
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
20/12/2025
Atomos announced the immediate availability of a new firmware update for its Ninja TX GO and Ninja TX monitor-recorders, unlocking ProRes RAW recording from the...
20/12/2025
CJP Broadcast has completed the digitisation of the European Gymnastics tape archive, converting 328 tapes containing more than forty years of recorded material...
20/12/2025
Bitmovin, the leading provider of video streaming solutions, today announced the launch of the Stream Lab MCP Server, to give AI agents and large language model...
20/12/2025
Share Share by:
Copy link
Facebook
X
Whatsapp
Pinterest
Flipboard...
20/12/2025
Share Share by:
Copy link
Facebook
X
Whatsapp
Pinterest
Flipboard...
20/12/2025
Share Share by:
Copy link
Facebook
X
Whatsapp
Pinterest
Flipboard...
20/12/2025
Share Share by:
Copy link
Facebook
X
Whatsapp
Pinterest
Flipboard...
20/12/2025
Share Share by:
Copy link
Facebook
X
Whatsapp
Pinterest
Flipboard...
20/12/2025
Share Share by:
Copy link
Facebook
X
Whatsapp
Pinterest
Flipboard...
20/12/2025
Barack Obama Includes Laufey on His 2025 Favorite Music List The former presidents roundup of books, music, and movies includes a song from the Berklee alums ...
20/12/2025
Study reveals a key hormonal circuit in the kidneys Scripps Research scientists identify the protein that helps kidney cells regulate renin, providing foundatio...
19/12/2025
With Playout Release 2025.4, ToolsOnAir continues to push professional playout w...
19/12/2025
SVG Sit-Down: Diversified's Jared Timmins on AI for Broadcast Sports and Cre...
19/12/2025
2025 SVG Summit Audio Recap: Say What?The Audio Production and Distribution Workshop at the SVG Summit 20 took on issues including speech intelligibility, Next-...
19/12/2025
Gamified fun: Channel 5 on its NFL Big Game Night ambitions with Hungry Bear Med...
19/12/2025
College Football Playoff Preview: For ESPN, Round 1 is a Fantastic Yet Familia...
19/12/2025
AWS's Jason Dvorkin on Developing Partnerships With the NBA and PGA Tour, Em...
19/12/2025
Netflix Kicks Off Packed Sports Week with Paul-Joshua Fight Before Shifting to N...
19/12/2025
SVG New Sponsor Spotlight: Presidio's Nareev Shah on the Role of Its Captiva...
19/12/2025
Mounted to the pylon of an AH-1Z Viper helicopter, a Red Wolf vehicle successful...
19/12/2025
L3Harris technology for the SDA Tranche 3 Tracking Layer program will provide in...
19/12/2025
Partnership brings Nielsen ONE measurement activation directly into XR's adv...
19/12/2025
Share Share by:
Copy link
Facebook
X
Whatsapp
Pinterest
Flipboard...
19/12/2025
Share Share by:
Copy link
Facebook
X
Whatsapp
Pinterest
Flipboard...
19/12/2025
Berklee Announces Spring 2026 Signature Series This season's highlights include the Gospel Extravaganza, the 40th International Folk Festival, special gue...
19/12/2025
Performing arts centres across the globe have doubled down on live production infrastructure in recent years. For venues like the Queensland Performing Arts Cen...
19/12/2025
Share Share by:
Copy link
Facebook
X
Whatsapp
Pinterest
Flipboard...
19/12/2025
Share Share by:
Copy link
Facebook
X
Whatsapp
Pinterest
Flipboard...
19/12/2025
Share Share by:
Copy link
Facebook
X
Whatsapp
Pinterest
Flipboard...
19/12/2025
Share Share by:
Copy link
Facebook
X
Whatsapp
Pinterest
Flipboard...
19/12/2025
Share Share by:
Copy link
Facebook
X
Whatsapp
Pinterest
Flipboard...
19/12/2025
Share Share by:
Copy link
Facebook
X
Whatsapp
Pinterest
Flipboard...
19/12/2025
Ricardo Coke-Thomas Named Chair of Theater for Boston Conservatory at Berklee The distinguished theater educator, director, and performer will join the Conser...
19/12/2025
Back to All News
Salvador Arrives to Netflix on February 6
Entertainment
19 December 2025
GlobalSpain
Link copied to clipboard
WHEN THERE IS NOTHING LEFT ...
19/12/2025
As the year comes to a close, it's the perfect time to give your WO Automation for Radio system a quick tune up. At the top of your year end checklist is on...
19/12/2025
19 Dec 2025
VEON's Mobilink Microfinance Bank Launches Islamic Banking Oper...
19/12/2025
Wrapping up a year of connection and clarity!
19 Dec Written By Suzanne Costello
As 2025 comes to a close, we want to take a moment to thank our incredib...
19/12/2025
The six-part drama, set in a close-knit Welsh town fractured by an unspeakable c...
19/12/2025
Rohde & Schwarz drives the future of mobility at CES 2026 At the 2026 Consumer Electronics Show in Las Vegas, Rohde & Schwarz will present a powerful lineup o...
19/12/2025
Back to All News
Salvador arrives to Netflix on February 6
Entertainment
19 December 2025
GlobalSpain
Link copied to clipboard
WHEN THERE IS NOTHING LEFT ...
19/12/2025
Back to All News
Last Samurai Standing' Renewed for Season 2 - A Global Se...
19/12/2025
RT is proud to return to the RDS to support the 2026 Stripe Young Scientist & T...
19/12/2025
Nanoparticle vaccine strategy could protect against Ebola and other deadly filoviruses Scripps Research scientists turn nanoparticles into virus showcases to ...
18/12/2025
SVG Campus Shot Callers: Kurt Sutton, Director of Broadcast Operations, Clemson ...
18/12/2025
Follow the Money Episode 2: Inside the Sports Media Biz with Sam McCleery and St...
18/12/2025
SVG Sit-Down: Google Cloud's Anshul Kapoor on the Future of Generative Prod...
18/12/2025
The 2025 SVG Summit Draws Record Crowd for 20th-Annual Sports-Production Industr...
18/12/2025
SBS's sports schedule sizzles in January with Dakar Rally, Kooyong Classic a...
18/12/2025
Canada's largest indoor arena has transformed its live production capabilities with a full ST 2110 infrastructure and Calrec's compact Argo S console. S...
18/12/2025
During November, streaming's share of TV viewing in Mexico settled at 24.2%, an increase of 0.5 share points from the previous month.
Disclaimer: YUMI TV,...