Texture mapping

From Wikipedia, the free encyclopedia

Spherical texture mapping
Spherical texture mapping

Texture mapping is a method, pioneered by Edwin Catmull, of adding detail, surface texture, or colour to a computer-generated graphic or 3D model. A texture map is applied (mapped) to the surface of a shape. This process is akin to applying gift wrapping paper to a plain white box. In the example at right, a texture map of the Earth's coloration is applied to a sphere to create the illusion of color detail that would take very many additional polygons to realise otherwise. This kind of coloration is the most common application of texture mapping.

Multitexturing is the use of more than one texture at a time on a polygon[1]. This has various uses, sometimes as a way of applying a light map to a surface, which is faster than requiring the graphics hardware to do lighting calculation for that surface on the fly, or more recently bump mapping has become popular, which allows a texture to directly control the lighting calculations. By adjusting the reflections, the bump mapping can give the appearance of different surfaces, such as tree bark or rough concrete, in addition to the usual detailed coloring.

The way the resulting pixels on the screen are calculated from the texels (texture pixels) is governed by texture filtering. The fastest method is to use the nearest neighbour interpolation, but bilinear interpolation is commonly chosen as good tradeoff between speed and accuracy. In the event of a texture coordinate being outside the texture, it is either clamped or wrapped.

At the hardware level usually texture coordinates are specified at each vertex of a given triangle (any polygon may be broken down into triangles for rendering), and these coordinates are interpolated as part of a calculation that is an extension of Bresenham's line algorithm. Direct interpolation of the texture coordinates between vertices results in affine texture mapping, which causes a perceivable discontinuity between adjacent triangles when the 3D geometry of the specified triangle is at an angle to the plane of the screen, perspective correction is more realistic, and adjusts the texture coordinate interpolation as a function of the 3D depth of each pixel. Because perspective correction involves slightly more calculation it can negatively affect performance[2], though most modern graphics hardware implements perspective correct texturing.

[edit] See also

[edit] References

  1. ^ : Multitexture)
  2. ^ : pg. 1285)

[edit] External links