Before you begin linking
any but the simplest hierarchy you should take a few minutes to
plan your linking strategy. Your choices for the root of the hierarchy
and how the branches grow out to the leaf objects will have important
effects on the usability of your model.
The strategy behind linking
objects into a hierarchy can be reduced to two main principles:
- The hierarchy follows a logical progression
from parent to child.
- Parent objects move less than their descendants.
Within these two principles
you have almost unlimited flexibility as to how you link your objects.
If you think about how you intend to use the hierarchy, and link
it with that use in mind, you will rarely have a problem.
Progression from Parent
Progression from parent
to child means the links do not erratically jump from object to
object. If two objects touch each other they should probably be
linked as parent and child. There is nothing to prevent you from
linking a body in the order of: Thigh->Foot->Shin->Waist.
You would probably regret such a linking strategy later. The effort
to figure out how to transform objects linked in such a strange
way would be quite difficult. A more logical progression would be
Using Multiple Hierarchies
Rather than build a single
bone chain from a hip to a toe, you can make one chain from the
hip to the ankle, and then a second independent chain from the heel
to the toe. You would then link the chains together to form a complete
Because they are linked
together, the leg and foot chains could be considered one chain.
However, the way you animate them treats each chain separately,
allowing fine control over the parts.
With this type of arrangement
on leg and foot chains, the foot could be made to stay on the ground
while the leg bends. It also allows for independent control of the
foot's rotation, pivoting on the heel or toe, which would then cause
the knee to bend.
Parents Move Less Than
Because of the way transforms
are inherited from parent to child, small adjustments to a parent
object might require you to adjust all of its descendants. The typical
approach to linking is to choose as your root object the object
that moves the least. Objects close to the root should move very little,
and leaf objects should move the most.
This is especially true
when you are linking jointed structures like robots or machinery,
or intend to use the hierarchy with
An exception to this
rule occurs when you are using the root object as a handle. All
of the descendants of the root are just along for the ride. Consider
a tray full of objects traveling on a conveyor belt. All the objects
should be children of the tray even though the tray moves much more
than any of the other objects.
Choosing the Root of a
You can find the best
candidate for the root of your hierarchy by asking the following
If I move this object,
should all of the other objects in the hierarchy move with it?
- If the answer is almost always, then
you are looking at a likely candidate for the root object. Examples
of this type of object are a torso, a lamp base, and a tree trunk.
- If the answer is not often, then you
are probably looking at a child object. Examples of this type of
object are hands, lamp shades, and tree leaves. If you move a character's
hand, for example, its torso should not move.
Once you have a few candidates
for the root object, you can examine them in greater detail. Use
these criteria to determine a good root object for your hierarchy:
- Moving the root object usually has a
great effect on all other objects in the hierarchy.
- Conversely, the root object is mostly
unaffected by movement of other objects in the hierarchy.
- The root object is rarely animated, and
is moved or rotated primarily to place the hierarchy at the correct
place in the scene.
- The root object is at or near the hierarchy’s
virtual center of mass.
The object that best
satisfies these criteria is your root object. You then create your
hierarchy with all of the other objects as descendants of that root
Linking Objects for Inverse
Inverse kinematics (IK)
uses the child object as the driving force for the animation. IK
is less forgiving and is highly dependent on the linking strategy
for performing calculations.
You need to consider
two additional principles when linking hierarchies for use with
- Links and pivot placement simulate real-world
- Choose an object near the structure’s
center of mass, or center of gravity, as the root of the hierarchy.
The center of mass in the real world is the point on an object about
which reactions to external forces are applied.
1 and 2 each represent
the root of the characters.
Both structures are
suitable for forward kinematics.
The structure on the
right is best for most inverse kinematics.
The figure above shows
two approaches to linking a skeletal structure. Either structure
is suitable for working with forward kinematics. The structure on
the right, however, is a better choice for working with inverse kinematics.
- The root object is located near the body’s
center of mass.
- The link order more closely simulates
the connections of a real body.
The structure on the
left has the arms and torso linked to the neck. The structure on
the right links the arms and neck to the torso, a more realistic
WarningBe sure to avoid
using non-uniform scaling on objects in a hierarchy that will be
animated using IK. You will see stretching and skewing if you do.
Instead do all non-uniform scaling at the sub-object level, to avoid
this problem. Use Reset XForm if you have objects that exhibit this
Linking Objects After Animation
When you link an object
to another, the link relationship between the child and its parent
is determined by the position, rotation and scale of the parent
and child objects when the link is made.
Imagine linking a stationary
sphere to an animated box.
- At frame 0 the box is beside the sphere.
- At frame 50 the box is 20 units away.
with ball unlinked and stationary while the box moves.
Linking the sphere to
the box causes the sphere to move with the box. The distance between
the sphere and the box depends on the frame when the link is made.
Linking the sphere on different frames has the following effects:
- Link on frame 0, and the sphere stays
next to the box as it moves.
- Link on frame 50, and the sphere stays
a distance 20 units away from the box as it moves.
Left: Ball linked at
frame 0 follows the box on the side.
Right: Ball linked
at frame 50 follows the box 20 units away.
Unlinking Objects After
When you unlink a child,
its frame 0 transforms are taken from the transforms of its parent
at the frame when the link is removed.
Imagine a sphere linked
to a box moving around the face of a clock. The box starts at 12
o'clock and travels all the way around the face over 100 frames.
The figure shows a box moving in a circle with a sphere linked above it.
with ball linked to follow the animated box.
If you unlink the sphere,
it stops following the box. The position of the sphere depends on
its position, rotation or scale at the frame on which the link is
removed. Unlinking the sphere on different frames has the following
- Unlink on frame 0, and the sphere stays
at 12 o'clock.
- Unlink on frame 25, and the sphere stops
at 3 o'clock.
- Unlink on frame 75, and the sphere stops
at 9 o'clock.
Clockwise from top,
position of the sphere unlinked at frame 0, 25 and 75, respectively.