 # Wiggle, rubber, bounce, throw, inertia expressions

Home / after fx / Wiggle, rubber, bounce, throw, inertia expressions

WIGGLE, RUBBER, BOUNCE, THROW

WIGGLE01

// Jumpy Wiggle 1 (moves at a random FPS)
v=wiggle(5,50);
if(v < 50)v=0;
if(v > 50)v=100;
v

WIGGLE02

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;
}

THROW

veloc = -10; //horizontal velocity (pixels per second)
x = position + (time – inPoint) *veloc;
y = position;
[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]

Auteur : Chris Wright site motion graphics exchange