After Effects Bouncing Ball Masterclass

Physics, Graph Editor, and Expression Automation

Every motion designer starts with the same exercise: The Bouncing Ball. But while most treat it as a simple keyframe practice, true professionals understand that within this simple sphere lies the entire universe of animation theory — gravity, friction, elasticity, and the Disney 12 Principles.

In this masterclass, we go far beyond basic software instruction, diving deep into the physics of motion, advanced Graph Editor techniques, and the JavaScript expression that automates a full physics engine.



Part 1: The Three Laws of Physical Motion

1. Gravity and Acceleration

When a ball falls, gravity accelerates it. When it rises, gravity decelerates it. At the apex, velocity momentarily reaches zero. This dramatic speed contrast is what creates the visual sense of weight and gravity.

2. Energy Loss Per Bounce

Every collision with the floor dissipates energy. Design your bounces to progressively lose height:

BounceHeightAir Time
1st100%10 frames
2nd70%8 frames
3rd40%6 frames
4th20%4 frames

3. The Moment of Collision

The instant before and after floor contact is the moment of maximum velocity.

⚠️ Critical Warning: Never apply Easy Ease to the floor contact keyframe. Softening this moment destroys the kinetic impact. The floor contact keyframe must remain strictly Linear.


Part 2: Disney’s 12 Principles — Applied

Timing vs. Spacing (Conveying Weight)

  • Timing: Total frames of the bounce arc → Heavy bowling ball (fast timing, few bounces) vs. ping-pong ball (longer air time, many micro-bounces)
  • Spacing: Frame interval → Tight at the apex (slow), wide just before impact (fast gravitational acceleration)

Arcs (The Trajectory of Nature)

Nothing in the natural world moves in straight lines. The ball’s travel path must form a flawless parabolic arc. Any angular break in the trajectory will be immediately perceived as unnatural by the viewer.

Slow In and Slow Out

Use the Graph Editor Bezier handles at the apex to spread the curve wide horizontally — maximizing “hang time” as gravity briefly loses its grip.

Squash & Stretch (Material and Mass)

MomentFormScale XScale Y
High-speed fallStretched vertically~85%~120%
Floor impactSquashed flat~120%~80%

Volume Preservation Law: If Scale Y drops to 80%, Scale X must rise to approximately 120% to maintain the object’s total visual mass. Failing to do this creates a physically impossible shrinking effect. Also, fine-tune Y Position at the squash frame so the ball’s base remains perfectly flush with the floor — not floating above it.


Part 3: Mastering the Graph Editor

The Golden Rule: Separate Dimensions

Before touching the Graph Editor, right-click Position → Separate Dimensions.

  • X-axis (Horizontal): Smooth, steady forward momentum with gradual friction deceleration
  • Y-axis (Vertical): Sharp, gravity-driven parabolic curves
Graph TypePrimary UseShape at Floor Contact
Value GraphSculpt the exact parabola shape for Y-axisSharp “V” at impact
Speed GraphConfirm velocity explosion at impactAggressive vertical spike

⚠️ Short Bounce Warning: In micro-bounces of 5 frames or fewer, applying 85%+ Influence causes frame-skipping teleportation. Reduce Influence to 60–70% for these final settling frames.

Keyframe Precision Nudging

Use Alt + Arrow Keys to move keyframes one frame at a time — eliminating the accidental drift that occurs with mouse dragging.


Part 4: Professional Detail Enhancements

  1. Null Object Rigging: Never apply Squash & Stretch, Rotation, and Position to the same layer. Parent the Ball layer to a Null Object — let the Null own the Position trajectory while the Ball layer exclusively handles Scale deformations and Rotation.
  2. Cinematic Motion Blur: Go to Ctrl+K > Advanced > Shutter Angle. Increase from the default 180° to 360° or even 720° to create long, dramatic blur streaks during the fastest phases of the fall.
  3. Friction Deceleration: Apply Shift + F9 (Ease In) to the final horizontal keyframe on the X-axis to simulate the ball gradually grinding to a stop.

Part 5: Physics Expression — Infinite Bouncing Automation

For complex scenes requiring multiple animated balls or dynamic physics, manually keyframing every bounce is impractical. Use this JavaScript expression to generate perfectly calculated, infinitely decaying bounces automatically.

Alt + Click the stopwatch on Position and paste:

// Advanced Gravity and Elasticity Bouncing Physics
e = 0.7; // Elasticity coefficient (0 = no bounce, 1 = infinite)
g = 5000; // Gravitational acceleration constant
n = 0;

if (numKeys > 0){
  n = nearestKey(time).index;
  if (key(n).time > time) n--;
}

if (n > 0){
  t = time - key(n).time;
  v = velocityAtTime(key(n).time - .001);
  vv = v[1];
  h = .5*g*t*t - vv*t;
  pos = value + [0,h];

  while (pos[1] > value[1]){
    vv = vv*e;
    t_hit = 2*vv/g;
    t -= t_hit;
    h = .5*g*t*t - vv*t;
    pos = value + [0,h];
  }
  pos;
} else {
  value;
}
VariableMeaningAdjustment
e = 0.7Elasticity (bounce decay)0.9 = rubber ball · 0.2 = medicine ball
g = 5000Gravitational forceHigher = heavier, faster fall

Part 6: The Master’s Library

ResourceWhy It Matters
The Animator’s Survival Kit (Richard Williams)The animation bible — definitive theory on timing, spacing, and weight
School of MotionPremier global motion design education platform
Video CopilotHigh-end VFX-integrated motion tutorial library
Motion Design SchoolAdvanced expression coding and Graph Editor workflows on YouTube

The bouncing ball is not a task to be completed — it is a discipline to be practiced. By separating dimensions, sculpting the Value and Speed graphs, integrating expression-driven physics, and rigorously applying volume preservation in Squash & Stretch, you elevate your work from mere moving pixels to living, breathing motion design. Keep iterating, keep adjusting those Bezier curves, and never stop studying the physical world around you.

Leave a Comment