Game Development Reference
In-Depth Information
Figure 10.8. In a physical camera, increasing the focal distance d while keeping the size of the
“film” the same has the effect of zooming in.
how to project onto a plane perpendicular to the z-axis and d units away
from the origin. (The plane is of the form z = d.) But we didn't use d
anywhere in the above discussion. As it turns out, the value we use for d
isn't important, and so we choose the most convenient value possible for d,
which is 1.
To understand why d doesn't matter, let's compare the projection that
occurs in a computer to the projection that occurs in a physical camera.
Inside a real camera, increasing this distance causes the camera to zoom
in (objects appear bigger), and decreasing it zooms out (objects appear
smaller). This is shown in Figure 10.8.
The vertical line on the left side of each diagram represents the film
(or, for modern cameras, the sensing element), which lies in the infinite
plane of projection. Importantly, notice that the film is the same height
in each diagram. As we increase d, the film moves further away from the
focal plane, and the field of view angle intercepted by the view frustum
decreases. As the view frustum gets smaller, an object inside this frustum
takes a larger proportion of the visible volume, and thus appears larger
in the projected image. The perceived result is that we are zooming in.
The key point here is that changing the focal length causes an object to
appear bigger because the projected image is larger relative to the size of the
film.
Now let's look at what happens inside a computer. The “film” inside
a computer is the rectangular portion of the projection plane that inter-
sects the view frustum. 9
Notice that if we increase the focal distance,
9 The “film” is in front of the focal point rather than behind the focal point like in a
real camera, but that fact is not significant to this discussion.
Search WWH ::




Custom Search