Animating a Freeform Walk Cycle
 
 
 

While 3ds Max has a dedicated method (Footstep mode) for creating quick and easy walking animations, you can also create walk cycles with freeform animation.

In this lesson, you’ll use animated pivot points and IK blend keys to constrain the feet to the ground plane.

Set up the lesson:

  1. Restart or reset 3ds Max.
  2. On the Create panel, click the Systems button.

Create a biped and load a FIG file:

  1. Click the Biped button and create a biped in the Front viewport.
  2. Open the Motion panel.
  3. Turn on Figure Mode and click Load File.

    The Open dialog is displayed.

  4. Open the file cs4_tut_rtgame.fig.

    The biped takes on new structural elements stored in the FIG file. This simplified figure has one large toe on each foot and one large finger on each hand; its spine contains two segments instead of four.

  5. Turn off Figure mode.
    NoteYou cannot animate in Figure mode.
  6. Click Zoom Extents All.
  7. Save the scene as mywalk01.max.

Set a key:

  1. Change the Perspective viewport to wireframe (press F3) and zoom in so the feet are clearly visible.
    Tip Use the display controls Field Of View and Pan to zoom in on the feet.
  2. Select Bip01 R Foot.

  3. On the Motion panel, in the Key Info rollout, click Set Key.

    The foot is highlighted in white, and a key appears on the track bar at frame 0. You have just started a freeform animation.

    Track bar key at frame 0

Set different types of keys at frame zero:

There are two ways to set character animation keys in 3ds Max. You can use the standard method of keyframing, which involves turning on Auto Key and transforming objects. It is quick and easy, but if you forget that Auto Key is on, you can set keys unintentionally.

The second method uses the Set Key buttons on the Key Info rollout. These buttons set several parameters at once. This is the method you'll use in the steps that follow.

  1. On the Track Selection rollout, click Body Vertical.

    This selects the biped's center of mass, Bip01, and activates the Move tool in one step. You’ve set a key for the foot, but there is a problem. The foot can go through the ground plane. See for yourself in the next few steps.

  2. Right-click the Left viewport to activate it without changing the selection set.
  3. With the Body Vertical track still active on the Track Selection rollout, move the center of mass down in the Left viewport.

    The biped moves down through the ground plane (as indicated by the grid in the Perspective viewport).

  4. Press Ctrl+Z to undo.

Set planted keys:

Now you’ll set a planted key. A planted key does three things: it sets IK Blend to 1, turns on Join To Previous IK Key, and also turns on Object Space. Together, these three settings ensure that the foot will not pass through the ground plane.

For more information about IK Keys, refer to the “Key Info Rollout” topic in the User Reference.

  1. In the Perspective viewport, select Bip01 R Foot again.
  2. On the Key Info rollout, click Set Planted Key.

    The red pivot point becomes more pronounced.

  3. On the Track Selection rollout, click Body Vertical, and move the biped down in the Left viewport.

    The foot stays on the ground plane, and the knee bends to accommodate the vertical movement of the biped.

    Planted foot stays on ground.

  4. Press Ctrl+Z again to return the biped to its previous position.

Now you’ve seen the effect of the planted key on the foot. You can use the same Set Key buttons on pivot points for the feet and hands. Next, you’ll replace the key at frame 0 with a new one, changing the pivot point.

Set pivot keys:

  1. At frame 0, right-click the Perspective viewport and select Bip01 R Foot.

    It still has the planted key from before.

  2. On the Key Info rollout, open the IK expansion bar and click Select Pivot.

    All pivot points for the foot are now visible as blue and red dots. The pivot at the ankle is red, showing that this is the currently active pivot point.

    Wireframe mode lets you clearly see and select the pivot points.

  3. Click the pivot point on the ball of the foot, at the base of the toes.

    The new pivot point is displayed in red.

    NoteYou don’t have to set a key each time you choose the pivot point. However, you should use the Set Key buttons if you want to change the Key parameters.
  4. Advance the time slider to frame 5, and click Set Key.
  5. Right-click the foot and choose Rotate from the quad menu. On the main toolbar, make sure Reference Coordinate System is set to Local.
  6. Rotate the foot up approximately –15 degrees about the local Z axis to make the heel raise, and then click Set Planted Key.

    The heel lifts off the ground, the foot rotates on the ball, and the toes stay on the ground.

