ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Expression for pausing an animated object at certain intervals

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
jakob skote
Expression for pausing an animated object at certain intervals
on Jun 16, 2019 at 9:31:55 am

Hi, I'm animating a map of London's tube network. I have a shape layer with paths of all the various tube routes, and small red dots symbolizing the actual trains that use these paths for their positions.

It would look much nicer if they stopped at certain intervals, as if they are stopping at a station, instead of moving continuously. I could ofc animate this manually by adding keyframes, but that would take ages. Adding the trains and the routes have already taken far too much time.

Is there an expression for doing e.g. "Every 15th frame = pause for 5 frames"?

Parenting them to a main layer, or animating the time of the whole sequence, wouldn't work since then they would all stop at the same time, which would look odd.

Thanks a lot for the help!


Return to posts index

Dan Ebberts
Re: Expression for pausing an animated object at certain intervals
on Jun 16, 2019 at 4:59:15 pm

Maybe something like this, plus some randomization so the don't all move at the same time/spped:

runFrames = 15;
pauseFrames = 5;
f = timeToFrames(time);
seg = Math.floor(f/(runFrames+pauseFrames));
phase = f%(runFrames+pauseFrames);
totalRunFrames = seg*runFrames + Math.min(phase,runFrames);
valueAtTime(framesToTime(totalRunFrames));


Dan



Return to posts index

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