ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Static random numbers

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Hampus Lideborg
Static random numbers
on Dec 13, 2019 at 5:47:46 pm

Hello!
I'm currently setting up a project where I want to give the the objects just a random wiggle on the position and rotation. It's stop motion so I'm posterizing the time on the wiggle to get a nice effect. However I want the values to shift just a tiny bit.

Currently what I'm using is this

posterizeTime(1.3)
wiggle(2,5)


But what I'd like to do is this

x = random number between .8 - 1.5 that is static and gives me a new one everytime i copy/paste to a new layer
y = random number between .5 - 2 that is static and gives me a new one everytime i copy/paste to a new layer
z = random number between 2 - 5 that is static and gives me a new one everytime i copy/paste to a new layer

posterizeTime(x)
wiggle(y,z)


So I really just want to simplify my workflow with not having to go in to each expression and change the values just a tiny bit to get a nice variation in the animation.

Thanks!


Return to posts index

Andrei Popa
Re: Static random numbers
on Dec 13, 2019 at 6:32:43 pm

Try this:

seedRandom(index, false);
x = random(0.8,1.5);
y = random(0.5,2);
z = random(2,5);
posterizeTime(x);
wiggle(y,z);


Andrei
My Envato portfolio.


Return to posts index

Andrei Popa
Re: Static random numbers
on Dec 13, 2019 at 6:50:19 pm

I'm sorry. You should pass true as an argument to seedRandom. So this should work:


seedRandom(index, true);
x = random(0.8,1.5);
y = random(0.5,2);
z = random(2,5);
posterizeTime(x);
wiggle(y,z);


Andrei
My Envato portfolio.


Return to posts index


Hampus Lideborg
Re: Static random numbers
on Dec 16, 2019 at 3:30:55 pm

This did it!
Thank you so much!


Return to posts index

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