Now you can animate the pivot point to the toes, as the ball of the foot lifts off the ground.

Animate the pivot points:

  1. Move the time slider to frame 10 and then click Set Key.
  2. Click Select Pivot and choose the pivot on the end of the toe.

  3. Click Set Sliding Key to set a key for the pivot.
  4. Click Select Pivot again, to turn it off.
  5. In the Perspective viewport, right-click the foot and choose Rotate from the quad menu.
  6. Rotate the right foot about –25 degrees around the Z axis so the heel continues to raise and roll off the toes.

  7. Click Set Sliding Key to keyframe the foot rotation.

    The sliding key does not join to the previous key, but has IK Blend set to 1, which keeps the foot above the ground plane. If you had set a planted key, the foot would jump to a different location as it attempted to join to the previous key.

Lift the foot off the ground:

When the foot lifts off the ground completely, you’ll set a free key.

  1. Move the time slider to frame 15.
  2. In the Left viewport, right-click the foot and choose Move from the quad menu. Move the foot up off the ground and forward.

    By moving the foot, you are seeing an example of Biped’s IK system. You are creating rotations for the upper and lower leg links as you move the foot.

  3. On the Key Info rollout, click Set Free Key to keyframe the lifted position of the foot.
  4. Move the time slider back and forth to observe the animation so far.
  5. Save the scene as MyWalk02.max.

Lock down the opposite foot:

  1. Move the time slider back to frame 0 and select Bip01 L Foot.
  2. On the Key Info rollout, click Set Key.
  3. Click Set Planted Key to set a the initial key for the left foot at frame 0.

    This key locks the foot down for any subsequent movement in upcoming frames. If you were to grab the center of mass and move it down, both legs would bend instead of moving below the ground plane.

  4. Turn on Select Pivot and pick the pivot point at the ball of the foot.

    The left foot with a new pivot point

  5. Click Select Pivot to turn it off.

Keyframe the center of mass:

  1. On the Track Selection rollout, click Body Horizontal.

    Bip01 is automatically selected.

  2. At frame 0, click Set Key for Bip01.

    This creates a start key for the center of mass.

  3. Move the time slider to frame 15.
  4. In the Left viewport, use the Move Transform gizmo to move the center of mass so the torso shifts forward, and then set another key.

    Note Because the center of mass is the root node, you can use only Set Key, not the specialized IK keys.
  5. Use the Move Transform gizmo to move the center of mass down a little, so the left knee bends slightly, then set another key.

    The left leg bends automatically as the center of mass moves down.

  6. Select Bip01 L Foot.
  7. On the Key Info rollout, set a planted key for the ball of the foot.
  8. Right-click the left foot and choose Rotate from the quad menu. Rotate the foot so the heel is lifting up off the ground, and then set another planted key.

    The heel is rotated off the ground.

  9. Move the time slider to frame 22 and click Set Key.
  10. Right-click in the Perspective viewport, turn on Select Pivot, and then pick the pivot at the end of the toes of Bip01 L Foot.
  11. On the Key Info rollout, click Set Sliding Key, then turn off Select Pivot.
  12. In the Left viewport, rotate the left foot up a little more and set another sliding key.

  13. On the Track Selection rollout, click Body Horizontal. Move the center of mass forward again, and set a key.

Keyframe the right heel hitting the ground:

  1. At frame 22, select Bip01 R Foot and move it forward, then set a sliding key.

  2. Activate Select And Rotate, note the location of the gizmo intersection, and then turn on Select Pivot (this deactivates Rotate). Pick the point at the ankle that lay at the gizmo intersection, and then set a sliding key.
  3. Turn off Select Pivot. Rotate the foot so it's parallel to the ground, and then set a sliding key.

  4. Turn on Select Pivot, and set the pivot to the heel. Set another sliding key.

    The pivot point moved to the heel

  5. Turn off Select Pivot. Move the time slider to frame 27.
  6. In the Left viewport, move the right foot forward a little.

    Notice that the foot moves away from the pivot point in the viewport.

    Sliding Key lets foot move away from pivot

  7. Set a sliding key.

    The pivot point in the viewport moves to the heel of the foot.

  8. Move the right foot down so it touches the ground, and set another sliding key.

  9. Turn on Select Pivot. Pick the pivot at the ball of the right foot.

    The pivot moved to the ball of the right foot

  10. Click Body Horizontal, move the center of mass so that it is over the heel of the right foot and set a key.

  11. At frame 27, select Bip01 L Foot and set a free key.
  12. Move the time slider and watch the animation of the foot and the pivot points.
  13. Save the scene as MyWalk03.max.

