Filmora
Filmora - AI Video Editor
Edit Faster, Smarter and Easier!
OPEN
Filmora Video Editor
Effortlessly create video with AI.
  • Various AI editing tools to increase your video creation efficiency.
  • Offer popular templates and royalty-free creative resources.
  • Cross-platform functionality for editing everywhere.

How to Add Expression in After Effects

Liza Brown
Liza Brown Originally published Jul 28, 22, updated Dec 10, 24

Although After Effects (AE) is a fantastic tool for creating UI animation prototypes, we're constantly searching for methods to make our process go more quickly. Expressions are supported by AE and allow the designer to animate layers without manually specifying each keyframe by establishing connections between layer parameters or keyframes. We'll go through the fundamentals of using and defining expressions as well as how to adapt them to your own need.

In this article
  1. What is After Effects Expression
    1. thisComp
    2. loopOut
    3. random
    4. Wiggle
    5. Time
  2. How to Add Expressions in After Effects
  3. How to Edit Expressions in After Effects

Part 1. What is After Effects Expression

Expressions are sections of code created in the JavaScript programming languages with the sole objective of changing the layer attributes in After Effects. They can create adaptable rigs and automate repetitive processes. Because of this, developing and modifying the code should be a breeze. There are many phrases that already exist and have for many years, but finding them might be challenging if you aren't sure what you're searching for. They may be as small as a single word or integer, or very complicated, including chapters and paragraphs of code.

You may begin forming connections between a property and other layers when you write an expression on that property. By connecting the expressions to the numerical parameters, the expression controllers in the Effects & Presets panel may assist you in better controlling the expressions. Although they are by no means necessary, expressions come in quite handy when attempting to replicate effects like inertia or bouncing without having to specify a ton of extra keyframes. They not only provide many creative possibilities, but they may also streamline your motion design process.

Part 2. Common Expressions in After Effects

An expression is a brief piece of JavaScript code that can be plugged into animated properties in After Effects applications. Expressions evaluate to a single value for a single layer property at a particular instant in time. Below are a few popular expressions.

1. ‘thisComp’

Expressions in After Effects revolve entirely on manipulating values inside an object hierarchy. Objects in this context include the composition, specific layers, and even effects. Values or other things may be contained by an object.

Use thisComp together with some fundamental arithmetic to precisely place things on the screen. This comes in quite helpful when exporting several versions for social media sites and reusing content. To have the logo scale in accordance with the size of the comp, you could even add a similar statement to the Scale option.

2. ‘loopOut’

You can always simply copy and paste keyframes throughout the timeline if you want an animation to repeat. But if you wanted to make adjustments, you'd have to go back and deal with all of those keyframes again. Again, you'd never see Batman using After Effects accomplishing this. You should use the loopOut expression in these circumstances. Even four options may be used to modify how the animation loops.

Again, cycle is the default setting; however, you may also choose from continue, offset, and ping pong. It just requires animating an Ellipse's Scale and Opacity properties, then adding loopOut to each of them. The two keyframes are immediately cycled; it is plug and play. There are really just four keyframes in total, however the animation lasts the full length of the timeline. Use two keyframes per parameter to keep things simple, or specify which keyframes you want to loop to make things more complicated.

3. ‘random’

As implied by the name, each frame's value is generated randomly by this expression based on the argument you provide. It will automatically randomize between 0 and 1 if you leave it empty. The parameter will generate a value at random between 0 and the value you provide between the parentheses. It will generate random numbers between the two values you enter.

Another excellent expression for rapidly producing an animation is this one. We often use it to make opacity transitions that flicker. It just takes a few clicks to do this by adding the phrase below to Opacity and keyframing it in and out from 100% Opacity.

4. ‘Wiggle’

One of the few expressions that may be used without keyframes is the Wiggle expression. Watch your shape begin to wiggle by simply adding the phrase to any Transform attribute. It will jiggle between keyframes if you decide to add them.

