Forum Replies Created

Page 1 of 2
  • Simon Francois

    August 27, 2024 at 11:49 am in reply to: Rotation + Position + Anchor Point

    Ah no sorry, it does work! I do have a question though: what if the orientation of the square, instead of always going back to 0, stays coherent with the motion?

    I mean, for now, the plain colour does the trick, so we don’t see that the square goes back to 0° at every step it takes. But if the square contains content, you can see that trick and damages the effects. Any idea?

    I’m posting a preview since I’m not good at explaining well…

  • Simon Francois

    August 27, 2024 at 9:30 am in reply to: Rotation + Position + Anchor Point

    So to bother you all on that matter again. I was trying that expression again, but it doesn’t seem to work, although it did work perfectly a year ago. I just assume something has changed within After Effects.

    The error message I get is only on the Anchor Point expression, and says “ReferenceError: a is not defined”. Do you know where that could come from?

  • Simon Francois

    November 23, 2023 at 8:59 pm in reply to: Rubik’s cube expression

    Thank you Filip 🙏

  • Simon Francois

    November 16, 2023 at 1:57 pm in reply to: Rubik’s cube expression

    Here is another demo of what I’m trying to achieve.

    Here I chose a more obvious POV to see more clearly what is happening.

    I did it here “by hand” cheating with the help of editing multiple compositions in a row, but my goal is to have all that happening on one composition, and have an expression that randomizes the result and the color palette visible.

    Do you that can be achieve in After Effects through expressions?

  • Simon Francois

    November 15, 2023 at 11:45 am in reply to: Rubik’s cube expression

    Hello Hector, and thanks for your reply!

    Yes, I modified a camera so the perspective is almost gone, and the volumes are seen flat when looked from the front. This is for me a way to create sort of a surprise, since the viewer will first assume he is looking at a flat graphics, which will, by moving, reveal its depth. Not sure if is what you meant…

  • Simon Francois

    May 19, 2023 at 1:43 pm in reply to: Rotation + Position + Anchor Point

    Wow! Thanks a million Filip, it works like a charm!!

    Thanks again and again!!

  • Simon Francois

    January 22, 2023 at 6:59 am in reply to: Increase a value every time an event occurs

    Splendid!!! Thanks a lot Dan, this works like magic!

  • Simon Francois

    January 21, 2023 at 8:35 am in reply to: Increase a value every time an event occurs

    Thanks Dan!! Do you know why the whole row gets triggered instead of just one single square, as shown in the video attached?

  • Simon Francois

    January 20, 2023 at 11:01 pm in reply to: Increase a value every time an event occurs
    p = thisComp.layer("Target").position;
    animateFrames = 15;
    Hor = p.valueAtTime(0)[0] >= position[0];
    Ver = p.valueAtTime(0)[1] >= position[1];
    fCur = timeToFrames(time);
    f = 1;
    fSave = 0;
    n = 0;
    while (f <= fCur){
    if (Ver){
    if (p.valueAtTime(framesToTime(f))[1] < position[1] && p.valueAtTime(framesToTime(f))[0] < position[0]){
    Hor = false;
    Ver = false;
    }
    }else{
    if (p.valueAtTime(framesToTime(f))[1] >= position[1] && p.valueAtTime(framesToTime(f))[0] >= position[0]){
    n++;
    Hor = true;
    Ver = true;
    fSave = f;
    }
    }
    f++
    }
    r = 0;
    if (n > 0){
    r = (n-1)*90 + ease(fCur-fSave,0,animateFrames,0,90);
    }
    value + r
  • Simon Francois

    January 20, 2023 at 11:00 pm in reply to: Increase a value every time an event occurs

    Hi Dan, hi all, and tanks again for your help!

    Based on the expression you sent, I tried to go further, and extend it to a 9×9 grid go squares, with the element named “Target” wiggling all over it, so not one axis anymore.

    As you can see with the attachment, it does work somehow, but most of the times the whole row gets triggered, and, weirdly, only a chuck of a horizontal or vertical row…

    What I want to achieve now is, when approaching a square —let’s say when it is touching it (each saquer is 120×120 pixels, so once the target is nearing it by 60 pixels on X and Y), the square must spin 90} and retains that rotation value until they meet again and it can spin further.

    Here is what I wrote (please don’t mind):

    p = thisComp.layer("Target").position;
    animateFrames = 15;
    Hor = p.valueAtTime(0)[0] >= position[0];
    Ver = p.valueAtTime(0)[1] >= position[1];
    fCur = timeToFrames(time);
    f = 1;
    fSave = 0;
    n = 0;
    while (f <= fCur){
    if (Ver){
    if (p.valueAtTime(framesToTime(f))[1] < position[1] && p.valueAtTime(framesToTime(f))[0] < position[0]){
    Hor = false;
    Ver = false;
    }
    }else{
    if (p.valueAtTime(framesToTime(f))[1] >= position[1] && p.valueAtTime(framesToTime(f))[0] >= position[0]){
    n++;
    Hor = true;
    Ver = true;
    fSave = f;
    }
    }
    f++
    }
    r = 0;
    if (n > 0){
    r = (n-1)*90 + ease(fCur-fSave,0,animateFrames,0,90);
    }
    value + r
Page 1 of 2

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy