FORUMS: list search recent posts

Pulse Opacity

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Tom Andersson
Pulse Opacity
on Sep 11, 2012 at 6:34:14 pm

So...I suddenly got stuck! :(

All I needed was the most simple expression to make the opacity of a layer pulsate smoothly over a given time in a sinus-like-way.

It seems so simple, but I`m not man enough to figure it out.
Anyone?

/tom


Return to posts index

Darby Edelen
Re: Pulse Opacity
on Sep 11, 2012 at 7:25:39 pm

f=1;
s=Math.sin (f * time * Math.PI * 2);

The above will give you values ranging from -1 to 1 'f' times per second. If you want to remap the output then I recommend the linear() function:

linear (s, -1, 1, 0, 100);

The 2nd and 3rd arguments (-1 and 1) are the input range and the 4th and 5th (0 and 100) are the output range that 's' is remapped to linearly. Try changing these numbers around to clip the pulse in interesting ways.

Darby Edelen


Return to posts index

Dan Ebberts
Re: Pulse Opacity
on Sep 11, 2012 at 7:25:48 pm

Like this maybe:

freq = 1;
50*(1 + Math.cos(time*freq*Math.PI*2))


Dan



Return to posts index


Tom Andersson
Re: Pulse Opacity
on Sep 11, 2012 at 11:17:35 pm

Thanks a bunch!!!
Works like a charm.


Return to posts index

Nathan Soliz
Re: Pulse Opacity
on Dec 10, 2013 at 5:57:04 pm

Works wonders, glad this was here.


Return to posts index

Christoph Heimer
Re: Pulse Opacity
on Sep 15, 2016 at 10:48:06 am

Cool! How can I adjust the expression so that it pulsates from 100 to 50 in value, instead of 100 to 0 ?



Return to posts index


Christoph Heimer
Re: Pulse Opacity
on Sep 15, 2016 at 10:50:29 am

figured it out, thanks!

freq = 1;
50*(2 + Math.cos(time*freq*Math.PI*1))



Return to posts index

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