FORUMS: list search recent posts

Opacity ease from 0-100 but with random timing

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Ronny Young
Opacity ease from 0-100 but with random timing
on Jun 1, 2014 at 9:41:37 pm

Hey all,

I've looked for a few expressions on here to fix my scenario.. some come really close but I'm not savvy enough to get it to work.

I have a grid of separate boxes, I want each one to fade in and out for a predetermined amount of time. Say fade 12 frames in, hold 100 opacity for a random range of frames, and then fade to 0 over 12 frames to hold for another random range of frames. I'd like the timing of when they're 100% visible and when they're 0% visible to randomly change.

Basically the fades are predetermined but the final value timings are randomly generated. The final piece will be 30 secs if it helps. Any ideas you crazy awesome geniuses?

Best regards,
Ronny


Return to posts index

Dan Ebberts
Re: Opacity ease from 0-100 but with random timing
on Jun 2, 2014 at 4:09:06 pm

Maybe something like this:


minHold = 24; // min hold frames
maxHold = 40; // max hold frames
fade = 12; // fade frames

seedRandom(index,true);
t = t0 = 0;
hold1 = minHold;
f = fade*thisComp.frameDuration;
while (t <= time){
hold1 = Math.round(random(minHold,maxHold))*thisComp.frameDuration;
hold2 = Math.round(random(minHold,maxHold))*thisComp.frameDuration;
t0 = t;
t += f*2 + hold1 + hold2;
}

t1 = t0 + f;
t2 = t1 + hold1;
t3 = t2 + f;

if (time < t1)
linear(time,t0,t1,0,100)
else if (time < t2)
100
else if (time < t3)
linear(time,t2,t3,100,0)
else
0;



Dan



Return to posts index

Ronny Young
Re: Opacity ease from 0-100 but with random timing
on Jun 2, 2014 at 7:54:38 pm

Dan, THANK YOU so much. You truly are a life saver, there's no way I would have been able to write that. Thank you a million times over.

Best regards,
Ronny


Return to posts index

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