Game Development Reference

In-Depth Information

rigid transformations while being computationally competitive and easy to imple-

ment. Its only downside is that it does not
directly
support the blending of joints

with scaling. That said, scaling can be done in a separate pass and added after

the DQ deformation. The newest version of Maya does exactly this in its DQ

implementation. Readers interested in implimenting DQ skinning in their own

engine (as several studios already have) will find sample source codes available

from Ladislav Kavan's website:
http://isg.cs.tcd.ie/projects/DualQuaternions/
.

Spline skinning.
Another interesting extension of smooth skinning comes from

the paper titled “Fast Skeletal Animation by Skinned Arc-Spline Based Deforma-

tion” [Forstmann and Ohya 06]. This paper contains what I believe to be the best

solution for character skinning. For whatever reason, it has received very little

attention from industry professionals (that I am aware of). What follows is a brief

description of how it can fix the problems with smooth skinning.

The technique involves the creation of spline curves that run through the skele-

ton, giving it a sense of connectivity. Control points of the spline are placed along

the lengths of the bones. This results in a smooth curve that runs
through
the

skeleton. After the joints are animated, the curve's control points are updated to

lie along the new bone positions (point positions are implicitly defined as a per-

centage along the length between two joints). New control-point positions are

then used to recompute the curve itself each frame.

13.3.5 Deforming with Splines

Mesh vertices are then attached to a parameterized position,
u
(
t
), along the length

of the skeleton curve. The parameter
u
(
t
) can be automatically precomputed as

the closest point on the curve, making attachment automatic (and far easier than

the comparatively laborious task of painting weights).

To compute the deformed vertex positions, a new transformation is computed

on-the-fly at the curve position
u
(
t
). This transform matrix is positioned at
u
(
t
)

with the
x
-axis pointing down the curve and the
y
-axis aligned with the twist of

the parent joint. The
z
-axis is computed as the cross-product of the other axes:

X.x

X.y

X.z

0

Y.x

Y.y

Y.z

0

(
Y

×

X
)
.x

(
Y

×

X
)
.y

(
Y

×

X
)
.z

0

u
(
t
)
.x

u
(
t
)
.y

u
(
t
)
.z

1

Twisting can be added by taking a percentage of the child joint's twisting

rotation and applying that down the length of the parameterized curve using a

linear or exponential falloff. Scaling can be applied similarly.