Graphics Reference
In-Depth Information
Figure 1.4. Channeling spell being cast. [Image courtesy of Mail.Ru Group.]
First, only axis-aligned nonuniform scale may be encoded. Figure 1.5 shows
the difference between encoding the same transform with an SQT and a scale-
rotation matrix. While a single scale-rotation transform performed by a scale-
rotation matrix can also encode only an axis-aligned nonuniform scale, a super-
position of these transforms can encode a non-axis-aligned scale, while a superpo-
sition of SQTs will always keep all scales axis-aligned. This means, for instance,
that a box will always remain a box after any SQT transformations (keeping
straight angles around its corners), but this is not a case for an arbitrary scale-
rotation matrices superposition. In our experience, we did not have a strong need
for such transformations. However, this can slightly increase the mesh count, as,
for instance, different rhombi can no longer be encoded with a single mesh with
different transformations applied.
Second, with SQTs all scale transformations are done in the object space .For
instance, if you rotate an object at a 90 angle in the xy -plane and then scale along
the x -axis, it will be scaled along the y -axis instead, as shown in Figure 1.6. In
terms of channeling effects, this imposed a restriction on the content. All objects
that a channeling effect consists of should be aligned along the major axis of the
effect; otherwise, they will be stretched orthogonally to the effect direction.
For instanced objects, encoding rotation with quaternions worked straightfor-
wardly. We provide more details on this in Section 1.8.
Search WWH ::




Custom Search