Advanced Computer Graphics (Spring 2013) CS 283, Lecture 8: Illumination and Reflection cs283/sp13...

47
Advanced Computer Graphics (Spring 2013) CS 283, Lecture 8: Illumination and Reflection http://inst.eecs.berkeley.edu/~cs283/sp13 Many slides courtesy Pat Hanrah

Transcript of Advanced Computer Graphics (Spring 2013) CS 283, Lecture 8: Illumination and Reflection cs283/sp13...

Page 1: Advanced Computer Graphics (Spring 2013) CS 283, Lecture 8: Illumination and Reflection cs283/sp13 Many slides courtesy.

Advanced Computer Graphics (Spring 2013)

CS 283, Lecture 8: Illumination and Reflection

http://inst.eecs.berkeley.edu/~cs283/sp13

Many slides courtesy Pat Hanrahan

Page 2: Advanced Computer Graphics (Spring 2013) CS 283, Lecture 8: Illumination and Reflection cs283/sp13 Many slides courtesy.

Overview

Moving from geometry to rendering and appearance

Major part of course: 10 lectures Includes discussion of current research topics Assignments 2 and 3

First couple of lectures recap of 184 for those in it Formal illumination, reflection, global illumination But quickly move to new and advanced material

Remember Mesh Assignment due Feb 22

Page 3: Advanced Computer Graphics (Spring 2013) CS 283, Lecture 8: Illumination and Reflection cs283/sp13 Many slides courtesy.
Page 4: Advanced Computer Graphics (Spring 2013) CS 283, Lecture 8: Illumination and Reflection cs283/sp13 Many slides courtesy.

Radiometry

Physical measurement of electromagnetic energy

Measure spatial (and angular) properties of light Radiance, Irradiance Reflection functions: Bi-Directional

Reflectance Distribution Function or BRDF Reflection Equation Simple BRDF models

Environment Maps

Page 5: Advanced Computer Graphics (Spring 2013) CS 283, Lecture 8: Illumination and Reflection cs283/sp13 Many slides courtesy.
Page 6: Advanced Computer Graphics (Spring 2013) CS 283, Lecture 8: Illumination and Reflection cs283/sp13 Many slides courtesy.
Page 7: Advanced Computer Graphics (Spring 2013) CS 283, Lecture 8: Illumination and Reflection cs283/sp13 Many slides courtesy.
Page 8: Advanced Computer Graphics (Spring 2013) CS 283, Lecture 8: Illumination and Reflection cs283/sp13 Many slides courtesy.
Page 9: Advanced Computer Graphics (Spring 2013) CS 283, Lecture 8: Illumination and Reflection cs283/sp13 Many slides courtesy.

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 10: Advanced Computer Graphics (Spring 2013) CS 283, Lecture 8: Illumination and Reflection cs283/sp13 Many slides courtesy.

Radiance properties• Radiance constant as 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 11: Advanced Computer Graphics (Spring 2013) CS 283, Lecture 8: Illumination and Reflection cs283/sp13 Many slides courtesy.
Page 12: Advanced Computer Graphics (Spring 2013) CS 283, Lecture 8: Illumination and Reflection cs283/sp13 Many slides courtesy.
Page 13: Advanced Computer Graphics (Spring 2013) CS 283, Lecture 8: Illumination and Reflection cs283/sp13 Many slides courtesy.

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 14: Advanced Computer Graphics (Spring 2013) CS 283, Lecture 8: Illumination and Reflection cs283/sp13 Many slides courtesy.

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

• Radiant Exitance (radiosity) – Power per unit area leaving

surface (like irradiance)

Page 15: Advanced Computer Graphics (Spring 2013) CS 283, Lecture 8: Illumination and Reflection cs283/sp13 Many slides courtesy.
Page 16: Advanced Computer Graphics (Spring 2013) CS 283, Lecture 8: Illumination and Reflection cs283/sp13 Many slides courtesy.
Page 17: Advanced Computer Graphics (Spring 2013) CS 283, Lecture 8: Illumination and Reflection cs283/sp13 Many slides courtesy.
Page 18: Advanced Computer Graphics (Spring 2013) CS 283, Lecture 8: Illumination and Reflection cs283/sp13 Many slides courtesy.
Page 19: Advanced Computer Graphics (Spring 2013) CS 283, Lecture 8: Illumination and Reflection cs283/sp13 Many slides courtesy.

Irradiance Environment Maps

Incident Radiance(Illumination Environment Map)

Irradiance Environment Map

R N

Page 20: Advanced Computer Graphics (Spring 2013) CS 283, Lecture 8: Illumination and Reflection cs283/sp13 Many slides courtesy.

Radiometry

Physical measurement of electromagnetic energy

Measure spatial (and angular) properties of light Radiance, Irradiance Reflection functions: Bi-Directional Reflectance

Distribution Function or BRDF Reflection Equation Simple BRDF models

Environment Maps

Page 21: Advanced Computer Graphics (Spring 2013) CS 283, Lecture 8: Illumination and Reflection cs283/sp13 Many slides courtesy.
Page 22: Advanced Computer Graphics (Spring 2013) CS 283, Lecture 8: Illumination and Reflection cs283/sp13 Many slides courtesy.
Page 23: Advanced Computer Graphics (Spring 2013) CS 283, Lecture 8: Illumination and Reflection cs283/sp13 Many slides courtesy.
Page 24: Advanced Computer Graphics (Spring 2013) CS 283, Lecture 8: Illumination and Reflection cs283/sp13 Many slides courtesy.

Building up the BRDF

• Bi-Directional Reflectance Distribution Function [Nicodemus 77]

• Function based on incident, view direction

• Relates incoming light energy to outgoing

• Unifying framework for many materials

