Simple Walk Tutorial
Part 3 - Animation
This is the third and final part of a tutorial on designing a simple character, making a walk cycle for it, and then animating it walking in a scene.  The three parts are:
1) Building the body parts
2) Making the character's skeleton, and
3) Animating the character.
In this part you will first make a single cycle of a walk and the use it to make a longer walk sequence an animated scene.  Since the main reason for this tutorial is to animate a character, the objects are rather simplistic.  You will need the project that you built in part two, or you can use this Anim8or project instead.
What's a Walk Cycle?
Before you animate your character, you need to know about Walk Cycles.  This section gives a very simple introduction to Walk Cycles for those who are unfamiliar with them.   More advanced animators can skip to the next section.  It would also be useful for beginners to find a good animation book and read the chapters on walking.
A cycle is a sequence of animation that can be repeated over and over again so that a short animation can be used to fill a long time in an animation.  In addition to the normal movement, for a cycle to work, the position and motion of an object must flow naturally from the final image to the first as well.  Repetitive motion, like a character walking, does this quite easily.  So, to animate a character walking across a room, you only have to animate one full step for each foot and then repeat it enough times to get you character to the other side.
In the case of a walk, it's even simpler.  Since both legs move the same, just out of sync by 50%, you only have to animate one half of they cycle, then copy the animation to the other half.
Here you'll use 5 key positions to make a walk cycle.  By spacing them a few frames apart, Anim8or will fill in the missing poses and make a longer animation with smooth, fluid motion.  The 5 poses for the first half of the walk cycle are shown below:
Making a Walk Cycle
Open the Sequence Editor with the Mode->Sequence menu command.  The Sequence Editor will create a new, blank sequence if there aren't any in the current project.  If there already is one, use the Sequence->New command to create a new one.  Open the sequence properties dialog with Settings->Sequence.  Name the sequence something like Walk Cycle, then click on the  and select your character from the dialog that appears.  Set the length of the sequence to 40.  Close the dialog and your figure should appear in the frame.
A time line should be visible just below the work area.  If not, select the Options->TrackWindow command from the menu.  Each space represents one frame, and the dark gray one is the current frame.  You can click on any frame to see your character's pose at that time.
The Animate Key
There are two ways you can make changes to the position, angle, size, or some other aspect of a figure or object.  One is to change it for all time, such as the way that you build a model.  The other is to apply the change only for a certain time period so that it changes from frame to frame when you play a scene, and thus becomes animated.
You use the key frame  to select which kind of change you to make in the Sequence and Scene editors.  When it's off changes you make are for all time, and when it's enabled  changes are animated.  Any value you change is recorded for the current frame.  Then when you play the scene your values are updated each frame to match the ones you set for that frame.

You don't have to set keys in each frame, just those in the defining frames.  Missing values are smoothly filled in for you.  The values you set are called key values, and frames they're in are called key frames

Enable animation , hide body  parts, and show axis .  Start in the front view and select the left thigh (the right one on the screen).  Make sure that you are on frame 0 in the Track Window.  Change to the side view.  Set rotate joints  from the toolbar, then click on the tip of the thigh bone and rotate it out to the left about 35 degrees.  You can see the angle in the markings on the green arc.  Each tick is 30 degrees, so rotate the thigh a bit past the first tick.  A small black square will appear in the time track indicating that there is a key position for some joint in that frame.  Since animation is enabled changes that you make are only for frame 0.

When you have it right, hold down the Ctrl and Shft keys (to temporarily switch into Select mode) and click on the left shin.  Alternately you can select multiple bones while in Select mode and work with them by rotating any selected bone's joints.  This way you won't accidentally change the position of unselected bones.  Bend the knee back just under 45 degrees, making that position a key one as well.  Finally, select the left foot, bend it slightly to make it level with the ground.

Each joint that you touch will add a key for the current frame.  If you accidentally mode the wrong one, either use the Undo command, or select the key in the track window and delete it with a Cut or Delete command.

Now pose the right leg.  Starting at the top, select the thigh and move it  back to match the first image in the sequence above.  Then pose the right shin and foot.

Click the plus  next to the title "Walk Cycle" in the track.  This expands the track to show individual bones.  You can resize the track window by dragging the resize bar  up or down.  You can select individual bones by clicking on their row in the track.  You should see six little black boxes in the first (zero-th) column for the six bones that have key positions set. 

Your first key pose is now done.  Nine more, and you have a walk cycle!
Now click on the minus  next to the title to shrink the track back to a single line.  Carefully click on the 4th slot (counting from 0) to select frame 4 of your sequence.  A number "4" should appear in the status bar at the bottom of the window.  Then select the left thigh and rotate it so that it matches the second image in the sequence above.  Since the animate tool is still green these will become keys for frame 4.  Then position the rest of the joints as well.  Now your second key pose is complete.  This pose is called a "crossover" position and is important to get right, especially when animating at lower frame rates, since it give valuable visual cues to the viewer that the legs are changing order.

