- Forward


Texture Mapping
An Introduction


Prof. David Bernstein
James Madison University

Computer Science Department
bernstdh@jmu.edu

Print

Motivation
Back SMYC Forward
  • "Simple" materials can be rendered reasonably well using simple lighting and shading models
  • More "complex" materials (e.g., bricks, stones, singles) could be rendered the same way if each component (e.g., each brick) were a polygon but this increases the complexity of the model and the time required to render it
  • Texture mapping essentially attaches an image (e.g., a photograph of a brick wall) to a polygon (e.g., representing a wall)
Terminology
Back SMYC Forward
  • Texture:
    • A rectangular array of colors
  • Texel:
    • An individual element in a texture
Mappings
Back SMYC Forward
  • Texture Space to Object Space:
    • The texel at \([u, v]\) maps to a point at \([x, y, z, 1]\)
  • Object Space to "Screen" Space:
    • A projection/viewing transform
Mapping from Texture Space to Object Space
Back SMYC Forward
texture-map
Mipmapping (Williams, 1983)
Back SMYC Forward
  • A Problem:
    • As the textured object is moved it may appear to change abruptly
    • Sometimes called the "minification problem"
  • A Solution:
    • Multum In Parvo - Many things in a small place (i.e., multiple textures at different levels of resolution)
    • Sometimes called "image pyramids"
Procedural Textures
Back SMYC Forward

An Example: Stripes

openglexamples/textures/stripes.c (Fragment: stripes)
 
Procedural Textures (cont.)
Back SMYC Forward
  • Perlin Noise (Perlin, 1985):
    • "White noise" (i.e., a random value for each texel) looks like static
    • Perlin noise is a (non-linear) interpolation of random vectors
  • Sums of Sinusoidal Functions:
    • Peachey (1985) developed a marble texture
    • Gardner (1984, 1985) developed terrain and cloud textures
There's Always More to Learn
Back -