Advanced Texture Mapping - PowerPoint PPT Presentation

About This Presentation
Title:

Advanced Texture Mapping

Description:

Cass Everitt, 'Projective Texture Mapping' NVIDIA SDK White Paper. ... Image Source: Cass Everitt et al., 'Hardware Shadow Mapping' NVIDIA SDK White Paper ... – PowerPoint PPT presentation

Number of Views:188
Avg rating:3.0/5.0
Slides: 16
Provided by: csNth
Category:

less

Transcript and Presenter's Notes

Title: Advanced Texture Mapping


1
Advanced Texture Mapping
  • May 10, 2007

2
Todays Topics
  • Mip Mapping
  • Projective Texture
  • Shadow Map

3
Texture Resolution
  • One size does not fit all
  • For example an NxN texture may be OK for a
    polygon about the same size on screen, but not
    for a much smaller or much larger polygon.
  • Polygon too large ? blurry texture
  • Polygon too small ? wasted texture memory.

4
Mip Map
  • For an NxN texture, also build textures of N/2 x
    N/2, N/4 x N/4, etc.
  • Total memory required 4/3 NxN
  • 11/41/16 4/3

5
Which Level to Use?
  • Naïve answer pick the closest size.
  • Note that we dont pick a fixed mip-map level for
    the whole polygon. We will pick a different
    level for each drawn pixel.
  • Also, the level does not need to be an integer ?
    In-between levels.

6
Filtering
  • Here, we only consider individual pixels of a
    scan-converted polygon (on the screen)
  • Texture coords(u, v) u, v real number.
  • Bi-linear Find the closest mip-map level, fetch
    (?u?, ?v? ), (?u?, ?v? ), (?u? ,?v? ), (?u? , ?v?
    ).
  • Tri-linear Also interpolated between two mip-map
    levels.

7
Anisotropic Filtering
  • Bilinear (and tri-linear) filtering assumes that
    a screen picture is mapped to a circle on the
    texture, which is actually incorrect.
  • An ellipse (not necessary axis aligned) should be
    used instead.
  • Next slide EWA Ellipse Weighted Average.

8
EWA for Texture Mapping
  • Paul Heckbert, Survey of Texture Mapping IEEE
    CGA, Nov. 1986. (Figures)
  • Green Heckbert, Creating Raster Omnimax Images
    from Multiple Perspective Views Using The
    Elliptical Weighted Average Filter IEEE CGA,
    6(6), pp. 21-27, June 1986.

9
Projective Texture
  • Mark Segal, et al., Fast shadows and lighting
    effects using texture mapping. SIGGRAPH 92
  • Cass Everitt, Projective Texture Mapping
    NVIDIA SDK White Paper.

10
Assigning Texture Coordinates to Vertices
  • The basic idea
  • 1. Move the camera to the projector location.
  • 2. Overlay the produced photo on top of the
    texture.
  • (i.e. the pixel location becomes the texture
    coordinates)
  • Projective Texture Mapping by Cass Everitt
    describes how to use OpenGL texgen to achieve
    that.

11
In a Nutshell
  • Tools available for generating texture
    coordinates glTexGen() and texture
    transformation matrix. (See todays handout.)
  • Use glTexGen() to get
  • Then set texture matrix to

12
Shadow Map
  • Similar to projective texture
  • But this time, we will project the depth, instead
    of the slide image.

13
Basic Steps of Shadow Maps
  • Render the scene from the lights point of view,
  • Use the lights depth buffer as a texture (shadow
    map),
  • Projectively texture the shadow map onto the
    scene,
  • Use texture color (comparison result) in
    fragment shading.

14
Eyes View
Lights View
Depth/Shadow Map
Image Source Cass Everitt et al., Hardware
Shadow Mapping NVIDIA SDK White Paper
15
Food for Thought
  • Why is texture mapping so powerful, useful,
    magical, etc.?
  • (Hint a lot of hardware design effort)
  • Why are global illumination effects possible now,
    even though we still process one primitive at a
    time?
Write a Comment
User Comments (0)
About PowerShow.com