ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Random Wiggle Opacity from 100% to 0%

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Kuba Lu
Random Wiggle Opacity from 100% to 0%
on Jun 19, 2013 at 5:02:15 pm

Hi guys,

I have a picture of a night cityscape with loads of buildings. I basically need to switch of all the lights in the city. The scene is 12 seconds long and the lights need to go off randomly throughout the whole city. I masked all the windows (and there are hundreds and hundreds of them) and I'm trying to figure out how to do the job without doing it manually.

Does any of you know an expression that would randomly change the Mask Opacity from 100% to 0%?

I found few expressions that make the layers blink but I couldn't find any that would knock down the opacity to 0 and make it stay there.

Thanks!

Kuba


Return to posts index

Dan Ebberts
Re: Random Wiggle Opacity from 100% to 0%
on Jun 19, 2013 at 5:14:37 pm

Something like this should work:

wiggle(1,100) < 100 ? 0 : 100


Dan



Return to posts index

Kuba Lu
Re: Random Wiggle Opacity from 100% to 0%
on Jun 19, 2013 at 5:18:14 pm

It still makes it flicker

hmm...


Return to posts index


Dan Ebberts
Re: Random Wiggle Opacity from 100% to 0%
on Jun 19, 2013 at 5:23:50 pm

sorry, I misunderstood. Try this one:

seedRandom(index,true);
if (time > random(thisComp.duration)) 0 else 100


Dan



Return to posts index

Kuba Lu
Re: Random Wiggle Opacity from 100% to 0%
on Jun 19, 2013 at 5:30:26 pm

Jeez !!!

That works. Thanks so much Dan!

Do you know if it's possible to change the opacity across 4 frames so it fades out ?

Cheers !

Kuba


Return to posts index

Dan Ebberts
Re: Random Wiggle Opacity from 100% to 0%
on Jun 19, 2013 at 5:37:52 pm

This should work:

seedRandom(index,true);
t = random(thisComp.duration);
ease(time,t,t+thisComp.frameDuration*4,100,0)

Dan



Return to posts index


Kuba Lu
Re: Random Wiggle Opacity from 100% to 0%
on Jun 20, 2013 at 9:21:51 am

You're a genius !


Return to posts index

Reynoud van der M
Re: Random Wiggle Opacity from 100% to 0%
on Feb 26, 2018 at 5:10:06 pm

Hi Dan,

I saw the incredible handy expression you created for Kuba, and I used for a similair project with a skyline and a bunch of layers.
Now the project is evolving and I was wondering, since I am fairly new to expressions in AE, is there a easy add to let the opacity wiggle between 100% and 0% at multiple random moments.
So to more clear: it would not just turn on or off once, but sometimes it would turn on and some times it would turn on, randomly. Or if it is easier with an predetermined frequency I can alter?

Kind Regards,

Reynoud
Studio NOUD


Return to posts index

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