Overview Foundations of Computer Graphics (Spring 2012) . Lighting and shading key in computer graphics . CS 184, Lecture 21: Radiometry HW 2 etc. ad-hoc shading models, no units http://inst.eecs.berkeley.edu/~cs184 . 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)

Many slides courtesy Pat Hanrahan

Radiometry 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

1 2 Radiometry 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

3 Radiometry 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

Radiance

E Power per unit projected area perpendicular to the ray per unit solid angle in the direction of the ray

E Symbol: L(x,ω) (W/m2 sr)

E Flux given by dΦ = L(x,ω) cos θ dω dA

Radiance properties E Radiance constant as propagates along ray – Derived from conservation of flux – Fundamental in Light Transport. dΦ == L dωω dA L d dA = dΦ 1 1112 2 2 2

22 dωω12== dA r d 21 dA r

dA dA dωω dA==12 d dA 11 r 2 2 2

∴LL12=

4 Radiance properties Irradiance, Radiosity E Sensor response proportional to radiance E Irradiance E is radiant power per unit area (constant of proportionality is throughput) E Integrate incoming radiance over – Far surface: See more, but subtend smaller angle hemisphere – Wall equally bright across viewing distances – Projected solid angle (cos θ dω) Consequences – Uniform illumination: Irradiance = π [CW 24,25] – Radiance associated with rays in a ray tracer – Units: W/m2 – Other radiometric quants derived from radiance E Radiant Exitance (radiosity) – Power per unit area leaving surface (like irradiance)

5 Irradiance Environment Maps R N

Incident Radiance Irradiance Environment Map (Illumination Environment Map)

Radiometry 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

6 Building up the BRDF

E Bi-Directional Reflectance Distribution Function [Nicodemus 77]

E Function based on incident, view direction

E Relates incoming light energy to outgoing

E Unifying framework for many materials

BRDF

E Reflected Radiance proportional Irradiance E Constant proportionality: BRDF E Ratio of outgoing light (radiance) to incoming light (irradiance) – Bidirectional Reflection Distribution Function – (4 Vars) units 1/sr Lr(ω r ) f (ω i,ω r ) = Li(ω i)cosθ idω i Lr(ω r ) = Li(ω i)f (ω i,ω r )cosθ idω i

7 Isotropic vs Anisotropic

. Isotropic: Most materials (you can rotate about normal without changing reflections) . Anisotropic: brushed metal etc. preferred tangential direction

Isotropic Anisotropic

Radiometry and Photometry Reflection Equation . Physical measurement of electromagnetic energy . Measure spatial (and angular) properties of light . Radiant Power . Radiant Intensity ω ω . Irradiance i r . Inverse square and cosine law x . Radiance . Radiant Exitance (Radiosity) . L (x,ω ) = L (x,ω ) + L (x,ω )f (x,ω ,ω )(ω i n) Reflection functions: Bi-Directional Reflectance r r e r i i i r i Distribution Function or BRDF Reflected Light Emission Incident BRDF Cosine of (Output Image) Light (from Incident angle . Reflection Equation (and simple BRDF models) light source)

Reflection Equation Reflection Equation

ω ω ω ω i r dωi i r x x Replace sum with integral Sum over all light sources Lx(,ω )=+ L (, xω ) Lx (,ωω )(,fx ωθ , )cos dω L (x,ω ) = L (x,ω ) + L (x,ω )f (x,ω ,ω )(ω i n) r r e r∫ i i ir i i r r e r ∑ i i i r i Ω Reflected Light Emission Incident BRDF Cosine of Reflected Light Emission Incident BRDF Cosine of (Output Image) Light (from Incident angle (Output Image) Light (from Incident angle light source) light source)

8 BRDF Viewer plots

Diffuse Torrance-Sparrow Anisotropic

bv written by Szymon Rusinkiewicz

9 Analytical BRDF: TS example Torrance-Sparrow

. One famous analytically derived BRDF is the . Assume the surface is made up grooves at microscopic level. Torrance-Sparrow model . T-S is used to model specular surface, like Phong . more accurate than Phong . Assume the faces of these grooves (called microfacets) are . has more parameters that can be set to match different perfect reflectors. materials . derived based on assumptions of underlying geometry. . Take into account 3 phenomena (instead of ‘because it works well’)

Shadowing Masking Interreflection

Torrance-Sparrow Result Other BRDF models

Fresnel term: Geometric Attenuation: allows for reduces the output based on the . Empirical: Measure and build a 4D table wavelength amount of shadowing or masking dependency that occurs. . Anisotropic models for hair, brushed steel

Distribution: . Cartoon shaders, funky BRDFs F(θ i)G(ω i,ω r )D(θ h) distribution f = function . Capturing spatial variation 4cos(θ i)cos(θ r ) determines what How much of the percentage of . Very active area of research macroscopic microfacets are How much of oriented to reflect surface is visible the macroscopic to the light source in the viewer surface is visible direction. to the viewer

Environment Maps Reflection Equation . 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) ω ω dωi i r x Replace sum with integral Lx(,ω )=+ L (, xω ) Lx (,ωω )(,fx ωθ , )cos dω r r e r∫ i i ir i i Ω Reflected Light Emission Environment BRDF Cosine of (Output Image) Map (continuous) Incident angle Blinn and Newell 1976, Miller and Hoffman, 1984 Later, Greene 86, Cabral et al. 87

1 0 Environment Maps Demo

. 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

1 1