Detail Without Triangles

How to 3D

Chapter 8: Textures

Detail Without Triangles

Picture a piece of toast. From afar, the toast is just a golden rectangular prism. But up close we see that the surface is not perfectly flat or uniform in color. It's full of holes left behind by the yeast as it produced carbon dioxide bubbles. To render convincing toast, we need to make these irregularities visible.

One way to add detail to a surface is to break big triangles up into many small triangles. But this is costly. Modeling with many small triangles is challenging, just as sand is harder to build with than bricks. Adding triangles also slows down rendering. The more triangles we have, the more matrix multiplications, clipping, and perspective divisions we have to compute. To achieve fast rendering, we want fewer triangles.

A cheaper way to get detail is to paste an image on the surface of the mesh. This is texturing. The texture image might even be photo of some real toast. The detail is an illusion; no triangles are actually added. The pixels of the texture, which are called texels, provide the detail at a much lower cost than extra triangles.

This renderer uses just 112 vertices to render a piece of low-poly toast:

Toggle the texture to see the simple underlying geometry.

In this chapter we explore the process of applying textures to models. By its end, you'll be able to answer the following questions:

For the time being, we'll use textures only as a source of fine-grained albedo. In a later chapter, we'll see how we can use texture to produce a variety of visual effects.

Reading Textures →