After Effects

Advanced Motion Graphics in After Effects: Math, Expressions & Rigs

Unlock parametric animation rigs, complex expression math, and procedural motion design.

Why Expressions Outperform Manual Keyframing in Complex Rigs

Manual keyframing breaks when a client requests a change in timing or text length. By writing procedural JavaScript expressions in After Effects, you build self-adapting animation systems that automatically adjust padding, timing, and velocity based on master slider controls.

Top 4 Production Expressions Every Animator Must Know

  • Linear Interpolation (Remapping):
    linear(time, inPoint, inPoint + 0.5, 0, 100); — Animates values from 0 to 100 over the first half-second of a layer regardless of where it is trimmed.
  • Auto-Sizing Text Box (SourceRectAtTime):
    var s = thisComp.layer("Text").sourceRectAtTime(); [s.width + 40, s.height + 20]; — Creates a background shape that dynamically resizes as text changes.
  • Inertial Bounce & Decay: Computes smooth physical damping without creating extra keyframes.
  • LoopOut Duration Cycling: loopOut("cycle"); — Loops background texture motion infinitely.

Building Master Slider Control Rigs

Create a dedicated Null Layer named [MASTER_CONTROLS]. Add Expression Controls > Slider Control and Color Controls. Link multiple layers to these sliders so global changes (like color theme or animation speed) update across the entire project in one click.

3D Camera Rigging with Two-Node Controllers

Never animate raw After Effects camera positions directly. Create a 3D Camera, parent it to a 3D Null Object named [Camera_Orbit], and animate the Null's rotation and position to achieve silky smooth, gimbal-lock-free orbital moves.

Download Advanced Expression Rigs

Get ready-to-use After Effects expression templates, auto-resizing text boxes, and camera controllers.

Download Expression Rigs

Frequently Asked Questions

Simple mathematical expressions execute in microseconds. However, avoid running heavy 'sampleImage()' expressions on 4K layers across hundreds of frames.

Always select the modern 'JavaScript' expression engine under Project Settings rather than the legacy 'Legacy ExtendScript' engine for faster calculation speeds.