top of page

After Effects Expressions: Master 5 Essentials for Motion Designers

  • Aug 3
  • 5 min read

Updated: Aug 4

After Effects Expressions: Master 5 Essentials for Motion Designers


Cover image expression blog

After Effects Expressions: Master 5 Essentials for Motion Designers


Expressions in Adobe After Effects are the ultimate time-saver for motion designers. They allow you to automate repetitive tasks, eliminate unnecessary keyframing, and create dynamic, professional animations.

In this complete guide, we’ll cover five essential After Effects expressions that every motion designer should know:


  1. loopOut() – Repeat animations endlessly

  2. time – Automatic continuous motion

  3. wiggle() – Organic random movement

  4. valueAtTime() – Delayed & offset animations

  5. linear() – Remap values dynamically


Each section will cover:


  • What is this expression?

  • How to use it (step-by-step)

  • Full examples and code blocks with original details

  • Use cases and pro tips


1. loopOut() – Repeating Animations

What is loopOut()?


The loopOut() expression allows you to automatically repeat your keyframed animation without manually duplicating keyframes.

  • Perfect for infinite loops

  • Creates seamless cycles

  • Supports multiple loop types for different motion styles


How to use loopOut()

  1. Animate a property (Position, Rotation, Scale) with at least 2 keyframes.

  2. Alt (Windows) / Option (Mac) + Click the stopwatch to enable expressions.

  3. Type the expression:

    loopOut("cycle")

  4. Press Enter. Your animation now loops infinitely.


Original Data (Full Details)


loopOut(type = "cycle", numKeyframes = 0)
Example: loopOut("pingpong")

  • Loops your keyframes endlessly

  • Types: "cycle", "pingpong", "offset", "continue"

  • Use Case: Repeating bounces, pulses, etc.


Loop Types Explained:


1. cycle (default)

  • Repeats animation from first to last keyframe, then jumps back.

  • Motion is continuous and seamless.

  • Example: A bouncing ball repeats A → B → C → back to A → repeat.

2. pingpong

  • Animation plays forward, then backward like a pendulum.

  • Example: A ball moves left → right → left → right infinitely.

3. offset

  • Adds the difference between first and last keyframes to each loop.

  • Motion progresses instead of resetting.

  • Example: A sliding layer keeps moving right continuously.

4. continue

  • Extrapolates motion beyond the last keyframe using its speed & direction.

  • Example: A rotating object continues spinning at the same rate forever.


Numeric Modifier Example


loopOut("pingpong", 2)
  • Only loops the last 2 keyframes.


Pro Tip:

  • Great for LED blinking, bouncing loops, pendulum swings, and walking cycles.


2. time – Constant Animation Over Time

What is the time expression?


The time expression returns the current comp time in seconds, letting you animate without keyframes.

  • Ideal for continuous motion: spinning, moving, scaling, fading.


How to use time

  1. Select a property (e.g., Rotation).

  2. Alt/Option + Click the stopwatch.

  3. Enter:

    time * 100

  4. The property now animates automatically over time.


Original Data (Full Details)


Expression: time * value
Or, in practice:
time * 100

Supported Properties:

  • Rotation (degrees)

  • Position (pixels)

  • Scale (percent)

  • Opacity (percent)

  • Anchor Point (pixels)


Examples:

  • time * 100 on Rotation → Spins infinitely

  • time * 200 on Position X → Moves 200px/sec to the right

  • time * 0.5 on Scale → Grows 0.5% each second

  • time * 10 on Slider → Increases 10 units/sec


Summary Table:

Property

Works with time*N?

Example Result

Rotation

Spinning layer

Position

Moves across screen

Scale

Layer grows/shrinks

Opacity

Fades automatically

Anchor Point

Moves anchor point

Effect Numeric

Effect value increases

Text/Checkbox

Not numerical


Advanced Techniques

1. Change Speed


time * 100         // 100 units/sec
time * (360 / 5)   // 1 full rotation in 5 sec

2. Stop After 3 Seconds


if (time < 3) {
  time * 100;
} else {
  300;
}

3. Step Animation


posterizeTime(3);
time * 100;

4. Slider Control


time * effect("Slider Control")("Slider");

5. Smooth Ease


A more advanced Control - Easy in and Easy out with slider.


