
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 ...
07/10/2026
Dalet, a leading technology and service provider for media-rich organizations, today announced the latest Long-Term Supported (LTS) release of Dalet Flex. Build...
06/09/2026
June 9 2026, 23:00 (PDT) Dolby and MagentaTV Bring Fans Closer to the FIFA Worl...
20/08/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
20/08/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
20/08/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
20/08/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
20/08/2026
IPC Expands Brazilian Presence with New Channel Partner CCATech
Industry veterans Carlos Abrah o and Bruno Lopes strengthen local support and expand IPCs prese...
20/08/2026
Zixi Enters Mauritius Market Through Strategic Deployment with MTC Jockey Club
Worlds Oldest Horse Racing Club in the Southern Hemisphere Selects Zixis Softwar...
20/08/2026
LA JOLLA, CA-Scripps Research assistant professor Tiantian Liu has received a five-year NIAID DP2 award from the National Institute of Allergy and Infectious Di...
20/08/2026
Audiences reveal appetite for multicultural Australia on-screen 20 August 2026
Dr Georgie McClean, Dr Rebecca Huntley (L-R)
By Dr Georgie McClean and Dr Rebec...
20/08/2026
How Mavis Studio Is Expanding Live Production Teaching at Sussex
Brie Clayton August 19, 2026
0 Comments
Hero image displays a student about to mix be...
20/08/2026
Vertical Unscripted Series Legal Queens Captured with Blackmagic Design
Brie Clayton August 19, 2026
0 Comments
Reality TV veteran Eric Gardner create...
19/08/2026
As the cost of IP nears price parity with traditional SDI, Reynolds argues that ...
19/08/2026
A private 5G bubble was chosen instead of traditional broadcast RF for the race ...
19/08/2026
(L-R) Rafael Manuel and Isabel Sicat attend the Filipi ana premiere during the 2026 Sundance Film Festival at The Ray Theatre on January 23, 2026, in Park Cit...
19/08/2026
Studio owners invited to have their say on rates cuts
The Music Producers Guild (MPG) are inviting UK-based studios to take part in an in-depth survey that ...
19/08/2026
Vintage-inspired desktop interface revealed
Harrison's latest hardware offering sees them head into the world of audio interfaces, delivering a 10-in/12...
19/08/2026
Granular effect remains locked to scale and tempo
Described as your dream granular effect , Minimal Audio's latest creation is capable of turning any s...
19/08/2026
First polyphonic SWAM instrument incoming
Audio Modeling's latest physical-modelling orchestral instrument is just around the corner, and is now availab...
19/08/2026
World Cup Games Generate 84 Billion Minutes Across FOX, Fox Sports 1 and NBCU...
19/08/2026
July brought typical peak-holiday drops in viewership, driven primarily by viewers stepping away from screens and a visible decline in reach across both traditi...
19/08/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
19/08/2026
Henry joins BCE as the company accelerates its commercial strategy and expands its international presence across the media, broadcast and technology markets. He...
19/08/2026
iWedia, a leading provider of software solutions for connected TV devices, today announced a major milestone in Android platform optimization with the successfu...
19/08/2026
NTP Technology announces that ST 2110-30 audio-over-IP connectivity with AES67 and RAVENNA capabilities is now available for the brand's world-class audio i...
19/08/2026
Net Insight has been selected to provide its Nimbra platform by the service provider Big Blue Marble, formerly ORS Group, as the core media transport solution f...
19/08/2026
LiveU has supported Coventry City FC and several other top-flight UK football clubs through one of their most demanding live production challenges of the year, ...
19/08/2026
Nature Seekers Documentary Shot with Blackmagic URSA Cine 12K LF
Brie Clayton August 18, 2026
0 Comments
Filming endangered turtles required camera...
19/08/2026
Neyrinck Brings D-Control Consoles Back to Life on Apple Silicon with D-Control ...
19/08/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
19/08/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
19/08/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
19/08/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
19/08/2026
Share
Copy link
Facebook
X
Linkedin
Bluesky
Email...
19/08/2026
Riedel Communications today announced that Edith Cowan University (ECU) in Perth, Australia, implemented a comprehensive communications infrastructure that brin...
19/08/2026
QuickLink, a leading provider of award-winning video production and remote guest contribution solutions, will spotlight a major leap forward in remote guest con...
19/08/2026
Integrated platform melds media asset management, playout automation and newsroom workflows
EMAM, PlayBox Neo and SNEWS have officially launched Nuvex, a conne...
19/08/2026
Screen Australia releases the Private Investment Toolkit to strengthen screen in...
19/08/2026
Do Aussies truly value local content? Unpacking Screen Currency 2026 with Deirdr...
19/08/2026
There's an early Christmas gift for Bookish fans, as UKTV confirms the re-commission of the hit U&alibi drama, created by and starring Mark Gatiss. Viewers ...
19/08/2026
Wednesday 19 August 2026
Sky gives sports fans the chance to watch multiple liv...
19/08/2026
On Saturday September 5 Katie Taylor will step into the ring for the fight of her life against Flora Pili in front of 80,000 fans in Croke Park. A legendary fig...
18/08/2026
SportStream 2026, a free three-day virtual event, will take place September 15-17. One registration provides access to all three days of live programming and on...
18/08/2026
BeckTV will introduce BeckFlow to the European market at IBC2026, demonstrated on the Providius stand (10.F53).
BeckFlow is a web-based schematic documentation...
18/08/2026
Boland Communications will introduce a SMPTE ST 2110 input option for its 4K monitors at IBC2026, along with a new 55-inch super-narrow bezel display for video ...
18/08/2026
Dolby Laboratories and the Seattle Seahawks have announced a partnership integrating Dolby OptiView into the Seahawks' live streaming coverage, making the S...
18/08/2026
For BMG Executive Producer of Sports Production, Graham Taylor, producing live s...
18/08/2026
TMRW Sports has appointed Rufus Hack as President of Golf, a newly created role in which he will lead the company's golf businesses including TGL presented ...