Alternate Blinking Layers in After Effects

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.

Tags: , ,

2 Responses to “Alternate Blinking Layers in After Effects”

  1. Brad Chmielewski Says:
    July 29th, 2009 at 9:52 am

    Seems like a useful expression thanks for sharing. Fee like I need to start to using more expressions in my work.

  2. nathan Says:
    July 29th, 2009 at 10:01 am

    Thanks 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.

Leave a Reply