Creating a Simple Freeform Animation
Animating with Freeform
Using Controllers with Biped
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:
- Restart
or reset 3ds Max.
-
On the
Create panel, click the Systems button.
Create
a biped and load a FIG file:
-
Click
the Biped button and create a biped in the Front viewport.
-
Open
the Motion panel.
-
Turn
on Figure Mode and click Load File.
The Open
dialog is displayed.
- 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.
-
Turn
off Figure mode.
NoteYou
cannot animate in Figure mode.
-
Click
Zoom Extents All.
- Save
the scene as mywalk01.max.
Set
a key:
- 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.
- Select Bip01
R Foot.
-
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.
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.
-
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.
- Right-click
the Left viewport to activate it without changing the selection
set.
- 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).
- 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.
- In
the Perspective viewport, select Bip01 R Foot again.
-
On the
Key Info rollout, click Set Planted Key.
The red
pivot point becomes more pronounced.
- 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.
- 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:
- At
frame 0, right-click the Perspective viewport and select Bip01
R Foot.
It still has the planted key from before.
- 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.
- 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.
-
Advance
the time slider to frame 5, and click Set Key.
- Right-click
the foot and choose Rotate from the quad menu. On the main toolbar,
make sure Reference Coordinate System is set to Local.
-
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:
-
Move
the time slider to frame 10 and then click Set Key.
- Click
Select Pivot and choose the pivot on the end of the toe.
-
Click
Set Sliding Key to set a key for the pivot.
- Click
Select Pivot again, to turn it off.
- In
the Perspective viewport, right-click the foot and choose Rotate
from the quad menu.
- Rotate
the right foot about –25 degrees around the Z axis so the heel continues
to raise and roll off the toes.
-
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.
- Move
the time slider to frame 15.
- 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.
-
On the
Key Info rollout, click Set Free Key to keyframe the lifted position
of the foot.
- Move
the time slider back and forth to observe the animation so far.
- Save
the scene as MyWalk02.max.
Lock
down the opposite foot:
- Move
the time slider back to frame 0 and select Bip01 L Foot.
-
On the
Key Info rollout, click Set Key.
-
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.
- Turn
on Select Pivot and pick the pivot point at the ball of the foot.
- Click
Select Pivot to turn it off.
Keyframe
the center of mass:
-
On the
Track Selection rollout, click Body Horizontal.
Bip01 is
automatically selected.
-
At frame
0, click Set Key for Bip01.
This creates
a start key for the center of mass.
- Move
the time slider to frame 15.
- 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.
- 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.
- Select Bip01
L Foot.
-
On the
Key Info rollout, set a planted key for the ball of the foot.
- 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.
-
Move
the time slider to frame 22 and click Set Key.
- 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.
-
On the
Key Info rollout, click Set Sliding Key, then turn off Select Pivot.
- In
the Left viewport, rotate the left foot up a little more and set another
sliding key.
-
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:
-
At frame
22, select Bip01 R Foot and move it forward,
then set a sliding key.
- 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.
- Turn
off Select Pivot. Rotate the foot so it's parallel to the ground,
and then set a sliding key.
- Turn
on Select Pivot, and set the pivot to the heel. Set another sliding
key.
- Turn
off Select Pivot. Move the time slider to frame 27.
- In
the Left viewport, move the right foot forward a little.
Notice
that the foot moves away from the pivot point in the viewport.
-
Set
a sliding key.
The pivot point in the viewport moves to the
heel of the foot.
- Move
the right foot down so it touches the ground, and set another sliding
key.
- Turn
on Select Pivot. Pick the pivot at the ball of the right foot.
-
Click
Body Horizontal, move the center of mass so that it is over the
heel of the right foot and set a key.
-
At frame
27, select Bip01 L Foot and set a free key.
- Move
the time slider and watch the animation of the foot and the pivot
points.
- Save
the scene as MyWalk03.max.
Continue
the walk cycle:
-
At frame
27, click Body Vertical so you can move the center of mass.
-
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.
- 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.
-
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:
-
Move
the time slider to frame 37 and click Body Horizontal. Move the
center of mass forward and set a key.
-
Select Bip01
L Foot and move it so the leg is extended in front of
the biped. Set a free key.
- Rotate
the left foot so the heel is down and the toes point upward. Set
another free key.
Now the foot looks better.
-
With
the left foot selected, click Select Pivot and select the pivot
at the heel. Set a planted key for the pivot.
- Turn
off Select Pivot.
- Move
to frame 39, and rotate the left foot so it is flat on the ground.
-
Set
a planted key for the left foot.
-
Click
Body Horizontal and move the center of mass so the body moves forward.
-
Set
a key for the center of mass.
-
At frame
41, rotate the left toes (Bip01 L Toe0) so they are flat
on the ground. Set a planted key.
- Select Bip01
R Foot and move the time slider back to frame 30. Set
a planted key.
- At
frame 32, rotate the right toes so they are flat, and set another planted
key.
- Move
the time slider to frame 37 and rotate the right foot up a little,
then set a planted key.
- Move
the time slider and review the motion. Add rotations for the toes
as needed.
- 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.
-
On the
Track selection rollout, click Body Horizontal.
-
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.
- Scrub
the time slider, and watch the biped center of mass moving along
its trajectory.
-
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.
- Use
the Move Transform gizmo to move the keys to correct the trajectory.
- 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.
- 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.
-
Turn
on Auto Key.
- At
frame 0, select and move the left hand slightly, to set a key.
- At
frame 0, select and move the right hand slightly, to set a key.
- 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.
-
On the
Track Selection rollout, click Opposite.
The right
hand is selected.
- 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.
- In
the Front viewport, double-click Bip01 R UpperArm.
The entire
right arm is selected.
-
On the
Motion panel, open the Copy/Paste rollout and click Copy Posture.
-
Click
Create Collection. Name the Collection walkcycle1.
- Turn
on Create Snapshot from Viewport, just above the Paste Options group.
-
Click
Copy Posture. Name the Copied Posture RArm back.
-
At frame
37, click Paste Posture Opposite.
The left
arm swings behind the biped.
- At
frame 27, double-click Bip01 L UpperArm.
The entire
left arm is selected.
-
On the
Copy/Paste rollout, activate the Perspective viewport and click
Copy Posture again. Name the posture LArm forward.
-
At frame
37, click Paste Posture Opposite.
The right
arm swings in front of the body.
- Turn
off Auto Key.
- Move
the time slider back and forth to evaluate the animation.
- 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.
- 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.
-
Rotate
the pelvis about the Y-axis approximately –2 degrees and set a key.
NoteYou can only rotate the pelvis about all
three axes.
The pelvis
will not accept too much rotation. When you set the key, the pelvis
corrects itself to account for the locked foot.
-
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.
- 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
- 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.
- Select
the biped spine object, Bip01 Spine.
- 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.
- 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.
- 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.
- Turn
off Figure Mode.
- Turn
on Auto Key.
-
On the
Bend Links rollout turn on Twist Links Mode.
- Select
the Bip01 Spine object. This is the
lowest spine object in the biped.
- 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.
- 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.
- 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.
- Repeat
at frame 37 in the opposite direction to match the swinging of the
green arm outward.
- 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
.