top of page

6 Essential After Effects Expressions Explained

Unlock the full potential of your animations with our comprehensive guide to After Effects expressions. Whether you’re a seasoned pro or just starting out, this tutorial will take you through the most powerful and essential expressions you need to elevate your motion graphics and visual effects.

Master 6 Essential Expressions for Motio

1. Smooth Continuous Rotation

This expression continuously rotates your layer without the need for keyframes.

jsx

Copy code

time * rotationSpeed;

 

Example:

jsx

Copy code

time * 50;

 

This rotates the layer at 50 degrees per second.

How to Modify:

  • rotationSpeed: Change the 50 to any other number to adjust the rotation speed. For instance, time * 100 makes it rotate faster.

Why Modify:

  • Use slower speeds (time * 10) for subtle rotation, like a slowly spinning logo.

  • Faster speeds work well for dynamic elements, such as a fast-spinning wheel or gear.

Tip: Link this expression to a Slider Control effect to easily adjust the speed from the effects panel without editing the expression.

 

2. Wiggle for Random Motion

The wiggle expression adds random movement to any property (position, rotation, scale, etc.).

jsx

Copy code

wiggle(frequency, amplitude);

 

Example:

jsx

Copy code

wiggle(5, 30);

 

This makes the layer move 5 times per second (frequency) within a 30-pixel range (amplitude).

How to Modify:

  • Frequency: Increase or decrease the first number to change how often the layer wiggles. For example, wiggle(2, 30); moves more slowly.

  • Amplitude: Adjust the second number to control the intensity of the wiggle. A value of wiggle(5, 5); will result in more subtle movement.

Why Modify:

  • A higher frequency (e.g., wiggle(10, 50);) is great for chaotic, jittery motion, like camera shake in an action scene.

  • Lower frequencies are perfect for smooth, floating effects, such as a gentle swaying motion on a leaf or background element.

Tip: Add a Slider Control for either frequency or amplitude so you can tweak it live in your composition without changing the expression itself.

 

3. Randomize for Variations

This expression generates random values within a specified range. It’s useful when you want to introduce variations in a property like position, scale, or color.

jsx

Copy code

random(minValue, maxValue);

 

Example:

jsx

Copy code

random([100, 300]);

 

This generates random values between 100 and 300, which could be applied to position, scale, or any other numerical property.

How to Modify:

  • minValue and maxValue: Replace [100, 300] with any range that suits your project. For example, random([50, 150]) would create a smaller range for variation.

Why Modify:

  • Randomizing properties like opacity (random([50, 100])) can add subtle variation to particles or repeated objects to make them feel more natural.

  • On position, randomization makes grids or arrays of objects look less mechanical.

Tip: For repeated objects like text, randomize rotation for dynamic titles or randomize scale for a more playful look.

 

4. Time-Based Animations

This expression links a property to the timeline, allowing it to change as time progresses, making it perfect for continuous motion.

jsx

Copy code

value + time * speed;

 

Example:

jsx

Copy code

position + time * 200;

 

This moves the layer 200 pixels per second.

How to Modify:

  • speed: Change 200 to any value that matches how fast you want the element to move. Slower speeds like time * 50 result in a more gradual shift.

  • property: Apply this to any property, such as opacity or scale. For example, you can use scale + time * 10; to have an object grow in size as time progresses.

Why Modify:

  • Apply to positions for scrolling text or endless backgrounds.

  • Apply to rotation to create smooth, continuous rotation tied to the timeline.

Tip: Add easing expressions to slow down or speed up the animation at specific points.

 

5. Center the Anchor Point

Automatically move the anchor point of a layer to its center for symmetrical transformations like scaling or rotating.

jsx

Copy code

[thisLayer.width / 2, thisLayer.height / 2];

 

How to Modify:

  • No need to modify the core expression itself, but you can adjust the anchor point manually for specific adjustments if the object is not centered by default.

Why Modify:

  • This expression is essential when you want consistent transformations from the center of the object. For example, scaling up or down from the center or rotating symmetrically around the middle of the layer.

Tip: If you need a different anchor point (not the center), you can adjust the values. For example, [thisLayer.width / 2, thisLayer.height / 3] will place the anchor point along the horizontal center but closer to the top vertically.

 

6. Bounce for Realistic Motion

This expression adds a realistic bounce to keyframed motion, perfect for making objects feel like they have weight and respond to gravity.

jsx

Copy code

amp = 30;

freq = 2;

decay = 5;

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 - thisComp.frameDuration/10);

    value + v*amp*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t);

  }

}

 

How to Modify:

  • amp: Controls how high the bounce is. A higher value like amp = 50 will result in a stronger bounce.

  • freq: Adjusts how many times per second the bounce oscillates. Higher values make the bounce more rapid.

  • decay: Controls how quickly the bounce loses energy. A higher value like decay = 8 makes the bounce slow down faster.

Why Modify:

  • Use this to make an object feel like it's bouncing to a stop, as if it has real-world physics applied to it.

  • Ideal for things like text drop-ins, where the text needs to land with a subtle bounce for added effect.

Tip: Play with the amplitude and frequency to match the bounce style to your scene—use low values for soft, subtle bounces or higher values for exaggerated impacts.

 

Final Thoughts

Each of these expressions can be modified to fit your specific animation needs, saving you hours of manual keyframing. By understanding the parameters and knowing how to tweak them, you can achieve everything from subtle, natural movements to dynamic, complex animations in After Effects.

These are must-have tools for anyone looking to speed up their workflow while maintaining creative control over their projects.

bottom of page