Now that you have two poses you can begin to see your character move!  Click the play button  to see your character move, at least a little bit.  Notice that the character moves almost back to it's starting position.  This is because the Sequence Editor links the end and beginning positions in a loop when previewing motion. 

Now comes a bit of work.  Move to each of the next 3 poses.  Advance the frame number by 4 each time, and position your skeleton to match.  Then make 5 more key poses after that, this time with the left and right legs in the other's position.  When you're done you'll have a complete walk cycle.  Click the play button and watch it go!
Making a Scene
Now you're ready to do some animation.  Switch to the Scene Editor with the Mode->Scene command and start in the front view.  Make the length of the scene 80 frames with Settings->Scene. 
Now add your character to the scene.  Use Build->AddFigure and select your character's name from the dialog and it will appear in the center of the scene in its default pose.  This actually adds a reference to your character, not the character itself.  You can have as many references as you like.  If you go back to the Figure Editor and change something in your character, all references will automatically be updated as well.
Now make sure that you are in frame 0 and a copy of your sequence. First select your character, then Build->AddSequence from the menu.  Your character should change into the first key pose in your sequence.
Select your character and move it up so that it is standing on the ground.  If you click the play button  your character should do one walk cycle, and then freeze in the final pose for the rest of the Scene.  The keys positions are not linked circularly like they used to be in earlier releases of Anim8or.
Now go to frame 40 by clicking on the right place on the track bar.  Or you can move forwards and backwards a frame at a time with the Right- and Left-Arrow keys.  Add the same sequence again with Build->AddSequence.  Now when you play the scene your character will do two complete walk cycles.
Set the frame to zero and select your character.  Drag to the left about 2/3 to the edge.  Enable animation with the key animation tool .  Now any change that you make to an element's position, size, etc. will animate that property.  It will create a new key for the current frame if one doesn't already exist.  Now go to frame 80, being careful not to deselect anything. Move your character to near the right of the frame.  A new position key is added at frame 80, and since frame 0 doesn't already have a key one is added there as well to mark your figure's position at the start.  A white line appears showing the location of the path.
When you move an object, there are two things that can happen:
1) If the animate tool is selected , then the position is only changed at the current frame, and adjacent frames up to the neighboring position keys.  This is how you normally animate something.

2) If the animate too isn't selected , then the position is changed for the entire scene.  If there aren't any position keys the object is simply moved.  If there are then all of the keys are moved by the same position, so the entire path moves.

Now double click on your character and in the Orientation section select Relative to: Path.  Now it will face the direction that the path is going.  Change to the Camera viewpoint, and use World  coordinates.  Go to frame 40 or so, select your character, and make sure animation is enabled.  Then click down with the left mouse button and drag up and to the right.  Your character will move away from you and stay in the plain of the ground.  Hit the play key and watch it walk along the now curved path, passing in front of the camera and out of view.
Go back to the front view and select the camera.  Select Build->FaceTarget from the menu.  Then click on your character, and the camera will always face it.  Go back to the Camera View and play your scene.  Now the camera follows your character so it doesn't leave the field of view!

Does it go by too fast to see?  Then select the View->Preferences command and in the bottom Frame Rate section check the Limit Playback box.  Now your scene will play at a more constant rate.  The default value is 24 frames per second, the same rate used for film
projection in movie theaters.  You can change this to another rate if you want.

Make a Movie
Now make an .AVI movie.  Make sure you're in Camera View, and select Render->RenderToFile.  Select AVI and All Frames, and enter a name for the file.  Click OK and a Video Compression dialog appears.  This will vary depending upon the software installed on your computer, but you can select one of several different compression schemes for the output.  Full (Uncompressed) makes VERY big files, so it's best to choose another one.  The best overall codec is called Divx.  It is not normally installed but you can find it on the web at  The Indeo codecs by Ligos or Intel are good, as is Cinepak by Radius is a good choice. Set the options you want, and click OK to make a movie!
Future Work
You may notice several problems with the way your character walks.  It's feel may appear to slide along the ground as it walks.  It may float above the ground, or it's feet may go below the surface part of the time.  You can certainly reduce these problems by carefully adjusting various positions, and you should give it a try.

You will quickly find out that this is a very tedious way to fix things.  What you need is a way to have Anim8or do these things for you.  Future releases of Anim8or will address these problems, with ways to have the motion matched to the speed that a character walks, and the height matched to the level of the ground, without having to tweak each position by hand.  So, hang in there!

To download an Anim8or project containing the objects built in the tutorial, click here:
This page was last updated on November 1, 2001.
 Copyright 2001 R. Steven Glanville