Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Random numbers for each layer

  • Random numbers for each layer

    Posted by Topher Blair on March 22, 2017 at 10:38 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

    Topher Blair replied 9 years, 5 months ago 2 Members · 2 Replies
  • 2 Replies
  • Kevin Camp

    March 22, 2017 at 11:01 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

  • Topher Blair

    March 23, 2017 at 1:01 am

    That did it! Thank you

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy