Professional Documents
Culture Documents
have a much more difficult time understanding even the global illumination
techniques of today, much less those of tomorrow.
10.2 Viewing in 3D
Before we render a scene, we must pick a camera and a window. That is,
we must decide where to render it from (the view position, orientation, and
zoom) and where to render it to (the rectangle on the screen). The output
window is the simpler of the two, and so we will discuss it first.
Section 10.2.1 describes how to specify the output window. Section 10.2.2
discusses the pixel aspect ratio. Section 10.2.3 introduces the view frustum.
Section 10.2.4 describes field of view angles and zoom.
premium quality to these “widescreen” monitors. Monitor sizes are typically measured
by the diagonal, but costs are more directly tied to number of pixels, which is proportional
to area, not diagonal length. Thus, a 16:9 monitor with the same number of pixels as a
4:3 will have a longer diagonal measurement, which is perceived as a “bigger” monitor.
We’re not sure if the proliferation of monitors with even wider aspect ratios is fueled
more by market forces or marketing forces.
364 10. Mathematical Topics from 3D Graphics
Figure 10.3
The 3D view frustum
more complicated, but essentially it has to do with how the depth buffer
values are assigned. As an example, if the depth buffer entries are 16-
bit fixed point, then the largest depth value that can be stored is 65,535.
The far clip establishes what (floating point) z value in camera space will
correspond to the maximum value that can be stored in the depth buffer.
The motivation for the near clip plane will have to wait until we discuss
clip space in Section 10.3.2.
Notice that each of the clipping planes are planes, with emphasis on the
fact that they extend infinitely. The view volume is the intersection of the
six half-spaces defined by the clip planes.
Figure 10.4
Horizontal field of view
Figure 10.5
Geometric interpretation of zoom
10.2. Viewing in 3D 367
view:
1 Converting between
zoom = , fov = 2 arctan (1/zoom) . (10.3)
tan (fov/2) zoom and field of view
8 While it causes videophiles extreme stress to see an image manhandled this way,
apparently some TV owners prefer a stretched image to the black bars, which give them
the feeling that they are not getting all their money’s worth out of their expensive
new TV.
368 10. Mathematical Topics from 3D Graphics
Figure 10.6
Perspective versus orthographic projection
in terms of two angles, we give two sizes: the physical width and height of
the box.
The zoom value has a different meaning in orthographic projection com-
pared to perspective. It is related to the physical size of the frustum box:
Converting between
zoom and frustum size in
zoom = 2/size, size = 2/zoom. orthographic projection
As with perspective projections, there are two different zoom values, one
for x and one for y, and their ratio must be coordinated with the aspect ratio
of the rendering window in order to avoid producing a “squashed” image.
We developed Equation (10.5) with perspective projection in mind, but this
formula also governs the proper relationship for orthographic projection.