Graphics Reference
In-Depth Information
specific object in the environment. This works well as long as there is a single point or single object on
which the camera should focus and as long as the camera does not pass too close to the point or object.
Passing close to theCOIwill result in radical changes in viewdirection (in some cases, the resulting effect
may be desirable). Other methods use points along the path itself, a separate path through the environ-
ment, or interpolation between positions in the environment. The up vector can also be set in several
ways. The default orientation is for the up vector to lie in the plane of the view vector and the global
y -axis. Alternatively, a tilt of the up vector can be specified away from the default orientation as a
user-specified value (or interpolated set of values). And, finally, the up vector can be explicitly specified
by the user.
The simplest method of setting the view vector is to use a delta parametric value to define the COI.
If the position of the camera on a curve is defined by
( s þDs ). This, of course,
should be after reparameterization by arc length. Otherwise, the actual distance to the COI along the
path will vary over time (although if a relatively large Du is used, the variation may not be noticeable).
At the end of the curve, once s þ Ds is beyond the path parameterization, the view direction can be
interpolated to the end tangent vector as s approaches 1 (in the case that distance is normalized).
Often, updating the COI to be a specific point along the curve can result in views that appear jerky.
In such cases, averaging some number of positions along the curve to be the COI point can smooth
the view. However, if the number of points used is too small or the points are too close together,
the view may remain jerky. If n is too large and the points are spaced out too much, the view direction
may not change significantly during the traversal of the path and will appear too static. The number of
points to use and their spread along the curve are dependent on the path itself and on the effect desired
by the animator.
An alternative to using some function of the position path to produce the COI is to use a separate
path altogether to define the COI. In this case, the camera's position is specified by
P
( s ), then the COI will be
P
P
( s ), while the
COI is specified by some
C
( s ). This requires more work by the animator but provides greater control
and more flexibility.
Similarly, an up vector path,
U
( s ), might be specified so that the general up direction is defined
by
( s ). This is just the general direction because a valid up vector must be perpendicular
to the view vector. Thus, the coordinate frame for the camera could be defined as in Equation 3.34 .
U
( s )
P
w ¼ CðsÞPðsÞ
u ¼ w ðUðsÞPðsÞÞ
v ¼ u w
(3.34)
Instead of using a separate path for the COI, a simple but effective strategy is to fix it at one location
for an interval of time and then move it to another location (using linear spatial interpolation and
ease-in/ease-out temporal interpolation) and fix it there for a number of frames, and so on. The up vec-
tor can be set as before in the default “up” direction.
3.4.3 Smoothing a path
For cases in which the points making up a path are generated by a digitizing process, the resulting curve
can be too jerky because of noise or imprecision. To remove the jerkiness, the coordinate values of the
data can be smoothed by one of several approaches. For this discussion, the following set of data will be
used: {(1, 1.6), (2, 1.65), (3, 1.6), (4, 1.8), (5, 2.1), (6, 2.2), (7, 2.0), (8, 1.5), (9, 1.3), (10, 1.4)}. This is
plotted in Figure 3.35 .
 
Search WWH ::




Custom Search