ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

How can I randomize a linear expression?

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
David Cabestany
How can I randomize a linear expression?
on Oct 19, 2017 at 10:18:07 pm

How can I make this expression below start its thing after the 4 second mark but with a few random frames of difference on each layer?
I'm using the index to add some variation, but as the index number grows the output decreases and it does not look ok.

m=thisComp.layer("NULL CONTROL 2").effect("mult")("Slider");
t=time;
if
(t&lt;4)
{
100}
else
linear(t,4/(index/m),5,100,0)
;






Return to posts index

Dan Ebberts
Re: How can I randomize a linear expression?
on Oct 19, 2017 at 10:25:46 pm

Something like this maybe?

seedRandom(index,true);
tStart = 4 + random(.5);
dur = random(.9,1.1);
linear(time,tStart,tStart+dur,100,0)


Dan



Return to posts index

David Cabestany
Re: How can I randomize a linear expression?
on Oct 19, 2017 at 11:21:16 pm

Exactly that and much cleaner code. Thanks a lot Dan.


Return to posts index

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