Art for Videogames

Page 71

70

Moving Beyond 2D Concept Art

it the appearance of greater detail without increasing the complexity of the underlying mesh. If the object was simple in nature and only made out of one item, then the task of texturing would be very simple. However, in reality, designers are usually dealing with extremely complex shapes and might need a number of textures to be placed on the surface of the model in order to achieve the desired result. In order to do this they undertake a process called ‘UV mapping’. The full term is ‘UVW mapping’ (usually shortened to ‘UV map’) where the letters UVW are the coordinates for the texture, just like XYZ (but these are already being used as a reference in the model space). A UVW map is a flat image, the points on which are related to points on the surface of the model. Once this image is created, the UV map can be applied to the model in order to give it its textured appearance.

‘higher’ and a darker area is ‘lower’. This enhances the three-dimensional appearance of the object without building in more geometry.

NORMAL MAPPING Normal mapping works in a similar way to bump mapping, but it uses colour (red, green and blue, as used in monitors) to produce a textured effect. Normal mapping can be particularly effective because a normal map from a high-resolution (high poly count) model can be used on a low-resolution (low poly count) model. The effect is to give the appearance of a high-resolution model from a more efficient low-resolution model. Normal mapping is used extensively in current games, as it gives excellent graphic quality with reduced processing demands.

DISPLACEMENT MAPPING ALPHA CHANNELS Textures can add other visual effects to a model beyond simple surface effects. The use of a fourth channel, other than red, blue and green – known as an alpha channel – can make certain parts of the model transparent to give the effect of a window or translucent material. Alpha channels can also add specular information – this indicates whether the item is shiny or not.

BUMP MAPPING Bump mapping refers to a greyscale texture image. When the image is rendered, the data is used so that a lighter area is

Displacement mapping uses a greyscale image as an information channel, but this time the data from the tones in the image are used to actually move the model vertices in order to create a textured effect.

VERTEX AND PIXEL SHADERS These aspects of texturing and modelling are key to visuals in games. Shaders can affect the final appearance of a model’s surface, such as the amount of light reflection, how the light is diffused, and further effects on texture, refraction, shadows and other aspects. Vertex shaders work on the vertex level of the Offset

TILING A SURFACE TEXTURE

OK

pixels right

Horizontal: -256

Cancel Vertical: -256

pixels down

Preview

Undefined Areas

In this exercise, you will make a simple wall texture that will seamlessly tile when placed in an environment. First get an image of a standard stone wall (such as your own garden wall). Note that the image used must have been taken perpendicular to the wall.

Set to Background Repeat Edge Pixels Wrap Around

TL

TR

BR

BL

BL

BR

TR

TL

S Step 1

S Step 2

S Step 3

Open the image up in your image-manipulation program (Adobe Photoshop, in this example). Then choose an area roughly 512 pixels square. Be careful to pick a section that has no strong features in it. Check where your edges are, and try to guess ahead by selecting along mortar lines. Select from the middle of the image, as at the edges of a photograph there may be some ‘bulging’ effect due to the nature of the camera lens.

Size the image to exactly 512 pixels square, trimming and making sure the mortar lines are horizontal.

Now comes the clever bit. In Photoshop, there is a filter called ‘offset’. This filter cuts the image into quarters and swaps them around as in the diagram. Set the filter to wrap around and the offset to half of the image size – 256 pixels. The edges of the image will now match up to the corresponding edges of the adjacent images when tiled.

The joints in the texture can be seen. They need careful digital painting to remove them.


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.