Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Random value for many layers

  • Random value for many layers

    Posted by Hans Meier on March 12, 2008 at 11:13 am

    Hi,

    I would have loved to find the answer to my questions by searching the forums, but I don’t know what to search for! 😉

    So – I have 30 layers, each one with the same effect expecting a random value. I used for every layer the same expression (numgen=random(20,80); ).

    While working I realized that I maybe have to adjust the random area in the future. So I thought about creating a Slider Expression Control on an Adjustment Layer and assigning the expression to it and link all the layers to the Adjustment Layer. But then all my Layers receive the same random value.

    Is there a way to control the expression at a single place and giving all the layers their own random value?

    Thanks in advance!

    Lloyd Alvarez replied 18 years, 2 months ago 3 Members · 2 Replies
  • 2 Replies
  • Sébastien Périer

    March 12, 2008 at 11:48 am

    Have you tried to randomize the random with seedRandom(index,true)

    You can try to assign “index” (it’s the value that changes the random) as the actual index of the target layer, so each layer will have a random seed different, thus having different random values.

  • Lloyd Alvarez

    March 12, 2008 at 3:24 pm

    Leave the expression on the layers and only tie the random values to a slider expression on a Null, like this:

    min=thisComp.layer(“Null 1”).effect(“Random Min”)(“Slider”);
    max=thisComp.layer(“Null 1”).effect(“Random Max”)(“Slider”);
    numgen=random(min,max);

    -Lloyd

    https://aescripts.com

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