How to Loop Animation in After Effects Without Expressions
Looping animation in After Effects can be a tricky process to perfect. There are a variety of methods, from pre-rendering an extended sequence stack of duplicate layers, to using expressions.
The loopOut() After Effects expression is normally considered the best built-in looping method, although there are better solutions built into Motion Studio.
The loopOut() expression only works on single properties. Which means a layer with multiple properties to loop, or properties across different layers needs the same expression copied AND have all keyframes at the same Timecodes, or the expression will get out of sequence on each loop iteration.
Motion Studio has a unique time and animation tool called Animo that can do a variety of difficult time and animation tricks, from perfect looped animations, to merging mass keyframes into a single one dimensional property.
The Native After Effects Workflow
After Effects doesn't have a built-in loop tool or a simple button to create looping animations. But, After Effects ships with native Expressions that can modify a single property to loopOut("cycle") or loopOut("pingpong).
To loop an animated property, Option+Click a property stopwatch to add an Expression and type in loopOut("cycle") or loopOut("pingpong).
loopOut("cycle): means the animation will go from the start to the end, and then loop around and start back at the beginning.
loopOut("pingpong): means the animation will go from the start to the end, then reverse in a loop from the end to the beginning.
The issue with the simple provided loopOut() functions is that they are applied to a single property and have no context of other keyframes.
For a layer with (example) Position, Scale and Rotation keyframes, that's three separate expressions that need to be added per property. That means across 10 layers using PSR animation to loop, you would be managing over 30 expressions.
Additionally, every keyframe needs to be set at the exact same frame and timecode, or the loopOut() sequencing will get out of sync across multiple layers and properties.
The constraints with loopOut() is it works perfectly for simple small property loops, but falls apart in most professional animation complexity, since loopOut() expression can only read the keyframes on the property it's applied to, so timing can't be coordinated through loopOut() to other properties.
After the initial setup of loopOut() changing timing, editing the loop and making changes becomes a heavy workload.
Further expression logic could be written to loopOut() to try and handle other property keyframe arrays, but the overhead to process stored datasets from other layers bilaterally, starts to look over-engineered to "loop."
Another "simple" solution to looping animation in After Effects, is to literally manually copy-paste the keyframes for each property so they loop without expressions. Meaning each keyframe needs to be managed independently, and the amount of keyframes explodes exponentially across layers and additional properties.
Both the loopOut() expressions and hard-coded duplicate keyframes will create simple loops. Changes and edits are expected in commercial production, so often these two solutions fall apart across multiple layers and properties or, add huge time investments to retime, reverse or restore from.
How do I loop keyframes in After Effects without writing expressions?
As discussed in the above native After Effects solutions, looping can be done, but often needs further expressions.
Motion Studio has a unique tool called Animo, that does looping and merges keyframes into a unified control. Animo is super powerful with a variety of functions, but even has built-in Loop options that "fix" all the issues with the native Loop workflows in After Effects.
Animo binds all keyframe data, including multi-coordinate properties like [x,y,z], Effect properties, or literally any Layer property, into a "single ease curve" that controls the entire sequence and animation (including crazy non-linear abilities, impossible without Animo).
One of the many tricks with Animo is that it automates converting Position [x,y] to be the same "system" as a property like Shadow Distance etc, these values have different limits, min-max values, and even different numerical values. Animo merges these into a percentage conversion and that treats the whole keyframe set on Animo as one curve.
This allows you to place a SINGLE loop expression on a huge system of keyframes, across layers and properties, and have everything stay perfectly in SYNC. You can also edit the Value Curve for Animo and retime entire sequences and easing from a single Animo controller (this is one of our all-time favorite tools in Motion Studio, Animo makes complex animation easy to change, edit and adjust.
Animo is a great solution to loop animation in After Effects, and has simple Loop options in the Animo Effect Controls. In the custom Effect (.ffx) that is auto-added with Animo, enable Loop with the checkbox, pick a Type of Ping-pong or cycle, and the entire animation is looped perfectly. This greatly simplifies managing many layers of independent expressions and values.
Animo Loop Options:
- Cycle: plays start to end, then restarts at the start
- Ping-Pong: plays start to end, then reverses back from end to start
PRO-TIP: since Animo has Effect properties, keyframes, other expressions and more can be manipulated in the Timeline, instead of hard-coded into an Expression.
Because the Animo controller converts keyframes into a percentage range, a huge world of interesting possibilities opens up like holding a specific frame, jumping to sections of a sequence, keyframing, or manually adjusting the Value Curve for non-linear (overshoot/undershoot) entire sequence timing.
Setting up Animo
For a powerful system, Animo is simple to set up. Since Animo works on any property with a keyframe set, the only limitation is a set of keyframes (meaning at least 2, or greater).
To use Animo:
- select a property, or multiple properties with 2, or more keyframes
- click Animo in the Motion Studio panel
- a sub-menu will open for Animo with flexible setup options
- click Run Animo and the entire expression and custom Effect controls will be created
TIP: the Animo sub-menu has options to name the controller, shy original layers (to keep the timeline clean, since Animo can handle all the animation), and an option to Preserve Timing.
After you run Animo, a Null Layer will be created with the custom Controller Name from the sub-menu. Also, on the Animo layer will be a custom Effect Control of even deeper keyframable options.
On the Animo Effect control:
- an Enable toggle to turn on, or off the Animo effect
- an Animate slider (0-100%)
- Spectre settings
- and the Loop options
Now the entire animation, bulk keyframes and properties is controllable via a single Easing Curve to retime, reverse, hold and more via the native Graph Editor, or in the Motion Studio Easing screens.
Spectre: trigger animation from layer overlap
An interesting system in Animo, is the Spectre mode that converts layer overlap, into animation playback.
To use Spectre:
- after Animo is run
- go the Effect Controls on the Animo layer, and the Spectre drop-down
- Enable Spectre, and set a Trigger (layer) that will be the overlap target
The overlap percentage can be multiplied, or Effects & Masks can also be interpreted. With Spectre + Animo all your animations can literally drive themselves.
TIP: interesting visual effects like Turbulent Displace can be used to trigger Spectre
PRO-TIP: a Trigger layer could be a whole quadrant of a composition. Example: a layer is in a Trigger layer it's BLUE, and off the layer it's RED.
The Multiplier in the Spectre Effect controls can scale output, so a small, or brief overlap can run an entire animation sequence.
Common Questions About Looping Animation in After Effects
What's the difference between loopOut("cycle") and loopOut("pingpong")?
loopOut("cycle): means the animation will go from the start to the end, and then loop around and start back at the beginning.
loopOut("pingpong): means the animation will go from the start to the end, then reverse in a loop from the end to the beginning.
These basic expressions with the caveats listed in this article, can be great tools to create looping animation. For more advanced and flexible options across bulk keyframe sets, try using the Animo Loop option to Preserve Timing across many layers and properties.
Can I loop animation across multiple properties without copying the expression to each one?
There are a few intensive and time-consuming workarounds to Loop animation natively. The short answer is "no, not natively... very easily..."
After Effects expressions are "property-level" which means expressions "read" what is on the property (like the keyframes that exist on the layer).
Animo solves the property-level complexities by merging, unifying and converting different property types into one controller. Which then allows a Loop animation to work from one single expression.
How do I reverse a looping animation in After Effects?
Depending on your comfort with Expressions, reversing a Loop is possible with a longer expression, although it still has the bottlenecks of property-level context.
A simple workaround (to at least reverse the Loop) is to manually reverse/reorder the keyframes and then adding the loopOut() expression.
With Animo, the animation is a single coordinate (0-100%) "playback curve" and so with bezier handles, or just moving a single keyframe the entire animation can be reversed without timing sync issues.
Does the loopOut expression affect render times?
Expressions add per-frame render overhead; on new computers the impact is negligible for a few layers.
However, the loopOut() expression is heavier than most other native function calls, because it's reading a set of keyframes across time.
For complex projects with 10, 20, 30+ expressions the expression calculation can start to get a little heavier, or slower to preview and playback (partly depending on the keyframe density per property).
With Animo, there are expressions, and can use loopOut() but, since Animo merges the keyframes into a new simplified Easing curve, there are fewer heavy Expressions being used.
Animo is available now. Try Motion Studio free for 7 days, no credit card required.
