multiple importance sampling -...
TRANSCRIPT
Page 1
Multiple Importance Sampling
Multiple Importance Sampling
Reflection of a circular light source by a rough surface
Radius
CS348B Lecture 12 Pat Hanrahan, Spring 2007
Shin
ines
s
Sampling the light source Sampling the BRDF( ) ( )f x g x dx∫
Page 2
Multiple Importance Sampling
Two sampling techniques
2 2~ ( )iX p x1 1~ ( )iX p x
Form weighted combination of samples
2, 2
2,2,
2 2,
( )( )( )
i
ii
i
pf X
Yp X
=
1, 1
1,1,
1 1,
( )( )( )
i
ii
i
pf X
Yp X
=
1 1 2 2i i iY w Y w Y= +
CS348B Lecture 12 Pat Hanrahan, Spring 2007
The balance heuristic
1 1, 2 2,i i i
1 1 2 21 2
( )( ) ( ) ( ) ( ) ( ) ( )( ) ( )
ii
p xw x p x w x p x w x p xp x p x
= ⇒ = ++
Multiple Importance Sampling
CS348B Lecture 12 Pat Hanrahan, Spring 2007
Source: Veach and Guibas
Page 3
Texture / Image-Based Rendering
Texture maps
Surface color and transparency
Environment and irradiance maps
Reflectance maps
Shadow maps
Displacement and bump maps
CS348B Lecture 12 Pat Hanrahan, Spring 2007
Texture Maps
How is texture mapped to the surface?
Dimensionality: 1D, 2D, 3D
Texture coordinates (s t)Texture coordinates (s,t)Surface parameters (u,v)
Direction vectors: R, N, H
Projection: cylinder
Developable surface: polyhedral net
Reparameterize a surface: old-fashion decal
What does texture control?
CS348B Lecture 12 Pat Hanrahan, Spring 2007
Surface color and opacity
Illumination functions: environment maps, shadow maps
Reflection functions: reflectance maps
Geometry: bump and displacement maps
Page 4
Texture Mapping
++ ==
CS348B Lecture 12 Pat Hanrahan, Spring 2007
3D Mesh 2D Texture 2D Image
Surface Color and Transparency
Tom Porter’s Bowling Pin
CS348B Lecture 12 Pat Hanrahan, Spring 2007
Source: RenderMan Companion, Pls. 12 & 13
Page 5
Reflection Maps
Blinn and Newell, 1976
CS348B Lecture 12 Pat Hanrahan, Spring 2007
Gazing Ball (Light Probe)
Miller and Hoffman, 1984
CS348B Lecture 12 Pat Hanrahan, Spring 2007
Photograph of mirror ballMaps all directions to a to circleResolution function of orientationReflection indexed by normal
Page 6
Environment Maps
CS348B Lecture 12 Pat Hanrahan, Spring 2007
Interface, Chou and Williams (ca. 1985)
Environment Map Approximation
CS348B Lecture 12 Pat Hanrahan, Spring 2007
Ray Traced Environment Map
Self reflections are missing in the environment map
Page 7
Cylindrical Panoramas
QuickTime VR
Mars Pathfinder
CS348B Lecture 12 Pat Hanrahan, Spring 2007
Memorial Church (Ken Turkowski)
Fisheye Lens
CS348B Lecture 12 Pat Hanrahan, Spring 2007
Pair of 180 degree fisheyePhoto by K. Turkowski
Page 8
Cubical Environment Map
Easy to produce with rendering system
CS348B Lecture 12 Pat Hanrahan, Spring 2007
Easy to produce with rendering systemPossible to produce from photographs“Uniform” resolution Simple texture coordinates calculation
Direction Maps
Methods:Lattitude-Longitude (Map Projections)
Create by paintingy p g
Gazing BallCreate by photographing a reflective sphere
Fisheye LensStandard camera lens
Cubical Environment MapCreate with a rendering program, photography...
CS348B Lecture 12 Pat Hanrahan, Spring 2007
g p g p g p y
Issues:Non-linear mapping - expensive, curved linesArea distortion - spatially varying resolutionConvert between maps using image warp
Page 9
Shadow Mattes
UberLight( ){Clip to near/far planesClip to shape boundary
Projected Texture
Clip to shape boundaryforeach superelliptical blocker
atten *= …foreach cookie texture
atten *= …foreach slide texture
color *= …foreach noise textureShadow Matte
CS348B Lecture 12 Pat Hanrahan, Spring 2007
atten, color *= …foreach shadow map
atten, color *= …Calculate intensity fall-offCalculate beam distribution
}
Reflectance Maps
CS348B Lecture 12 Pat Hanrahan, Spring 2007
M. C. Escher
Page 10
Capturing Reflectance Maps
Photographs of 5 spheres in 3 environments
CS348B Lecture 12 Pat Hanrahan, Spring 2007[Adelson and Dror]
Creating Irradiance Map
Incident Lighting Reflected Lightˆ ˆ( ) ( )B EN N
CS348B Lecture 12 Pat Hanrahan, Spring 2007
( ) ( )B Eρ=N NFor each normal direction (defines hemisphere)
For each incoming directionCompute contribution to irradiance
Page 11
Creating Reflectance Map
For any material
σ
CS348B Lecture 12 Pat Hanrahan, Spring 2007
For each normal direction (defines hemisphere)For each incoming direction
Compute contribution to reflection
Filtered Environment Maps
CS348B Lecture 12 Pat Hanrahan, Spring 2007
From W. Heidrich
Page 12
Reflectance Space Shading
Cabral, Olano, Nemic 1999
CS348B Lecture 12 Pat Hanrahan, Spring 2007
Reflectance maps for 12 directions
Illumination Maps
* =
R fl t I di R di it
CS348B Lecture 12 Pat Hanrahan, Spring 2007
Reflectance Irradiance Radiosity
( )B x( )E x( )xρ
Page 13
Quake Light Maps
* Lower resolution
CS348B Lecture 12 Pat Hanrahan, Spring 2007
Ambient Occlusion Maps
Percentage of hemisphere visible
CS348B Lecture 12 Pat Hanrahan, Spring 2007
From Production ready global illumination, Hayden Landis, ILM
Page 14
Displacement/Bump Mapping
( , )u vP
Displacement
( ) ( ) ( ) ( )u v u v h u v u v′ = +P P N
( , )( , )( , ) u vu vu
∂∂
=PS ( , )( , ) u vu v
v∂∂
=PT
( , )u v = ×N S T
CS348B Lecture 12 Pat Hanrahan, Spring 2007
Perturbed normal
( , )( ) ( )
u v
u v
u vh h
′ ′ ′= ×
= + × + ×
N P PN T N S N
( , ) ( , ) ( , ) ( , )u v u v h u v u v= +P P N
From Blinn 1976
Normal Maps
CS348B Lecture 12 Pat Hanrahan, Spring 2007
(nx,ny,nz) = (r,g,b)
http://members.shaw.ca/jimht03/normal.html
Page 15
Bidirectional Texture Function (BTF)
CS348B Lecture 12 Pat Hanrahan, Spring 2007Plaster
BTF Mapping
Complex interplay between texture and reflection
CS348B Lecture 12 Pat Hanrahan, Spring 2007
http://www1.cs.columbia.edu/CAVE/projects/btf/btf.php
Page 16
Classic History
Catmull/Williams 1974 - basic idea
Blinn and Newell 1976 - basic idea, reflection maps
Blinn 1978 - bump mappingBlinn 1978 - bump mapping
Williams 1978, Reeves et al. 1987 - shadow maps
Smith 1980, Heckbert 1983 - texture mapped polygons
Williams 1983 - mipmaps
Miller and Hoffman 1984 - illumination and reflectance
Perlin 1985, Peachey 1985 - solid textures
CS348B Lecture 12 Pat Hanrahan, Spring 2007
y
Greene 1986 - environment maps/world projections
Akeley 1993 - Reality Engine
Levoy and Hanrahan 1996 - Light Field
Dana, van Ginneken, Nayar, Koenderink 1996 - BTF