126 Game Development and Simulation with Unreal Technology
mesh can become a mirror, concrete, wood flooring, or even metal grating. Moreover,
materials may give ob je cts effects such as splotches, stains, cracks, rust, or anything
you can think to apply to them to achieve the desired look.
This basic analogy does not accurately convey what materials are and what they
are capable of, however, as it is an oversimplification of the concept. Applying pain t
to a surface controls the co lor of that surface, whereas a material can control the color,
shininess, reflectivity, roughness, m etallic aspects, and much more. They can make
an object gleam in light, look dirty or tarnished, o r give minute details to a character
model such as stubble or scarring. See Figure 4.1 for an example of an object with
(left), and without (right), a material.
For now, it is easiest to think of materials as a visual overlay for an object. How-
ever, once you understand and become more comfortable with materials, how they
work, and how to create them, it will become easier to instead think of materials as
substantial, just as much a part of the object as the m esh. For the time be ing, we will
keep a basic understanding of materials a s an overlay in order to keep the concep t
simple.
(a) (b)
FIGURE 4.2: (a) UV space is a coordinate system that runs from 0 to 1, beginning in the
lower left corner. Each vertex of a surface has values that correspond t o the coordinates of a
texture that is applied to a surface. (b) An example of how the UVs of an object affect how the
texture is applied to the surface of that object.
4.2.1 MAT ERIALS VS. TEXTURES
A simple mistake made by newcomers to game design is the confusion between ma-
terials and textures. Although they are closely related and are often associated, there
are a few key differences between the two. Textures are simply two-dimensional im-
ages consisting of pixels that make up what you can see, whereas materials are a
combina tion o f different elements, often times including one or more textures. While