Tutorial 2: Freeform Biped Animation

Lesson 2: Animating a Freeform Walk Cycle

While character studio has a entire mode (Footstep mode) for creating quick and easy walking animations, you can also create walk cycles with freeform animation. You'll use animated pivot points and IK blend keys to constrain the feet to the ground plane.

Setup

  1. Restart or reset 3D Studio MAX.

Creating a biped and loading a figure file

  1. Create a biped in the Front viewport.

  2. On the Motion panel, click Figure mode and load rtgame.fig for a simple figure that has 1 large toe and 1 large finger.

    Biped with one toe and one finger

    This will work quicker than a file with more toes and fingers.

  3. Click Figure mode again to turn it off.

    Tip: You can't animate in Figure mode.

  4. Select the entire biped and click Zoom Extents All.

  5. Change the Perspective viewport to wireframe and zoom in so the feet are clearly visible.

  6. Select Bip01 R Foot.

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

    Track bar key at frame zero

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

  8. On the IK Key Info rollout, click Select Pivot.

    The pivot points for the foot are now visible. The pivot at the ankle is red, showing that this is the pivot point currently selected.

    Pivots in wireframe display

    Wireframe mode lets you see and select the pivot points.

    Tip: To select pivot points in Smooth and Highlight shading, use See-Through Display mode (ALT+X).

    Pivots visible in See-Through display

  9. In the Perspective viewport, click the pivot point at the heel.

    The pivot point at the heel turns red.

    Tip: You must set a key before you can select a pivot in the viewport.

Setting different types of keys at frame zero

There are two ways to set keys in character studio. You can turn on Animate and transform objects. This is the standard 3D Studio MAX method of keyframing. It is quick and easy, but if you forget that Animate is on, you may set keys unintentionally.

Instead, you can use the set keys buttons on the Key Info and IK Key Info rollouts. The Set Key buttons set up several parameters at once.

  1. Turn off Select Pivot.

  2. In Track Selection, choose Body Vertical.

    This selects the biped center of mass, and activates the move icon 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 several steps.

  3. Right-click to activate the Left viewport without changing the selection set.

  4. 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).

  5. Press CTRL+Z to undo.

Setting Planted Keys

Now, you'll set a planted key. A planted key will do three things: it will set IK Blend to 1, it will turn on Join to Previous IK Key, and it will turn on Object Space. Together, these three settings ensure that the foot will not go through the ground plane.

  1. Select Bip01 R Foot.

  2. On the IK 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, the knee bends to accommodate the vertical movement of the biped.

    Planted foot stays on ground

  4. Press CTRL + Z again, to reverse the movement of the center of mass and return the biped to its original position.

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

Setting Pivot Keys

  1. At frame 0, select the Bip01 R Foot in the Perspective viewport.

  2. On the IK Key Info rollout, click Set Planted Key.

  3. Turn on Select Pivot.

  4. Choose the pivot point in the middle of the front of the foot, at the base of the toes.

    The pivot point is displayed in red.

    Ball of the foot pivot selected

    You don't have to set a key after each time you choose the pivot point. However, you should use the set key buttons if you want to change the IK Key parameters.

  5. Advance the time slider to frame 5, and click Set Key.

  6. Right-click the foot and choose Rotate. Rotate the foot up approximately 15 degrees about the Z axis and click Set Planted Key.

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

    Rotate the foot on the ball pivot.

    Now, we can animate the pivot point to the toes, as the ball lifts off the ground.

Animating the Pivot Points

  1. Go to frame 10, and click Set Key.

  2. Click Select Pivot and choose the pivot on the end of the toe.

  3. Click Set Sliding Key to keyframe the pivot.

    Select the toe pivot.

  4. Click Select Pivot again, to turn it off.

  5. In the Perspective viewport right-click the foot and choose rotate.

  6. Rotate the foot so the heel continues to raise and roll off the toes.

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

    Rotate the foot.

    The sliding key does not join to the previous IK 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 attempts to join to the previous IK key.

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

Lifting the foot off the ground

  1. Move the time slider to frame 15.

  2. In the Left viewport, move the foot off the ground using the Transform gizmo arrow.

    Here you're using biped's IK system. By moving the foot, you are also creating rotations for the upper and lower leg links.

  3. Move the foot forwards by using the Transform gizmo arrow.

  4. Click Set Free Key to keyframe the position of the foot.

  5. Rotate the foot slightly down toward the ground.

    Raise the foot then rotate it.

  6. Click Set Free Key to keyframe the rotation of the foot.

    If you add rotations for the toes, be sure to set Free Keys for them as well.

  7. Move the time slider back and forth to observe the animation so far.

Locking down the opposite foot

  1. Move the time slider back to frame 0 and select Bip01 L Foot.

  2. On the IK Key Info rollout, click Set Key.

  3. Choose Select Pivot.

  4. Select the pivot for the ball of the foot.

  5. Set a planted key for the pivot point.

    The IK Blend changes to 1. Object Space and Join to Prev IK Key are turned on.

    There is now a planted key at frame 0.

    This locks the foot down for any subsequent movement in frames to come.

  6. Click Select Pivot to turn it off.

