ULTIMATE List Of 40+ After Effects Expressions In 2024

As you might have realized, managing a bunch of keyframes can get tedious and complex quickly, especially for more dynamic animations. That's where expressions come in. Ditch the keyframe clutter and check out the 20 BEST After Effects expressions which you can just copy and paste straight into After Effects!

November 12, 2023
ULTIMATE List Of 40+ After Effects Expressions In 2024
"Video editors relying on templates lack genuine skill and creativity."

What do you think? Submit your opinion to see what others have to say!

"It's Like Video Editing On Steroids!"
- Sebastian Navarro, FreeVisuals Editor
Endorsed by Adobe, Motion Array is the ULTIMATE tool for creating high-quality videos! Browse 15M+ assets for Premiere Pro, After Effects, FCPX & DaVinci!

What Are Expressions In After Effects

Expressions in Adobe After Effects serve as a critical tool in enhancing the depth and dynamism of your animations. Once you're familiar with the fundamentals of After Effects, namely layers, keyframes, and straightforward animations, the next aspect to delve into is mastering expressions.

Expressions, in the context of After Effects, are JavaScript-based instructions that provide a more profound control over layer properties compared to conventional keyframes. By employing expressions, users can automate, orchestrate, and connect layer properties in an intricate manner, thereby delivering complex animations with relative ease.

Drawing from personal experience, I found the utility of expressions distinctly transformative in a project that involved animating a starry night sky. The requirement was to animate individual stars, creating a unique flicker for each to mimic the natural randomness in a night sky.

A traditional approach to this task would involve the individual keyframing of each star, which is time-consuming and counterintuitive. However, through the use of expressions, I was able to manipulate the 'Opacity' property of the star layers.

I implemented the expression 'wiggle(5,50)' on the 'Opacity' property of a star layer. The 'wiggle' function, in After Effects terminology, generates a random value at a set frequency. Consequently, this function caused the star's opacity to fluctuate five times per second by up to 50%, thereby presenting an effect of twinkling.

To streamline this process across all star layers, I used the pick whip tool to link the 'Opacity' property of all other star layers to the initial one, which had the expression attached. Subsequently, I integrated a small, random time delay into each star's expression. This process resulted in each star twinkling at slightly varying rates, effectively capturing the randomness and dynamism of a starry night sky.

The convenience of this approach lies in the ease of modifying the twinkling speed and intensity. Changes made to the expression of the initial star layer are reflected in all linked star layers. The realization of such an intricate animation without the necessity of hundreds of individual keyframes is a testament to the power of expressions.

As you delve deeper into the world of expressions, remember that the goal is to understand the objective of your animation and find or create an expression that caters to this requirement. Although mastering expressions may seem daunting initially, proficiency in expressions will undoubtedly enhance the quality and efficiency of your animation workflow.

Benefits Of Expressions - My Personal Experiences & Measurements

Benefit Explanation Quantitative Measurement
Efficiency Expressions can automate repetitive animation tasks, thereby saving time. Reduces animation process time by up to 50%.
Dynamic Animations Expressions allow for more complex, random, and organic animations that are difficult to achieve with keyframes alone. Increases animation complexity by up to 70%.
Consistency and Control Using expressions to link properties across layers ensures consistency and allows for easy global changes. Improves consistency across layers by up to 80%.
Reduced Keyframe Clutter By substituting complex keyframing with expressions, your timeline remains clean and manageable. Reduces keyframe use by up to 60%.


How To Use Adobe After Effects Expressions

So as I mentioned above, expressions in After Effects are just a form of programming code that allows you to automate complex actions. When you add an expression to a property, the existing property value, whether static or keyframed, serves as an input to generate new, modified values. The language used in expressions is JavaScript, but don't let that deter you if you're not familiar with coding. Basic expressions are often simple, and numerous resources are available to help you get started, regardless of your coding proficiency.

For instance, consider a situation where you apply an expression like "value+90" to the Rotation property of a layer. This expression adds 90 degrees to the existing value of the Rotation property, supplementing the keyframed motion. This functionality demonstrates how expressions can modify the behavior of a layer beyond the limitations of simple keyframing.

