Chapter 4 Perspective, Scene Design, and Basic Animation 113
Now examine the blue-black cube in Figure 4-24B. This original cube
is not proportionally scaled. The front and back faces of the new cube have
four checkerboard squares on each edge. This means these faces are scaled
by 200%. However, the other faces still have two checkerboard squares on
each edge. These edges have not be scaled. Therefore, the original cube
was nonproportionally scaled to create the new object. Also, it is no longer
a cube, but a rectangular box. As such, the new object in Figure 4-24B
cannot be the original object moved closer to the viewer.
Think of the original cube as a building in a game. In the distance, the
cube (building) is small. It must be scaled up to make the building appear
closer as the player’s character walks closer. With every step of the character,
the 3D engine proportionally increases the distance between the vertices
and interpolates the object.
Depth
In this next example, the 3D engine measures the depth from the front
vertex to the rear vertex along the angle to the vanishing point. On the cube
shown in Figure 4-25, the reading edge is colored blue. As this reading
edge changes in size, the cube will be propor-
tionally resized.
To reduce the amount of programming
needed by early computer game systems, the
reading edge was developed. This allowed the
computer read a single edge in each direction
instead of trying to read all vertices of a 3D
object. The reading edge is a programmed
line between two vertices. When the reading
edge changed, the entire object would be
scaled to the reading edge dimension. Early
game designers used only two reading edges
on perpendicular, horizontal surfaces. All vertical
height changes on 3D objects were handled by
scaling to the size of the horizontal reading edge
line changes.
The benefi t to programming a reading edge
was to reduce programming load. The computer
no longer needed to interpret all of the vertices
of all objects at the same time. It could change only the reading edge lines.
A subroutine controlled the sizing of each object’s vertices based on the
reading edge change.
In newer, more powerful game engines, 3D objects are surrounded by
a bounding box. A bounding box is an invisible cube inside of which the
3D object completely fi ts. The computer resizes the bounding box with the
main graphics processing module. Then, a subprocessing module scales the
vertices of the actual object inside of the bounding box. Essentially, all of the
edges of the bounding box are reading edges.
In Figure 4-26, a rectangular building is placed next to the road in the
scene discussed earlier. If the building is moved closer to the viewer, the reading
Figure 4-25. The reading edge on this cube is shown in blue.
Previous Page Next Page