In general, an envelope operator will put together:
- a skeleton composed of several bones (deformers).
- a mesh that will be deformed by transforming (rotating, translating, scaling) the
bones
- a set of weights that will, o a per vertex basis, define how influential is each
bone in the deformed mesh.
Once you have selected the bones, applied an envelope operator and defined its relative
importance, how this data is used to build a deformed mesh? The method implemented
in XSI is called
linear blend skinning or
skeleton subspace
deformation [Lewis00]. It's based on the idea that every vertex is
transformed using a weighted average of each deformer's transformation.
It can be mathematically modeled as
In the above equation
v and
v' represent the vertex
position before and after applying the deformation,
Cji
is the matrix that represents the relative transformation of joint
ji
respect to its rest transformation and the weight
wi
contains a value that defines the importance of bone
i in the overall
result. In simple words, to get the deformed position of each vertex, we'll transform
the vertex original position with a matrix that is the result of adding together
the relative transformation matrix of each bone multiplied by its weight.
In XSI terms, the bone transform is contained in
Kinematics.Global.
The rest transform corresponds to the
StaticKineState and contains
the pose of the bone when the operator is applied. The weights are stored in a cluster
property named
Envelope_Weights. The equation assumes that all
the weights assigned to a vertex sum 1 but there is no restrictions on this.
This method is flexible enough to generate good results, and has been accepted as
de-facto standard. However, its simplicity is the source of its limitations. In
the above image, a prism has been deformed using two bones and an envelope operator.
We can see how is properly deformed near the root and effector, but but is too compressed
in the area where the pink bone has been rotated. In the bottom image, the mesh
collapses completely as a result of the same bone being rotated 180 degrees in
the X axis. To understand the importance of this, replace that mesh with a character
arm: when animated, the arm will not keep its volume and the elbow will be reduced
to a point.
Note that several techniques can alleviate these problems. The simplest ones are
adding extra deformers and fine tuning the weights applied to each vertex but both
of them have a direct impact in the time that is needed to rig a character.
The origin of these problems is in the blending method itself. When a bone is moved,
a rigid transformation (the composition of a rotation and a translation) is applied
to it. If we interpolate several rigid transformations using a matrix representation,
as in the above equation, the resulting matrix can or cannot be a rigid transformation.
Scale and shear factors can be included in the result. That is why the mesh looks
funny.