Texturing Outline Applications Applications Bump mapping - - PDF document

texturing
SMART_READER_LITE
LIVE PREVIEW

Texturing Outline Applications Applications Bump mapping - - PDF document

Texturing Outline Applications Applications Bump mapping Environment mapping 1 Bump Mapping So far weve been thinking of textures modulating color only modulating color only Decal Lightmap But any other


slide-1
SLIDE 1

1

Texturing

Outline

  • Applications
  • Applications

– Bump mapping – Environment mapping

slide-2
SLIDE 2

2

Bump Mapping

  • So far we’ve been thinking of textures

modulating color only modulating color only

– Decal – Lightmap

  • But any other per-pixel properties are fair

game...

  • Pixel normals usually smoothly varying

Computed at vertices for Gouraud shading; color – Computed at vertices for Gouraud shading; color interpolated – Interpolated from vertices for Phong shading

  • Textures allow setting per-pixel normal with a

bump map

Bump mapping: Why?

  • Can get a lot more surface detail

without expense of more object vertices without expense of more object vertices to light, transform

courtesy of Nvidia

slide-3
SLIDE 3

3

Bump Mapping: How?

  • Idea: Perturb pixel normals n(u, v)

derived from object geometry to get additional detail for shading

  • Compute lighting per pixel (like Phong)

from Hill

Bump mapping: Representations

  • 3 D vector m(u v)
  • 3-D vector m(u, v)

added directly to normal n

  • Or: 2-D vector of

coefficients (b

b )

coefficients (bu, bv) that scale u, v vectors tangent to surface

from Akenine-Moller & Haines

slide-4
SLIDE 4

4

Bump representation: Height map f(u, v)

  • Store scalar “altitude” at each pixel
  • Get bu, bv from partial derivatives:

from Akenine-Moller & Haines

Example: Converting height maps to normal displacements

Z coordinate set to some constant scale factor; (X, Y) normalized to [0, 1] range. Right image is mostly blue because “straight up” vector is (0, 0, 1)

courtesy of Nvidia

slide-5
SLIDE 5

5

Bump mapping: Example

+ =

from MIT CG lecture notes

Bump mapping: Example

courtesy of A. Awadallah

Height map Bump texture applied to teapot

slide-6
SLIDE 6

6

Environment/Reflection Mapping

  • Problem: To render pixel on mirrored surface correctly, we

need to follow reflection of eye vector back to first y intersection with another surface and get its color

  • This is an expensive procedure
  • Idea: Approximate with texture mapping

from Angel

Projecting in non-standard directions

  • Don’t have to project ray from object center through

position (x, y, z)—can use any attribute of that p

( , y, )

y

  • position. For example:

– Ray comes from another location – Ray is surface normal n at (x, y, z) – Ray is reflection-from-eye vector r at (x, y, z) – Etc.

courtesy of R. Wolfe

slide-7
SLIDE 7

7

Projecting in non-standard directions

  • This can lead to interesting or informative

ff t effects

courtesy of R. Wolfe

Different ray directions for a spherical projector

Environment mapping: Details

  • Key idea: Render 360 degree view of environment

from center of object with sphere or box as from center of object with sphere or box as intermediate surface

  • Intersection of eye reflection vector with intermediate

surface provides texture coordinates for reflection/environment mapping

courtesy of R. Wolfe

slide-8
SLIDE 8

8

Making environment textures: Cube

  • Cube map

straightforward to make: Render/ photograph six rotated views of environment

– 4 side views at compass 4 side views at compass points – 1 straight-up view, 1 straight-down view

Making environment textures: Sphere

  • Most often constructed with two

photographs of mirrored sphere taken 90 degrees apart

courtesy of P. Debevec

slide-9
SLIDE 9

9

Environment mapping: Issues

  • Not physically correct to the extent that

bj t h diff f i t di t

  • bject shape differs from intermediate

surface shape

  • Looks better when environment objects

are farther from object

v

from Angel

Environment mapping: Example

courtesy of G. Miller

slide-10
SLIDE 10

10

Environment mapping: Example

From “Terminator II”