Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 21: Radiometry cs184 Many slides...

62
Foundations of Computer Foundations of Computer Graphics Graphics (Spring 2012) (Spring 2012) CS 184, Lecture 21: Radiometry http://inst.eecs.berkeley.edu/~cs184 Many slides courtesy Pat Hanrah

Transcript of Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 21: Radiometry cs184 Many slides...

Page 1: Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 21: Radiometry cs184 Many slides courtesy Pat Hanrahan.

Foundations of Computer Graphics Foundations of Computer Graphics (Spring 2012) (Spring 2012)

CS 184, Lecture 21: Radiometry

http://inst.eecs.berkeley.edu/~cs184

Many slides courtesy Pat Hanrahan

Page 2: Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 21: Radiometry cs184 Many slides courtesy Pat Hanrahan.

OverviewOverview

Lighting and shading key in computer graphics

HW 2 etc. ad-hoc shading models, no units

Really, want to match physical light reflection

Next 3 lectures look at this formally

Today: physical measurement of light: radiometry

Formal reflection equation, reflectance models

Global Illumination (later)

Page 3: Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 21: Radiometry cs184 Many slides courtesy Pat Hanrahan.
Page 4: Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 21: Radiometry cs184 Many slides courtesy Pat Hanrahan.

Radiometry and PhotometryRadiometry and Photometry Physical measurement of electromagnetic energy

Measure spatial (and angular) properties of light Radiant Power Radiant Intensity Irradiance

Inverse square and cosine law Radiance Radiant Exitance (Radiosity)

Reflection functions: Bi-Directional Reflectance Distribution Function or BRDF

Reflection Equation

Page 5: Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 21: Radiometry cs184 Many slides courtesy Pat Hanrahan.
Page 6: Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 21: Radiometry cs184 Many slides courtesy Pat Hanrahan.
Page 7: Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 21: Radiometry cs184 Many slides courtesy Pat Hanrahan.
Page 8: Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 21: Radiometry cs184 Many slides courtesy Pat Hanrahan.
Page 9: Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 21: Radiometry cs184 Many slides courtesy Pat Hanrahan.
Page 10: Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 21: Radiometry cs184 Many slides courtesy Pat Hanrahan.
Page 11: Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 21: Radiometry cs184 Many slides courtesy Pat Hanrahan.
Page 12: Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 21: Radiometry cs184 Many slides courtesy Pat Hanrahan.
Page 13: Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 21: Radiometry cs184 Many slides courtesy Pat Hanrahan.

Radiometry and PhotometryRadiometry and Photometry Physical measurement of electromagnetic energy

Measure spatial (and angular) properties of light Radiant Power Radiant Intensity Irradiance

Inverse square and cosine law Radiance Radiant Exitance (Radiosity)

Reflection functions: Bi-Directional Reflectance Distribution Function or BRDF

Reflection Equation

Page 14: Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 21: Radiometry cs184 Many slides courtesy Pat Hanrahan.
Page 15: Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 21: Radiometry cs184 Many slides courtesy Pat Hanrahan.
Page 16: Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 21: Radiometry cs184 Many slides courtesy Pat Hanrahan.
Page 17: Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 21: Radiometry cs184 Many slides courtesy Pat Hanrahan.
Page 18: Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 21: Radiometry cs184 Many slides courtesy Pat Hanrahan.
Page 19: Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 21: Radiometry cs184 Many slides courtesy Pat Hanrahan.
Page 20: Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 21: Radiometry cs184 Many slides courtesy Pat Hanrahan.

Radiometry and PhotometryRadiometry and Photometry Physical measurement of electromagnetic energy

Measure spatial (and angular) properties of light Radiant Power Radiant Intensity Irradiance

Inverse square and cosine law Radiance Radiant Exitance (Radiosity)

Reflection functions: Bi-Directional Reflectance Distribution Function or BRDF

Reflection Equation

Page 21: Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 21: Radiometry cs184 Many slides courtesy Pat Hanrahan.

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 22: Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 21: Radiometry cs184 Many slides courtesy Pat Hanrahan.
Page 23: Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 21: Radiometry cs184 Many slides courtesy Pat Hanrahan.
Page 24: Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 21: Radiometry cs184 Many slides courtesy Pat Hanrahan.

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

dAdAd dA d dA

r

1 2L L

Page 25: Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 21: Radiometry cs184 Many slides courtesy Pat Hanrahan.
Page 26: Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 21: Radiometry cs184 Many slides courtesy Pat Hanrahan.
Page 27: Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 21: Radiometry cs184 Many slides courtesy Pat Hanrahan.

Radiance properties• Sensor response proportional to radiance

(constant of proportionality is throughput)– Far surface: See more, but subtend smaller angle– Wall equally bright across viewing distances

Consequences– Radiance associated with rays in a ray tracer– Other radiometric quants derived from radiance

Page 28: Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 21: Radiometry cs184 Many slides courtesy Pat Hanrahan.

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 29: Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 21: Radiometry cs184 Many slides courtesy Pat Hanrahan.
Page 30: Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 21: Radiometry cs184 Many slides courtesy Pat Hanrahan.
Page 31: Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 21: Radiometry cs184 Many slides courtesy Pat Hanrahan.
Page 32: Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 21: Radiometry cs184 Many slides courtesy Pat Hanrahan.

