Title: Texture Mapping
1Texture Mapping
2Definitions
- Texel
- Occlusion
- Multi-texturing
- Images
- Light Maps
- Height Maps
3- Texture mapping maps the texels of a texture in
UV space to the coordinates of a polygon and the
pixels of the screen in the same way that a
function, say f, maps one value to another - ie. f(x) y
4Mapping of Images
- Two distinct categories of image mapping
- (non-exclusive)
- -Linear (Affine) Mapping
- -Perspective Correct Mapping
5Linear (Affine) Mapping
- Pros
- Fast
- Easy to implement
6Linear (Affine) Mapping
- Essentially, the equation for linear mapping is
- ua (1 a)u0 au1, where 0 a 1
- To interpolate a texture coordinate ua between
two endpoints u0 and u1.Source Wikipedia.org
- Simple equation
- No divisons
- Fast
Approach used in original Doom game ?
7- Linear mapping does not take depth information
into account. - Distortion worsens as angle increases
- Effect can be minimized
Area Subdivision
Scanline Subdivision (Quake)
8Perspective Correct Mapping
- Pros
- Correct rendering of textures
- Cons
- More complex implementation (barely)
- Slower
9Perspective Correct Mapping
(1 a)(u0/z0) a(u1/z1)
3x the operations with 5 divisions.
ua
(1 a)(1/ z0) a(1/z1)
Perspective Correct Mapping takes depth
information into account (note the z variables),
but at a greater cost of execution.
10Multi-Texturing
- Light Mapping
- Bump Mapping
- Normal Mapping
- Parallax Mapping
- Displacement Mapping
11Bump Mapping
- Creates a textured look without altering the
geometry of the object.
12Bump Mapping
- Uses a height map to recalculate the normal for a
surface at a pixel
13Bump Mapping
14Bump Mapping
Without Bump Mapping
With Bump Mapping
15Normal Mapping
- Similar to bump mapping
- Perturbs surface normal
- Uses Normal Map instead of Height Map
- Creates the illusion of a detailed texture
- Does not change any object geometry
16Normal Mapping
- The Normal Map encodes information about the
surface normal as a color instead of determining
the slope at a pixel
Height Map
Normal Map
17Normal Mapping
18Normal Mapping
19- Can be used to significantly reduce the number of
polygons needed for a model
80001 polygonal compression!
Image Source www.Wikipedia.org
20Parallax Mapping
- Aka. Offset Mapping or Virtual Displacement
Mapping - Uses a height map
- Capable of generating more exaggerated textures
- Does not change object geometry
21Parallax Mapping
- Builds on the idea of bump mapping. Displaces
pixels based on height, creating a smear
effect. - The texture is able to make it look like there is
more geometry than actually present
22(No Transcript)
23Problems with Bump, Normal, and Parallax Mapping
- Pros
- Geometry is not altered
- Less costly
- Cons
- Geometry is not altered!
- Rendering Issues
Low cost techniques that add detail to a scene,
but do not take into account occlusion and
silhouetting . Various methods exist to properly
render occlusion and silhouetting, but at high
cost
24Enter Displacement Mapping
25Displacement Mapping
- Pros
- Alters geometry of an object granting proper
occlusion and silhouetting - Adds high levels of detail to an object
- Can use height maps the same as bump mapping
- Cons
- One of the highest overheads of all texturing
techniques - Polygon count can quickly grow to unmanageable
numbers
26Displacement Mapping
Bump Mapping
Displacement Mapping
27Displacement Mapping
Height (Displacement) Map
Displacement Mapping
28Displacement Mapping
29Fin