Inertial Bounce
can be put on the scale, position ... and creates this bounce as when a ball hit the ground

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/15);
amp = .05;
freq = 4;
decay = 8;
value + v*amp*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t);
}else{
value;
}

Watch Out for some reason, the enter (=go to next line) are replaced by ? sign that is not understood by AE, so be sure to delete the ? mark to have the expression working

Add twice the effect "Slider Control", call one "freq" and the other "amount"

When you add the wiggle expressions, connect the amount to "amount" and the frequency to the other one:
wiggle(effect("freq")("Slider"), effect("amount")("Slider"))

Now you can keyframe the sliders and start and stop and manipulate the wiggle.

Uploaded 2,367 Plays0 Likes0 Comments

It is applied to the OPACITY of the layer. It picks a random number for the opacity value the layer only some of the time, based on whether another random number ("probability") is less than or equal to 1. You can change the likelyhood of a random opacity being selected by changing the value of "probability."

The rest of the time the opacity is set to the value of "opacity_normal" which is set to 100 by default.

This concept be easily adaptable to other times when you only want something to happen some of the time by using the if...else operators. For example - you could apply something similar to the position or rotation of a layer and it would hop around some of the time.
//applyTo: opacity
// HIGHER values for probability make a random opacity LESS likely.
// A value of 1 will always create a random opacity, a value of 2 will
// create a random opacity 50% of the time, value of 4 will be 25%, etc.

probability = 6;
// "opacity_normal" is the value set for opacity when the a random opacity is NOT chosen.
opacity_normal = 100;
x = random(probability);
if (x);

A library of After Effects expressions to make animation easier. If you have any expression you would like to see in the channel, drop me a mail and I should do something about it.

Heads up: the shoutbox will be retiring soon. It’s tired of working, and can’t wait to relax. You can still send a message to the channel owner, though!