Insider Tips: How to Loop a Composition in After Effects

Insider Tips: How to Loop a Composition in After Effects

Every week, Frame.io Insider asks one of our expert contributors to share a tip, tool, or technique that they use all the time and couldn’t live without. This week, Laurence Grayson demonstrates how to loop a composition in After Effects.


How to loop a composition in After Effects

Technically speaking, this is how to loop a precomp in After Effects, because the first part of the process is to grab your loop composition—usually an animation cycle—and drop it into a new composition with a longer duration.

Add your loop comp to a new comp and enable time remapping.
Add your loop comp to a new comp and enable time remapping.

Once your loop comp is in place in your new comp, select it and hit Opt+Cmd+T (Mac) or Ctrl+Alt+T (PC) to enable time remapping. This will add time remap keyframes at the beginning and end of your loop comp. It’ll also enable handles at each end of your loop comp that you can drag to create the duration you want your animation to have.

To loop a composition, add a loopOut() expression.
Add the loopOut() expression to the loop comp.

But before you take that step, there are a couple of things you need to to first.

  1. Add an expression (Opt+click / Alt+click on the Time Remap stopwatch.
  2. Replace the expression text timeRemap with loopOut(). After Effects will autocomplete as you type—selecting the correct list entry will make sure you get the syntax right.
  3. Move the composition playhead to the end keyframe and then move it back one frame (Cmd / Ctrl+left cursor).
  4. Delete the last keyframe. If you don’t do this, you’ll get a black frame between each animation cycle.
Deleting the end keyframe in your loop composition
Add a keyframe to the penultimate frame, then delete the last keyframe.

You can now drag your loop comp’s end handle to the required duration. Job done.


Insider Tips are helpful weekly posts brought to you by Frame.io’s awesome writers and industry experts. Come back for a new Insider Tip every Wednesday, or subscribe to our newsletter to get a reminder each week.

If you’re looking for tips on using Frame.io account, check out Shawn McDaniel’s playlist on our YouTube channel.

Thank you to Laurence Grayson for contributing this article.

After a career spanning [mumble] years and roles that include creative lead, video producer, tech journalist, designer, and envelope stuffer, Laurence is now the senior editor for Frame.io Insider. This has made him enormously happy, but he's British, so it's very hard to tell.

Interested in contributing?

This blog relies on people like you to step in and add your voice. Send us an email: blog at frame.io if you have an idea for a post or want to write one yourself.