<<

- Transport -

Hendrik Lensch

Computer Graphics WS07/08 – Light Transport Overview • So far – simple shading • Today – Physics behind – Physical light quantities – Perception of light – Light sources – Light transport simulation • Next lecture – Light-matter interaction – function – models

Computer Graphics WS07/08 – Light Transport What is Light ? • Ray – Linear propagation ⇒ Geometrical • Vector – ⇒ Jones Calculus: matrix representation • Wave – Diffraction, Interference ⇒ Maxwell equations: propagation of light • Particle – Light comes in discrete energy quanta: ⇒ Quantum theory: interaction of light with matter • Field – Electromagnetic force: exchange of virtual photons ⇒ Quantum Electrodynamics (QED): interaction between particles

Computer Graphics WS07/08 – Light Transport What is Light ? • Ray – Linear propagation ⇒ Geometrical optics • Vector – Polarization ⇒ Jones Calculus: matrix representation • Wave – Diffraction, Interference ⇒ Maxwell equations: propagation of light • Particle – Light comes in discrete energy quanta: photons ⇒ Quantum theory: interaction of light with matter • Field – Electromagnetic force: exchange of virtual photons ⇒ Quantum Electrodynamics (QED): interaction between particles

Computer Graphics WS07/08 – Light Transport Light in Computer Graphics • Based on human visual perception – Macroscopic geometry – Tristimulus color model – Psycho-physics: tone mapping, compression, … • Ray optics – Light: scalar, real-valued quantity – Linear propagation – Macroscopic objects – Incoherent light – Superposition principle: light contributions add up linearly – No attenuation in free space • Limitations – Microscopic structures (≈λ) – Diffraction, Interference – Polarization – Dispersion

Computer Graphics WS07/08 – Light Transport Angle and Solid Angle θ the angle subtended by a curve in the plane, is the length of the corresponding arc on the unit circle. Ω,d ω the solid angle subtended by an object, is the surface area of its projection onto the unit sphere, Units for measuring solid angle: [sr]

Computer Graphics WS07/08 – Light Transport Solid Angle in Spherical Coordinates

θ Infinitesimallyφ small solid angle du = r dθ dv θ θ dv = r sinω d φ dA = du dv = r 2 sin d d dA θ ⇒ d ,dΩ = = sin dθ dφ r 2 Finite solid angle φ φ1 1 θ () θ Ω = ∫∫d φsin dθ du 0 φ 0 () θ φ

Computer Graphics WS07/08 – Light Transport Projected Solid Geometry The solid angle subtended by a small surface patch S with area ΔA is obtained (i) by projecting it orthogonal to the vector r to the origin ΔAcosθ and (ii) dividing by the square of the distance to the origin: ΔAcosθ ΔΩ ≈ r 2

Computer Graphics WS07/08 – Light Transport • Definition: – Radiometry is the science of measuring transfers. Radiometric quantities have physical meaning and can be directly measured using proper equipment such as spectral .

• Radiometric Quantities – energy [ second] n · hν ( Energy) – radiant (total ) [watt] Φ – [watt/(m2 sr)] L – [watt/m2]E – [watt/m2] B – [watt/sr] I

Computer Graphics WS07/08 – Light Transport Radiometric Quantities: Radiance • Radiance is used to describe radiant energy transfer. • Radiance L is defined as – the power (flux) traveling at some point x – in a specified direction ω = (θ,φ), – per unit area perpendicular to the direction of travel, – per unit solid angle. • Thus, the differential power d2Φ radiated through the differential solid

ω angled 2Φ = L(x, ) dA cosθ dω dω, from the projected differential area dA cosθ is: ω ω d 2Φ = L(x, ) dAcosθ dω

dA

Computer Graphics WS07/08 – Light Transport Spectral Properties • – Since light is composed of electromagnetic waves of different and , most of the energy transfer quantities are continuous functions of wavelength. – In graphics each measurement L(x,ω) is for a discrete band of wavelength only (often some abstract R, B, G)

Computer Graphics WS07/08 – Light Transport Radiometric Quantities: Irradiance

Irradiance E is defined as the total power per unit area (flux density) incident onto a surface. To obtain the total flux incident to dA, the

incoming radiance Li is integrated over the upper hemisphere Ω+ above the surface:

ω dΦ E ≡ θ ω dA ω θ⎡ ω ⎤ dΦ = L (x, )cos d dA ⎢ ∫ i ⎥ ⎣⎢Ω+ ω ⎦⎥ θ ππ/ 2 2 θ E = L (x, )cos d = L (x, )cos sin dθ dφ ∫ i ∫∫ i Ω+ 0 0

