of its surface, the coordinates of the viewer’s perspective, the location and intensity of a
light source, the location and orientation of the display plane, and more.
With this information available, the GPU and graphics chipset render the 3D image
onto the 2D screen. To create the 3D look, mathematical equations calculate the tracing
through a scene, determine any light reflections and light sources, place some objects in
view and obscure others, and make distant objects smaller and darker (called depth
cueing). Obviously, the 3D rendering process is very complicated, involving a tremen-
dous number of calculations regardless of the complexity of the scene displayed. If shad-
ing is added to the process, the number of computations required is doubled.
To speed up the process, all of the computations are made on the video card by the
GPU and chipset and the graphics program; the one running on the PC is written in a
standard 3D graphics language such as OpenGL. The graphics program may also use an
API that provides a library of standard graphic commands that can be passed to the
graphics processor. Graphics APIs allow the game or application to remain compatible to
all versions of a 3D card.
Transform and Lighting
Creatingthegraphicimagesfor3Dinvolvesthetransform,lighting,andsetup.Thetrans-
form phase compares the data of one frame to the next and decides what has changed and
must be rendered (drawn) into each frame. Every object in the frame, including those that
end up behind other objects in a frame, is transformed.
As you watch a 3D game or animated image, the objects on the screen move, rotate,
and change in scale and perspective. When an item, such as a car, a plane, the focus of a
camera, or an imaginary gun moves, it creates what is called movement or translation.
Whenever your point of view on the screen changes, movement has occurred. When an
object changes in size relative to other objects, the action is called scaling. If the object
shouldturnorspin,theactioniscalledrotation.Movement,translation,scaling,androta-
tion as a group are called transforms.
Lighting effects, such as shadows, spotlights, and indirect lighting sources are then
applied to each transformed frame. Next, the setup phase builds the triangles (polygons)
that make u pthe 3D objects in the frame. They are created through a floating- point en-
gine, and the frame is ready to be rendered.
Setu p.
The third step in the process used to prepare graphic images for display is setup. This
phase of the process is split into two steps: the geometry setup and the triangle setup. The
geometry setu pcreates the data that describes how the triangles that make u pthe dis play
are to be configured. The triangle setup translates this data to represent formatted poly-
gons and triangles that essentially define the basic 3D image, its lighting, textures, and
more that is to be converted for display on the 2D monitor screen.
Chapter 12: Video Cards^271