Activity › Forums › Adobe After Effects Expressions › Opacity Sine Rhythm
-
Opacity Sine Rhythm
Posted by Neal Barenblat on July 29, 2010 at 2:28 pmHey all – I need to have a layer’s opacity go from 0% to 100% repeatedly in a sine-wave fashion. What expression would I use for this? Thanks!
Navarro Parker replied 11 years, 11 months ago 3 Members · 4 Replies -
4 Replies
-
Dan Ebberts
July 29, 2010 at 5:59 pmThis should get you started:
freq = 1; // 1 cycle per second
50*(1 – Math.cos(freq*time*Math.PI*2))Dan
-
Navarro Parker
August 28, 2014 at 8:45 pmHey Dan,
Would there be a way to get it to hang a smidge more at the peak and valley of the sine wave?
It’s because of my transfer modes and contrast of the image, it’s not looking as graceful as I want. Looks somewhere between linear interpolation and sine.
-
Dan Ebberts
August 28, 2014 at 9:19 pmYou could add an ease to it like this:
freq = 1; // 1 cycle per second
val = 50*(1 – Math.cos(freq*time*Math.PI*2));
ease(val,0,100,0,100)Dan
Reply to this Discussion! Login or Sign Up