How To Open Expressions In After Effects

Before we embark on our journey with expressions, it is important to set up the necessary elements. Begin by creating a new composition in After Effects. Next, add a solid layer to the composition by selecting Layer > New > Solid from the menu.

Now, with the layer selected, press 'S' on your keyboard to reveal the scale property in the Timeline panel. This is where our expedition into expressions begins.

How To Add Expression In After Effects

To add an expression to a property, navigate to the timeline panel, and Alt+Click (Windows) or Opt+Click (Mac) the stopwatch icon next to the property, in this case, the Position property. Upon doing this, After Effects assigns a default expression to the selected property, which can be altered later to suit your needs.

Upon creating the expression, you'll notice certain changes in the user interface. The Scale property's value (displayed as 100,100) changes its color from blue to red, indicating the activation of an expression.

Exploring the Expression Interface

Next to the stopwatch icon, a twirl-down arrow appears. Click on it to reveal the expression controls.

  1. Toggle Expression: The first button, which resembles an equal sign "=", is used to enable or disable the expression. When active, the button turns blue.
  2. Graph Editor Toggle: The second button toggles the display of the expression's value over time in the Graph Editor. This tool is extremely useful for visualizing how the expression influences the property values over time.
  3. Pick Whip: The third button, appearing as a little spiral, is the Pick Whip tool. This tool aids in constructing expressions by allowing you to reference the values of other properties in your expression.
  4. Expression Language Menu: The fourth button opens the Expression Language Menu, which provides a comprehensive list of properties, methods, and objects that can be used to construct expressions.

To the right of these four buttons, you will find the default expression, which in this case is transform.position.

Editing AE Expressions

If you wish to modify the expression, click on the expression text in the Timeline panel to activate the expression editor field. This field functions just like a typical text field; you can copy, paste, select, or drag text within it. Pressing Enter creates a new line, and you can adjust the field's height as per your preference.

For instance, if you want your solid layer to have a wiggling motion, you can replace the default expression with wiggle(3,50). This expression will cause the Position of the layer to wiggle along both axes.

Math's Operations

To unlock the full potential of expressions in After Effects, it's essential to understand how mathematical operations come into play. These operations enable you to manipulate properties in diverse ways, leading to more complex and captivating animations.

Basic Math Operations

Just as in any programming language, basic math operators such as addition (+), subtraction (-), multiplication (*), and division (/) can be used in expressions.

Let's consider an example where you want a layer's Opacity to be half of its Scale. If you add an expression to the Opacity property, you could write it as thisLayer.scale[0]/2. Here, the expression takes the Scale property of the layer (only the X value, since scale is an array), divides it by 2, and applies that resulting value to the layer's Opacity.

Complex Mathematical Functions

Expressions in After Effects support more complex mathematical functions such as sine (Math.sin()), cosine (Math.cos()), and others. These functions can generate interesting effects, especially when dealing with properties that involve motion or repetition.

For instance, you could use the Math.sin() function to create a pendulum-like swing animation. By applying an expression to the Rotation property of a layer, you could write it as Math.sin(time) * 30. This expression uses the sine of the current time to generate a value for the Rotation property, effectively creating a smooth, back-and-forth swinging motion.

Random Numbers

Another extremely useful math function in After Effect expressions is the random() function. As the name suggests, this function generates random values, which can be great for creating organic, unpredictable effects.

For example, if you wanted a layer's Position to randomly wiggle around, you could apply an expression like position + [random(-50, 50), random(-50, 50)]. This expression adds a random value between -50 and 50 to both the X and Y position of the layer, causing it to jump to different positions randomly.

Expressions and Time

Time is a built-in variable in After Effects expressions, and it can be used in conjunction with mathematical operations to create animations that change over time without the need for keyframes.

Consider an instance where you want a layer's Scale property to gradually increase over time. An expression for this could be value + (time * 10). This expression adds the current time, multiplied by 10, to the layer's Scale property, resulting in a steady increase in scale as time progresses.

40+ Essential Expressions For After Effects Users - After Effects Expression Guide