Computer Graphics WS07/08 – Light Transport Radiometric Quantities: Radiosity

Radiosity B is defined as the total power per unit area (flux density) leaving a surface. To obtain the total flux radiated from dA, the

outgoing radiance Lo is integrated over the upper hemisphere Ω+ above the surface.

ω dΦθ ω B ≡ ω θ dA ⎡ ω ⎤ dΦ = L (x, )cos d dA ⎢∫ o ⎥ ⎣Ω ω ⎦ θ ππ/ 2 2 θ B = L (x, )cos d = L (x, )cos sin dθ dφ ∫ o ∫∫ o Ω 0 0

Computer Graphics WS07/08 – Light Transport • Photometry: – The human eye is sensitive to a limited range of wavelengths (roughly from 380nm to 770nm). – The response of our visual system is not the same for all wavelengths, and can be characterized by the luminuous efficiency function V(λ), which represents the average human spectral response. – A set of photometric quantities can be derived from radiometric quantities by integrating them against the luminuous efficiency function V(λ). – Separate curves exist for light and dark adaptation of the eye.

Computer Graphics WS07/08 – Light Transport Radiometry vs. Photometry

Physics-based quantities Perception-based quantities

Computer Graphics WS07/08 – Light Transport Perception of Light

dΩ dΩ' r dA

f l photons / second = flux = energy / time = power Φ rod sensitive to flux angular extend of rod = resolution (≈ 1 arc minute2) dΩ projected rod size = area dA ≈ l 2 ⋅dΩ Angular extend of pupil aperture (r ≤ 4 mm) = solid angle dΩ'≈ π ⋅ r 2 / l 2 flux proportional to area and solid angle Φ ∝ dΩ'⋅dA Φ radiance = flux per unit area per unit solid angle L = dΩ'⋅dA The eye detects radiance

Computer Graphics WS07/08 – Light Transport Brightness Perception

dΩ dΩ' r dA dA'

f l

2 2 r As l increases: Φ0 ∝ dA⋅dΩ'= l dΩ⋅π 2 = const l • dA’ > dA : photon flux per rod stays constant • dA’ < dA : photon flux per rod decreases

Where does the Sun turn into a star ? − Depends on apparent Sun disc size on retina ⇒ Photon flux per rod stays the same on Mercury, Earth or Neptune ⇒ Photon flux per rod decreases when dΩ’ < 1 arc minute (beyond Neptune)

Computer Graphics WS07/08 – Light Transport Brightness Perception II Extended light source

dΩ r

l

2 Φ0 = L0 ⋅π ⋅r ⋅dΩ

⇒ Flux does not depend on distance l ⇒ Nebulae always appear b/w

Computer Graphics WS07/08 – Light Transport Radiance in Space

dΩ2 dΩ1

L1 L2

l dA1 dA2

Flux leaving surface 1 must be equal to flux arriving on surface 2

L1 ⋅dΩ1 ⋅dA1 = L2 ⋅dΩ2 ⋅dA2 dA dA From geometry follows dΩ = 2 dΩ = 1 1 l 2 2 l 2 dA ⋅dA Ray throughput T = dΩ ⋅dA = dΩ ⋅dA = 1 2 1 1 2 2 l 2

L1 = L2

The radiance in the direction of a light ray remains constant as it propagates along the ray

Computer Graphics WS07/08 – Light Transport Point Light Source • Point light with isotropic radiance – Power (total flux) of a point light source

∀Φg= Power of the light source [watt] – Intensity of a light source

• I= Φg/(4π sr) [watt/sr] – Irradiance on a sphere with radius r around light source: 2 2 • Er= Φg/(4π r ) [watt/m ] – Irradiance on some other surface A dA θ dΦ ω d r E(x) = g = I dA dA

Φ g dAcosθ = π ⋅ dω 4 r 2dA Φ cosθ = gπ⋅ 4 r 2

Computer Graphics WS07/08 – Light Transport Inverse Square Law

Irradiance E:

d2 d1 2 E1 d 2 E 1 = 2 E2 d1 E2

• Irradiance E: power per m2 – Illuminating quantity • Distance-dependent – Double distance from emitter: sphere area four times bigger • Irradiance falls off with inverse of squared distance – For point light sources

