Graphics Reference
In-Depth Information
Transformation Hierarchies
The type of movement constraint that we need can be accomplished with transformation
hierarchies. If one object's transformation matrix is generated such that it is applying the
position and orientation of its mesh with respect to the mesh that it is attached to, it can
be rendered by concatenating its own world space matrix with that of its "parent" object.
Returning to our robotic arm example, if each of these arm components is connected to a
parent object, it only needs to manage the transformation state with respect to its parent.
When it is time to render each component, we would begin with the component that has
no parent and calculate its transformation matrix. This would be followed by the first child
calculating its transformation matrix and then concatenating this value with the parent's
transformation matrix. This process of concatenating matrices essentially moves the child
object from a coordinate space defined by its parent to the world space in which its parent
is located. This is repeated until all of the components have been updated, at which point
we could render them individually with their newly calculated world matrices.
This concept was used in computer graphics long before programmable GPUs were
developed. However, this is still an interesting topic to consider, which can be applied to
the more difficult problem of rendering organic objects. Using transformation hierarchies,
we can render individual portions of the robotic arm, since they actually are individual
pieces. However, a human arm not only has bones that are separate pieces, but also has a
muscular system and skin that are continuous across the arm. This doesn't lend itself to render-
ing an arm in pieces, since the object should appear continuous, as it does in the real world.
Transformation hierarchies still hold the key to finding a solution to this problem.
Instead of trying to split the arm into multiple discrete pieces, it would be better to be able
to say how much each vertex is influenced by each the objects it is in contact with. For
example, the skin on an elbow moves partially with the upper arm and partially with the
lower arm. If we develop a system that allows us to assign a weighting for each vertex to
each specify how much it is influenced by a particular component, we could calculate the
vertex position as if it were attached to each component and then interpolate its final posi-
tion based on the weights applied to each component.
Skin and Bones
This is the primary idea behind vertex skinning. The vertices of a mesh define the skin of
a model, and each component included in the transformation hierarchy is referred to as a
bone. The complete group of bones is referred to as the skeleton of the model. These names
provide a simple visualization of what the individual pieces of this algorithm represent.
There are many different variations of this algorithm that can be more or less suitable for a
given situation, but the algorithm provided here is a fairly general version. We will allow
each vertex to be associated with up to four bones each, which will allow for a significant
amount of flexibility in making an animation look correct.
Search WWH ::




Custom Search