Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Offset position on 900 layers

  • Offset position on 900 layers

    Posted by Gon Perdigao on June 11, 2016 at 5:51 pm

    Hello, I have 900 layers that they animate from -5000Z axis to 0.
    I want to offset them by 5 frames, is there a fast and quick way of doing this?
    I remember that grey machine had a tutorial about this, but I can’t find it.

    Can anyone help me?

    Cheers

    Gon Perdigao replied 9 years, 11 months ago 2 Members · 4 Replies
  • 4 Replies
  • Dan Ebberts

    June 11, 2016 at 6:04 pm

    If you currently have them keyframed, you could add something like this to the position property:

    delay = (index-1)*framesToTime(5);
    valueAtTime(time-delay)

    Dan

  • Gon Perdigao

    June 11, 2016 at 6:26 pm

    Dan you are the best!!!!!

    Thanks so much for this.

    If I would and wanna add this expression to the animation // Inertial Bounce (moves settle into place after bouncing around a little)
    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);

    amp = .05;
    freq = 4.0;

    decay = 2.0;

    value + v*amp*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t);

    }else{
    value;
    }

    How could I do it?

    Cheers

  • Dan Ebberts

    June 11, 2016 at 8:27 pm

    Try this:


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

    Dan

  • Gon Perdigao

    June 14, 2016 at 8:47 am

    Dan, Thank you so much for your help!
    You just save my life.

    Cheers

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