FORUMS: list search recent posts

Randomly freeze and skip value

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Noel Powell
Randomly freeze and skip value
on Dec 30, 2013 at 9:41:46 pm

Dan Ebberts has helped me with something similar in the past: http://forums.creativecow.net/readpost/227/20569

What I'm trying to accomplish now is a little different. Any guidance you can give me is greatly appreciated. I am looking to randomly change a value on every frame, but it needs to occasionally and randomly freeze the value for a random amount of time, then continue on changing on every frame. I have four Slider Controls which I would like to use to control the boundaries of randomness:

Minimum Play Time
Maximum Play Time
Minimum Freeze Time
Maximum Freeze Time

Instead of on a Time Remapping effect, this expression would go on the "Evolution" parameter of a Fractal Noise Effect. I'd like to have the value range from -30,000 to 30,000.

So to sum up, during the "Play Time", the Evolution value would be changing every frame using a function like "random(-30000,30000)". It would do this for a random number of frames (determined by the "Play Time" slider controls). Then, it would hold (freeze) a value for a random number of frames (determined by the "Freeze Time" slider controls). Then it would just continue playing, then freezing, then playing, etc.

Thanks.

After Effects templates - lens flares, light leaks, old film effects, digital glitches, VHS glitches, and more: http://CreationEffects.com


Return to posts index

Dan Ebberts
Re: Randomly freeze and skip value
on Dec 30, 2013 at 11:09:48 pm

Something like this should work:


if (time >= inPoint){
minPlay = .75;
maxPlay = 1.5;
minFreeze = .2;
maxFreeze = .7;
minVal = -30000;
maxVal = 30000;
t0 = inPoint;
seg = -1;
seedRandom(index,true);
while (t0 <= time){
seg++;
if (seg%2){
t0 += random(minFreeze,maxFreeze);
}else{
t0 += random(minPlay,maxPlay);
}
}
seedRandom(seg,seg%2);
random(minVal,maxVal)
}else
value



Just attach the play and freeze min and max to sliders.


Dan



Return to posts index

Noel Powell
Re: Randomly freeze and skip value
on Dec 30, 2013 at 11:51:04 pm

Brilliant. Works great. You're my hero, Dan. Thank you.

After Effects templates - lens flares, light leaks, old film effects, digital glitches, VHS glitches, and more: http://CreationEffects.com


Return to posts index

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