You will simultaneously move in two dimensions while using this phrase. You may sometimes just need to jiggle one dimension. The After Effects Wiggle expression (also known as AE Wiggle) is an excellent tool for creating erratic item movement, idle character movement, unpredictable camera motion, shaky lettering, and flashing lights.

5. ‘Time’

The greater the value next to "time" below, the quicker your animation will be. Time expression is useful for continuous animation. Utilizing time is one of the fastest and simplest methods to create an animation. Time just creates each second's numerical value in the timeline. Remember that regardless of the timecode settings, this number begins at zero at the beginning of the comp.

Again, combine this with some simple arithmetic for excellent outcomes. To find a multiplier value that works for the parameter you are animating, play around and explore. Use it to gradually modify a layer's position or rotation. Time is also very useful for driving animated textures like the Fractal or Turbulent Noise effects. The evolution parameter is increased by a factor of 100 throughout time.

Part 3. How to Add Expressions in After Effects

In Adobe AE, expressions may be added to any kind of layer and any form of layer attribute. Don't give up; one of the best things about expressions is that you don't have to be an expert programmer or coder to use them. A variety of transform effects may have expressions applied to them to generate fascinating animation, which might take hours to create from scratch.

While some idioms are brief, simple, and easy to use and comprehend, others are wordy and complex. Even though they can appear difficult, sticking them in their designated spot should work. The process of adding expressions is always the same; the code varies based on your goals. Learning how to apply an Expression effect to your layer is the first step.

Step1 Include your form or image in the timeline. When viewing the layer's properties, click on the stopwatch of the property you wish to apply the phrase to while holding "Alt" (PC) or "Option" (Mac).

click stopwatch property

Step2 Make two keyframes for the transformation you've selected; in our case, we’ve point it Beginning and the End frames as shown below:

make 2 key frames

Step3 Go to the Animation menu and choose the Transform option you keyframed in the timeline. We are choosing Scale since it is what we keyframed. Multiple Transform settings may have expressions added to them, but you should do it sequentially.

choose transform animation

Step4 A box will show up on the timeline after choosing Add Expression from the menu. In the box, paste your expression. The numerical parameters will become red and a text box will show up in the timeline below the layer. The Expressions will be typed or copied here. By adjusting the values in the code, you may fine-tune the expression; experiment with each to find what works for you.

paste expression to box

Part 4. How to Edit Expressions in After Effects

To edit the Expressions in AE, you do need some programming skills to make the most of expressions since they employ JavaScript. However, there are many of excellent starter and expert expression examples, so you can still get a lot done with Premiere Pro without them. When you click the keyframe symbol on the property you wish to apply an expression to, hold down the Alt key to utilize expressions. There will appear an expression box where you may type and amend expressions.

Step1Select the property in the Timeline panel, then choose Animation > Add Expression to add and reveal an expression. To search Expressions and other parts of a property, use the search box in the Timeline panel.

select property from timeline ae

Step2In the Timeline panel or the Effect Controls panel, click the stopwatch button next to the property name using the keyboard shortcut Alt + click for the Windows or Option + click for the MacOS. Four icons are shown under the property while the expression is active, and the value becomes red.

select effects control ae

Step3To open the Expression Editor, click within the text box on the Timeline panel. Wherever you wish to alter the phrase, position the cursor. The pick whip may be moved to the name or cost of a property. The resultant expression shows all the values as one if you drag to the name of a property.

open the expreesion editor

Step4Press Enter on the numeric keyboard to end text editing and start the expression.

press enter start expression

Conclusion

One of the most popular pieces of software for the post-production of movies is called After Effects. The tools and expressions in AE are used by many video editors and motion graphics creators to produce stunning works of art, animated films, video advertising, distinctive video effects, and many other useful things. Expressions are JavaScript lines of code that let you manipulate data in Adobe After Effects. Even though they don't have the same flashy name as a kryptonite spear, they may be just as powerful in the proper hands. The fact that they'll save you a ton of time applies to all of them, regardless of size.

Free Download
Free Download
Liza Brown
Liza Brown Dec 10, 24
Share article: