Skip to content
← Back to Blog

LoopIn and LoopOut in After Effects

May 4, 2021 · ,
 Denys Bondartsov
Denys Bondartsov Motion Designer & Tutor

Find out how to work with loopIn and LoopOut expressions to improve your workflow.

Using LoopIn and LoopOut in After Effects


After Effects provides powerful expressions that allow you to automate and control animations efficiently. Two commonly used expressions for creating looping animations are loopIn and loopOut. These expressions enable you to seamlessly loop specific segments of your animation, saving time and effort in the process.

Understanding LoopIn and LoopOut


loopIn is an expression that repeats the animation from the current keyframe to the end of the layer. It creates a smooth loop by seamlessly connecting the last and first frames of the specified segment.


On the other hand, loopOut repeats the animation from the beginning of the layer to the current keyframe. Like loopIn, it creates a seamless loop by connecting the first and last frames of the specified segment.

How to Use LoopIn and LoopOut

To use loopIn and loopOut expressions in After Effects, follow these steps:

  1. Open After Effects and Create a New Composition:
    • Launch After Effects and create a new composition by selecting “Composition” > “New Composition” from the menu.
  2. Create Keyframes:
    • Add keyframes to the property you want to animate. Right-click on the property, choose “Keyframe Assistant,” and select “Easy Ease” for smoother transitions.
  3. Open the Expression Editor:
    • Select the property with keyframes, press U to reveal the keyframes, and then hold down Alt (Option on Mac) and click on the stopwatch icon. This opens the Expression Editor.
  4. Apply LoopIn or LoopOut Expression:
    • In the Expression Editor, type either loopIn() or loopOut() depending on whether you want to loop from the current keyframe to the end or from the beginning to the current keyframe.
  5. Adjust Expression Options:
    • You can customize the loop by adding parameters to the expressions. For instance, you can use loopIn(type = "cycle", numKeyframes = 0) to create a cyclic loop. Explore additional options in the After Effects documentation for more advanced functionality.
  6. Preview Your Animation:
    • Play the composition to preview your looping animation. Adjust keyframes or expression parameters as needed to achieve the desired effect.

Advanced Tips and Tricks

  • Infinite Loop: To create an infinite loop, you can use the expression loopOut("cycle") or loopIn("cycle"). This will keep the animation looping continuously.
  • Adjusting Loop Duration: If you want the loop to cover a specific duration, you can use the expression loopOut("cycle", numKeyframes = n) or loopIn("cycle", numKeyframes = n), where n is the number of keyframes you want to include in the loop.
  • Combining LoopIn and LoopOut: You can also combine loopIn and loopOut in the same expression to create more complex looping patterns.


In summary, mastering loopIn and loopOut expressions in After Effects can significantly enhance your animation workflow. By understanding the basics and experimenting with advanced options, you can create dynamic and seamless looping animations for your projects.

Expressions help you to save time and focus on animation and not on hundreds of routine actions. Learn how to create whole rig systems in After Effects to achieve maximum efficiency!


Expressions Trip

    Your Cart