Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Sequentially start animation

  • Sequentially start animation

    Posted by Daniel Remler on May 4, 2014 at 9:49 am

    Hey there,
    I have a stack of layers – say 5 circles – that are all animating the same way. For example, they all should scale up from 0 to 100%.
    The idea is, to have them start each with a delay, so they appear sequentially. My idea would be to create a “Control Null” with a slider for and pickwhip the scale of each layer to it. I’ve already added the inertial bounce expression. So far, so good – all layers pop up as they should. Now, how can I have them start sequentially?

    If anyone has an idea that would be great!

    Cheers. Dan

    amp = .1;
    freq = 2.0;
    decay = 2.0;
    n = 0;
    if (numKeys > 0){
    n = nearestKey(time).index;
    if (key(n).time > time){
    n--;
    }}
    if (n == 0){ t = 0;
    }else{
    t = time - key(n).time;
    }
    if (n > 0){
    v = velocityAtTime(key(n).time - thisComp.frameDuration/10);
    value + v*amp*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t);
    }else{value}

    Dan Ebberts replied 12 years, 4 months ago 3 Members · 4 Replies
  • 4 Replies
  • George Goodman

    May 5, 2014 at 1:47 pm

    Since you’re doing scale, add the inertial bounce expression to only one layer (we’ll call it “layer1” in the example). Then add the expression below to all the other scale values. Shrink the the number in ‘time-1’ to shorten the delay or enlarge it to lengthen. Remember, if you click on the scale property after you’ve added the expression below, you can copy the expression and paste it to all the layers so you don’t have to manually go into each one.

    thisComp.layer("layer1").transform.scale.valueAtTime(time-1)

    “|_ (°_0) _|”

    Sincerely,

    George

    http://www.vimeo.com/georgegoodman
    http://www.linkedin.com/in/georgefranklingoodman

  • Daniel Remler

    May 13, 2014 at 12:42 am

    Thanks for that, George!
    Does this expression also work for other properties (e.g rotation, positition etc…)?

    Cheers!

  • Daniel Remler

    May 13, 2014 at 12:57 am

    I just tried this as well on a shape layer. In this instance, I have a shape layer with various groups which I want to fade in one after another. I amended the expression to the one below and applied it to all shape layer groups except the first one (which has got the opacity keyframes). Unfortunately they all fade in at the same time after the delay.

    Also, is there a way to randomize the sequence (think “lights of a city skyline switch on”)

    Cheers.
    Dan

    thisComp.layer("Lights Back Outlines").content("Group 1").transform.opacity.valueAtTime(time-0.5)

  • Dan Ebberts

    May 13, 2014 at 1:22 am

    For random timing, try something like this:

    minDelay = .1;
    maxDelay = .7;
    seedRandom(index,true);
    delay = random(minDelay,maxDelay);
    thisComp.layer(“Lights Back Outlines”).content(“Group 1”).transform.opacity.valueAtTime(time – delay)

    Dan

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