JavaScript EditorFree JavaScript Editor     Ajax Editor 



Main Page
  Previous Section Next Section

Gloss Mapping

Gloss mapping is a variant of environment mapping that allows greater realism in your reflections. A new texture, the gloss map, encodes information about the reflectivity of the object's surface, so it is not constant along its surface. Some areas will be shiny, and others will be dull. A popular way to achieve this reflective result is to encode the gloss mapping information as the alpha channel of the base material.

Then, to render the glossiness, we start by rendering the base texture map with no alpha and modulating it with diffuse lighting information. We then multiply the gloss information by the specular or environment texture map. This results in a reflective component that varies along the surface. Then, we add this to the base texture as the specular component. Because more information was used to compute the result than in traditional environment mapping or specular highlighting, more realistic reflections and highlights are computed. Figure 18.7 shows a sphere with and without gloss mapping information.

Figure 18.7. Gloss mapping.

graphics/18fig07.gif

      Previous Section Next Section
    



    JavaScript EditorAjax Editor     JavaScript Editor