Home | Lehre | Videos | Texte | Vorträge | Software | Person | Impressum, Datenschutzerklärung | Blog RSS

See subsection 4.2 through section 6 of my tutorial.

Texturing

Texture Interpolation, Texture Filtering

On rendering, the texels neither are not of the same size as the pixels of the screen, nor are the texels aligned to the pixels. Hence, we need color values "between" existing texels. Typically, these are computed using linear interpolation (or rather bilinear interpolation because it's done in two directions: u and v). Demo with XNA.

If the texels become significantly smaller than the pixels, we’ll see moiré (=aliasing) patterns in the rendering. Demo with XNA and Cinema 4D. To suppress this effect, "MIP mapping" is used (MIP stands for “multum in parvo”: much in little). A MIP map contains the texture image in several levels of resolution, each one two times the side length of the next. With linear MIP map interpolation, the graphics chip chooses the two most appropriate levels and blends them linearly. Hence, trilinear interpolation, because we’re interpolating in u, v, and MIP level. Demo with XNA.

MIP maps can be created on the fly (demo with XNA) or can be prepared as .dds files. The latter can be achieved for instance through Microsoft’s DirectX Texture Tool that is included with the (free) DirectX SDK. In addition, the DirectX Texture Tool can be employed to combine six images to form a cube map to be used as sky dome or as environment map.

Alpha Blending

We may use a forth color component (alpha, hence ARGB) to control transparency. Demo with XNA. Note that “alpha blending” incurs a dependency on the order in which objects are rendered.

Bump Mapping

Textures may also be used to control shape: