The Bounce Expression
Best for: Scale · Position · RotationNothing communicates energy like a good bounce. When an element lands and physically rebounds, viewers feel it — it communicates weight, speed, and intention all at once. Doing this manually means stacking ease curves until your eyes glaze over.
The Bounce Expression reads your existing keyframes and automatically adds oscillating damping physics after the last keyframe fires. All you have to do is create two keyframes (say, moving a box from left to right), paste the expression on that property, and watch it come alive.
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 && t < 1) { v = velocityAtTime(key(n).time - thisComp.frameDuration / 10); amp = .06; // bounce height freq = 3; // oscillations per second decay = 5.0; // how fast it settles value + v * amp * Math.sin(freq * t * 2 * Math.PI) / Math.exp(decay * t); } else { value; }
| Variable | What it controls | Suggested range |
|---|---|---|
| amp | Height of each rebound | 0.02 – 0.15 |
| freq | How many bounces occur | 2 – 6 |
| decay | How quickly it settles | 3.0 – 8.0 |