ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Automatically generate different timeless random numbers on the same layer

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Andrew Jehan
Automatically generate different timeless random numbers on the same layer
on May 10, 2020 at 11:44:56 pm
Last Edited By Andrew Jehan on May 11, 2020 at 3:39:49 am

If I want After Effects to automatically generate a different timeless random numbers on each instance of a duplicated layer, I know how to do that by referencing the index. For example:

seedRandom (index, true);
random (10)

What I want to do is similar to that, but I need the different random numbers to be generated in duplicated effects on the same layer.

Obviously, using 'index' won't produce different random numbers between the duplicated effects because the layer number will be the same for all instances of the effect.

(For those who want to know why I need this, I'm using a particle plugin called Stardust, and each of the different Stardust effects on the same layer work together in 3D space. If I put any of the elements on a different layer, I will lose the 3D link between them. I need to duplicate a particular effect dozens of times, and I want it to be able to automatically generate a different wiggle for each. I don't want to have to edit the expressions in all of them, partly because I will probably want to go back a few times and make changes to the first instance and then re-duplicate the others. )

Any ideas?

Thanks!


Return to posts index

Richard Garabedain
Re: Automatically generate different timeless random numbers on the same layer
on May 11, 2020 at 9:43:40 pm

cant you have a list of numbers that 1 wiggle expresssion will work on?


Return to posts index

Andrew Jehan
Re: Automatically generate different timeless random numbers on the same layer
on May 11, 2020 at 10:42:34 pm

Thanks for your response, but I don't understand your suggestion. Can you elaborate or give an example?

Thanks again!


Return to posts index


Darby Edelen
Re: Automatically generate different timeless random numbers on the same layer
on May 13, 2020 at 6:16:59 pm

You'd need to replace 'index' with something like:

thisProperty.propertyGroup().propertyIndex

This is somewhat complicated by the fact that if the property you're applying the expression to is inside multiple 'property groups' then you may need to put a different integer inside the call to propertyGroup(). If the property sits directly under the effect then the above will work, if it's inside another property group on the effect then you'd need propertyGroup(2) and if it's two groups down you'd need propertyGroup(3).

Darby Edelen


Return to posts index

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