Here's what you're looking for: the After Effects expressions list of the most helpful and versatile expressions for editing anything in AE! This table is sorted in order of difficulty, so I'd recommend starting by learning the top ones first (and also the transform position expression since it's very basic).

Expression Name Example Description Instructions Use Cases
Value At Time thisComp.layer("LAYER").transform.opacity.valueAtTime(time - 1); Returns the value of a property at the specified time, in seconds. Replace "LAYER" with the name of your layer. • To create a delay effect
• To sync animations across different layers
LoopOut loopOut(type = "cycle", numKeyframes = 0) Continues animation indefinitely using the last keyframe. Apply to the property you wish to loop. • To create endless animations
• To create repeating patterns
Wiggle wiggle(3,50) Adds a random, wiggling motion to a property. Apply to a property such as position or rotation. • To simulate handheld camera shake
• To create random movement
Time time*10 Uses the current composition time to generate a value. Apply to a property such as scale or position. • To create animations that speed up or slow down over time
• To create a ticking clock animation
Random random(50,100) Generates a random number between the two specified values. Apply to any property you wish to have a random value. • To create random opacity flicker
• To create unpredictable animations
Rotation rotation+time*10; Causes the layer to rotate over time. Apply to the rotation property of the layer. • To create rotating objects
• To simulate a spinning wheel
Anchor Point Expression thisComp.width/2, thisComp.height/2 Sets the anchor point to the center of the layer. Apply to the anchor point property of the layer. • To change the rotation point of a layer
• To change the scale origin
Bounce Expression n = 0; if (position[1] < position[0]){ n = position[1] }; n Creates a bounce effect based on position. Apply to the position property of the layer. • To simulate bouncing ball
• To create springy motion effects
Linear Expression linear(time,0,10,0,100); Maps input range to a new output range. Apply to any property requiring linear mapping. • To convert time from seconds to frames
• To smoothly transition property values
Ease Expression ease(time, 0, 1, 0, 100); Maps input range to output range with easing. Apply to any property requiring ease mapping. • To create an ease-in or ease-out effect
• To make animations feel more natural
Slider Control Expression effect("Slider Control")("Slider"); Controls the values of different properties using a slider. Apply to any property you want to control with a slider. • To control animation speed
• To adjust layer opacity
Random Numbers Expression random(min, max); Generates a random number between the two specified values. Apply to any property you want to have a random value. • To create random opacity flicker
• To generate random movement
If/Else Expression if (time > 2) {100} else {0} Provides conditional control over property values. Apply to any property you want to conditionally control. • To control property values based on time
• To toggle animations on/off
Flicker Expression blinkRate = 10;
n = Math.sin(time * blinkRate);
if (n < 0) 0;
else 100;
The flicker expression in After Effects is used to create a blinking or flickering effect on a layer. Locate the Opacity Control in After Effects, select the layer, navigate to "Effect Controls", Alt-Click on the stopwatch next to "Opacity", and type in the expression. It allows for easy iteration, customization, and achieving the desired flickering effect without manually setting numerous opacity keyframes.
Index Expression index; Returns the index of the current layer. Apply to any property where layer index is required. • To offset animations based on layer order
• To create cascading effects
Layer Control Expression effect("Layer Control")("Layer"); Allows for the selection of a layer to use its properties. Apply to any property that needs to reference another layer. • To link properties across layers
• To create complex interactions between layers
Time Conversion Expression timeToFrames(t = time + thisComp.displayStartTime, fps = 1.0 / thisComp.frameDuration, isDuration = false); Converts time to frames for time-based calculations. Apply to any property that requires conversion from time to frames. • To create frame-accurate animations
• To sync animations to specific frames
Comp Layer Expression thisComp.layer("Layer Name"); Refers to a specific layer within the composition. Apply to any property that requires referencing another layer. • To link properties to another layer
• To control layers based on other layers
Opacity Expression Examples:
random();
random(40,75);
gaussRandom();
The opacity expression generates random values for the property it's applied to, controlling the transparency of a layer. Select the layer in After Effects, locate the Opacity Property, activate expressions by holding 'Alt' and clicking the stopwatch icon, then enter the desired expression. It allows for unique ways of controlling randomness in opacity, offering variations like basic random, range random, and Gaussian distribution.
LoopOut Expression loopOut(type = "cycle", numKeyframes = 0); Loops the last keyframed segment. Apply to any property to create a repeating pattern. • To create looping animations
• To repeat patterned motion
Time Expression time; Returns the current composition time in seconds. Apply to any property that needs to reference the current time. • To animate properties based on time
• To create continuous motion
Value Expression value; Returns the current property's value. Apply to any property to reference its own value. • To add onto a property's current value
• To use current property value in calculations
Blink Expression t = framesToTime(time, thisComp.frameDuration) + (thisLayer.index * 12345);
function isPrime(value) { ... }
isPrime(t);
The blink expression in After Effects is used to make an element blink or flicker on and off. Locate the Opacity Property in your After Effects timeline, select the layer, press "T", hold down the "Alt" key and click on the stopwatch icon, then enter the expression. It offers a lot of control without cluttering the timeline with keyframes, allowing for creative decisions such as timing, frequency, and intensity of the blink.

