
Animating a Walk-Cycle Using Loop Expressions
Dan Ebberts July 27, 2023
0 Comments
Originally published in 2002
With version 5.5 of After Effects, Adobe has included some new keyframe-looping expressions that can be very useful for cyclic animation and layer-looping. In this tutorial, Dan Ebberts walks us through the basics of how to set up and use these expressions and then we'll use one to loop a walk-cycle as you might do in a simple character animation.
Project file: .sit file not available
The new loop expressions can be a little confusing until you get used to them. Basically, you define the region that you want looped by setting one or more keyframes. Then, the type of loop expression you use determines whether looping occurs before the first keyframe (loop_in) or after the last keyframe (loop_out). The parameters that you provide determine the nature of the looping (cycle, pingpong, offset, or continue) and the duration of the segment that gets looped. An example might make things more clear. Let's say that you have an animated sequence at the start of a layer and you want it to repeat over and over for the duration of the layer. You might use the following expression in each of the animated properties:
loop_out( cycle ,0)
(Note that Adobe's documentation shows these expressions in the form loop_out(type= cycle , num_keyframes= 0), but you can safely leave out the type= and num_keyframes=. I prefer the shorter form and that's what we'll use in this tutorial).
This expression tells After Effects to take the sequence between the first and last keyframes and, starting from the last keyframe, repeat the sequence until the layer's Out point is reached. Note that the second parameter defines the length of the sequence to be looped by telling After Effects how many keyframes (counting backwards from the last one) to loop. A zero in this parameter says to use all keyframes. The expression given above is probably the one you will use most often and it's the one we'll use for the walk-cycle animation.
O.K. Let's Begin Go Ahead and open the loop_project (currently unavailable here) file in After Effects. Then open the intro comp. This comp has layers set up with position keyframes and loop_out expressions applied. You will want to examine the various layers in this comp to see how the loop expressions work. I've set these up so that the keyframes start one second into the comp so that you can see that nothing happens before the first keyframe. Select the cycle_1 layer. As you examine each of these layers, you'll want to make sure that it is the only layer visible (besides grid ) and that you hit the u key to expose the keyframes in the position property and that you open the little twirly so you can see the expression. Step through the keyframe area and beyond. You might expect, since this is supposed to be a cyclic loop, that the segment between the two keyframes would loop over and over. That's not quite what happens as you'll notice as you move past the keyframed segment.
at first frame of new cycle, box does not return to starting position as expected
It seems that the cycle flavor of loop_out works best when the starting and ending positions are the same. Toggle the visibility of cycle_1 off and turn cycle_2 on. You'll see that we've solved this little anomaly by adding one more keyframe and moving the square back to the starting position. Now it works the way you would expect. This is something that you need to keep in mind when using cycle . Toggle off the visibility of cycle_2 and turn on ping_pong . As you step through this layer, you'll notice that it works exactly the way you would expect - the little square moves back-and-forth along its path. Turn off ping_pong and turn on offset . You'll see that the offset version repeats the motion but starts from where the previous cycle left off. Turn off offset and turn on continue . I've changed the path somewhat for this example so you can more easily see the effect. You'll notice that the little square keeps moving with the direction and velocity it had at the last keyframe.
Feel free to experiment with these layers until you feel comfortable with what's going on. I'd recommend changing the expressions to the loop_in variety and seeing that the looping action now occurs before the first keyframe. You might also want to experiment with the num_keyframes parameter, although 0 will probably be what you use the most often. Also try the loop_in_duration and loop_out_duration varieties, where the second parameter is time (in seconds) instead of keyframes.
Go ahead and open the model comp. This comp is an Illustrator file that was imported as a comp. It has a separate body part in each layer. To keep things somewhat simple I made each arm as only one piece and the head is combined with the torso.
exploded view of model showing the pieces
I've taken care of the animation of one cycle of the walk-cycle (since the focus of this tutorial is using the loop expressions, not character animation), but I'll briefly go over what I did. The first step was to move all the anchor points to the center of rotation for that body part. For the feet this would be the ankle, for the lower legs it's the knee, for the upper legs it's the hip joint, and for the arms it's the shoulder joint. I did this in the comp window using the Pan Behind tool.
repositioned anchor points
After the anchor points were in the correct positions, I stitched the character together by establishing parent relationships. Look at the parent column in the time line and you'll see that the torso is the parent of the arms and the upper legs, the upper legs are parents of the lower legs, and the lower legs are parents of the fe
Most recent headlines
05/01/2027
Worlds first 802.15.4ab-UWB chip verified by Calterah and Rohde & Schwarz to be ...
16/11/2026
November 16, 2026
Hitachi system enables proton beams to be delivered from 360 degrees around the patient, expanding treatment capacity and supporting more pre...
16/11/2026
Share
{alert(Link copied)}).catch(err => {console.error(Failed to copy: , err)}) data-platform=copy_link data-action= class=font-ui-heading py-2 text-sm tex...
16/11/2026
Share
{alert(Link copied)}).catch(err => {console.error(Failed to copy: , err)}) data-platform=copy_link data-action= class=font-ui-heading py-2 text-sm tex...
16/11/2026
Share
{alert(Link copied)}).catch(err => {console.error(Failed to copy: , err)}) data-platform=copy_link data-action= class=font-ui-heading py-2 text-sm tex...
16/11/2026
Share
{alert(Link copied)}).catch(err => {console.error(Failed to copy: , err)}) data-platform=copy_link data-action= class=font-ui-heading py-2 text-sm tex...
16/11/2026
Share
{alert(Link copied)}).catch(err => {console.error(Failed to copy: , err)}) data-platform=copy_link data-action= class=font-ui-heading py-2 text-sm tex...
16/11/2026
Share
{alert(Link copied)}).catch(err => {console.error(Failed to copy: , err)}) data-platform=copy_link data-action= class=font-ui-heading py-2 text-sm tex...
16/11/2026
Share
{alert(Link copied)}).catch(err => {console.error(Failed to copy: , err)}) data-platform=copy_link data-action= class=font-ui-heading py-2 text-sm tex...
16/11/2026
Share
{alert(Link copied)}).catch(err => {console.error(Failed to copy: , err)}) data-platform=copy_link data-action= class=font-ui-heading py-2 text-sm tex...
16/11/2026
Hiltron Communications has received a repeat order from one of Europes longest established communications satellite operators. Central to this project is a Hilt...
16/11/2026
Fabric Insights and Fonn Group today announce a partnership to connect editorial planning and media operations across their complementary product portfolios.
...
16/11/2026
Density 1.0 brings a complete color grading workflow to Final Cut Pro
Brie Clayton November 16, 2026
0 Comments
Filmmaker Pascal Basel's plugin pr...
16/11/2026
Berklee Students to Perform at Boston's CITGO Sign Relighting Kuper Walker, Ollie Mann, and dreamcorp. will perform at the free public celebration in Kenm...
16/11/2026
The Hollywood Reporter Names Berklee Among World's Best Music Schools The annual list spotlights Berklee's screen scoring programs and new master'...
16/11/2026
Five years ago, Lightware launched the original Taurus UCX with a clear vision: USB-C would become the central connection in meeting rooms. The goal was simple:...
16/11/2026
Sonniss: bundles over 80% below their libraries' prices, plus up to 60% off ...
16/11/2026
Singaporean Comedy Luck My Life Shot with Blackmagic URSA Cine 17K 65
Brie Clayton November 16, 2026
0 Comments
Blackmagic PYXIS 12K and DaVinci Resol...
16/11/2026
As countries gather to discuss climate targets at COP 31 this week, one question that is at the heart of debates is how to measure the environmental impact of t...
16/11/2026
Announced today at SC26, NVIDIA Rubin HPC is a new GPU in the NVIDIA Vera Rubin ...
16/11/2026
This week at SC26, NVIDIA is marking two decades of CUDA by honoring the researchers, developers and engineers who helped make GPU computing a foundation for mo...
16/11/2026
With expanded NVIDIA CUDA-X libraries, including cuPhoton, cuPotential and cuSpa, researchers can sift through vast amounts of data to accelerate research, from...
16/11/2026
In its MLPerf benchmarks debut, with results released today, the NVIDIA Vera Rub...
16/11/2026
Quantum processor deployments at supercomputing centers have grown nearly sevenfold over the past five years, with nearly 30 supercomputing centers around the w...
16/11/2026
To train an AI model, thousands of GPUs have to work together, requiring a network that's fast, efficient and resilient.
Lambda is tackling the network pie...
15/11/2026
Mixers, interfaces & DAW controller receive new firmware
Yamaha have just launched a trio of firmware updates that bring some powerful new functionality to ...
15/11/2026
Can VideoProc AI Really Reduce Noise and Enhance Blurry, Old Footage? Real-World...
15/11/2026
Over two days at COEX, more than 2,000 attendees converged for AI Day Seoul, bri...
14/11/2026
Longtime MLB Network employee David Maybrown passed away Thursday at the age of 57. David joined MLB Network in 2009 shortly after its launch, beginning as an i...
14/11/2026
Modular innovators introduce two guitar-based products
ADDAC System's recently introduced Four String Series makes it possible to integrate physical str...
14/11/2026
Marcelo Dai's Live Session Captured with URSA Cine Immersive
Brie Clayton November 14, 2026
0 Comments
Artist takes viewers on an immersive journe...
14/11/2026
Share
{alert(Link copied)}).catch(err => {console.error(Failed to copy: , err)}) data-platform=copy_link data-action= class=font-ui-heading py-2 text-sm tex...
14/11/2026
Share
{alert(Link copied)}).catch(err => {console.error(Failed to copy: , err)}) data-platform=copy_link data-action= class=font-ui-heading py-2 text-sm tex...
14/11/2026
Newest Lenses, Horizon Anamorphic Seminar & Guided Lens Character Experience Highlight Creative Possibilities
At the 2026 Toru CAMERIMAGE Film Festival, ZEISS...
14/11/2026
Sonnet Announces Black Friday Sale on Select Products
Brie Clayton November 14, 2026
0 Comments
WHAT: Sonnet Technologies is having a sale on a select...
14/11/2026
Berklee Alumni Shine at the 2026 Latin Grammy Awards This year's winners included songwriters, engineers, and performers who contributed to acclaimed reco...
13/11/2026
The UIM E1 Series wraps its third season this week with the Bombay Sapphire E1 Miami GP, Nov. 11-14, on Biscayne Bay at the Miami Seaplane Base on Watson Island...
13/11/2026
In-venue and creative video staffers at the professional and collegiate level ha...
13/11/2026
Singer-songwriter Benson Boone will headline entertainment for the Discover NHL Winter Classic between the Utah Mammoth and Colorado Avalanche at Rice-Eccles St...
13/11/2026
Blackmagic Design has announced the Blackmagic Ambisonic Microphone, a 7th order ambisonic microphone array that captures spatial audio for immersive video prod...
13/11/2026
SMPTE has announced that The Studio B&H and Riedel Communications will provide the video infrastructure and communications technology for the Solutions Hub at t...
13/11/2026
The Hollywood Professional Association (HPA) has announced the theme and program focus for the 2027 HPA Tech Retreat, which takes place Feb. 14-18, 2027, in La ...
13/11/2026
Football Manager 27 Touch is available on Apple Arcade starting today. The game ...
13/11/2026
MotoGP has announced a two-year media rights agreement with ESPN covering the Un...
13/11/2026
Apple Sports, the free iPhone app, has added the Ultimate Fighting Championship (UFC) to its lineup of supported sports, in time for Saturday's UFC 334. The...
13/11/2026
The NBA and Fanatics Studios, the joint venture between Fanatics and entertainme...
13/11/2026
ESPN held its annual EDGE Innovation Conference last night and offered up an ove...
13/11/2026
Regional sports network gives Ithaca College, SUNY Cortland students a platform to thrive
One of the biggest games in Division III college football will be pla...
13/11/2026
Studer-inspired 500-series PWM compressor unveiled
The HLabs range already includes a couple of Studer-inspired offerings in the form of the PRE169 and EQ16...