Page 25: Advanced Computer Graphics (Spring 2013) CS 283, Lecture 8: Illumination and Reflection cs283/sp13 Many slides courtesy.
Page 26: Advanced Computer Graphics (Spring 2013) CS 283, Lecture 8: Illumination and Reflection cs283/sp13 Many slides courtesy.

BRDF

• Reflected Radiance proportional Irradiance• Constant proportionality: BRDF • 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 27: Advanced Computer Graphics (Spring 2013) CS 283, Lecture 8: Illumination and Reflection cs283/sp13 Many slides courtesy.
Page 28: Advanced Computer Graphics (Spring 2013) CS 283, Lecture 8: Illumination and Reflection cs283/sp13 Many slides courtesy.
Page 29: Advanced Computer Graphics (Spring 2013) CS 283, Lecture 8: Illumination and Reflection cs283/sp13 Many slides courtesy.

Isotropic vs Anisotropic

Isotropic: Most materials (you can rotate about normal without changing reflections)

Anisotropic: brushed metal etc. preferred tangential direction

Isotropic Anisotropic

Page 30: Advanced Computer Graphics (Spring 2013) CS 283, Lecture 8: Illumination and Reflection cs283/sp13 Many slides courtesy.
Page 31: Advanced Computer Graphics (Spring 2013) CS 283, Lecture 8: Illumination and Reflection cs283/sp13 Many slides courtesy.

Reflection Equation

ir

Reflected Radiance(Output Image)

Incident radiance (fromlight source)

BRDF Cosine of Incident angle

Page 32: Advanced Computer Graphics (Spring 2013) CS 283, Lecture 8: Illumination and Reflection cs283/sp13 Many slides courtesy.

Reflection Equation

ir

Sum over all light sources

Reflected Radiance(Output Image)

Incident radiance (fromlight source)

BRDF Cosine of Incident angle

Page 33: Advanced Computer Graphics (Spring 2013) CS 283, Lecture 8: Illumination and Reflection cs283/sp13 Many slides courtesy.

Reflection Equation

ir

Replace sum with integral

id

Reflected Radiance(Output Image)

Incident radiance (fromlight source)

BRDF Cosine of Incident angle

Page 34: Advanced Computer Graphics (Spring 2013) CS 283, Lecture 8: Illumination and Reflection cs283/sp13 Many slides courtesy.

Radiometry

Physical measurement of electromagnetic energy

Measure spatial (and angular) properties of light Radiance, Irradiance Reflection functions: Bi-Directional Reflectance

Distribution Function or BRDF Reflection Equation Simple BRDF models

Environment Maps

Page 35: Advanced Computer Graphics (Spring 2013) CS 283, Lecture 8: Illumination and Reflection cs283/sp13 Many slides courtesy.

Brdf Viewer plots

Diffuse

bv written by Szymon Rusinkiewicz

Torrance-Sparrow

Anisotropic

Page 36: Advanced Computer Graphics (Spring 2013) CS 283, Lecture 8: Illumination and Reflection cs283/sp13 Many slides courtesy.
Page 37: Advanced Computer Graphics (Spring 2013) CS 283, Lecture 8: Illumination and Reflection cs283/sp13 Many slides courtesy.
Page 38: Advanced Computer Graphics (Spring 2013) CS 283, Lecture 8: Illumination and Reflection cs283/sp13 Many slides courtesy.
Page 39: Advanced Computer Graphics (Spring 2013) CS 283, Lecture 8: Illumination and Reflection cs283/sp13 Many slides courtesy.
Page 40: Advanced Computer Graphics (Spring 2013) CS 283, Lecture 8: Illumination and Reflection cs283/sp13 Many slides courtesy.

Analytical 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 41: Advanced Computer Graphics (Spring 2013) CS 283, Lecture 8: Illumination and Reflection cs283/sp13 Many slides courtesy.

Torrance-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 42: Advanced Computer Graphics (Spring 2013) CS 283, Lecture 8: Illumination and Reflection cs283/sp13 Many slides courtesy.

Torrance-Sparrow ResultFresnel 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 43: Advanced Computer Graphics (Spring 2013) CS 283, Lecture 8: Illumination and Reflection cs283/sp13 Many slides courtesy.

Other 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 44: Advanced Computer Graphics (Spring 2013) CS 283, Lecture 8: Illumination and Reflection cs283/sp13 Many slides courtesy.

Radiometry

Physical measurement of electromagnetic energy

Measure spatial (and angular) properties of light Radiance, Irradiance Reflection functions: Bi-Directional

Reflectance Distribution Function or BRDF Reflection Equation Simple BRDF models

Environment Maps

Page 45: Advanced Computer Graphics (Spring 2013) CS 283, Lecture 8: Illumination and Reflection cs283/sp13 Many slides courtesy.

Environment Maps Light as a function of direction, from entire environment

Captured by photographing a chrome steel or mirror sphere

Accurate only for one point, but distant lighting same at other scene locations (typically use only one env. map)

Blinn and Newell 1976, Miller and Hoffman, 1984Later, Greene 86, Cabral et al. 87

Page 46: Advanced Computer Graphics (Spring 2013) CS 283, Lecture 8: Illumination and Reflection cs283/sp13 Many slides courtesy.

Reflection Equation

ir

Replace sum with integral

id

Reflected Radiance(Output Image)

EnvironmentMap (continuous)

BRDF Cosine of Incident angle

Page 47: Advanced Computer Graphics (Spring 2013) CS 283, Lecture 8: Illumination and Reflection cs283/sp13 Many slides courtesy.

Environment Maps

Environment maps widely used as lighting representation

Many modern methods deal with offline and real-time rendering with environment maps

Image-based complex lighting + complex BRDFs