ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Offset keyframes randomly

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Hannes Paulsson
Offset keyframes randomly
on Sep 8, 2011 at 10:13:47 am

Hi!

I have a comp with 256 different precomps (made another thread about this project a few days ago).
All of these comps needs to rotate on the y-axis to 180 degrees. The thing is I don't want them all to rotate at the same time, it is supposed to look random. What I have done is to animate the rotation on all of the precomps at the same time, and what I'm looking for is an expression that I could add that would offset these animations randomly by about 10 frames. I cannot offset the comps them self in time, since they all contains an animation that needs to be sync.

I think this should be quite simple, just a short expression on the rotation value?


Return to posts index


Dan Ebberts
Re: Offset keyframes randomly
on Sep 8, 2011 at 1:18:24 pm

Try this:

maxOffset = 10; // frames
seedRandom(index,true);
offset = framesToTime(random(maxOffset));
valueAtTime(time-offset)


Dan



Return to posts index

Hannes Paulsson
Re: Offset keyframes randomly
on Sep 8, 2011 at 1:23:44 pm

Awesome, works like a charm!

Thanks again Dan!


Return to posts index


Stuart Paciej
Re: Offset keyframes randomly
on Apr 1, 2020 at 2:03:51 pm

Ancient post here but I just found it and wondered how you would make this behavior offset a loopOut expression?

Adding it at the end just overrides the offset expression.

maxOffset = 10; // frames
seedRandom(index,true);
offset = framesToTime(random(maxOffset));
valueAtTime(time-offset);
loopOut("cycle");

Hope you see this, and thanks!


Return to posts index

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