
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
09/11/2025
Dalet today announced a transformative leap forward for media operations: Agentic Artificial Intelligence (AI) that unifies the Dalet ecosystem under one natura...
05/11/2025
A 13-year old company that serves as a master control/disaster recovery hub for PBS stations says it has seen little financial impact from cuts to public broadc...
05/11/2025
To no one's surprise, the NFL's most dominant franchise in recent years attracts the most TV viewers, according to new research by S&P Global Markete In...
05/11/2025
MELBOURNE, Australia Atomos today introduced Ninja TX GO, a new HDMI monitor-recorder that combines a brighter screen, advanced monitoring tools, professional c...
05/11/2025
WASHINGTON Despite the ongoing government shutdown, Federal Communications Commission Chairman Brendan Carr has announced a tentative agenda for the agency'...
05/11/2025
The College Football Playoff (CFP), ESPN and TNT Sports have announced kick times and broadcast information for the 2025 CFP First Round, which will launch the ...
05/11/2025
NEW YORK IAB Tech Lab, the global digital advertising technical standards-setting body, has announced the release of device attestation support in the industry ...
05/11/2025
SINGAPORE Appear, an Oslo-based provider of live production technology, is opening a new facility in Singapore as part of the company's expansion into the A...
05/11/2025
DALLAS Parks Associates has released new data showing just how far the dramatic shift to streaming services has gone in recent years. Currently, more than nine ...
05/11/2025
New schedule will be live on-air Monday 10 November
Brand-new Today with David McCullagh from 9am
Oliver Callan in all-new extended show from 11am to 1pm
Kie...
05/11/2025
Explore the future with Science Week on RT
Dive into a week of innovative, themed programming and content across RT television, radio and online
Includes a ...
05/11/2025
Get ready for six weeks of United FC, a brand-new, feel-good teen docuseries kic...
04/11/2025
SVG Sit-Down: Why Professional Fight League CEO John Martin Believes Growth Is I...
04/11/2025
SVG All-Stars: David Koppett, Executive Producer, Live Sports and Studio, NESN a...
04/11/2025
From concept to kick-off: How TAMS could transform sports workflows By Paul Markham
Tuesday, October 28, 2025 - 09:43
Print This Story
Techex tx darwin pr...
04/11/2025
College Hoops Preview 2025: The CW Tips Off Third Season of ACC Men's/Women&...
04/11/2025
College Hoops Preview 2025: Big Ten Network Heats Up for Busy Season With 500 Me...
04/11/2025
College Hoops Preview 2025: CBS Sports Readies 300+ Game Broadcasts Across Its P...
04/11/2025
College Hoops Preview 2025: NBC Sports Slate Features 200+ Big Ten, BIG EAST, an...
04/11/2025
College Hoops Preview 2025: ESPN Remote-Ops Team Preps for Massive Slate of 7,40...
04/11/2025
Never-before-seen footage of Selena Quintanilla and her family's band offers...
04/11/2025
Joel Edgerton at Train Dreams Park City premiere (photo by Soul Brother / Shutterstock for Sundance Film Festival)...
04/11/2025
Today, we announced our third quarter 2025 earnings, marking strong momentum as we surpassed 700 million Monthly Active Users and achieved double-digit subscrib...
04/11/2025
Idag rapporterar vi v rt resultat f r det tredje kvartalet 2025, vilket markerar en stark och fortsatt tillv xt d vi passerade 700 miljoner m natliga aktiva an...
04/11/2025
SBS calls for bold, thought-provoking factual ideas: up to $50,000 in developmen...
04/11/2025
Tomorrow's fight will demand networks that deliver both capacity and survivability, the speed to move mission applications at scale, and the resilience to e...
04/11/2025
New York, NY - November 3, 2025 - Neptune BidCo US Inc. (the Issuer or the Co...
04/11/2025
WASHINGTON The National Association of Broadcasters took aim at YouTube TV and its owner Google in a blog post for its heavy hand in deciding what viewers can ...
04/11/2025
HACKENSACK, N.J. The European Broadcasting Union (EBU) has awarded LiveU a five-year contract to deliver 24/7 live news content through its Eurovision News Exch...
04/11/2025
Bob Dylan Awarded Honorary Doctorate from Berklee College of Music The songwriter, performer, and cultural icon is recognized for a six-decade career that redef...
04/11/2025
SAN JOSE, Calif. Roku has launched Roku Ads API, a fully open, self-serve developer platform for connected TV (CTV) advertising. The Roku Ads API gives develope...
04/11/2025
Harmonic (NASDAQ: HLIT) today announced an expanded partnership with Spectrum to extend the company's industry-leading cOS vCMTS and advanced network and o...
04/11/2025
The inauguration of Empresa de Meios Audiovisuais' (EMAV's) first virtual studio in Lisbon marks a major technological milestone for the Portuguese audi...
04/11/2025
ZTransform, a leader in transformational system design, integration, and launch services for broadcasters, sports venues, educational facilities, and corporate ...
04/11/2025
Fred Baumgartner's op-ed (ATSC 3.0: I Cant Imagine Anyone Defending Our Current Adoption Strategy) on the broadcast industry's transition to ATSC 3.0 dr...
04/11/2025
Q&A with Music Alum Andrew van der Paardt The oboist and English horn player reports back from the pit of the New York City Ballet Orchestra, and tells how he...
04/11/2025
Damien Moloney as Jim Bergerac
As filming wraps on the highly anticipated second series of Bergerac(6x60'), UKTV today unveils a selection of first look im...
04/11/2025
Tuesday 4 November 2025
To view this content, please enable our use of cookies....
04/11/2025
Back to All News
Netflix and Embratur launch audiovisual tourism guide at the W...
04/11/2025
Back to All News
Frankenstein' Sightings Grip Hollywood With Halloween Wee...
04/11/2025
From the recent SMPTE Media Technology Summit in Pasadena, with FilmLight Image Engineer, Daniele Siragusano, and Research Engineer, Julius Tschannerl.
Matchin...
04/11/2025
Begins Thursday November 6 on RT One and RT Player at 10:15pm
Camogie: Inside...
04/11/2025
In Berlin on Tuesday, Deutsche Telekom and NVIDIA unveiled the world's first...
04/11/2025
When inspiration strikes, nothing kills momentum faster than a slow tool or a frozen timeline. Creative apps should feel fast and fluid - an extension of imagin...
04/11/2025
Douglas W. Phillips and Steven M. Paul join Scripps Research Board of Directors Finance and biomedical leaders bring decades of experience in investment strateg...
03/11/2025
SVG Sit-Down: Inside the Sports Rights Landscape (and the new IMG) with Andrew D...
03/11/2025
Challenging the norm: How TNT Sports is evolving coverage of the men's and w...
03/11/2025
Inspired storytelling: TNT Sports' Pete Thomas on creating opportunities out...
03/11/2025
NBA 2K League Returns With New Format Featuring NBA Players, Creators, and FansSeason will include online tournaments, in-person events, and open-ladder fan com...
03/11/2025
Live on the Water: The Rowing Channel Pulls Off Historic Production at Head Of T...