Continue the walk cycle:

  1. At frame 27, click Body Vertical so you can move the center of mass.
  2. Lower the body slightly, so the biped sinks a bit as the right foot flattens onto the floor. Set a key for the center of mass.
  3. Move the time slider ahead to frame 32. Move the center of mass so it’s over the ball of the right foot. Set a key for the center of mass.

  4. Move and rotate Bip01 L Foot so the heel swings above the ground. Set a free key.

    Use this procedure throughout this exercise: Lock one foot by setting planted or sliding keys, move the center of mass, then move the other foot and set a key.

Complete the walk cycle:

  1. Move the time slider to frame 37 and click Body Horizontal. Move the center of mass forward and set a key.

  2. Select Bip01 L Foot and move it so the leg is extended in front of the biped. Set a free key.

  3. Rotate the left foot so the heel is down and the toes point upward. Set another free key.

    Now the foot looks better.

  4. With the left foot selected, click Select Pivot and select the pivot at the heel. Set a planted key for the pivot.
  5. Turn off Select Pivot.
  6. Move to frame 39, and rotate the left foot so it is flat on the ground.
  7. Set a planted key for the left foot.
  8. Click Body Horizontal and move the center of mass so the body moves forward.
  9. Set a key for the center of mass.
  10. At frame 41, rotate the left toes (Bip01 L Toe0) so they are flat on the ground. Set a planted key.
  11. Select Bip01 R Foot and move the time slider back to frame 30. Set a planted key.
  12. At frame 32, rotate the right toes so they are flat, and set another planted key.
  13. Move the time slider to frame 37 and rotate the right foot up a little, then set a planted key.
  14. Move the time slider and review the motion. Add rotations for the toes as needed.
  15. Save the scene as MyWalk04.max.

Display trajectories:

Biped has its own trajectory display. You can use it to observe the movement of the center of mass in the walk cycle. You can also edit the keys on the trajectory directly in the viewport.

  1. On the Track selection rollout, click Body Horizontal.
  2. On the Key Info rollout, turn on Trajectories.

    A line appears on the viewports showing the COM's trajectory: the path it moves along during the animation.

  3. Scrub the time slider, and watch the biped center of mass moving along its trajectory.
  4. Choose Select And Move on the main toolbar. At the top of the Motion panel, turn on Sub-Object and then click any key on the trajectory.

  5. Use the Move Transform gizmo to move the keys to correct the trajectory.

    Edit keys in biped trajectory

  6. Turn off Sub-Object and Key Info rollout > Trajectories.
WarningDon’t use the standard Trajectories functionality (button near the top of the Motion panel) with Biped. Use the Trajectories button on the Biped rollout > Modes And Display expansion bar > Display group or the Key Info rollout.

Add arm swings:

The character is starting to look like it’s walking, but it’s still pretty stiff. Adding arm swings will put some life in the animation.

