Activity › Forums › Adobe After Effects Expressions › Random Scale Expression
-
Random Scale Expression
Posted by Riccardo Sinti on May 20, 2007 at 5:15 pmWhat is an expression to randomly scale a layer uniformly in x and y?
I want the layer to randomly scale every 3 frames between 50% and %150.
Chris Cameron replied 10 years, 8 months ago 5 Members · 6 Replies -
6 Replies
-
Lord Scales
May 20, 2007 at 5:52 pmTry this Dan Ebberts tutorial: Random Pan and Scale:
https://www.motionscript.com/mastering-expressions/random-3.html
Lord Scales
-
Dan Ebberts
May 20, 2007 at 9:59 pmSomething like this maybe:
frame = Math.round(time/thisComp.frameDuration);
seed = Math.floor(frame/3);
seedRandom(seed,true);
s = random(50,150);
[s,s]Dan
-
Dan Ebberts
June 22, 2010 at 9:26 pmLike the expression earlier in this thread except random scale y only? Like this:
frame = Math.round(time/thisComp.frameDuration);
seed = Math.floor(frame/3);
seedRandom(seed,true);
s = random(50,150);
[value[0],s]Dan
-
Chris Cameron
August 19, 2015 at 12:08 pmSorry… reviving this old thread again.
This expression worked perfectly for me, except I’m wondering whether there’s a way to randomize the frame hold number?
So instead of the 3 in seed = Math.floor(frame/3); there would be a range from 3 – 10, or something like that.
Thanks!
frame = Math.round(time/thisComp.frameDuration);
seed = Math.floor(frame/3);
seedRandom(seed,true);
s = random(50,150);
[s,s]
Reply to this Discussion! Login or Sign Up