150
Video Game Design Foundations
In Figure 4-31, two rectangular buildings are placed next to the road in
the scene discussed earlier. If the building is moved closer to the viewer, the
reading edge is longer. The building must be proportionally increased in size.
The 3D engine increases the distance between the vertices to stretch the object.
Additionally, when the player moves around the scene, the vertices on
objects must move to show a change of direction. Figure 4-32 shows two
cubes. Notice the position of the character and vertices in Figure 4-32A. In
Figure 4-32B, the character has moved in the scene. The cube is exactly the
same, just viewed from a different angle. Notice the new positions for the
vertices.
Round Objects
Rounded objects like spheres can be a challenge for a 3D engine. A sphere has
no corners. Different engines may use different solutions to this problem. In most
cases, the sphere is made up of several flat, rectangular or triangular faces that make
the object look round. Where these faces connect is a vertex. With these vertices,
A 3D engine changes the dimensions of a
model by changing the distance between
vertices. How does this work on an object
like a sphere that has no corners?
UP!
4.4
Figure 4-31.
Goodheart-Willcox Publisher; image: Shutterstock.com
A—Two buildings have been added to the scene. The building closest to the viewer
appears proportionally larger than the building farthest from the viewer. In reality, the
models are the same size. B—Textures have been added to the building models.