RSS Feed
Jun 16

Elastic Snap Expression

Posted on Friday, June 16, 2006 in After Effects, Expressions
Here is a keyframe-less X postion animation, using an elastic snap style movement.

The timing is easily defined by placing a marker on your layer (asterisk key).

I’ve made several crude inclusions for varying wobble amounts based on distance traversed and transition time. I’m no coder or mathmetician, so suggestions are always welcome! And don’t forget the marker!

Also, I must credit much of the Trigonometry to Dan Ebberts Physical Simulations section of motionscript.com. THE BEST expressions reference anywhere, and he’s a really nice guy.

displace = 600 ; //user enters # of pixels to move

startBounce = marker.key(1).time;
speedFactor = 1 + (startBounce – inPoint) ;
veloc = (displace / 50) / speedFactor ;
amplitude = ( displace / 3) / speedFactor;
decay = 3;

t = time – startBounce;

if (t
}else{

x = amplitude*Math.cos(veloc*t)/Math.exp(decay*t)-amplitude;

value + linear(time , 0, startBounce, 0, displace) + [ x , 0 ];

}

  • Share/Bookmark

Bring on the comments

  1. HUBOGOSS says:

    Very nice ! thnaks !

Leave a Reply

You must be logged in to post a comment.