Live Video Editing Classes Start

Live Video Editing Classes Start Apply Now
Limited Time Offer EZEDIT All Course - Yearly Membership Plan at Only 7999 Rs. | Offer End in

5 Powerful Expressions That Make After Effects Animations Effortless

5 After Effects Expressions That Will Transform Your Motion Graphics Workflow | AE Tips
Adobe After Effects · Motion Graphics

5 Powerful Expressions That Make After Effects Animations Effortless

Motion Design Beginner–Intermediate Copy-Paste Ready

Here's a question every motion designer quietly wrestles with: why spend forty minutes manually tweaking keyframes when four lines of code can do it in four seconds?

After Effects Expressions are JavaScript-based commands you attach to layer properties — position, scale, opacity, source text — and they literally tell your layers how to behave on their own. No plugin. No third-party tool. Just native AE power that most beginners walk right past.

In this guide, we're cutting straight to the five expressions that deliver the most visible impact with the least learning curve. Whether you're building social media content, corporate explainers, or full broadcast packages, these will change your workflow permanently.

01

The Bounce Expression

Best for: Scale · Position · Rotation

Nothing 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.

bounce.js — Apply to any animated property
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; }
VariableWhat it controlsSuggested range
ampHeight of each rebound0.02 – 0.15
freqHow many bounces occur2 – 6
decayHow quickly it settles3.0 – 8.0
Pro tip For a heavy, slow-settling feel (like a falling rock), try amp = 0.03, freq = 2, decay = 3. For something light and snappy (like a notification badge), use amp = 0.08, freq = 5, decay = 7.
02

The Wiggle Expression

Best for: Position · Rotation · Opacity

Wiggle is arguably the most used expression in the entire After Effects ecosystem — and with good reason. It introduces randomized, perpetual movement to any property, which is perfect for simulating a handheld camera feel, making floating UI elements breathe, or adding organic instability to stagnant compositions.

The syntax is elegantly simple: wiggle(frequency, amplitude). Two numbers, infinite creative applications.

wiggle.js — Apply to Position for camera shake
wiggle(1, 50);
// wiggle(frequency, amplitude)
// frequency = times it changes per second
// amplitude = how far it moves (in pixels)

For a slow, dreamy camera drift, use wiggle(0.5, 20). For intense shaky-cam handheld energy, push it toward wiggle(8, 80). If you want to confine the wiggle to only horizontal movement, wrap it in an array: [wiggle(2,30)[0], value[1]].

Creative use Apply wiggle to a Null Object's position, then parent all your scene layers to that Null. Now the entire scene shakes as one unit — exactly like a physical camera.
03

Squash & Stretch Expression

Best for: Scale (on icons, shapes, text layers)

Squash and stretch is one of the 12 classic principles of animation, and it exists because our eyes instinctively read volume preservation as physical reality. When an object squashes on impact and stretches on release, our brains register it as real. This expression automates that physics for you.

Apply it to the Scale property of any layer. It works especially well on app icons, bullet points, logo reveals, and UI button states.

squash-stretch.js — Apply to Scale property
maxDev = 13;   // max pixel deviation
spd    = 30;   // speed of oscillation
decay  = 1.0; // how fast it calms down
t = time - inPoint;
x = scale[0] + maxDev * Math.sin(spd * t) / Math.exp(decay * t);
y = scale[0] * scale[1] / x;
[x, y];
Common error fix If AE throws "expression result must be of dimension 2, not 1" — make sure you're applying this to a 2D Scale property (the X/Y scale), not a 1D property like Opacity. The final [x, y] output requires a 2-value dimension.

Increase spd for faster, more elastic wobble. Increase decay to shorten how long it jiggles. Tweak maxDev to control how extreme the squash/stretch ratio gets.

04

Motion Tail Expression

Best for: Position (with duplicated layers)

This one feels like actual magic the first time you see it work. The Motion Tail creates a cascading stream of echoes that trail behind a moving object — the same technique used in energy burst effects, racing speed lines, and ghost-trail logo reveals.

The setup requires two steps and one duplication pass. First, animate your lead layer's position normally. Then apply the expression below to the Position property of that layer (and all its duplicates), and a separate opacity expression to fade them out naturally.

motion-tail-position.js — Apply to Position
delay = 5; // frames of delay between each echo
d = delay * thisComp.frameDuration * (index - 1);
thisComp.layer(1).position.valueAtTime(time - d);
motion-tail-opacity.js — Apply to Opacity
opacityFactor = .75; // falloff per layer (0–1)
Math.pow(opacityFactor, index - 1) * 100;

Once both expressions are applied, duplicate the layer with Ctrl+D / Cmd+D around 5–8 times. Each copy automatically reads the lead layer's position at a staggered delay, while the opacity expression makes each successive echo progressively fade out.

Pro tip Reduce the opacityFactor below 0.6 for a faster fade that feels more like a speed blur. Increase delay to 10+ frames for a ghost-trail feel with longer persistence.
05

Auto Timer Expression

Best for: Text Layer → Source Text

Need a live countdown or count-up clock in your video — one that auto-syncs to your composition's timeline without a single keyframe? This expression builds a fully formatted HH : MM : SS : MS timer that updates every frame automatically.

Create a new Text Layer and apply the expression directly to the Source Text property (hold Alt/Option and click the stopwatch icon). The timer starts ticking the moment your composition plays from frame zero.

timer.js — Apply to Source Text of a Text Layer
// Break time into readable units
var hour = Math.floor((time / 60) / 60);
var min  = Math.floor(time / 60);
var sec  = Math.floor(time);
var mili = Math.floor(time * 60);

// Clean up overflow values
if (mili > 59) { mili = mili - sec * 60; }
if (mili < 10) { mili = "0" + mili; }
if (sec  > 59) { sec  = sec  - min  * 60; }
if (sec  < 10) { sec  = "0" + sec;  }
if (min  >= 59) { min = min   - hour * 60; }
if (min  < 10) { min  = "0" + min;  }
if (hour < 10) { hour = "0" + hour; }

// Output formatted string
hour + ' : ' + min + ' : ' + sec + ' : ' + mili;
Countdown vs count-up This expression counts up from zero. To turn it into a countdown, wrap the time variable: replace time with (yourDuration - time) where yourDuration is your target in seconds — e.g., for a 60-second countdown use (60 - time).

Style your text layer with a monospace or bold display font to make the numbers pop. Because the expression updates on every single frame, you get a perfectly smooth, broadcast-accurate timer with zero manual keyframing.

Start Using Expressions Today

Every one of these five expressions is copy-paste ready and works in After Effects CS6 through the current Creative Cloud release. Start with Wiggle — it's the gentlest entry point — and work your way through to Motion Tail once you're comfortable reading what the code is doing.

↑ Back to expressions

Leave a Comment

Your email address will not be published. Required fields are marked *

×

Someone just purchased:

🎉 Custom Package



0
    0
    Your Cart
    Your cart is emptyReturn to Shop
    Scroll to Top