startAngle = 0;
endAngle = 360;
startTime = 0;
endTime = 3;

t = clamp(time, startTime, endTime);
ease(t, startTime, endTime, startAngle, endAngle);

Pro Use Cases:

  • Spinning wheels, moving backgrounds, continuous UI effects.


3. wiggle() – Random Organic Motion

What is wiggle()?


The wiggle() expression generates smooth random motion over time.

  • Perfect for camera shakes, light flickers, natural jitter.


How to use wiggle()

  1. Select a property (Position, Rotation, Scale).

  2. Alt/Option + Click the stopwatch.

  3. Enter:

    wiggle(frequency, amplitude)

  4. The property now moves randomly.


Original Data (Full Details)


wiggle(frequency, amplitude)

Example: wiggle(3, 50)
  • Moves randomly 3 times/sec with 50px or 50° variation.

  • Use Case: Add natural motion with zero keyframes.

Advanced Tips:

  • Link to sliders for dynamic control:


wiggle(effect("Frequency")("Slider"), effect("Amplitude")("Slider"))
  • Combine with posterizeTime() for stop-motion jitter.

Pro Use Cases:

  • Handheld camera simulation

  • Flickering neon lights

  • Wiggling icons or shapes


4. valueAtTime() – Delayed & Offset Animations

What is valueAtTime()?


The valueAtTime() expression retrieves a property’s value at a specific time, enabling:

  • Delays

  • Follow-the-leader animations

  • Echo/trail effects


How to use valueAtTime()

  1. Animate a leader layer.

  2. Select a follower layer → enable expressions.

  3. Use:


thisComp.layer("Main Shape").position.valueAtTime(time - 0.2)
  • Follower lags 0.2 seconds behind leader.


Original Data (Full Details)


baseDelay = 0.2; // base delay per follower
leader = thisComp.layer("Main Shape"); // name of the leader layer
// Calculate delay by (layer index - leader index)
delay = baseDelay * (index - leader.index);
leader.position.valueAtTime(time - delay)

How to Make Follower Delays Automatic with Layer Index


Use the layer’s index to calculate delay automatically.

  • Duplicate followers → Each duplicate automatically delays more.


Example Expression (Position of All Followers):


baseDelay = 0.2; // base delay per follower
leader = thisComp.layer("Main Shape"); // leader layer
delay = baseDelay * (index - leader.index);
leader.position.valueAtTime(time - delay)

How this works:

  • Each new duplicate increases index → Delay grows automatically (0.2, 0.4, 0.6…)


Other Approaches:

  • Slider Control Approach:

    delay = effect("Delay Slider")("Slider"); thisComp.layer("Ball").position.valueAtTime(time - delay)

    • Manual but interactive control.


  • Reference Layer Above:

    thisComp.layer(index-1).position.valueAtTime(time-0.2)

    • Delay stacks as duplicates follow each other.


Duplicating Layers Notes:

  • Duplicates inherit the same expression.

  • Using index-based delay ensures automatic progressive delay.


Pro Use Cases:

  • Trailing particles

  • Snake-like motion

  • Echo effects & motion trails


5. linear() – Remap One Range to Another

What is linear()?


The linear() function maps one range of numbers to another, useful for:

  • Slider-driven controls

  • Audio-reactive effects

  • Custom rigs without re-keyframing


How to use linear()

  1. Apply Slider Control to a layer.

  2. Alt/Option-click the property’s stopwatch.

  3. Enter:


s = linear(effect("Scale Controller")("Slider"), 0, 100, 50, 200);
[s, s]

Original Data (Full Details)


linear(effect("Slider")(1), 0, 100, 50, 200)
  • Maps slider 0–100 → scale 50–200%.

  • Example:

    • Slider 0 → 50% scale

    • Slider 100 → 200% scale

    • Slider 50 → 125% scale

Pro Use Cases:

  • Map audio amplitude to scale

  • Custom slider-driven rigs

  • Procedural effects with no keyframes


Final Thoughts


By mastering these five essential expressions:

  • loopOut() → Endless loops

  • time → Automatic animation

  • wiggle() → Organic randomness

  • valueAtTime() → Delayed followers & trails

  • linear() → Map ranges dynamically


You will save hours of work, create professional motion graphics, and design flexible animation systems in After Effects.


bottom of page