amp = .05;

freq = 4.0;

decay = 2.0;// Play with these values to get the correct bounce you want

n = 0;

if (numKeys > 0){

n = nearestKey(time).index;

if (key(n).time > time){

n--;

}

}

if (n == 0){

t = 0;

}else{

t = time - key(n).time;

}

if (n > 0){

v = velocityAtTime(key(n).time - thisComp.frameDuration/10);// This is where the AMP FREQ and DECAY were originally

value + v*amp*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t);

}else{

value;

}

The values you want to play with are AMP, FREQ, and DECAY. They are kind of self-explanatory, but when you start playing with them some of them do unexpected things.

AMP (Amplitude): the larger the number the stronger the bounce.

FREQ (Frequency): basically how many bounces you get after the keyframe

DECAY: how long it takes for the bounces to die down.

I use it in all sorts of things, but this works really well to "fake" simulated dynamics. Contrary to typical fashion, if you use this expression, make the out keyframe linear and hard that way the bounce has some inertia from the motion.

EXPLORE MORE with these website that have a few other expressions that simulate motion like this:

www.bastiendelmare.com/experiment/my-favorites-ae-expressions/

http://www.motionscript.com/articles/bounce-and-overshoot.html

]]>AMP (Amplitude): the larger the number the stronger the bounce.

FREQ (Frequency): basically how many bounces you get after the keyframe

DECAY: how long it takes for the bounces to die down.

I use it in all sorts of things, but this works really well to "fake" simulated dynamics. Contrary to typical fashion, if you use this expression, make the out keyframe linear and hard that way the bounce has some inertia from the motion.

EXPLORE MORE with these website that have a few other expressions that simulate motion like this:

www.bastiendelmare.com/experiment/my-favorites-ae-expressions/

http://www.motionscript.com/articles/bounce-and-overshoot.html

1- Alt + Click the 2D position value

2- Pickwhip the 3D layer then add ".toComp([0,0,0]);"

thisComp.layer("3DLAYERNAMEHERE").toComp([0,0,0]);

If you've used **After Effects** for a small period of time, chances are you have come across the problem of trying to connect a 3D layer position with a 2D effect (like trying to connect the standard lens flare effect to a 3D null or something). Well this helps you solve that! Plot this expression in the 2D point and you're good!

I've found, however, that you can modify this expression to connect a 2D point with another 2D point! This works really well when you want something to follow something else (like maybe a puppet pin point to a controller null or something). Simply take out a "**,0**" and you'll end up with:

I've found, however, that you can modify this expression to connect a 2D point with another 2D point! This works really well when you want something to follow something else (like maybe a puppet pin point to a controller null or something). Simply take out a "

thisComp.layer("]]>2DLAYERNAMEHERE").toComp([0,0]);

It'll either

or

loopOut("one of the 3 options"),

loopIn("one of the 3 options"),

loopInDuration("one of the 3 options"),

loopOutDuration("one of the 3 options")

commands and their "ping pong", "cycle" and "continue" modes.

Personally, I almost always use **loopOut("[one of the 3 options]"). **What I'll do is key an animation for a property at the start of the timeline, then apply this expression. Easy peasy. I might use **loopOut("continue")** for linear actions, lets say for a rotation or **loopOut("cycle")** random animation that I want to keep going forever.

I learned a little more about the loop expression today. This blog post really explains this part really well. You can also determine how many keyframes you want to LOOP with the second value of the expression.

I learned a little more about the loop expression today. This blog post really explains this part really well. You can also determine how many keyframes you want to LOOP with the second value of the expression.

loopOut(type="cycle",numKeyframes=0);

Shinsuke's animation shows really well what this means. Also check out the Adobe help page about this expression and more.

]]>