ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Random numbers for each layer

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Topher Blair
Random numbers for each layer
on Mar 22, 2017 at 10:38:37 pm

Hi,
I'm trying to have many layers all rotating at random speeds, between time*20 and time*40, around a single point. I need to be able to tell each layer to pick a random number between 20 and 40 and stick to it throughout the timeline. Is there an expression to make that happen?

Thanks


Return to posts index

Kevin Camp
Re: Random numbers for each layer
on Mar 22, 2017 at 11:01:07 pm

you can use seedRandom() to set the random seed, and also make it 'timeless' (so it doesn't keep generating random numbers).

try this:

seedRandom( index, timeless = true );
rate = random( 20, 40 );
time * rate


Kevin Camp
Art Director
KCPQ, KZJO & KRCW


Return to posts index

Topher Blair
Re: Random numbers for each layer
on Mar 23, 2017 at 1:01:02 am

That did it! Thank you


Return to posts index

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