motion graphics eXchange
top

Wiggle, rubber, bounce, throw, inertia expressions

No thumbnail available
These expressions save so much time, you might get home earlier tonight just by reading this.
After Effects CS3
Useful things
Expressions

Views: 41054
Permalink
visit |  share this  error? 
"If you've ever animated these sorts of things manually, you'll know what I mean. Most will need to be tweaked to your specific needs, but it's just a matter of playing with the numbers a little, and understanding how they'll change your animation."

Jumpy Wiggle 1 makes wiggle skip and hold rather than move fluidly.
// Jumpy Wiggle 1 (moves at a random FPS)
v=wiggle(5,50);
if(v < 50)v=0;
if(v > 50)v=100;
v
Jumpy Wiggle 2 is similar to 1, but works at a defined FPS so your "jump" will happen at a regular pace.
// Jumpy Wiggle 2 (moves at a defined FPS)
fps=5; //frequency
amount=50; //amplitude
wiggle(fps,amount,octaves = 1, amp_mult = 0.5,(Math.round(time*fps))/fps);
Inertial Bounce is like making your moves "rubbery." Layers will overextend, then settle into place on position and rotation keyframes.
// Inertial Bounce (moves settle into place after bouncing around a little)
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);
amp = .05;
freq = 4.0;
decay = 2.0;
value + v*amp*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t);
}else{
value;
}
Sometimes you just want something to move constantly without keyframing it. Use throw.
// Throw (move at a constant speed without keyframes)
veloc = -10; //horizontal velocity (pixels per second)
x = position[0] + (time - inPoint) *veloc;
y = position[1];
[x,y]
Same as throw, but for rotation.
// Spin (rotate at a constant speed without keyframes)
veloc = 360; //rotational velocity (degrees per second)
r = rotation + (time - inPoint) *veloc;
[r] 
by Chris Wright


(Min. Version: After Effects CS3, Category: Useful things, Type: Expressions)
posted by vfx007 on Oct 10, 2009

 

Related topics:

Lightwrap in After Effects

Thumbnail for: Lightwrap in After Effects
This brief tutorial covers the compositing technique of light wrapping.
After Effects CS4
Keying
Video-/Tutorials

Views: 453
Permalink
posted by jamie on Jan 13, 2012

Lightwrap Preset

Thumbnail for: Lightwrap Preset
This is a preset that you can use on green screen footage or just general compositing.
After Effects CS5
Keying
Presets (ffx)

Views: 340
Permalink
posted by jamie on Jan 13, 2012

3D Cube Creator

Thumbnail for: 3D Cube Creator
This script is used to create a 3d cube. You can later replace the different sides and spin the null around for easy animation.
After Effects CS3
3D
Scripts (jsx)

Views: 2412
Permalink
posted by MicGyver on Nov 11, 2011


 

 

follow us on http://twitter.com/mgxchangeget in touch on facebook

 

 

motion graphics eXchange - Get The Search Engine