Computer Graphics (Fall 2008) COMS 4160, Lecture 19: Illumination and Shading 2 cs4160.
-
date post
20-Dec-2015 -
Category
Documents
-
view
218 -
download
1
Transcript of Computer Graphics (Fall 2008) COMS 4160, Lecture 19: Illumination and Shading 2 cs4160.
![Page 1: Computer Graphics (Fall 2008) COMS 4160, Lecture 19: Illumination and Shading 2 cs4160.](https://reader035.fdocument.pub/reader035/viewer/2022062407/56649d535503460f94a2f3a0/html5/thumbnails/1.jpg)
Computer Graphics (Fall 2008)Computer Graphics (Fall 2008)
COMS 4160, Lecture 19: Illumination and Shading 2
http://www.cs.columbia.edu/~cs4160
![Page 2: Computer Graphics (Fall 2008) COMS 4160, Lecture 19: Illumination and Shading 2 cs4160.](https://reader035.fdocument.pub/reader035/viewer/2022062407/56649d535503460f94a2f3a0/html5/thumbnails/2.jpg)
Radiance
• Power per unit projected area perpendicular to the ray
per unit solid angle in the direction of the ray
• Symbol: L(x,ω) (W/m2 sr)
• Flux given by
dΦ = L(x,ω) cos θ dω dA
![Page 3: Computer Graphics (Fall 2008) COMS 4160, Lecture 19: Illumination and Shading 2 cs4160.](https://reader035.fdocument.pub/reader035/viewer/2022062407/56649d535503460f94a2f3a0/html5/thumbnails/3.jpg)
Radiance properties
• Radiance is constant as it propagates along ray
– Derived from conservation of flux – Fundamental in Light Transport.
1 21 1 1 2 2 2d L d dA L d dA d
2 21 2 2 1d dA r d dA r
1 21 1 2 22
dA dAd dA d dA
r
1 2L L
![Page 4: Computer Graphics (Fall 2008) COMS 4160, Lecture 19: Illumination and Shading 2 cs4160.](https://reader035.fdocument.pub/reader035/viewer/2022062407/56649d535503460f94a2f3a0/html5/thumbnails/4.jpg)
![Page 5: Computer Graphics (Fall 2008) COMS 4160, Lecture 19: Illumination and Shading 2 cs4160.](https://reader035.fdocument.pub/reader035/viewer/2022062407/56649d535503460f94a2f3a0/html5/thumbnails/5.jpg)
![Page 6: Computer Graphics (Fall 2008) COMS 4160, Lecture 19: Illumination and Shading 2 cs4160.](https://reader035.fdocument.pub/reader035/viewer/2022062407/56649d535503460f94a2f3a0/html5/thumbnails/6.jpg)
Radiance properties• Sensor response proportional to radiance
(constant of proportionality is throughput)– Far away surface: See more, but subtends
smaller angle– Wall equally bright across viewing distances
Consequences– Radiance associated with rays in a ray tracer– Other radiometric quants derived from radiance
![Page 7: Computer Graphics (Fall 2008) COMS 4160, Lecture 19: Illumination and Shading 2 cs4160.](https://reader035.fdocument.pub/reader035/viewer/2022062407/56649d535503460f94a2f3a0/html5/thumbnails/7.jpg)
Irradiance, Radiosity• Irradiance E is radiant power per unit area• Integrate incoming radiance over hemisphere
– Projected solid angle (cos θ dω)– Uniform illumination:
Irradiance = π [CW 24,25]– Units: W/m2
• Radiosity
– Power per unit area leaving surface (like irradiance)
![Page 8: Computer Graphics (Fall 2008) COMS 4160, Lecture 19: Illumination and Shading 2 cs4160.](https://reader035.fdocument.pub/reader035/viewer/2022062407/56649d535503460f94a2f3a0/html5/thumbnails/8.jpg)
Building up the BRDF
• Bi-Directional Reflectance Distribution Function [Nicodemus 77]
• Function based on incident, view direction
• Relates incoming light energy to outgoing light energy
• We have already seen special cases: Lambertian, Phong
• In this lecture, we study all this abstractly
![Page 9: Computer Graphics (Fall 2008) COMS 4160, Lecture 19: Illumination and Shading 2 cs4160.](https://reader035.fdocument.pub/reader035/viewer/2022062407/56649d535503460f94a2f3a0/html5/thumbnails/9.jpg)
![Page 10: Computer Graphics (Fall 2008) COMS 4160, Lecture 19: Illumination and Shading 2 cs4160.](https://reader035.fdocument.pub/reader035/viewer/2022062407/56649d535503460f94a2f3a0/html5/thumbnails/10.jpg)
BRDF
• Reflected Radiance proportional to Irradiance• Constant proportionality: BRDF [CW pp 28,29]
– Ratio of outgoing light (radiance) to incoming light (irradiance)
– Bidirectional Reflection Distribution Function – (4 Vars) units 1/sr
( )( , )
( ) cos
r ri r
i i i i
Lf
L d
( ) ( ) ( , ) cosr r i i i r i iL L f d
![Page 11: Computer Graphics (Fall 2008) COMS 4160, Lecture 19: Illumination and Shading 2 cs4160.](https://reader035.fdocument.pub/reader035/viewer/2022062407/56649d535503460f94a2f3a0/html5/thumbnails/11.jpg)
![Page 12: Computer Graphics (Fall 2008) COMS 4160, Lecture 19: Illumination and Shading 2 cs4160.](https://reader035.fdocument.pub/reader035/viewer/2022062407/56649d535503460f94a2f3a0/html5/thumbnails/12.jpg)
![Page 13: Computer Graphics (Fall 2008) COMS 4160, Lecture 19: Illumination and Shading 2 cs4160.](https://reader035.fdocument.pub/reader035/viewer/2022062407/56649d535503460f94a2f3a0/html5/thumbnails/13.jpg)
Isotropic vs AnisotropicIsotropic vs Anisotropic
Isotropic: Most materials (you can rotate about normal without changing reflections)
Anisotropic: brushed metal etc. preferred tangential direction
Isotropic Anisotropic
![Page 14: Computer Graphics (Fall 2008) COMS 4160, Lecture 19: Illumination and Shading 2 cs4160.](https://reader035.fdocument.pub/reader035/viewer/2022062407/56649d535503460f94a2f3a0/html5/thumbnails/14.jpg)
RadiometryRadiometry
Physical measurement of electromagnetic energy
We consider light field Radiance, Irradiance Reflection functions: Bi-Directional Reflectance
Distribution Function or BRDF Reflection Equation Simple BRDF models
![Page 15: Computer Graphics (Fall 2008) COMS 4160, Lecture 19: Illumination and Shading 2 cs4160.](https://reader035.fdocument.pub/reader035/viewer/2022062407/56649d535503460f94a2f3a0/html5/thumbnails/15.jpg)
Reflection Equation
ir
( ) ( ) ( , )( )r r i i i r iL L f n Reflected Radiance(Output Image)
Incident radiance (fromlight source)
BRDF Cosine of Incident angle
![Page 16: Computer Graphics (Fall 2008) COMS 4160, Lecture 19: Illumination and Shading 2 cs4160.](https://reader035.fdocument.pub/reader035/viewer/2022062407/56649d535503460f94a2f3a0/html5/thumbnails/16.jpg)
Reflection Equation
ir
Sum over all light sources( ) ( ) ( , )( )r r i i i r i
i
L L f n Reflected Radiance(Output Image)
Incident radiance (fromlight source)
BRDF Cosine of Incident angle
![Page 17: Computer Graphics (Fall 2008) COMS 4160, Lecture 19: Illumination and Shading 2 cs4160.](https://reader035.fdocument.pub/reader035/viewer/2022062407/56649d535503460f94a2f3a0/html5/thumbnails/17.jpg)
Reflection Equation
ir
Replace sum with integral
id
( ) ( ) ( , )( )r r i i i r i iL L f n d
Reflected Radiance(Output Image)
Incident radiance (fromlight source)
BRDF Cosine of Incident angle
![Page 18: Computer Graphics (Fall 2008) COMS 4160, Lecture 19: Illumination and Shading 2 cs4160.](https://reader035.fdocument.pub/reader035/viewer/2022062407/56649d535503460f94a2f3a0/html5/thumbnails/18.jpg)
RadiometryRadiometry
Physical measurement of electromagnetic energy
We consider light field Radiance, Irradiance Reflection functions: Bi-Directional Reflectance
Distribution Function or BRDF Reflection Equation Simple BRDF models
![Page 19: Computer Graphics (Fall 2008) COMS 4160, Lecture 19: Illumination and Shading 2 cs4160.](https://reader035.fdocument.pub/reader035/viewer/2022062407/56649d535503460f94a2f3a0/html5/thumbnails/19.jpg)
Brdf Viewer plots Brdf Viewer plots
Diffuse
bv written by Szymon Rusinkiewicz
Torrance-Sparrow
Anisotropic
![Page 20: Computer Graphics (Fall 2008) COMS 4160, Lecture 19: Illumination and Shading 2 cs4160.](https://reader035.fdocument.pub/reader035/viewer/2022062407/56649d535503460f94a2f3a0/html5/thumbnails/20.jpg)
DemoDemo
![Page 21: Computer Graphics (Fall 2008) COMS 4160, Lecture 19: Illumination and Shading 2 cs4160.](https://reader035.fdocument.pub/reader035/viewer/2022062407/56649d535503460f94a2f3a0/html5/thumbnails/21.jpg)
![Page 22: Computer Graphics (Fall 2008) COMS 4160, Lecture 19: Illumination and Shading 2 cs4160.](https://reader035.fdocument.pub/reader035/viewer/2022062407/56649d535503460f94a2f3a0/html5/thumbnails/22.jpg)
![Page 23: Computer Graphics (Fall 2008) COMS 4160, Lecture 19: Illumination and Shading 2 cs4160.](https://reader035.fdocument.pub/reader035/viewer/2022062407/56649d535503460f94a2f3a0/html5/thumbnails/23.jpg)
![Page 24: Computer Graphics (Fall 2008) COMS 4160, Lecture 19: Illumination and Shading 2 cs4160.](https://reader035.fdocument.pub/reader035/viewer/2022062407/56649d535503460f94a2f3a0/html5/thumbnails/24.jpg)
![Page 25: Computer Graphics (Fall 2008) COMS 4160, Lecture 19: Illumination and Shading 2 cs4160.](https://reader035.fdocument.pub/reader035/viewer/2022062407/56649d535503460f94a2f3a0/html5/thumbnails/25.jpg)
Analytical BRDF: TS exampleAnalytical BRDF: TS example
One famous analytically derived BRDF is the Torrance-Sparrow model.
T-S is used to model specular surface, like the Phong model. more accurate than Phong has more parameters that can be set to match different
materials derived based on assumptions of underlying geometry.
(instead of ‘because it works well’)
![Page 26: Computer Graphics (Fall 2008) COMS 4160, Lecture 19: Illumination and Shading 2 cs4160.](https://reader035.fdocument.pub/reader035/viewer/2022062407/56649d535503460f94a2f3a0/html5/thumbnails/26.jpg)
Torrance-SparrowTorrance-Sparrow
Assume the surface is made up grooves at the microscopic level.
Assume the faces of these grooves (called microfacets) are perfect reflectors.
Take into account 3 phenomena
Shadowing Masking Interreflection
![Page 27: Computer Graphics (Fall 2008) COMS 4160, Lecture 19: Illumination and Shading 2 cs4160.](https://reader035.fdocument.pub/reader035/viewer/2022062407/56649d535503460f94a2f3a0/html5/thumbnails/27.jpg)
Torrance-Sparrow ResultTorrance-Sparrow Result
( ) ( , ) ( )
4cos( )cos( )
i i r h
i r
F G Df
Fresnel term:allows for wavelength
dependency
Geometric Attenuation:reduces the output based on the
amount of shadowing or masking that occurs.
Distribution:distribution function
determines what percentage of
microfacets are oriented to reflect in the viewer direction.
How much of the macroscopic surface is visible to the light
source
How much of the macroscopic
surface is visible to the viewer
![Page 28: Computer Graphics (Fall 2008) COMS 4160, Lecture 19: Illumination and Shading 2 cs4160.](https://reader035.fdocument.pub/reader035/viewer/2022062407/56649d535503460f94a2f3a0/html5/thumbnails/28.jpg)
Other BRDF modelsOther BRDF models
Empirical: Measure and build a 4D table
Anisotropic models for hair, brushed steel
Cartoon shaders, funky BRDFs
Capturing spatial variation
Very active area of research
![Page 29: Computer Graphics (Fall 2008) COMS 4160, Lecture 19: Illumination and Shading 2 cs4160.](https://reader035.fdocument.pub/reader035/viewer/2022062407/56649d535503460f94a2f3a0/html5/thumbnails/29.jpg)
Complex LightingComplex Lighting
So far we’ve looked at simple, discrete light sources.
Real environments contribute many colors of light from many directions.
The complex lighting of a scene can be captured in an Environment map. Just paint the environment on a sphere.
![Page 30: Computer Graphics (Fall 2008) COMS 4160, Lecture 19: Illumination and Shading 2 cs4160.](https://reader035.fdocument.pub/reader035/viewer/2022062407/56649d535503460f94a2f3a0/html5/thumbnails/30.jpg)
Environment MapsEnvironment Maps
Instead of determining the lighting direction by knowing what lights exist, determine what light exists by knowing the lighting direction.
Blinn and Newell 1976, Miller and Hoffman, 1984Later, Greene 86, Cabral et al. 87
![Page 31: Computer Graphics (Fall 2008) COMS 4160, Lecture 19: Illumination and Shading 2 cs4160.](https://reader035.fdocument.pub/reader035/viewer/2022062407/56649d535503460f94a2f3a0/html5/thumbnails/31.jpg)
DemoDemo
![Page 32: Computer Graphics (Fall 2008) COMS 4160, Lecture 19: Illumination and Shading 2 cs4160.](https://reader035.fdocument.pub/reader035/viewer/2022062407/56649d535503460f94a2f3a0/html5/thumbnails/32.jpg)
ConclusionConclusion
All this (OpenGL, physically based) are local illumination and shading models
Good lighting, BRDFs produce convincing results Matrix movies, modern realistic computer graphics
Do not consider global effects like shadows, interreflections (from one surface on another) Subject of next unit (global illumination)
![Page 33: Computer Graphics (Fall 2008) COMS 4160, Lecture 19: Illumination and Shading 2 cs4160.](https://reader035.fdocument.pub/reader035/viewer/2022062407/56649d535503460f94a2f3a0/html5/thumbnails/33.jpg)
What’s NextWhat’s Next
Have finished basic material for the class Texture mapping lecture later today
Review of illumination and Shading
Remaining topics are global illumination (written assignment 2): Lectures on rendering eq, radiosity
Historical movie: Story of Computer Graphics
Likely to finish these by Dec 1: No class Dec 8,
Work instead on HW 4, written assignments
Dec 10? will be demo session for HW 4