The arms swing opposite to the legs. When the right leg is forward, the left arm is forward. Arms bend at the elbow on the forward swing, and stretch out straight on the backward swing.

  1. Move the time slider to decide where to place the arm swings.

    The right leg stretches out at frame 27, and you’ll keyframe the left arm to swing there.

  2. Turn on Auto Key.
  3. At frame 0, select and move the left hand slightly, to set a key.
  4. At frame 0, select and move the right hand slightly, to set a key.
  5. At frame 27, select and move the left hand so it swings forward.

    Position the arm so there is a slight bend at the elbow. Since Auto Key is on, you have keyframed the arm by moving it.

  6. On the Track Selection rollout, click Opposite.

    The right hand is selected.

  7. Move the right hand back slightly, so the arm is stretched out.

    The left arm is forward and bent a little, while the right arm is back and straight.

  8. In the Front viewport, double-click Bip01 R UpperArm.

    The entire right arm is selected.

  9. On the Motion panel, open the Copy/Paste rollout and click Copy Posture.
  10. Click Create Collection. Name the Collection walkcycle1.
  11. Turn on Create Snapshot from Viewport, just above the Paste Options group.

  12. Click Copy Posture. Name the Copied Posture RArm back.
  13. At frame 37, click Paste Posture Opposite.

    The left arm swings behind the biped.

  14. At frame 27, double-click Bip01 L UpperArm.

    The entire left arm is selected.

  15. On the Copy/Paste rollout, activate the Perspective viewport and click Copy Posture again. Name the posture LArm forward.

  16. At frame 37, click Paste Posture Opposite.

    The right arm swings in front of the body.

  17. Turn off Auto Key.
  18. Move the time slider back and forth to evaluate the animation.
  19. Save the scene as MyWalk05.max.

Add sway to the shoulders and hips:

You’ve animated the character by moving its hands and feet and center of mass. But the spine, hips, and head are still stationary. You’ll add some rotations to the shoulders and hips to complete the walk cycle.

  1. Select Bip01 Pelvis and move the time slider to frame 15.

    The left foot is locked at this frame with a planted key.

    Be careful where you add the hip rotations. Don’t inadvertently disturb the work you’ve done on the feet so far.

    As the legs extend and swing forward, the hips rotate slightly in the direction of the movement.

  2. Rotate the pelvis about the Y-axis approximately –2 degrees and set a key.
    NoteYou can only rotate the pelvis about all three axes.

    Rotation added to the hips from the Front view

    The pelvis will not accept too much rotation. When you set the key, the pelvis corrects itself to account for the locked foot.

  3. Move the time slider back to frame 0. Rotate the pelvis back 2 degrees about the Y axis and set a key. Rotate the pelvis back about –3 degrees about the X axis and set a key.

  4. Move the time slider to frame 32. Rotate the pelvis about 4 degrees around the Y axis, then set a key. Repeat for the X axis and set a key
  5. Move to frame 39 and rotate the pelvis –2 degrees around the Y axis again, then set a key.

    The procedure is the same for the spine. At frame 27, the arms swing out in one direction. At frame 37, they swing in the opposite direction.

  6. Select the biped spine object, Bip01 Spine.
  7. At frame 27, rotate the spine in the direction of the arm swing and set a key. It should be about –6 degrees around the X axis.

  8. At frame 37, rotate the spine approximately 12 degrees about the X axis and set a key.

    The spine can freely rotate about all three axes. You can make adjustments on each one. Rotate about the Z axis for a more stooped walk. Increase rotation about the X axis to make the walk loose and floppy.

    Instead of animating the spine, you can also animate the clavicles to raise or lower the shoulders.

Twist links mode:

The Bend Links rollout includes tools you can use for animation. You can use either the Bend Links or the Twist Links to animate the bending and/or twisting of the spine.

  1. Choose Figure Mode.

    In the Structure Rollout change Spine Links to 5. You can have up to 10 spine links but you will use five to observe the effect.

  2. Turn off Figure Mode.
  3. Turn on Auto Key.
  4. On the Bend Links rollout turn on Twist Links Mode.
  5. Select the Bip01 Spine object. This is the lowest spine object in the biped.
  6. Go to frame 0 and rotate the object very slightly about the X axis to add a key. Do the same about the Y axis.
  7. Move the time slider to frame 27 and rotate approximately 10 degrees about the X axis so the spine rotates following the swing of the arms. The blue arm is swinging forward, so rotate the spine to match.
  8. You can also rotate –1 degree about the Y axis.

    The slight rotation of the first spine object results in a larger effect further up the hierarchy.

  9. Repeat at frame 37 in the opposite direction to match the swinging of the green arm outward.
  10. Save the scene as MyWalk06.max.

You have animated a simple walk cycle using freeform animation and IK constraints.

You can use the footstep method of animation to create a walk cycle automatically. To learn about this technique, see Creating a Distinctive Walk .

Next

Using Controllers with Biped