06-CG-Texture Mapping
Texture Mapping
- Adds visual detail to scenes
- Without raising geometric complexity
- A shading trick makes a surface look textured
Basic idea: use images instead of more polygons to represent fine scale color variation
Q: How do we decide where on the geometry each color from the image should go?
Option: unfold the surface Option: make an atlas Option: depending on artist's design
Types of projections
▪ Interpolating texture coor
Q: How to map object to texture?
To each vertex (
Map shapes correspond to various projections
- Planar, Cylindrical, Spherical
- First, map (square) texture to basic map shape
- Then, map basic map shape to object
- Or vice versa: Object to map shape, map shape to square
- Usually, this is straightforward
- Maps from square to cylinder, plane, sphere well defined
- Maps from object to these are simply spherical, cylindrical, cartesian coordinate systems
Planar mapping
Like projections, drop
Cylindrical Mapping
Cylinder:
Spherical Mapping
Convert to spherical coordinates: use latitude/long.
- Singularities at north and south poles
Cube Mapping
Cube mapping uses six square textures that represent the faces of a cube. These are typically labeled as (+X, -X, +Y, -Y, +Z, -Z). The cube is imagined to be surrounding either the object or the entire scene.
- Each face is like a camera looking in one of the six axis-aligned directions.
- The environment or a reflection is “stored” on these six faces.