Texture Mapping and Programmable Graphics Hardware: A Deep Dive, Slides of Computer Graphics

Explore the concepts of texture mapping and programmable graphics hardware in this comprehensive document. Topics include bsp trees, texture mapping techniques, sampling issues, and the use of mip-mapping. Learn about various mapping techniques such as planar, cylindrical, spherical, and cube mapping. Discover the role of programmable graphics hardware in implementing advanced texturing techniques like bump mapping and displacement mapping.

Typology: Slides

2012/2013

Uploaded on 04/23/2013

sarasvan
sarasvan 🇮🇳

4.4

(20)

118 documents

1 / 33

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Texture Mapping and
Programmable Graphics Hardware
Docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21

Partial preview of the text

Download Texture Mapping and Programmable Graphics Hardware: A Deep Dive and more Slides Computer Graphics in PDF only on Docsity!

Texture Mapping and

Programmable Graphics Hardware

Today

• More mapping

• Finish up Texture Mapping

• Bump Maps

• Displacement Maps

• Discussion of programmable graphics hardware

• Discussion of class project

BSP Tree Illustration

  • Let’s see an example (in 2D, not 3D)
    • Here, a line divides the plane into two half-

planes

Space BSP Tree

A

A

X

B C

C

X

B

Y

D

E E

Y

D

BSP Tree Review

  • Use implicit planes to carve up space (and

the geometry in it) into distinct subspaces

  • One BSP tree can be used for any

viewpoint

  • Can be used to implement a painter’s

algorithm

  • Or to speed up a raytracer...
    • We’ll be seeing this again
  • Any questions?

Sampling Issues

  • So we can define the mapping, and it

works fine

  • As long as the size of the rendered image is

approximately the same size as the texture

source

  • What if the textured polygon renders

much smaller in the final image

than the original texture?

  • How about much bigger?

Mip-mapping to the Rescue

  • Mip-mapping is a technique that creates

multiple resolutions of an image

  • i.e. Takes a 512x512 image and filters it to

create 256x256, 128x128, 64x64, ..., 1x

versions of it

  • Then, when you’re looking up your

texture coordinates, it uses the most

appropriate mip-map level

  • Or, more likely, interpolates between the two

closest

Assigning Texture Coordinates

  • We generally want an even sharing of

texels (pixels in the texture) across all

triangles

  • But what about this case?
    • Want to texture the teapot:

Do we want this? Or this? Docsity.com

Planar Mapping

  • Just use the texture to fill all of space
    • Same color for all z-values
    • (u, v) = (x, y)

Spherical Mapping

  • “Wrap” the texture around your object
    • Like a globe
    • Same color for all pixels with the same

angle

  • u = ϕ / 2π v = (π - θ) / π

Cube Mapping

  • Not quite the same as the others
    • Uses multiple textures (6, to be specific)
  • Maps each texture to one face of a cube

surrounding the object to be textured

  • Then applies a planar mapping to each face

Environment Mapping Example

Solid Textures

  • We’ve talked a lot about 2D (image) textures
    • Essentially taking a picture and pasting it on a

surface

  • No reason a texture HAS to be 2D, though
    • Can have 1D textures (not that interesting)
    • Can have 3D textures

Texture Mapping Review

  • Texture mapping is a relatively simple way

to add a lot of visual complexity to a

scene

  • Without increasing its geometric complexity
  • Use mip-mapping to alleviate sampling

problems

  • There are infinitely many possible

mappings

  • Usually want to use the most “similar” one
    • Texturing a plane? Use planar
    • Texturing a sphere? Use spherical Docsity.com

Other Mapping Techniques

  • So, now we know some things about

texture mapping

  • Allows us to change the color of simple

geometry

  • But color isn’t the only property a

point can have

  • Normals
    • Bump mapping
  • Location
    • Displacement Mapping