Graphics Reference
In-Depth Information
q c = (0, 0, 1, 0)
C
D
B
A
q D = (0, 0, 0.7, -0.7)
q B = (0, 0, 0.7, 0.7)
q' = (0, 0, 0, -1)
q = (0, 0, 0, 1)
Figure 1.1. Aligning quaternions for the cylinder object.
on the cylinder surface one after another in the counterclockwise direction. As
one can observe, when we return to point A after a turn around, the respective
quaternion at this point will be q =(0 , 0 , 0 , − 1). This means that neighbor-
ing vertices at point A will be misaligned , resulting in the long-arc quaternion
interpolation as shown in Figure 1.2.
The geometrical justification for this effect lies in the quaternion nature. If
we recall that a quaternion q =( x sin( 2 ) ,y sin( 2 ) ,z sin( 2 ) , cos( 2 )), it becomes
clear that while our turn around the angle α (and respective normal) made a
complete 360 , which corresponds to the full period of the function, it only made
ahalf-period(sincewehave 2 as an argument) for the quaternion.
In the general case, this problem is unsolvable without a topology alteration.
However, for a real in-game UV-mapped asset, we will never have a situation when
we can find a closed chain of adjacent vertices on the surface of a model so that a
normal makes a 360 rotation when we traverse this chain. This is true because
aclosedmeshcannotbecorrectly UV-mapped so that a texture, unique at each
point, can be applied to this mesh. If we get back to the cylinder sample and try
to map a 2D texture to the cylindrical surface (Figure 1.3), this would mean that,
Search WWH ::




Custom Search