149
Chapter 4 Perspective, Scene Design, and Basic Animation
Now examine the blue-black cube in Figure 4-29B. 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 percent. However, the other faces still have two checkerboard squares on
each edge. These edges have not been 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-29B 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
To reduce the amount of programming needed by early computer game
systems, the reading edge was developed. This allowed the computer to 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 benefit 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.
The 3D engine, therefore,
measured the depth from the front
vertex to the rear vertex along the
angle to the vanishing point. On
the cube shown in Figure 4-30, the
reading edge is colored blue. As this
reading edge changes in size, the
cube will be proportionally resized.
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 fits. 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.
Figure 4-30. The reading edge on this cube is shown
in blue.
Goodheart-Willcox Publisher
Previous Page Next Page