Computer Graphics WS07/08 – Light Transport Light Source Specifications • Power (total flux) – Emitted energy / time • Active emission size – Point, area, volume • Spectral distribution – Thermal, line spectrum • Directional distribution – Goniometric diagram

Computer Graphics WS07/08 – Light Transport Sky Light • Sun – Point source (approx.) – White light (by def.) • Sky – Area source – Scattering: blue • Horizon – Brighter – Haze: whitish • Overcast sky – Multiple scattering in clouds – Uniform grey

Courtesy Lynch & Livingston

Computer Graphics WS07/08 – Light Transport Light Source Classification

Radiation characteristics Emitting area

• Directional light • Volume – Spot- – neon advertisements – sodium vapor lamps –Beamers – Distant sources • Area – CRT, LCD display • Diffuse emitters – (Overcast) sky –Torchieres • Line – Frosted glass lamps – Clear light bulb, filament • Ambient light • Point – “Photons everywhere” – Xenon lamp –Arc lamp – diode

Computer Graphics WS07/08 – Light Transport ω ω ω Surface Radiance ω ω θ L(x, ) = L (x, ) + f ( , x, ) L (x, ) cos dω o e o ∫ r i o i i i i Ω

• Visible surface radiance L(x,ω o ) ω o – Surface position x ω i – Outgoing direction ω o θi – Incoming illumination direction ω • Self-emission i Le (x,ω o ) • Reflected light x – Incoming radiance from all L (x,ω ) directions i i – Direction-dependent reflectance (BRDF: bidirectional reflectance fr (ω i , x,ω o ) distribution function)

Computer Graphics WS07/08 – Light Transport ω ω ω Ray Tracing ω ω θ L(x, ) = L (x, ) + f ( , x, ) L (x, ) cos dω o e o ∫ r i o i i i i Ω • Simple ray tracing – Illumination from light sources only - local illumination (integral sum) – Evaluates angle-dependent reflectance function - shading • Advanced ray tracing techniques – Recursive ray tracing • Multiple reflections/refractions (for specular surfaces) – Forward ray tracing • Stochastic sampling (Monte Carlo methods) • – Combination of both

Computer Graphics WS07/08 – Light Transport Light Transport in a Scene • Scene – Lights (emitters) – Object surfaces (partially absorbing) • Illuminated object surfaces become emitters, too ! – Radiosity = Irradiance – absorbed photons flux density • Radiosity: photons per second per m^2 leaving surface • Irradiance: photons per second per m^2 incident on surface • Light bounces between all mutually visible surfaces • Invariance of radiance in free space – No absorption in-between objects • Dynamic Energy Equilibrium – emitted photons = absorbed photons (+ escaping photons)

Computer Graphics WS07/08 – Light Transport ω (Surface) Renderingω Equation ω • In Physics: Radiative Transport Equationω • Expresses energy equilibrium in scene ω θ L(x, ) = L (x, ) + f ( , x, ) L (x, ) cos dω o e o ∫ r i o i i i i Ω total radiance = emitted radiance + reflected radiance • First term: of the surface – non-zero only for light sources ω • Second term: reflected radiance o – integral over all possible incoming directions ω of irradiance times angle-dependent surface i θi reflection function • Fredholm integral equation of 2nd kind – unknown radiance appears on lhs and inside the integral – Numerical methods necessary to compute x approximate solution

Computer Graphics WS07/08 – Light Transport II • Outgoing illuminationω at a point L(x,ω ) = L (x,ω )+ L (xω,ω ) o e o r o ω = L (x, )+ f ( , x, )L (x,ω )cosθ dω e o ∫ r i o i i i i Ω+ • Linking with other surface points – Incoming radiance at x is outgoing radiance at y

Li (x,ωi ) = L(y,−ω i ) = L(RT (x,ω i ),−ωi ) L(y,-wi) y – Ray-Tracing operator -ωi y = RT (x,ω i )

Li(x,wi) ωi x

Computer Graphics WS07/08 – Light Transport ω Renderingω Equation III ω • Directional parameterizationω ω L(x, ) = L (x, )+ f ( , x, )L(y(x, ),−ω )cos θ dω o e o ∫ r i o i i i i Ω+ y n • Re-parameterization over surfaces S y θ dωi y dAy n cosθ y dωi = dAy x − y ω || x − y || 2 θ x i ω ω i ω dA ω cosθ cosθ L(x, ) = L (x, )+ f ( , x, ) L(y,ω (x, y))V (x, y) i y dA o e o ∫ r i o i 2 y y∈S x − y

