Introduction to Loop Expression in After Effect
Loop expression is a type of expression of after effect which allows you to repeat, offset, and continue keyframed animations. We use loopOut () as a syntax for loop expression. We can repeat any animation again and again with this expression without making multiple copies of the layer of our animation. You can apply this expression on any property of any object for animating that property continues, repeated, or in Ping-Pong mode. In this article, we will discuss how we can use this expression and handle its parameters for getting the best result in our animation and also learning how to save our time by using expressions in this software.
How to Use Loop Expression in After Effect?
We can use this expression by following some simple steps of using this expression and also learn the meaning of syntax of this expression but before starting we should have look on the working screen of this software so that there will be no problem occur during our learning about this topic.
At the top of the working screen, there is a Menu bar that has several menus. Below this, we have a toolbar along with a property bar of an active tool. Below this toolbar, we have three sections such as at left side we have Project panel along with Effect controls panel, at the center, there is Composition window in which we can see our current working, at the right side we have some parameters’ sections such as Preview tab, Align tab, Effects & Presets tabs and some others. Below these sections we have two more sections at the lower end of the screen of this software that is at the left side there is layer panel and Timeline frame sections at the right side. You can adjust all these sections as per your choice at any other place on the working screen.
Now let us have a new composition for our learning. For new composition, go to the Composition menu of the menu bar and click on it. Choose the ‘New Composition’ option from the drop-down list or you can press the Ctrl + N button of the keyboard for having new composition.
A composition setting box will be open. Make your desired settings in the Composition settings box and hit the Ok button of this dialog box.
Now let us make a circle for our learning. For circle go-to toolbar of this software and take Ellipse tool by click on its icon.
Now make a circle of any radius and color with this tool by holding the shift button of the keyboard.
Name it as Circle. I will animate its scale property first for learning about loop expression. So press the S button of the keyboard for the scale property of this circle layer.
Now I will click on the stopwatch of scale property for adding the first key on keyframe sections then I will place keyframe play head at about 2 sec and decrease its scale as 50 % for animating its scale.
Now if you want to repeat this animation again and again then you can do one thing that is cut this portion of the animated layer by pressing Ctrl + Shift + D buttons of the keyboard then delete extra portion by pressing delete button of the keyboard.
Now make several duplicate copies of this layer by pressing Ctrl + d button after selecting this layer according to the number of repetitions you want of this animation.
Now select all layers by pressing the shift button of the keyboard and go to the Animation menu of the menu bar and click on it. Go to the Keyframe Assistant option of the drop-down list and choose the Sequence layers option from a new drop-down list.
And your selected layer will arrange in sequence like this.
Now when you play your animation it will play in repeated mode.
Now if you want to save your time and don’t want to make multiple copies of your animated layer then you should go with loop expression. So let us discuss it.
Make click on the stopwatch of scale property of the circle layer by holding the Alt button of the keyboard for the loop expression box in the keyframe section.
Now type syntax of loop expression in expression box which is loopOut() and click anywhere out of this box.
Now when you play this animation of scale property of the circle layer it will play again and again in a loop. Make sure O should be in capital letter in the syntax of loop expression otherwise expression will not work.
Now if you want that the circle will become big at one time and small at another time then type loopOut(“pingpong”) in the expression box of scale property of the circle layer as the expression of loop expression.
Now you can see the effect of this expression by playing it.
Now let us do something with position property of this circle layer so press the P button of the keyboard for position property of this layer and animate it as per your choice. I will animate it like this.
Click on the stopwatch icon of the position property of this layer by holding the Alt button of the keyboard for the expression box. Type loopOut(“cycle”) in the box.
And when you play it your animated position will repeat again and again in the loop by this syntax also.
You can type loopOut(“Offset”) in the syntax of loop expression and it will animate your object in each loop with the last keyframe which means your object will increase its path of motion in each loop.
In this way, you can animate any property of the object in after effect in the loop with the help of loop expression.
After this article, you can easily understand what loop expression is and how you can handle its parameters for understanding about its syntax. Once you understand the syntax of this expression you can easily make a good effect with this expression of after effect. You can add plus point in your motion graphics skill by practicing on the different types of expression of after effect.
This is a guide to After Effects loop expression. Here we discuss How to use Loop Expression in After Effect along with the steps. You may also have a look at the following articles to learn more –