
8.1.2 Storing Bump Maps As Normal Map Texturesīefore you encounter your first Cg program that lights surfaces with bump mapping, you should understand how textures for bump mapping are created and what they represent. A single rectangle can adequately represent a roughly flat rectangular section of brick wall. Aside from all the surface variations that we've mentioned, a wall's geometry is quite simple. However, this approach may require a tremendous number of polygons.Īt a sufficiently coarse scale, a brick wall is more or less flat. During lighting, the surface normals at each vertex would alter the illuminated surface appearance appropriately. One approach to rendering a brick wall would be to model every brick, mortar gap, and even individual cracks in the wall with polygons, each with varying surface normals used for lighting. When the wall is illuminated, the gaps between bricks, cracks, and other features of the brick surface scatter light quite differently than a truly flat surface. Though a brick wall may look flat from a distance, on closer inspection, the brickwork pattern is not flat at all. Between the bricks is mortar that holds the bricks together. For example, a building model could be rendered once with a brick bump map and a second time with a stucco bump map.Ĭonsider a wall made of bricks of varying texture stacked on top of each other in a regular pattern.
BRICK WALL VECTOR 2D FULL
The second is that the surface features may well be smaller than the size of a pixel, meaning that the rasterizer could not accurately render the full geometric detail. The first is that representing the model with sufficient geometric detail to capture the bumpy nature of the surface would be too large and cumbersome for interactive rendering. There are two reasons to avoid representing this kind of fine detail using geometry.

Most real-world surfaces such as brick walls or cobblestones have small-scale bumpy features that are too fine to represent with highly tessellated geometry. This effect is achieved without requiring excessive geometric tessellation of the surface.Īs an example, you can use bump mapping to make surfaces appear as if they have bricks protruding from them, and mortar between the bricks. Bump mapping combines per-fragment lighting with surface normal perturbations supplied by a texture, in order to simulate lighting interactions on bumpy surfaces. This chapter introduces an advanced lighting approach commonly called bump mapping. The earlier presentation of lighting in Chapter 5 discussed per-vertex and per-fragment light computations. "Combining Bump Mapping with Other Effects" combines bump mapping techniques with other textures, such as decals and gloss maps, for more sophisticated shading.
BRICK WALL VECTOR 2D HOW TO



Please visit our Recent Documents page to see all the latest whitepapers and conference presentations that can help you with your projects.Ĭhapter 8. You can purchase a beautifully printed version of this book, and others in the series, at a 30% discount courtesy of InformIT and Addison-Wesley. The Cg Tutorial The Cg Tutorial is now available, right here, online.
