This is the 6th day of my participation in the August More Text Challenge

After Effect (AE) is graphic design software for video editing work. It is popular among video editing graphics professionals. In AE, we can animate arbitrary objects using expressions. An expression is a piece of code that allows you to define any effect on any object, saving you the time of having to give commands for that effect on every frame. If you know Javascript, you can easily use expressions in this software to make the best animations of any object. If you don’t have a computer background, you can learn expression coding with practice. So let’s examine the term “expression” in this article and see how to handle its arguments

How do I use expressions in After Effects

We’ll use an example to understand the expression in After Effect in a very interesting way. Before we begin our article, let’s take a brief look at the working interface of the software so that we can easily understand the working environment of the software in this article.

The first step

At the top of the working interface, we have two “strips” — a menu bar and a toolbar; The second highest section has three main areas: the project panel on the left, the Composition window in the middle, and some important parameters on the right. Below these we have two other important sections: the Layer area on the left and the timeline area on the right. You will understand the work in all of these areas throughout this article.

The second step

First, let’s create a new composition. To create a New Composition, go to the File menu on the menu bar and click the ‘New Composition’ option in the drop-down list, or you can press Ctrl + N to create a New Composition.

The third step

A new composition dialog will open. Set the Settings you want in this dialog box and then press the OK button of this dialog box to apply the Settings.

The fourth step

Now, select the Text tool from the tools panel of the software, which is located at the top of the work screen.

Step 5

Now use the Type Tool (T) to type the text you want in the Composition window area.

Step 6

With the help of the Align Align TAB (in the right working area of the parameters area), we Align the text in the center of the composition window.

Step 7

Now go to the Layer Layer section of the application and click on the little arrow icon for the text Layer. The properties of the text layer will be opened. Then click the Animation option for the text.

Step 8

From the properties drop-down list, select the Text property to which you want to apply the expression. I will select the Position property for the text.

Step 9

Now click on the little arrow icon of Animator 1 and remove Range Selector 1 from here, because we want the Expression Selector to appear there. To remove Range Selector 1, we just click on it and press the Delete button on the keyboard.

Step 10

Now click the Add button on the Animator, go to the selector in the drop-down list, and select the Expression option from the new drop-down list.

Step 11

Now click on a little arrow icon in Expression Selector 1, and select where you want to apply the Expression;

For example, if Characters is selected, the expression will only apply to text Characters. So choose any option from the drop-down list based on your situation.

Step 12

Now click the small arrow icon of Amount to open the expression code. You can see the expression code in the frame section of the timeline.

The specific code is as follows

selectorValue * textIndex / textTotal
Copy the code

The first ten steps

Select the expression and select all

Step 14

Enter an expression as shown below.

The specific code is as follows

a = selectorValue[0];
if(a<50) a = 0;
if(a>50) a= 100;
a;
Copy the code

Step 15

Let’s look at Wiggly Expression. For Wiggly expressions, click the Add button on Animator 1; The drop-down list opens; Go to the selector and select Wiggly from the new drop-down list

Step 16

Place Wiggly Selector 1 over Expression Selector 1

Step 17

Now disable the Expression Selector 1 layer to see the effect of our literal Wiggly Selector.

The 18th step

When you enable the Expression Selector 1 layer, now increment the value of position. According to our expression, if the value of position is less than 50, the character will remain in its position, and if the value of position is greater than 50, its position will change. The impact of the expression code is shown.

Step 19

You can use any property of the text to add an expression to that property. Just go to Animator 1’s “Add” button and select the properties you want at any point in your work.

Step 20

You can also add expressions in the Source Text option of the Text layer.

Step 21

Just hold down Alt on your keyboard and click on the clock icon in the Source Text option. An expression opens in the keyframe area of the timeline.

text.sourceText
Copy the code

Step 22

Suppose I enter the time in the expression.

time
Copy the code

Step 23

It will then calculate the time of the synthesized region.

Step 24

If you don’t know Javascript and have trouble coding expressions, you have the option of using expressions predesigned by the After Effect software. For pre-designed expressions, go to the Effects & Presets TAB of the software, which is on the right side of the work area.

Step 25

Now click on the small arrow icon for animation presets. The presets for the A-list will be opened.

Step 26

Now click on the small arrow icon for text presets. Multiple default expressions will open here.

Step 27

Select the expression you want here and place it on the text in the compositing window area.

Step 28

The default expression will be applied to your text layer like this.

conclusion

After reading this article, you can now understand “what is an expression in After Effect” and how to handle it without any difficulty to get the best results in your graphic design efforts. You can increase the scope of expressions by practicing Javascript coding.