Texture Mapping - PowerPoint PPT Presentation

1 / 29
About This Presentation
Title:

Texture Mapping

Description:

Texture mapping maps the texels of a texture in UV space to the ... Polygon count can quickly grow to unmanageable numbers. Displacement Mapping. Example ... – PowerPoint PPT presentation

Number of Views:111
Avg rating:3.0/5.0
Slides: 30
Provided by: na351
Category:

less

Transcript and Presenter's Notes

Title: Texture Mapping


1
Texture Mapping
2
Definitions
  • 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

4
Mapping of Images
  • Two distinct categories of image mapping
  • (non-exclusive)
  • -Linear (Affine) Mapping
  • -Perspective Correct Mapping

5
Linear (Affine) Mapping
  • Pros
  • Fast
  • Easy to implement
  • Cons
  • Distorted textures

6
Linear (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)
8
Perspective Correct Mapping
  • Pros
  • Correct rendering of textures
  • Cons
  • More complex implementation (barely)
  • Slower

9
Perspective 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.
10
Multi-Texturing
  • Light Mapping
  • Bump Mapping
  • Normal Mapping
  • Parallax Mapping
  • Displacement Mapping

11
Bump Mapping
  • Creates a textured look without altering the
    geometry of the object.

12
Bump Mapping
  • Uses a height map to recalculate the normal for a
    surface at a pixel

13
Bump Mapping
  • Examples

14
Bump Mapping
Without Bump Mapping
With Bump Mapping
15
Normal 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

16
Normal 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
17
Normal Mapping
  • Example

18
Normal Mapping
19
  • Can be used to significantly reduce the number of
    polygons needed for a model

80001 polygonal compression!
Image Source www.Wikipedia.org
20
Parallax Mapping
  • Aka. Offset Mapping or Virtual Displacement
    Mapping
  • Uses a height map
  • Capable of generating more exaggerated textures
  • Does not change object geometry

21
Parallax 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)
23
Problems 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
24
Enter Displacement Mapping
25
Displacement 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

26
Displacement Mapping
  • Example

Bump Mapping
Displacement Mapping
27
Displacement Mapping
  • Example

Height (Displacement) Map
Displacement Mapping
28
Displacement Mapping
  • Example

29
Fin
Write a Comment
User Comments (0)
About PowerShow.com