Activity › Forums › Adobe After Effects Expressions › Pulse Opacity
-
Pulse Opacity
Posted by Tom Andersson on September 11, 2012 at 6:34 pmSo…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
Christoph Heimer replied 9 years, 10 months ago 5 Members · 6 Replies -
6 Replies
-
Darby Edelen
September 11, 2012 at 7:25 pmf=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
-
Dan Ebberts
September 11, 2012 at 7:25 pmLike this maybe:
freq = 1;
50*(1 + Math.cos(time*freq*Math.PI*2))Dan
-
Christoph Heimer
September 15, 2016 at 10:48 amCool! How can I adjust the expression so that it pulsates from 100 to 50 in value, instead of 100 to 0 ?
-
Christoph Heimer
September 15, 2016 at 10:50 amfigured it out, thanks!
freq = 1;
50*(2 + Math.cos(time*freq*Math.PI*1))
Reply to this Discussion! Login or Sign Up