After Effects Wiggle Expression Explained

The wiggle() expression in Adobe After Effects is a powerful built-in code snippet used to generate smooth, randomized motion without manually setting keyframes. This article provides a comprehensive overview of how the wiggle expression works, explains its core syntax, and breaks down all five parameters you can use to control its frequency, magnitude, and complexity.

What is the Wiggle Expression?

The wiggle expression generates pseudo-random procedural noise (Perlin noise) over time. It can be applied to virtually any animatable property with numerical values, such as Position, Rotation, Scale, and Opacity. Instead of moving purely at random from frame to frame, the wiggle expression creates organic, natural fluctuations that oscillate smoothly around the layer's original property value.

The Full Wiggle Syntax

While most animators only use two values, the complete syntax for the wiggle expression accepts up to five parameters:

wiggle(freq, amp, octaves, amp_mult, t)

By default, After Effects assigns pre-set values to the final three parameters if they are not explicitly typed, which is why the shortened wiggle(freq, amp) syntax works in most workflows.

Parameter Breakdown

1. Frequency (freq)

  • Required: Yes
  • Data Type: Number
  • Description: Defines how many times per second the property will change or oscillate. A frequency of 1 means the value shifts roughly once every second, while a frequency of 10 creates rapid, jittery movement ten times per second.

2. Amplitude (amp)

  • Required: Yes
  • Data Type: Number
  • Description: Dictates the maximum amount the property can deviate from its original, keyframed value. For example, if applied to a Position property with an amplitude of 50, the layer can drift up to 50 pixels in any direction from its starting point.

3. Octaves (octaves)

  • Required: No (Default: 1)
  • Data Type: Integer
  • Description: Controls the level of detail or complexity in the noise by layering additional frequencies over the base movement. Increasing this to 2 or 3 adds smaller, higher-frequency vibrations on top of the broader movement, resulting in a more chaotic or rough motion path.

4. Amplitude Multiplier (amp_mult)

  • Required: No (Default: 0.5)
  • Data Type: Number (typically between 0 and 1)
  • Description: Determines how much influence each additional octave has over the previous one. A value of 0.5 means each subsequent layer of noise has half the amplitude of the one before it. Higher values make the secondary noise layers much more pronounced.

5. Time (t)

  • Required: No (Default: time)
  • Data Type: Number
  • Description: Represents the time sample used to evaluate the noise function. By default, it uses the current composition time (time). Replacing this with a fixed value or an altered time variable allows you to freeze the wiggle, offset its timing, or control the speed of the motion dynamically.

Standard Implementation Examples

  • Basic Motion: wiggle(3, 30) Moves 3 times per second with a variance of 30 units, using default noise detail.

  • Detailed, Trembling Motion: wiggle(1, 40, 3, 0.7) Creates a slow overall drift (1 time per second) up to 40 units, but with 3 octaves of noise and a 0.7 multiplier, adding a distinct secondary tremble.

  • One-Dimensional Wiggle (e.g., X-axis only):

    w = wiggle(5, 50);
    [w[0], value[1]];

    Applies the wiggle exclusively to the horizontal X-axis while keeping the vertical Y-axis locked to its original value.