Keyframing the center of mass

  1. Select the center of mass by choosing Body Horizontal on Track Selection.

  2. At frame 0, set a key for the center of mass.

    This will create an initial key for the center of mass.

  3. Move the time slider to frame 15.

  4. In the Left viewport, use the Transform gizmo to move the center of mass so the torso shifts forwards, and then set a key.

    Move the center of mass forward.

    Since the center of mass is the root node, use Set Key, rather than one of the specialized IK keys.

  5. Use the Transform gizmo to move the center of mass downwards so the knee bends, and then set a key.

  6. At frame 15, select Bip01 L Foot.

  7. On the IK Key Info rollout, set a key and choose Select Pivot.

  8. Choose the pivot point at the center of base of the toes, and set a planted key.

  9. Turn off Select Pivot.

  10. Rotate the foot so the heel is lifting up off the ground, and set a planted key.

  11. At frame 22, set a key, and turn on Select Pivot.

  12. In the Perspective viewport, select the pivot at the end of the toes of Bip01 L Foot.

  13. Set a sliding key.

  14. Turn off Select Pivot.

  15. Rotate the foot up some more and set a sliding key for the foot.

  16. Move the center of mass forward again, and set a key.

    If you move the center of mass down you can change the appearance of your walk. You can put bounce into the biped's step.

Keyframing the heel hitting the floor

  1. At frame 22, lower the right foot so the heel is level with the ground and set a sliding key.

  2. Select the pivot of the right foot so it's on the heel and set a sliding key.

    The heel strikes the ground.

  3. Move the foot forwards a bit.

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

  5. Set a sliding key.

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

  6. Advance to frame 27 and rotate the right foot so it's flat on the ground.

    Now you can set a planted key.

  7. At frame 27, select the pivot on the ball of the right foot.

    Animate the pivot to the ball

  8. Move the time slider and see the animation of the foot and the pivot points.

Keyframing the trailing foot

  1. Select the center of mass , move it so it is over the heel of the planted right foot and set a key.

  2. Select the left foot and set a free key.

  3. Raise the left foot up off the floor and move it to the right.

  4. Rotate the toes down so they look more natural and set a free key for the toes.

    Lift the trailing foot.

  5. Move the time slider to play the animation.

  6. If the foot appears to drag along the floor, go to frame 24, raise the foot off the ground and set a free key.

Continuing the walk cycle

  1. At frame 27, select 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 the blue 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.

Completing the walk cycle

  1. Move the time slider to frame 37, select the center of mass and shift it forward. Set a key.

  2. Select the left foot and move it so the leg is fully extended. Set a free key.

    You can rotate the lower leg to make it look more natural.

    The Leg extended, but not on the ground

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

  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.

    Tip: You can also turn off Select Pivot by clicking Sub-Object.

  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. Move the center of mass so the body moves forwards.

  9. Set a key for the center of mass.

  10. At frame 41, rotate the toes so they are flat too, and set a planted key for the toes.

  11. For the right foot, be sure there are set keys on the heel pivot at frame 22 and on the ball pivot at frame 27.

  12. At frame 32 set a sliding key on the toe pivot.

  13. At frame 37, rotate the right foot off the toe pivot and set a planted key.

  14. Move the time slider and review the movement. Add rotations for the toes as needed.

    Add Rotations to the toes

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. In the Display rollout turn on Trajectories.

  2. In the Track selection rollout, click Body Horizontal.

  3. Scrub the time slider, and see the biped center of mass moving along it's trajectories.

  4. Choose Select and Move on the Main toolbar, turn on Sub-Object Trajectories, and then click any key on the trajectory.

  5. Use the transform gizmo to raise or lower the keys to correct the trajectory.

    Edit keys in Biped Trajectory

    Warning: Don't use the 3D Studio MAX Trajectories with Biped. Use the Trajectories button in the Biped Display rollout instead.

  6. Turn off Biped Trajectories.

Adding 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 forwards, the left arm is forwards. Arms bend at the elbow on the forwards swing, and stretch out straight on the backwards swing.

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

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

  2. Turn on Animate.

  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 22, select and move the left hand so it swings forwards.

    Position the arm so there is a slight bend at the elbow. Since Animate 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 so the arm is stretched out.

  8. Double-click on Bip01 R UpperArm.

    The entire right arm is selected.

  9. On the Keyframing rollout, click Copy Posture.

  10. At frame 37, click Paste Posture/Pose/Track Opposite.

    The left arm swings behind the body.

  11. At frame 22, double-click Bip01 L UpperArm.

    The entire left arm is selected.

  12. On the Keyframing rollout, click Copy Posture.

  13. At frame 37, click Paste Posture/Pose/Track Opposite.

    The right arm swings in front of the body.

  14. Turn off Animate.

  15. Move the time slider back and forth to evaluate the animation.

Adding 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 the 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 inadvertantly disturb the work you've done on the feet so far.

    As the legs extend and swing forwards, 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.

    Add rotation to the hips.

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

    You can rotate the pelvis only in Y. You can't rotate it in Z or X.

    The right foot is locked down at frame 32, so you'll set a key there as well.

  3. Move the time slider to frame 32, and rotate the pelvis a few degrees, and set a key.

  4. Move to frame 39 and rotate the pelvis back again and set a key.

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

  5. Select the biped spine object (Bip01 Spine).

  6. At frame 22, rotate the spine in the direction of the arm swing and set a key.

  7. At frame 37, rotate the spine in the opposite direction and set a key.

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

    You can also animate the clavicles to raise or lower the shoulders instead of animating the spine.

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

    You can use the techniques found in the swimmer tutorial to refine and finish the animation motions. Be sure to do that tutorial as well, if you've skipped it.

    You can use the footstep method of animation, to create a walk cycle automatically. To learn about this, see Tutorial 3 Animating a Walk Cycle with Footsteps.

     

     

     


    Comments