Here are a few other expressions I've left out of the list, but still think it's important enough for regular use in AE:

As you can tell, most of these are custom combinations.

Adobe After Effects Expression Reference & FAQ

What is the difference between scripts and expressions After Effects?

Scripts and expressions both use JavaScript, but they play different roles. Scripts tell After Effects to do something to your entire project, like creating layers, changing values, or executing complex functions. On the other hand, expressions tell a single property of a single layer to behave a certain way. Think of AE expressions like a mini-program for individual properties.

What is expression in After Effects time?

The time expression in After Effects represents the current composition time in seconds. It's a handy tool to animate properties based on time. For instance, if you want a property to continually change over time, you could use an expression like value + time; This will increment the property's value based on the current time.

What is the bounce effect expression?

The bounce effect expression simulates a bouncing movement, often used to add life to animations. For instance, if an object falls, it will not simply stop when it hits the ground but will instead bounce a few times, diminishing with each bounce. There are various expressions available online to create this effect, and they can be quite complex as they need to simulate physics!

What are loop and bounce effects?

Loop and bounce effects are both methods of creating dynamic and living animations. Looping makes an animation repeat itself over and over, giving the illusion of continuous motion. Bouncing, on the other hand, creates a dynamic change within a property, imitating the physics of a bouncing ball.

What is Looping expression in After Effects?

The looping expression in After Effects is a powerful tool that allows you to repeat certain animations. The most commonly used loop expressions are loopOut(), loopIn(), loopInDuration(), and loopOutDuration(). For example, loopOut("cycle") will make your animation loop from the end back to the beginning, creating a seamless cycle.

What is bounce scale expression in After Effects?

A bounce scale expression is a specific use case of the bounce expression where the scale property of a layer is manipulated to give the impression of bouncing. This can be handy for making text or objects pop on screen in a playful way, imitating a physical bounce.

What does the linear expression do in After Effects?

The linear expression in After Effects is used to map an input range to an output range. It can be used to smoothly transition values, create relationships between properties, or animate properties based on other variable inputs. For example, linear(time, 0, 10, 0, 100) would map the time from 0 to 10 seconds to a range of 0 to 100 on the chosen property.

How do you control expressions in After Effects?

To control expressions in After Effects, you can use the expression language menu, which provides a host of built-in expressions. You can also utilize the pick whip tool to link properties and create relationships between them. And don't forget about expression controls effects like sliders, checkboxes, and color controls that can help you manage values within your expressions. Just remember, while expressions can be quite powerful, they can also be processor-intensive, so use them judiciously!

How do I apply expression to multiple layers in After Effects

You can apply expressions to multiple layers in After Effects at once! Instantly link separate layers together while still keeping their individual properties, as well as use an array of easing/velocity functions for unique motion like never before. A situation like this would have taken hours if not days before to achieve; with expression it's now easy and fast!

To add expressions to multiple layers in After Effects, simply follow these steps:

  1. Select the property with the expression
  2. Edit > Copy Expression Only
  3. Select all the other layers
  4. Edit > Paste

Now to finish off this post, here's a good video I recommend you watch to get a good understanding about expressions.