Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions An expression to offset an animation over time over several layers O.o

  • An expression to offset an animation over time over several layers O.o

    Posted by Efisio Scanu on July 16, 2012 at 6:30 pm

    Hi everyone.

    I have one hundred clips of the same playback, done by one hundred different people in a close up.
    What I need to do is to keep the first clip for like 10 frames and then move to the next and so on.

    I would like to do this with an expression, so that I could try different lengths of the clips without spending a month in Adobe Premiere, but after a day of research and many tries I’ve found out I’m too dumb for this…

    My idea was to set a little animation with the opacity (0 to 100 and 100 to 0) for the first clip, and then find a way to offset the same animation for all the other layers based on the layer number.

    Has anyone any idea on how to do this? Or any other idea on how to get the same result in any other way?

    Thank you in advance.

    Maxette

    Efisio Scanu replied 13 years, 10 months ago 2 Members · 3 Replies
  • 3 Replies
  • Dan Ebberts

    July 16, 2012 at 7:55 pm

    One way would be to add a null named “controls” at the bottom of your layer stack. Add a slider to the null with the number of frames you want each clip to play. Make sure all your clips have time remapping enabled with the out point of each layer extended as necessary so that it will be visible when it is time for that layer to play.

    Add this time remapping expression:


    frames = Math.round(thisComp.layer("controls").effect("Slider Control")("Slider"));
    f = timeToFrames(time)%frames;
    framesToTime(f)

    and this opacity expression:


    frames = Math.round(thisComp.layer("controls").effect("Slider Control")("Slider"));
    myStart = (index-1)*frames
    myStop = index*frames;
    f = timeToFrames(time);
    if (f >= myStart && f < myStop) 100 else 0

    to each layer. That should get you close.

    Dan

  • Efisio Scanu

    July 16, 2012 at 9:03 pm

    Thank you very very very much, it is working… almost.

    There is just a little problem. All the clips starts from the beginning, instead of continuing where the previous left.

    Did I messed something up?

    Maxette

  • Efisio Scanu

    July 16, 2012 at 9:10 pm

    Sorry, found the problem.
    I simply don’t need the time remapping part.

    Works like a charm!!!

    Thank you again.

    Maxette

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