110 Video Game Design Foundations
A 3D game engine will create an object
using a vanishing point in the center of the
screen if the view is fi rst person. If the view is
third person, then the vanishing point will be at
the midpoint of where the camera is pointed. To
achieve a vanishing point, the 3D engine uses
the concept of pixel shading and vertices.
Pixel Shading
Pixel shading works on the idea that as
you move farther from the light source, things
get darker. The game engine shades the pixels
of distant objects darker and closer objects
lighter. As you move toward a distant object,
it will get brighter until it reaches full color
when you are next to the object. In addition to
distance shading, an object will have different
shades of color on different surfaces to give
contrast to the object.
Vertices
Pixel shading is cool, but something has to make the objects get bigger
and move as though you were seeing them get closer. The 3D engine does
this by adjusting the distance between vertices on the model. A vertex is a
point on a 3D model where the corners of adjacent faces meet.
For example, a cube object has six faces and eight vertices. See Figure 4-21.
The maximum number of vertices visible on a cube in a given shaded view is
CHEAT CODE: VERTICES
While some consider the plural of vertex to
be vertexes, it is actually vertices (ver-ti-
sees). A group of more than one vertex
is a group of vertices.
THINK ABOUT IT
ACTIVITY 4.3
Think about the phrase, the light
at the end of the tunnel. Think
about how you might draw
this concept in a very long
straight tunnel. How does the
use of a vanishing point work in this
drawing?
A B C
Figure 4-21. A—A cube has eight vertices, represented by the spheres. In this view, only seven vertices are visible.
B—As the view of the cube is rotated, different vertices are visible and hidden. Now, only six vertices are visible. C—When
the view is rotated to show the front face, the cube looks like a square and only four vertices are visible.
Previous Page Next Page