Irradiance Environment MapsIrradiance Environment Maps

Incident Radiance(Illumination Environment Map)

Irradiance Environment Map

R N

Page 33: Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 21: Radiometry cs184 Many slides courtesy Pat Hanrahan.
Page 34: Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 21: Radiometry cs184 Many slides courtesy Pat Hanrahan.
Page 35: Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 21: Radiometry cs184 Many slides courtesy Pat Hanrahan.

Radiometry and PhotometryRadiometry and Photometry Physical measurement of electromagnetic energy

Measure spatial (and angular) properties of light Radiant Power Radiant Intensity Irradiance

Inverse square and cosine law Radiance Radiant Exitance (Radiosity)

Reflection functions: Bi-Directional Reflectance Distribution Function or BRDF

Reflection Equation

Page 36: Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 21: Radiometry cs184 Many slides courtesy Pat Hanrahan.
Page 37: Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 21: Radiometry cs184 Many slides courtesy Pat Hanrahan.
Page 38: Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 21: Radiometry cs184 Many slides courtesy Pat Hanrahan.
Page 39: Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 21: Radiometry cs184 Many slides courtesy Pat Hanrahan.

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 40: Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 21: Radiometry cs184 Many slides courtesy Pat Hanrahan.
Page 41: Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 21: Radiometry cs184 Many slides courtesy Pat Hanrahan.

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

Page 42: Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 21: Radiometry cs184 Many slides courtesy Pat Hanrahan.
Page 43: Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 21: Radiometry cs184 Many slides courtesy Pat Hanrahan.
Page 44: Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 21: Radiometry cs184 Many slides courtesy Pat Hanrahan.

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 45: Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 21: Radiometry cs184 Many slides courtesy Pat Hanrahan.

Radiometry and PhotometryRadiometry and Photometry Physical measurement of electromagnetic energy

Measure spatial (and angular) properties of light Radiant Power Radiant Intensity Irradiance

Inverse square and cosine law Radiance Radiant Exitance (Radiosity)

Reflection functions: Bi-Directional Reflectance Distribution Function or BRDF

Reflection Equation (and simple BRDF models)

Page 46: Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 21: Radiometry cs184 Many slides courtesy Pat Hanrahan.

Reflection Equation

r

x

Reflected Light(Output Image)

Emission Incident Light (fromlight source)

BRDF Cosine of Incident angle

Page 47: Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 21: Radiometry cs184 Many slides courtesy Pat Hanrahan.

Reflection Equation

r

x

Reflected Light(Output Image)

Emission Incident Light (fromlight source)

BRDF Cosine of Incident angle

Sum over all light sources

Page 48: Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 21: Radiometry cs184 Many slides courtesy Pat Hanrahan.

Reflection Equation

r

x

( , ) ( , ) ( , ) ( , , ) cosr r e r i i i r iiL x L x L x df x

Reflected Light(Output Image)

Emission Incident Light (fromlight source)

BRDF Cosine of Incident angle

Replace sum with integral

id

Page 49: Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 21: Radiometry cs184 Many slides courtesy Pat Hanrahan.
Page 50: Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 21: Radiometry cs184 Many slides courtesy Pat Hanrahan.

BRDF Viewer plots BRDF Viewer plots

Diffuse

bv written by Szymon Rusinkiewicz

Torrance-Sparrow

Anisotropic

Page 51: Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 21: Radiometry cs184 Many slides courtesy Pat Hanrahan.
Page 52: Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 21: Radiometry cs184 Many slides courtesy Pat Hanrahan.
Page 53: Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 21: Radiometry cs184 Many slides courtesy Pat Hanrahan.
Page 54: Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 21: Radiometry cs184 Many slides courtesy Pat Hanrahan.
Page 55: Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 21: Radiometry cs184 Many slides courtesy Pat Hanrahan.

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 Phong 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 56: Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 21: Radiometry cs184 Many slides courtesy Pat Hanrahan.

Torrance-SparrowTorrance-Sparrow

Assume the surface is made up grooves at microscopic level.

Assume the faces of these grooves (called microfacets) are perfect reflectors.

Take into account 3 phenomena

Shadowing Masking Interreflection

Page 57: Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 21: Radiometry cs184 Many slides courtesy Pat Hanrahan.

Torrance-Sparrow ResultTorrance-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 58: Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 21: Radiometry cs184 Many slides courtesy Pat Hanrahan.

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 59: Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 21: Radiometry cs184 Many slides courtesy Pat Hanrahan.

Environment MapsEnvironment 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 60: Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 21: Radiometry cs184 Many slides courtesy Pat Hanrahan.

Reflection EquationReflection Equation

r

x

( , ) ( , ) ( , ) ( , , ) cosr r e r i i i r iiL x L x L x df x

Reflected Light(Output Image)

Emission Environment Map (continuous)

BRDF Cosine of Incident angle

Replace sum with integral

id

Page 61: Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 21: Radiometry cs184 Many slides courtesy Pat Hanrahan.

Environment MapsEnvironment 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

Page 62: Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 21: Radiometry cs184 Many slides courtesy Pat Hanrahan.

DemoDemo