Computer Graphics WS07/08 – Light Transport ω Renderingω Equation IV ω ω cosθ cosθ L(x, ) = L (x, )+ f ( , x, ) L(y,ω (x, y)) V(x, y) i y dA o e o ∫ r i o i 2 y y∈S x − y

cosθ cosθ • Geometry term G(x, y) = V ()x, y i y || x − y || 2

• Visibility term ⎧1 if visible ω V (x, y) = ⎨ ⎩0 if not visible • Integration overω all surfaces ω ω L(x, ) = L (x, )+ f ( , x, ) L(y,ω (x, y)) G(x, y) dA o e o ∫ r i o i y y∈S

Computer Graphics WS07/08 – Light Transport Rendering Equation: Approximations • Using RGB instead of full spectrum – follows roughly the eye’s sensitivity • Dividing scene surfaces into small patches – Assumes locally constant reflection, visibility, geometry terms • Sampling hemisphere along finite, discrete directions – simplifies integration to summation • Reflection function model – Parameterized function • ambient: constant, non-directional, background light • diffuse: light reflected uniformly in all directions • specular: light of higher intensity in -reflection direction – Lambertian surface (only ) - Radiosity • Approximations based on empirical foundations An example: polygon rendering in OpenGL

Computer Graphics WS07/08 – Light Transport ω ω Radiosity Equationωρ ω θ L(x, ) = L (x, )+ f ( , x, ππ) L(y,ω (ωx, y)) G(x, y) dA o e o ∫ r i o i y y∈S θ / 2 2 ππ/ 2 2 θ (x) = f (x)cos d = f (x) cos sin dφ dθ • Diffuse reflection only ∫∫ r ∫∫ r 0 0 0 0 diffuse fr (ω i , x,ω o ) = fr (x) ⇒ ρ(x)= π fr (x) reflectance

• Radiance ⇒ Radiosity L(x,ω o ) → B(x)/π ρ B(x) = Be (x)+ (x) E(x) = B (x)+ ρ(x) F(x, y) B(y) dA e ∫ y y∈S • Form factor G(x, y) percentage of light leaving F (x, y) = dAy π that arrives at dA Computer Graphics WS07/08 – Light Transport Linear Operators

B(x) = B (x)+ ρ(x) F(x, y) B(y) dA • Properties e ∫ y – Fredholm integral of 2nd kind y∈S – Global linking f (x) = g (x)+ (K f )(x) • Potentially each point with o each other • Often sparse systems (occlusions) – No consideration of volume effects!! • Linear operator (K f )(x) k(x, y) f (y) dy – acts on functions like o ≡ ∫ matrices act on vectors – Superposition principle – Scaling and addition K o (af + bg)= a(K o f ) + b(K o g)

Computer Graphics WS07/08 – Light Transport Formal Solution of Integral Equations

B(x) = B (x)+ ρ(x) F(x, y) B(y) dA e ∫ y y∈S • Integral equation B = Be + K o B

⇒ (I − K )o B = Be

• Formal solution −1 B = (I − K ) o Be • Neumann series

1 =1+ x + x2 +... 1− x 1 1 (I − K) = (I − K)(I + K + K 2 +...) = I + K + K 2 +... I − K I − K = (I + K + K 2 +...) − (K + K 2 +...) = I

Computer Graphics WS07/08 – Light Transport Formal Solutions II • Successive approximation

1 2 Be = Be + K o Be + K o Be +... I − K

= (Be + K o (Be + K o (Be +...

– Direct light from the light

source B1 = Be – Light which is reflected and transported one time B2 = Be + K o B1 – Light which is reflected and ... transported n-times Bn = Be + K o Bn−1

Computer Graphics WS07/08 – Light Transport Lighting Simulation

Courtesy Karol Myszkowski, MPII

Computer Graphics WS07/08 – Light Transport Lighting Simulation

Courtesy Karol Myszkowski, MPII

Computer Graphics WS07/08 – Light Transport Lighting Simulation

Courtesy Karol Myszkowski, MPII

Computer Graphics WS07/08 – Light Transport Wrap-up • Physical Quantities in Rendering – Radiance – Radiosity – Irradiance – Intensity • Light Perception • Light Sources • Rendering Equation – Integral equation – Balance of radiance • Radiosity – Diffuse reflectance function – Radiative equilibrium between emission and absorption, escape – System of linear equations – Iterative solution

Computer Graphics WS07/08 – Light Transport