Alternate Blinking Layers in After Effects
Posted by nathan | Filed under Tutorial
I was looking for a simple way to alternate 2 layers for a simple flapping cape animation.
I came across this expression to set a layer to blink. I figured out how to modify it for the effect I wanted.
Add the following expressions to opacity:
Layer 1
blinkSpeed = 2;
t = (Math.cos (blinkSpeed*time*Math.PI*2)+1)/2;
v = linear(t, 0, 1, 0, 1);
Math.round(v)*100
Layer 1
blinkSpeed = 2;
t = (Math.cos (blinkSpeed*time*Math.PI*2)+1)/2;
v = linear(t, 1, 0, 1, 0);
Math.round(v)*100
Notice the change to the “v=linear” number order.
I’m sure this is out there somewhere but I couldn’t find it.
2 Responses to “Alternate Blinking Layers in After Effects”
-
Brad Chmielewski Says:
July 29th, 2009 at 9:52 amSeems like a useful expression thanks for sharing. Fee like I need to start to using more expressions in my work.
-
nathan Says:
July 29th, 2009 at 10:01 amThanks Brad!
Expressions are great in AE. What I figured out today allowed me to create that animation in one composition rather than the three I was previously doing. It really simplifies things.
Expressions also allow me to use the analytical side of my brain along with my creative side.