ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Sequencing layers with expression

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Mike Powell
Sequencing layers with expression
on Apr 16, 2018 at 11:19:42 pm

Hi All -

This is my first post on Creative Cow but this site has been an indispensable source of information for as long as I can remember. My question is regarding sequencing layers with expressions, specifically how to change the delay period between layers in an increasing or decreasing fashion.

I use Dan Ebberts expression below all the time (thanks Dan!) to sequentially move or scale multiple layers with one set of keyframes. What I can't do is have the delay for each layer change, so while I can ease the keyframes as desired, the delay between layers (i.e. 5 frames) is linear.

I tried keyframing the delay which kind of works but it seems to actually shorten the duration of the animation over time. Is there a way to modify this expression so that I can have the delay between layers be non-linear? In case i'm not explaining this well (which I'm probably not) I'm trying to accomplish something similar to this script: https://aescripts.com/lazy but without keyframing each layer.

Any suggestions?

delay = 5; //number of frames to delay

d = delay*thisComp.frameDuration;
thisComp.layer(index - 1).scale.valueAtTime(time - d)


Return to posts index

Dan Ebberts
Re: Sequencing layers with expression
on Apr 17, 2018 at 6:29:20 am

You could calculate the delay based on the layer index, with something like this:

maxDelay = 10;
delay = easeIn(index,1,thisComp.numLayers,0,maxDelay);
d = framesToTime(delay);

You'll have to modify it if not all layers in the comp are participating and/or if you want a different max dealy.

Dan



Return to posts index

Mike Powell
Re: Sequencing layers with expression
on Apr 17, 2018 at 7:41:26 pm

Thanks Dan, this is super helpful! I really appreciate all that you do


Return to posts index


Alessandro Ugazio
Re: Sequencing layers with expression
on Apr 16, 2019 at 5:30:03 pm

Hi, I have a bunch of animated text layers, each one slipping out from its own tracking mask.
In order to delay animation by layer index, how can I exclude all masks from index count (or include the text layers only)?

(I prefer not to precompose layers)

Thanks a lot
Alessandro


Return to posts index

Kalleheikki Kannisto
Re: Sequencing layers with expression
on Apr 18, 2019 at 1:02:28 pm

Since track mattes would be between every second layer, you can just cut the delay amount in half, as your index will change by two between each text layer.

Kalleheikki Kannisto
Senior Graphic Designer


Return to posts index

Alessandro Ugazio
Re: Sequencing layers with expression
on Apr 18, 2019 at 2:32:48 pm

Yes, that's what I actually did :)


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2019 CreativeCOW.net All Rights Reserved
[TOP]