Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Delayed trail animation

  • Delayed trail animation

    Posted by Justin Lundy on May 1, 2024 at 6:16 pm

    I’m animating a series of vertical bars and trying to have them move in from either side of the frame and have them stop at specific points. The attached video is how I did by key framing each individual bar’s position property and staggering the layers. However, I’m trying to make it easier to customize the speed in which they animate in and out without messing with keyframes and staggering layers and all that jazz.

    For starters, I created a null with a slider control on the Y position property and used the following linear expression to have the center vertical bar animate in based on the null’s position slider and it works perfectly for that one.

    “var p1 = thisLayer.position;

    var p2 = thisComp.layer(“null”).position;

    var delta = sub(p1,p2);

    var distance = length(delta);

    ease(distance,0,540,[960,540],[2020,540]);”

    I tried a few different methods to get the other vertical bars to work – like valueAtTime – and that gets the delayed animation, but it ends up stopping in the same position as the center bar instead of next to it. I also tried just using the same above expression and making p2 = the center bar’s position property instead of the null’s position property, and that made it stop in the correct position, but overshot it and animated backwards.

    I’m lost and not sure where to go from here. Any suggestions or help? I also attached the AE project itself.

    Thanks!

    Justin Lundy replied 2 years, 2 months ago 2 Members · 3 Replies
  • 3 Replies
  • Justin Lundy

    May 1, 2024 at 6:59 pm

    UPDATE:

    I realized the variables I had in the linear expression are not actually necessary and have simplified the expression as follows:

    ease(thisComp.layer(“Effector”).effect(“Slider Control”)(“Slider”),25,540,[2020,540],[1114,540]);

    However, when I copy the expression and change the X position, everything animates in and stops in the correct spots, but they all animate in simultaneously. How can I delay the animations?

    Updated AE project attached.

  • Dan Ebberts

    May 1, 2024 at 7:41 pm

    I haven’t tested this at all, but basically I would modify the expressions so that they’d look like this one for your Right Outlines:

    delay = .1;
    myDelay = (thisComp.layer("Right Center Outlines").index - index)*delay;
    s = thisComp.layer("Effector").effect("Slider Control")("Slider").valueAtTime(time - myDelay);
    ease(s,0,540,[2020,540],[960,540]);

    It seems like you should also be able to automate the calculation of the destination position, based on the difference in layer index between the leader (Right Center Outlines for the ones on the right) and the follower, but I didn’t tackle that.

  • Justin Lundy

    May 1, 2024 at 7:47 pm

    Yeah, getting the indexes figured out is my next goal.

    Thanks Dan!

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