Character Animation
Tutorial
For
By Frédéric Merlos
Part II
(Note: This tutorial was written for UNIVERSE
version 4
In this second part, we will build an entire human skeleton step by step, We will examine in detail the difficult body parts and how to fine-tune the skinning . And because each situation has its own problems, we will also see what are the best settings to use for each part of the skin.
This tutorial assumes you know the basics of the Inverse Kinematics System of Universe: You must know how to build a bone chain, how add an IK handle, what a PoleVector is and what Twistis .
If some of these words seem new to you, please refer to
the manual. The IK system is also explained, with examples, the Character
Animation Tutorial,
Part I.
EXAMINING THE MODELAlthough modeling is not the purpose of this tutorial, it is necessary to give some basic modeling advice because the final result of the skinning operation is strongly determined by the geometry of your model.
The model which you plan to animate with bones is commonly called the Skin.
The difference between the skin geometry and any other
object is that during the animation, the skin will be submitted to an important
transformation of its geometry. You should know in advance how you want
to animate your skin and where you plan to put the bones. During the modeling
phase you have to pay attention to the critical areas which will be deformed
by the skinning engine and try to anticipat what problems might occur in
extreme poses.
Fig.1.überNurbs model
In this example with an überNurbs model from Universe
modeler, we increase the mesh density by adding ribs in joint areas (indicated
by the grey arrows).This permits us to have smoother skinning during the
animation by adding extra polygons just where they will be needed most.
It is advantageous avoid tessellating the entire model to a higher degree
to minimize the number of polygons in the Animator.
Which pose for my character ?
Usually, we see the model in a perfectly straight
cross pose. The advantage of this position is that it's easier to model
and the initial skeleton position can be quickly created. But this is not
always the best solution for good skinning, especially not for the shoulder.
The cross position is almost an extreme position for the arms
(most of the time, arms are down, so the shoulders are
over-bent). It's often the cause of flattened and ugly shoulders. To avoid
such problems and for a better final result, you can model your character
with his legs, arms, and fingers slightly bent.
Let see some details of our "U-man" model, the character
that we will animate in this tutorial:
Fig2: U-man model
U-man is a pretty low-res polygon model, nonetheless,
the geometry is optimized in all the articulated areas. The knees, elbows,
and folds on the back of each joint are shaped. It's also important to
make the shoulders well rounded, in the initial pose position.
Take special care when you create your character model.
Even sophisticated skinning features such as weight mapping can't resolve
the problems resulting from a "bad" model.
BUILDING THE SKELETON
We will build the skeleton section by section without
caring, at least at first, about thie final hierarchy, We will focus on
hierarchy later, once the skeleton is complete..
The skelton method that follows is presented step by
step It can be used for any kind of character, not only for a human shape,
but also for quadruped, triped and all kinds of imaginary creatures.
How to add bone chains ?
It's time to recall that IK solvers find a solution in a plane according to the polevector orientation which is, by default, automatically determined according to the bones position. (see Character Animation Tutorial I ) All bone chains that will be controlled by an IK handle must be drawn within the same plane, If not, you'll run into troubles and unexpected results. So it's important to choose the plane to draw each chain in carefully. Taking this precaution will allow you to build a clean IK system for your skeleton that avoids troubles when manipulated.
ARMS
The arm bones in this example have be added in the top view.
- Select the top view and center the left
arm geometry.
- Choose create bones from character menu.
- Add the 2-bone chain by putting one bone from wrist
to elbow and the other from elbow to shoulder. The bone chain must be slightly
bent ( It's one of the
reasons
why it's better to have a pre-bent model .
- Terminate the add bone procedure by hitting ESC or
CMD-period.
- Select these first bones and choose add IK handle.
- Rename the bones and IK Handle to correspond the the
left arm
- Repeat the same steps for the right arm.
(We will cover the hands in detail later.)
If you follow this procedure, the polevector is automatically put in a good position and you don't need to change its orientation. You can now check that the chain bends in the expected way by dragging the IK Handles.
LEGS
The legs bones in this example have to be added in the side view.
- Select the side view and center the leg geometry.
- Add a 5-bone chain by putting one bone from hip to
knee, knee to ankle, ankle to heel, heel to ball of foot, ball of foot
to toe.
- Terminate the add bone procedure by hitting ESC or
CMD-period.
- Duplicate the 5-bone leg chain.
- Drag the duplicate to one side as shown in the right
side of Figure 4..
- Make sure that both leg chains are in the position
shown on the right side of Figure 4.
- Add an IK handle to each of the leg chains
that captures only the upper two bones of the leg as shown on the right
side of Figure 3.
- Rename the leg bones and Handles so they correspond
to the left and right legs..
Fig 3 : Add arm bones and leg bones in appropriated view
TIP: In figure 3, you can see that the ankle joint is, more or less, in the right place anitomically. Avoid the error of putting this joint at the heel. You can draw the foot bone directly from the ankle to the toe bone but adding the extra bone shown in fig 3 keeps the heel rigid.
Once the arm and leg skeleton are done, they appear in the front view as shown on the left side of figure 4.
-Use the IK handles for the legs and arms to position
the bone chains as shown on the right side of figure 4.
Fig 4: Use IK handle to adjust arms and legs skeleton in your skin
HAND
The hand is treated in a separate section because it's
a complex body part which needs more bones than all the previous parts
combined.
The hand skeletons must be built in two steps:
- Add the finger bones in the front view--slightly bent
in case you would like to use an IK handle to animate them.
- Adjust the Z-position of each
finger bone chain in the top view as shown in the middle section of Figure
5.
- Add the thumb bone chain in the
Top view
- Add an IK handle
for the the thumb.
- Back to front view or to camera
view and adjust the thumb skeleton position by means of the IK handle.
- Rename all the bones and the
handles to correspond to the different digits in the hand.
- Rename the long bone that runs
from the palm down into the wrist, Wrist.
TIP: The IK handle is helpful for the complex thumb articulations, but personnaly I don't like this solution for the finger animation. I will explain why in the hierarchy section.
Fig 5: hand skeleton
- Link all the fingers and the thumb chains to the main
central bone of the hand, the Wrist.
UPPER BODY
The upper body bones must be added in the front view as
shown in Figure 6.
The spine in this tutorial is pretty simple having one
bone for the lumbar area and one for the torso. This is the minimum you
can use for a spine, but you will see
that it can
be enough for a cartoon style character.
- Add the pelvis bones from the lumbar
origin to the top of the legs
- Add the collarbones from torso to the arms
- Add IK handle to control the collarbones
- Rename these IK handles to IK
shoulder left and IK shoulder right
TIP: It's important to be able to
animate the shoulders. Indeed, the position of the shoulders play an important
part in the body language. It can change the attitude and the expresion
of your character. Remember how Charlie Chaplin, acted with his shoulders...
This element is often forgotten in 3D character.animation and gives the
torso a rigid and unexpressive aspect.
Fig 6: Upper Body Skeleton
TIP: If you are looking for more elaborate spine chain and control, I suggest you to refer to the Spine tutorial. (see constraint tutorials)
We have our entire seleton done, but it is still in several independent hierarchies. We have to put these different parts into a single hierarchy to be able to manipulate them correctly.
At the moment, we have some IK handles that permit us
to control the shoulders, the arms and the legs but there are no controllers
for the hands, the feet and the upper body.
BUILDING THE HIERARCHY
First we have to define the root of our hierarchy.
the root is the parent of the entire skeleton. Usualy
is the center of gravity of the character in the pelvis area.
the root controls the global position of the entire skeleton:
The root is the parent of two hierarchy : The upperbody
hierarchy and the lower body hierarchy.
It permit to have an indepandent animation above and
below. Exemple, you should be able to animate arms, torso and head
without affecting the legs and vice versa.
TIP: We will use box effectors to
link the different parts together. We even will use some of them as animation
control HANDLES.
Box effector can be resized to
be fitted to body parts and become ergonomic and easily selectable
handles to manipulate the skeleton.
Using effector will permit also
to lock and even hide the bones. It also give a good overview of the skeleton
position in the global space
The LowerBody Hierarchy
- Link the upper legs to the pelvis bones.
- Link the pelvis bones to the lumbar bone.
- Add a box effector in the pelvis area . Put the origin
on bottom. Place the effector origin on the same position of the
lumbar bone orgin this is our center of gravity
- We call it the MOVER
This effector is now our skeleton root .
- Link the lumbar bone to
the root.
We have now, a first hierarchy structure which resemble
to our first biped from the part I
Fig. 7: Lower Body Hierarchy
The Upper Body Hierarchy
- Link the arms to their respective collarbones.
- Add a box effector to control the torso area. Stack
this effector origin to the torso bone origin (Like shown in fig 8). Call
this effector Torso Handle.
- Link the Torso Handle
to the Lumbar bone.
- Link the torso bone
to the Torso Handle effector.
- build an Head Hanlde box
effector to control the head rotation.
- Stack the Head Handle
Origin to the Head bone Origin.
- Link the Head Handle to
the torso bone.and the head
bone
to the Head Handle effector
- Link the the two Shoulder IK
to the Torso Handle effector
- Lock these previous mentioned bones
We have now , three main Effectors to control the upper
body from the pelvis to the head.
Fig. 8: Upper Body Hierarchy
Hand And Arm Hierarchy
Go back to the hand hierarchy. Currently we have the arm which is controlled by an IK handleand an independant hand skeleton. One simple solution is to link the main bone (wrist joint) of the hand skeleton to the End of the arm skeleton and then, link the Arm IK Handle to the Torso Handle. With this setup, if you bend the arm using the Arm IK Handle, the hand will follow with its orginal rotation kept according to the arm position When you rotate the Torso Handle, the Arm IK handle will follow bringing the arm and the linked hand with it.
Let look at another solution, more elaborate but which is more appropriate in many animation situations.
- Build a box effector fitted to the hand. Call it Hand
Effector.
- Link the hand skeleton and the
IK thumb to the Hand
Effector.
- Link the IK arm to the
Hand
effector.
TIP: In this exemple we added a
second forearm bone (like in real arm anatomy) to simulate the forearm
torsion and to avoid an ugly twisted wrist effect when we rotate
the hand. We need to add an IK handle at the end of this
extra bone and then, link this IK handle to the Hand
Effector.
Now, when you rotate the hand effector,
the forearm is gently twists.
- Link the Hand Effector to the
Torso Effector. The Hand position is now relative to the torso position.
Fig 9a: Hand and forearm set-up
The advantage of this setup is that the hand
Effector carries the Arm IK Handle .To move the arm, you
have to drag the Hand Effector. So, the hand
doesn't rotate according to the global space. This is what happens in real
life when you pull, or push something, when you write, when you grab a
plate or a glass, etc...
Fig 9b: Advantage of this setup during animation
Feet Hierarchy and Constraints
We left the feet without animation control until now. The reason is that the feet need special attention. Since the foot is apart of the body which always interacts with the ground, the challenge is to have a natural contact between the character and the ground. This is crucial for the credibility of the rest of the animation. The foot touches the ground at three points: under the heel, under the middle of the foot and under the toes. Because life is sometimes complicated, during a walk, these contact points touch the ground not at the same time but one after the other. Therefore the feet are doubley constrained, They are constrained by their anatomical rotation limits and by the physical limit of the ground. Fortunately, Universe 4 offers us a large set of choices for object constraint. We will now setup a constained system.
Note: there are several solutions to this particular problem. I choose to present this setup because it is one which gives me the most satisfaction in many situations.
- Select the ankle bone and the toe bone and Add an IK
Handle, call it: Foot IK
- Select the toe bone and the end of the chain and Add
an IK Handle, call it: toe IK
- Build a box effector fitted between these two IK handles
and call it : Foot Effector
- Link Toe IK and Foot IK to Foot
Effector
- Build a box effector fitted on
the heel. Call it Heel Effector
- Link the IK handle ankle
to the Heel Effector
Now, we're going to constrain these new controllers.
- First, put the Heel effector
origin, at the rear and bottom of the effector, where the heel of the model
must touch the ground.
- You also must put the Foot effector
Origin in the same place.
Fig 10a: Constrained Foot set-up
Lets focus on the type of constraints we need:
First thing, we don't want the foot to go under the ground:
- Select Heel effector and
open the Link Info window.
- Go to the Limits tab and Position.
In
the Y value choose Use Current Value and enter large numbers
into the X and Z limits to give
them free
movement., check on Enable Limits.
- Put the same Y position limits into the Foot
Effector
- Select the Foot Effector
and apply a Rotate Constraint
- Choose the Heel Effector
as the Target
- Select the Foot Effector
and apply a Position Constraint with Modify X
only.
- Choose the Heel Effector
as the Target
Fig 10b: Constrained Foot Parameters
The results of these constraints are shown in Fig 10c:
If you rotate the Heel Effector,
the foot Effector
rotates too according to its origin which is placed at the same place as
the Heel effector's
origin:
If you lift the Heel effector,
the foot Effector stays pinned to the ground
until you move it.?very useful when animating a walkcycle.
If you translate the Heel
effector on the X axis, the Foot effector
follows.
Fig 10c: Result of Rotation & Positon of the constrained foot
To finish this setup we need to constrain the leg rotation to the foot rotation in the Y axis. To achieve this, we need to constrain the Ankle IK handle Pole vector to the rotation of the Heel Effector.
- Open the IK Ankle Group info window and turn
on show Pole vector.
- Add a null ( cross effector) and put it on the Polevector
position. ( See Figure 10d )
- Rename this effector: Pole vector Target
- Link the Pole vector Target to the Heel
effector.
- Select the IK ankle and create a pole
vector Constraint
- Choose Pole vector Target null as target of
this constraint.
Now, when you rotate on the Y axis, the Heel
effector and the Foot effector follows,
and the entire leg chain rotate too. see Figure 10 d.
Fig 10d: result of Pole vector constraint on the IK Ankle .