Sony Pixel Power calrec Sony

Animating a Walk-Cycle Using Loop Expressions

28/07/2023

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
LINK: https://creativecow.net/animating-a-walk-cycle-using-loop-expressions/...
See more stories from creativecow

Most recent headlines

06/10/2025

France Tlvisions Wins Prestigious 2025 EBU Technology & Innovation Award in Groundbreaking Collaboration with Dalet

France T l visions, France's leading broadcaster, has received the 2025 EBU ...

04/09/2025

Monumental Sports & Entertainment and Dalet Win Prestigious 2025 NAB Show Project of the Year Award

Monumental Sports & Entertainment (MSE), in collaboration with Dalet, has been a...

07/08/2025

Tata Motors & Dolby Bring Dolby Atmos to Harrier.ev, Redefining In-Car Entertainment Experience

July 8 2025, 22:30 (PDT) Tata Motors & Dolby Bring Dolby Atmos to Harrier.ev, R...

29/07/2025

UEFA Womens EURO 2025 drives surge in ad-funded streaming as Yospace powers 6 billion one-to-one advertisements

Staines-upon-Thames, UK, 29 July, 2025 Yospace, the global leader in Dynamic Ad ...

29/07/2025

2025 Sundance Institute Trans Possibilities Intensive Announced

Six Fellows Selected for Program Supporting Projects From Transgender Storytellers of Color Today the nonprofit Sundance Institute announced the six artists p...

29/07/2025

Give Me the Backstory: Get to Know Michael Shanks, the Writer-Director of Together

By Jessica Herndon One of the most exciting things about the Sundance Film Fest...

29/07/2025

Spotify Reports Second Quarter 2025 Earnings

Today, we announced our second quarter 2025 earnings, fueled by standout subscriber and MAU growth. In the first half of 2025, subscriber net additions grew mor...

29/07/2025

Spotify rapporterar intkter fr andra kvartalet 2025

Idag rapporterar vi resultatet f r andra kvartalet 2025, med stark tillv xt av antalet prenumeranter och m natliga aktiva anv ndare. Under f rsta halv ret kade...

29/07/2025

Viewing to Content with Ads Gained Share to 73.6% of Overall TV Viewing in Q2, Nielsen's Q2 2025 Ad Supported Gauge Finds

Streaming Holds Steady in a Lighter Summer Viewership Season NEW YORK - July 29...

29/07/2025

Viewing of Ad-Supported Services Grew to 73.6% of TV Viewing in Q2

NEW YORK Nielsen is reporting that viewing of content with ads became more popular in Q2, 2025, gaining 1.2 share points of overall TV viewing to capture 73.6% ...

29/07/2025

QuickLink Launches New StudioEdge Products for IBC2025

SAN ANTONIO QuickLink has launched two new versions of its StudioEdge line of products: StudioEdge-1 and StudioEdge-2 provide one-channel and two-channels of br...

29/07/2025

SBE Honors Irwin, Bialik for Engineering Achievements

The Society of Broadcast Engineers has announced the recipients of the 2025 SBE National Awards, which recognize outstanding achievements by individual members,...

29/07/2025

Cobalt Digital to Feature Plug-and-Play ST 2110 Solutions at IBC 2025

CHAMPAIGN, Ill. Cobalt Digital is heading to IBC 2025 with an expanded lineup of IPMX-compliant products and solutions that highlight its simple plug-and-play a...

29/07/2025

G&D Outlines Plans for Live KVM and Video Processing Demos at IBC2025

AMSTERDAM German manufacturer Guntermann & Drunck GmbH (G&D) has announced that it will present a wide range of KVM and video processing solutions for broadcast...

29/07/2025

Guntermann and Drunck at IBC 2025 Live demos of innovativ...

At IBC 2025 in Amsterdam (September 12 15), German manufacturer Guntermann & Drunck GmbH (G&D) will present a range of intelligent solutions designed to meet th...

29/07/2025

Space42, Microsoft, and Esri Sign Memorandum of Understanding to Enhance Mapping Capabilities Across Africa

MoU will support the Map Africa Initiative, a program designed to create a con...

29/07/2025

X-Rite Launches CT2100 Spectrophotometer for Fast, Affordable Retail Paint Color Matching

X-Rite Launches CT2100 Spectrophotometer for Fast, Affordable Retail Paint Color...

29/07/2025

Adrian Edmondson and Lesley Sharp join cast for second series of Bergerac

Filming is now underway with Damien Molony and wider cast returning to Jersey for Bergerac, written by Toby Whithouse alongside Ashley Sanders, Emilie Robson an...

29/07/2025

NBA Summer League Tests Out, Refines Audio Workflows

NBA Summer League Tests Out, Refines Audio Workflows New mic arrays and ways of mixing them are a focus By Dan Daley, Audio Editor Tuesday, July 29, 2025 - 7...

29/07/2025

Athlete Audio Builds Fan Engagement, Player Branding at WNBA All-Star

Athlete Audio Builds Fan Engagement, Player Branding at WNBA All-Star Specialist A2 Ron Thompson has helped the technology evolve for decades By Dan Daley, Aud...

29/07/2025

Dante, Dell Technologies, Google, SMT, and Wave Central Renew Corporate Sponsorships

Dante, Dell Technologies, Google, SMT, and Wave Central Renew Corporate Sponsors...

29/07/2025

Ross Video Case Study: How to Draw Fans Deeper into the Game

Ross Video Case Study: How to Draw Fans Deeper into the Game By SVG Staff Tuesday, July 29, 2025 - 11:36 am Print This Story | Subscribe Story Highlight...

29/07/2025

