Graphics Reference
In-Depth Information
P
FIGURE 3.34
The curvature vector, defined everywhere but discontinuous, instantaneously switches direction at point P.
it's going” even though it is in the instantaneous (analytic) sense. The more natural orientation, for
someone riding in a car or riding a bike, for example, would be to look farther ahead along the curve
rather than to look tangential to the current location along the curve.
In addition, if the v -axis is equated with the up vector of an object, the object will rotate wildly about
the path even when the path appears to mildly meander through an environment. With three-
dimensional space curves, the problem becomes more obvious as the path bends up and down in space;
the camera will flip between being upright and traveling along the path upside down. While the Frenet
frame provides useful information to the animator, its direct use to control object orientation is clearly
of limited value. When modeling the motion of banking into a turn, the curvature vector ( u -axis) does
indicate which way to bank and can be used to control the magnitude of the bank. For example, the
horizontal component (the component in the x-z plane) of the u -axis can be used as the direction/
magnitude indicator for the bank. For a different effect, the animator may want the object to tilt away
from the curvature vector to give the impression of the object feeling a force that throws it off the path,
such as a person riding a roller coaster.
Camera path following
The simplest method of specifying the orientation of a camera is to set its center of interest (COI) to a
fixed point in the environment or, more elegantly, to use the center point of one of the objects in the
environment. In either case, the COI is directly determined and is available for calculating the view
vector, w ¼ COI POS . This is usually a good method when the path that the camera is following
is one that circles some arena of action on which the camera's attention must be focused.
This still leaves one degree of freedom to be determined in order to fully specify the local coordinate
system. For now, assume that the up vector, v , is to be kept “up.” Up in this case means “generally in the
positive y -axis direction,” or, for a more mathematical definition, the v -axis is at right angles to the view
vector ( w -axis) and is to lie in the plane defined by the local w -axis and the global y -axis. The local coor-
dinate system can be computed as shown in Equation 3.33 for a left-handed camera coordinate-system
computed in right-handed space. The vectors can then be normalized to produce unit length vectors.
w ¼ COI POS
u ¼ w ð
Þ
0,1,0
(3.33)
v ¼ u w
For a camera traveling down a path, the view direction can be automatically set in several ways. As
previously mentioned, the COI can be set to a specific point in the environment or to the position of a
 
Search WWH ::




Custom Search