Skip to main content
New Participant
January 22, 2021
Question

How to create a time delayed movement in one axis only.

  • January 22, 2021
  • 3 replies
  • 1291 views

Hi.

I have a comp with over 200 layers and I'm trying to have them drop down, in the y axis only, following the first layer which is key framed.

They all have different positions in the x and z axis that needs to stay the same.

Imagine a floor of tiles where each tile drops vertically into place following the first tile and with a fixed time delay between each tile.

I found this expression which works well for the time delay but its moving all the tiles to the same end position.

Any help would be greatly appreciated.

 

delay = 5; //number of frames to delay d = delay*thisComp.frameDuration*(index - 1); thisComp.layer(2).position.valueAtTime(time - d)

 

Many thanks

Casey

This topic has been closed for replies.

3 replies

moscottAuthor
New Participant
January 27, 2021

Hi Guys - thanks for the responses.

 

I gave both suggestions a try and couldn't quite get them to do what I was after - probably just my ingnorance of expressions and impatience to learn 🙂

 

However - I did work this out - which does the job for me -

 

First I separated the postions values, then I applied this expression to the Y axis on all layers except my keyframed master

 

thisComp.layer(index-1).transform.yPosition.valueAtTime(time - .2)

 

Seems to do the trick 🙂

P.M.B
Brainiac
January 23, 2021

Sounds like a perfect job for Rift, a pay-what-want plug-in for AE.  This is an incredibally useful plug-in so i would encourage to pay at least something if you can.  I highly siggest watching the the tutorials that are on the same page where you get the plug-in although if you're able to intuitively figure it out, more power to you.  Link below/

https://aescripts.com/rift/

~Gutterfish
Adobe Expert
January 23, 2021

I would base the position change and animation on the layer in point and add the ease(t, tMin, tMax, value1, value2) calculation. Time minus the layer in point will give you a starting value for "t" of zero so ease(t, 0, .5, -200, 0) would give you a layer that starts 200 pixels above the current Y position and moves down in 1/2 second. 

 

Here's the expression in full:

 

start = time - inPoint;
t = start / thisComp.frameDuration;
yMove = - 400;// movement in Y
yMove = ease(t, 0, 20, yMove, 0); // move for 20 frames
[value[0], value[1] + yMove]

 

I divided the accumulating start time by the frame duration of the comp so that I could enter the number of frames I wanted to use for the move in the Ease or EaseIn calculation.

 

Now all you have to do is Sequence the layers and they will all fall into place. 

 

If you want the layers to start at the same time and drop in one at a time then you can use the layer index as a timing device. Simply multiply the time in frames you want to offset the move and subtract that from the layer's in-point time. 

 

I hope you followed that. 

 

To modify your existing expression so that you can have different X positions for every layer all you have to do is separate dimensions. The master layer would be on the bottom. Each successive layer above it will have the move start 10 frames after the layer below starts to move.

delay = 10; //number of frames to delay 
d = delay*thisComp.frameDuration*(index); 
followLayer = thisComp.layer(index + 1).position.valueAtTime(time - d);
[value[0], followLayer[1]]

All layers will have the same Y values, but each can have its own X value.

 

If you want different X and Y values for each layer then you'll have to calculate the difference between the position of each layer and use that. Moves based on in points and a distance are a lot easier. I have about 50 animation presets that I have created for different moves for Dynamic Text Animations (Lyric Videos). All I do is set the hero or resting position of each layer, then set the in and out point for the layers so they move in and out of frame automatically. Using those presets I can create a lyric video without setting a single keyframe. I would have to fiddle a bit to come up with that expression.