Graphics Reference
In-Depth Information
Figure 1.10. Original character (left) and two extreme morph targets (center, right).
[Image courtesy of Mail.Ru Group.]
1.7 Morph Targets
As Skyforge is an MMORPG game, we want to give players as many opportunites
to customize characters as possible. One of the most interesting customizations
enables a player to change body proportions of his or her character in a contin-
uous fashion. This is implemented via interpolation of each vertex between two
so called morph targets , i.e., separate vertex streams. An example of such an
interpolation is shown in Figure 1.10.
Regarding quaternions, only a few considerations should be kept in mind
for morph targets. First, meshes, corresponding to different targets between
which we are interpolating, should have the same topology and uv -mapping.
This obviously includes handedness of initial TBN in vertices. Second, after
we convert TBNs to quaternions, we should align quaternions, corresponding to
the same vertex in different targets. This can be obtained naturally, if we start
Algorithm 1.1 for both targets at the same vertex, as meshes share the same
topology.
1.8 Quaternion Format
In this section we discuss how we store quaternions in memory and how we pack
them when sending to GPU. Table 1.1 shows layouts we use for quaternions in
our engine.
The most interesting case is a vertex quaternion. Our experiments have shown
that 8-bit precision is enough for per-vertex quaternions. However, since TBNs
can have different handedness, we also need to store a handedness bit. We did
not want to spend another channel on it, so we came up with two solutions.
Search WWH ::




Custom Search