Loops are an essential technique in animation, so let’s cover how we pull them off in Cavalry.


Related resources to this post are in the box below:

Making an animation loop is as easy as selecting the keyframes in either the Time Editor or the Graph Editor, and going: Right-click > Loop Before / Loop After > [option].

selecting keyframes in cavalry and looping

Selected keyframes turn green. Right-click to bring up looping options for them.

Loop After — Looping will occur after the last keyframe.
Loop Before — Looping will occur before the first keyframe.
Sub Options — None: Don’t loop / Looping: Start the loop at the value of the first keyframe / Looping with Offset: Start the loop at the value of the last keyframe / Oscillate: Ping pong between the first and last keyframes.

A looping animation; a fade has been added to the end to make this smoother.

Easy! But what if we want the animation to play and then reverse, rather than jumping to the start? This ping pong action is named Oscillate.

a scene in cavalry showing a 30 second oscillating loop's timeline
All you have to do is ensure that you have enough frames in your composition. So in this example we have a 30 frame initial animation, which needs a 60 frame comp. Then, go: Select keyframes > Right-click > Loop Before / Loop After > Oscillate.

A ping-pong or oscillating loop (this plays to the end of the animation, and then goes in reverse to the start, and so on).

You can also adjust looping behaviour with pre-comps, by going Right-click > Enable Time Remapping. And then repeating the above steps. Simply adjust the length of the imported composition bar to suit. Note that you can also control the speed of the loop by adjusting the difference between the keyframes.

An important note

For whatever reason, I couldn’t get these to loop with a Lottie export. So the above are in video format. Hopefully I can figure this out at some point!

—
For more on looping, see this cool video by First Keyframe.