Expressions can be the key to automating your motion graphics workflow. Let’s learn a few ways you can implement them in After Effects.
Now, if you’re a moderate user of After Effects like me, expressions seem scary. It’s throwing coded words that perform certain tasks onto your timeline. But, even knowing how to place those expressions seemed way over my head at first. Well, John Rodriguez at Shutterstock is here to help us realize that they aren’t as scary as they seem.
In this write-up, we’re going to follow his lead and learn a little bit about the world of expressions in After Effects.
How to Add Expressions in After Effects
Here’s a quick rundown of adding expressions in After Effects, in case you haven’t done it before. Simply go to the layer you’d like to add to, click “P” to bring up the Position tab, then select the stopwatch with “Alt” for PC, or “Option” for Mac. From there, you’ll be able to add in the expressions we’re diving into today, which are as follows:
- loopOut(); or loopOut(“cycle”);
Pingpong — loopOut(“pingpong”);
The Pingpong expression is an extremely versatile one to use for motion graphics. It’s used for infinitely looping between the first and last keyframe. It’s perfect for making objects bounce naturally and realistically.
To use this expression, simply copy and paste loopOut(“pingpong”); into your expressions box, under the Position tab.
Offset — loopOut(“offset”);
The Offset expression is used to start a loop at the same spot where the motion ended. As you can see in the .gif above, it’s great for creating a continuous path for an object moving at an angle — instead of straight up or straight down.
Continue — loopOut(“continue”);
Continue is a really handy expression when you’re working with a lot of assets. If you have an object that only travels a small distance, but you want it to go further, instead of messing with the keyframes, you can simply add the Continue expression, making the object continue on its path indefinitely.
Cycle — loopOut(“cycle”);
Cycle is your standard loopOut expression, also written as loopOut();. This expression just gives you a simple loop — from the first to last keyframe — with a hard cut. If you’re looking to just cycle through an animation indefinitely, this is a great tool to have.
An argument modifier is something you can add to your expressions to customize them. In the example above, it shows that if you add a 2 next to the “Offset” loopOut, it’ll select the second set of keyframes and beyond to loop, skipping the keyframes between the first and second.
Now, if you’re looking at all of these for the first time, it may seem daunting. Trust me, I felt the same way. However, once you start incorporating them into your designs and animations, they’re extremely helpful (in the long run) in creating simplified motion graphics on your timeline.
Looking for more on Adobe After Effects? Check out these articles.