FIFA Club World Cup 2025: Sounding Off With HBS at the Largest Production for a Club Competition Ever

FIFA Club World Cup 2025: Sounding off with HBS at the largest production for a ...

29/07/2025

'Breathless' Returns to Netflix, Premiering October 31st

Back to All News Breathless Returns to Netflix, Premiering October 31stPlay Video Play Video Entertainment 29 July 2025 GlobalSpain Link copied to clipboa...

29/07/2025

Made in New Jersey: Finding the Perfect Shot for Our Hit Sequel Happy Gilmore 2'

Back to All News Made in New Jersey: Finding the Perfect Shot for Our Hit Seque...

29/07/2025

FOR-A America Partners with TecNec for U.S. Distribution

Relationship Marks First U.S.-Based Distribution Partnership for FOR-A America...

29/07/2025

How Modesto Irrigation District Future-Proofed Its Public Communications with Broadcast Pix

A wide shot of MID's new Public Meeting Chambers in session, showcasing the ...

29/07/2025

Arqiva celebrates connecting 2.5 million Smart Water Meters to its network

Through reliable connectivity and industry-leading levels of data completeness, Arqiva is helping water companies to meet regulatory targets and push for a wate...

28/07/2025

4 Spotify Tips to Create the Perfect Summer Soundtrack

Summer is here, and whether you're road-tripping, relaxing poolside, or hosting friends for a backyard barbecue, the right soundtrack can make every moment ...

28/07/2025

Spotify Launches the Amplifika Creators Initiative to Empower Black Podcasters in Brazil

In 2021, Spotify launched Amplifika in Brazil as a dedicated program to foster t...

28/07/2025

7 Can't-Miss Audiobooks Available in Spotify Premium

Summer is the perfect time to dive into a new story, whether you're on the move or just looking for an escape. With Spotify Premium, eligible listeners in s...

28/07/2025

IABM confirms new Members Board for 2025 during record-at...

IABM, the International Trade Association for Broadcast and Media Technology, has confirmed the appointment of its Members' Board for 2025, following the co...

28/07/2025

Media Prima Strengthens with DHD SX2 Audio Systems for Ne...

Media Prima has chosen DHD SX2 audio production mixers for integration into new broadcast studios at Balai Berita in Bangsar on the southwest periphery of Kuala...

28/07/2025

MNC Software secures landmark transmitter project with St...

MNC Software, a global leader in network management and operational support systems tailored to the broadcast and media industry, has won a major monitoring and...

28/07/2025

Netflix Unveils the Official Trailer for the Limited Series 'Two Graves', Premiering August 29th

Back to All News Netflix Unveils the Official Trailer for the Limited Series Tw...

28/07/2025

New Korean Romantic Comedy Take Charge of My Heart' Production and Cast Confirmed

Back to All News New Korean Romantic Comedy Take Charge of My Heart' Produ...

28/07/2025

All Ireland Football Final draws a peak of over one million TV viewers to RT One & 378,000 streams on RT Player

Kerry's dominant All Ireland Football Final display draws a peak of over one...

28/07/2025

All Ireland Football Final draws a peak of over one million TV viewers & 378,000 streams on RT Player

Kerry's dominant All Ireland Football Final display draws a peak of over one...

28/07/2025

How New GB300 NVL72 Features Provide Steady Power for AI

The electrical grid is designed to support loads that are relatively steady, such as lighting, household appliances, and industrial machines that operate at con...

28/07/2025

VEON's Beeline Kazakhstan Opens New Office in Almaty Supporting the Digital Economy of Kazakhstan

28 Jul 2025 VEON's Beeline Kazakhstan Opens New Office in Almaty Supporting...

28/07/2025

Tour de France Femmes: Gravity Media France on Overlapping Schedules and Athlete Accessibility

New classic: EMG / Gravity Media France on overlapping schedules and athlete acc...

28/07/2025

Indiana Pacers Sports & Entertainment's Emily Wright on the IP-based Tech Transformation at Gainbridge Fieldhouse

Indiana Pacers Sports & Entertainment's Emily Wright on the IP-based Tech Tr...

28/07/2025

Live From National Baseball Hall of Fame Induction: Cooperstown Is at the Heart of MLB Network's Coverage

Live From National Baseball Hall of Fame Induction: Cooperstown Is at the Heart ...

28/07/2025

SVG Attendees Get Shared Reality' Treatment at Cosm Experience & Tech Tour in L.A.

SVG Attendees Get Shared Reality' Treatment at Cosm Experience & Tech Tour ...

28/07/2025

Second official teaser released for IT: Welcome to Derry, ahead of launch on Sky and streaming service NOW this October

Monday 28 July 2025 To view this content, please enable our use of cookies. To ...

28/07/2025

LinkedIn Wins Legal Battle to Protect Member Data

LinkedIn Wins Legal Battle to Protect Member Data Published on Jul 28, 2025 Categories: Company News LinkedIn Corporate Communications Share LinkedIn ...

26/07/2025

IABM Confirms New Members' Board for 2025

IABM, the International Trade Association for Broadcast and Media Technology, has confirmed the appointment of its Members' Board for 2025, following the co...

26/07/2025

Sinclair Acquires Non-Licensed Assets of WDKA and KBSI

BALTIMORE In another sign that dealmaking for U.S. TV stations may be heating up amid hopes that regulators will eliminate or loosen broadcast ownership caps, S...

26/07/2025

wTVision Inks Distribution Deal with Adistec for the Americas

LISBON wTVision, a provider of real-time graphics and broadcast services, has established a strategic alliance with Adistec that will see Adistec will distribut...