Upload
others
View
1
Download
0
Embed Size (px)
Citation preview
Philipp Slusallek & Arsène Pérard-Gayot
Computer Graphics
- Light Transport -
Overviewβ’ So far
β Nuts and bolts of ray tracing
β’ Todayβ Light
β’ Physics behind ray tracing
β’ Physical light quantities
β’ Perception of light
β’ Light sources
β Light transport simulation
β’ Next lectureβ Reflectance properties
β Shading
2
LIGHT
3
What is Light ?β’ Electro-magnetic wave propagating at speed of light
4
What is Light ?
5
[Wikipedia]
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
6
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
7
Light in Computer Graphicsβ’ Based on human visual perception
β Macroscopic geometry ( Reflection Models)
β Tristimulus color model ( Human Visual System)
β Psycho-physics: tone mapping, compression, β¦ ( RIS course)
β’ Ray optic assumptionsβ Macroscopic objects
β Incoherent light
β Light: scalar, real-valued quantity
β Linear propagation
β Superposition principle: light contributions add, do not interact
β No attenuation in free space
β’ Limitationsβ No microscopic structures (β Ξ»): diffraction, interference
β No polarization
β No dispersion, β¦
8
Angle and Solid Angleβ’ The angle ΞΈ (in radians) subtended by a curve in the
plane is the length of the corresponding arc on the unit circle: l = ΞΈ r = ΞΈ
β’ The solid angle Ξ©, dΟ subtended by an object is the surface area of its projection onto the unit sphereβ Units for measuring solid angle: steradian [sr] (dimensionless)
9
Solid Angle in Spherical Coordsβ’ Infinitesimally small solid angle dΟ
β ππ’ = π ππβ ππ£ = πΒ΄ πΞ¦ = π sin π πΞ¦β ππ΄ = ππ’ ππ£ = π2 sinπ πππΞ¦
β ππ = Ξ€ππ΄ π2 = sinπ πππΞ¦
β’ Finite solid angle
10
du
rdΞΈ
rβ
dΦ
dA
dv
ΞΈ
Ξ¦
dΟ1
Solid Angle for a Surfaceβ’ The solid angle subtended by a small surface patch S with area dA is
obtained (i) by projecting it orthogonal to the vector r from the origin:
ππ΄ πππ π
and (ii) dividing by the squared distance to the origin: dπ =dπ΄ cos π
π2
11
Radiometryβ’ Definition:
β Radiometry is the science of measuring radiant energy transfers. Radiometric quantities have physical meaning and can be directly measured using proper equipment such as spectral photometers.
β’ Radiometric Quantitiesβ Energy [J] Q (#Photons x Energy = π β βπ)
β Radiant power [watt = J/s] Ξ¦ (Total Flux)
β Intensity [watt/sr] I (Flux from a point per s.angle)
β Irradiance [watt/m2] E (Incoming flux per area)
β Radiosity [watt/m2] B (Outgoing flux per area)
β Radiance [watt/(m2 sr)] L (Flux per area & proj. s. angle)
12
Radiometric Quantities: Radiance
β’ Radiance is used to describe radiant energy transfer
β’ Radiance L is defined asβ The power (flux) traveling through some point x
β In a specified direction Ο = (ΞΈ, Ο)
β Per unit area perpendicular to the direction of travel
β Per unit solid angle
β’ Thus, the differential power π ππ½ radiated through the differential solid angle π π, from the projected differential area π π¨ πππ π½ is:
13
Ο
dA
π2Ξ¦ = πΏ π₯,π ππ΄ cos π ππ
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:
πΈ β‘πΞ¦
ππ΄
14
Radiometric Quantities: Radiosity
β’ 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 outgoing radiance Lo is integrated over the upper hemisphere Ξ©+ above the surface:
π΅ β‘πΞ¦
ππ΄
15
Radiosity Bexitant from
Spectral Propertiesβ’ Wavelength
β Light is composed of electromagnetic waves
β These waves have different frequencies and wavelengths
β Most transfer quantities are continuous functions of wavelength
β’ In graphicsβ Each measurement L(x,Ο) is for a discrete band of wavelength
only
β’ Often R(ed, long), G(reen, medium), B(lue, short) (but see later)
16
Photometryβ The human eye is sensitive to a limited range of wavelengths
β’ Roughly from 380 nm to 780 nm
β Our visual system responds differently to different wavelengths
β’ Can be characterized by the Luminous Efficiency Function V(Ξ»)
β’ Represents the average human spectral response
β’ Separate curves exist for light and dark adaptation of the eye
β Photometric quantities are derived from radiometric quantities by integrating them against this function
17
Radiometry vs. Photometry
18
Physics-based quantities Perception-based quantities
Perception of Light
19
The eye detects radiance
f
rod sensitive to flux
angular extent of rod = resolution ( 1 arcminute2)
r
22 /' lr angular extent of pupil aperture (r 4 mm) = solid angle
'
l
A
projected rod size = area 2lA
radiance = flux per unit area per unit solid angleA
L
'
'A Lflux proportional to area and solid angle
As l increases:const
2
22
0 Ll
rlL
photons / second = flux = energy / time = power (π½)
(1 arcminute = 1/60 degrees)
Brightness Perception
20
f
r
l
A
β’ Aβ > A : photon flux per rod stays constant
β’ Aβ < A : 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 β < 1 arcminute2 (beyond Neptune)
'A
'
Radiance in Space
21
1L1d
1dA
2L2d
2dAl
The radiance in the direction of a light rayremains constant as it propagates along the ray
Flux leaving surface 1 must be equal to flux arriving on surface 2
2
21
l
dAd
2
12
l
dAd From geometry follows
2
212211
l
dAdAdAddAdT
Ray throughput π:
πΏ1πΞ©1ππ΄1 = πΏ2πΞ©2ππ΄2
πΏ1 = πΏ2
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 (radiance cannot be defined, no area)
β’ I = Ξ¦g / 4Ο [watt/sr]
β Irradiance on a sphere with radius r around light source:
β’ Er = Ξ¦g / (4 Ο r2) [watt/m2]
β Irradiance on some other surface A
22
dA
r
d
πΈ π₯ =πΞ¦π
ππ΄=πΞ¦π
ππ
ππ
ππ΄= πΌ
ππ
ππ΄
=Ξ¦π
4πβ ππ΄ cos π
π2ππ΄
=Ξ¦π
4πβ cos π
π2
Inverse Square Law
β’ Irradiance E: power per m2
β Illuminating quantity
β’ Distance-dependentβ Double distance from emitter: area of sphere is four times bigger
β’ Irradiance falls off with inverse of squared distanceβ For point light sources (!)
23
E
E
d
d
1
2
2
2
1
2=
Irradiance E:
E2
E1
d1
d2
Light Source Specificationsβ’ Power (total flux)
β Emitted energy / time
β’ Active emission sizeβ Point, line, area, volume
β’ Spectral distributionβ Thermal, line spectrum
β’ Directional distributionβ Goniometric diagram
24
Black body radiation (see later)
Radiation characteristics
β’ Directional lightβ Spot-lights
β Projectors
β Distant sources
β’ Diffuse emittersβ Torchieres
β Frosted glass lamps
β’ Ambient lightβ βPhotons everywhereβ
Emitting area
β’ Volumeβ Neon advertisementsβ Sodium vapor lamps
β’ Areaβ CRT, LCD displayβ (Overcast) sky
β’ Lineβ Clear light bulb, filament
β’ Pointβ Xenon lampβ Arc lampβ Laser diode
Light Source Classification
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
β’ Several sky modelsare available
26
Courtesy Lynch & Livingston
LIGHT TRANSPORT
27
Light Transport in a Sceneβ’ Scene
β Lights (emitters)
β Object surfaces (partially absorbing)
β’ Illuminated object surfaces become emitters, too!β Radiosity = Irradiance minus absorbed photons flux density
β’ Radiosity: photons per second per m2 leaving surface
β’ Irradiance: photons per second per m2 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)
β Global Illumination, discussed in RIS lecture
28
Surface Radiance
β’ Visible surface radianceβ Surface position
β Outgoing direction
β’ Incoming illumination direction
β’ Self-emission
β’ Reflected lightβ Incoming radiance from all directions
β Direction-dependent reflectance(BRDF: bidirectional reflectancedistribution function)
29
πΏ π₯,πππ₯ππ
ππ
πΏπ π₯,ππ
πΏπ π₯, ππ
ππ ππ, π₯, ππ
i
o
x
i
Rendering Equationβ’ Most important equation for graphics
β Expresses energy equilibrium in scene
total radiance = emitted + reflected radiance
β’ First term: emissivity of the surfaceβ Non-zero only for light sources
β’ Second term: reflected radianceβ Integral over all possible incoming
directions of radiance timesangle-dependent surface reflection function
β’ Fredholm integral equation of 2nd kindβ Unknown radiance appears both on the
left-hand side and inside the integralβ Numerical methods necessary to compute
approximate solution
30
i
o
x
i
Rendering Equation: Approximations
β’ Approximations based only on empirical foundationsβ An example: polygon rendering in OpenGL
β’ Using RGB instead of full spectrumβ Follows roughly the eyeβs sensitivity
β’ Sampling hemisphere along finite, discrete directionsβ Simplifies integration to summation
β’ Reflection function model (BRDF)β Parameterized function
β’ Ambient: constant, non-directional, background light
β’ Diffuse: light reflected uniformly in all directions
β’ Specular: light from mirror-reflection direction
31
Ray Tracing
β’ Simple ray tracingβ Illumination from discrete point light
sources only β direct illumination only
β’ Integral β sum
β’ No global illumination
β Evaluates angle-dependent reflectance function (BRDF) β shading process
β’ Advanced ray tracing techniquesβ Recursive ray tracing
β’ Multiple reflections/refractions (for specular surfaces)
β Ray tracing for global illuminationβ’ Stochastic sampling
(Monte Carlo methods)
β’ Photon mapping
32
RE: Integrating over Surfacesβ’ Outgoing illumination at a point
β’ Linking with other surface pointsβ Incoming radiance at x is outgoing radiance at y
πΏπ π₯,ππ = πΏ π¦,βππ = πΏ π π π₯, ππ , βππ
β Ray-Tracing operator: y = π π π₯,ππ
33
πΏ π₯,ππ = πΏπ π₯, ππ + πΏπ(π₯, ππ)
-i
yL(y,-wi)
i
x
Li(x,wi)
Integrating over Surfacesβ’ Outgoing illumination at a point
β’ Re-parameterization over surfaces S
πππ =cosππ¦π₯ β π¦ 2 ππ΄π¦
34
n
yn
i
y
yx
dA
ydA
x
y
i
id
πΏ π₯, ππ
= πΏπ π₯,ππ
Integrating over Surfaces
35
πΏ π₯, ππ
= πΏπ π₯,ππ
Radiosity Algorithmβ’ Lambertian surface (only diffuse reflection)
β Radiosity equation: simplified form of the rendering equation
β’ Dividing scene surfaces into small planar patchesβ Assumes local constancy: diffuse reflection, radiosity, visibility
β’ βRadiosityβ algorithms: Discretizes into linear equation
β’ Algorithmβ Form factor: percentage of light flowing between 2 patches
β Form system of linear equations
β Iterative solution
β Discussed in details in RIS course
36
β’ Diffuse reflection constant BRDF & emission
β Reflectance factor or albedo: between [0,1]
β’ Direction-independent out-going radiance
β’ Form factorβ Defines percentage of light
leaving dAy arriving at dA
Radiosity Equation
37
ππ π π₯, π¦ , π₯, ππ = ππ π₯ β
= πΏπ π₯ + ππ π₯ πΈ π₯ = πΏπ π₯
Radiosity Equationβ’ Radiosity
β’ Irradiance
38
π΅ π₯ = ππΏπ π₯ + πππ π₯ πΈ(π₯) = π΅π π₯ + π π₯ πΈ(π₯)
Linear Operatorsβ’ Properties
β Fredholm equation of 2nd kind
β Global linking
β’ Potentially each point with each other
β’ Often sparse system (occlusions)
β No consideration of volume effects!!
β’ Linear operatorβ Acts on functions like matrices
act on vectors
β Superposition principle
β Scaling and addition
39
π΅ π₯ = π΅π π₯ + π(π₯) ΰΆ±π¦βπ
πΉ π₯, π¦ π΅ π¦ ππ΄π¦
π π₯ = π π₯ + πΎ[π π₯ ]
πΎ π π₯ = β« π π₯, π¦ π π¦ ππ¦
πΎ ππ + ππ = ππΎ π + ππΎ[π]
Formal Solution of Integral Equations
β’ Integral equation
β’ Formal solution
β’ Neumann seriesβ Converges only if |K| < 1 which is true in all physical settings
40
π΅ π₯ = π΅π π₯ + π(π₯) ΰΆ±π¦βπ
πΉ π₯, π¦ π΅ π¦ ππ΄π¦
π΅ β = π΅π β + πΎ π΅ β β πΌ β πΎ π΅ β = π΅π β
π΅(β ) = πΌ β πΎ β1 π΅π β
1
1 β π₯= 1 + π₯ + π₯2 +β―
1
πΌ β πΎ= πΌ + πΎ + πΎ2 +β―
πΌ β πΎ1
πΌ β πΎ= πΌ β πΎ πΌ + πΎ + πΎ2 + β― = πΌ + πΎ + πΎ2 + β―β πΎ+ πΎ2 +β― = πΌ( )
Formal Solutions (2)β’ Successive approximation
β Direct light from the light source
β Light which is reflected and transported at most once
β Light which is reflected and transported up to n times
41
= π΅π β + πΎ[π΅π β + πΎ π΅π β + β― ]
π΅1 β = π΅π β
π΅2 β = π΅π β + πΎ[π΅π β ]
π΅π β = π΅π β + πΎ[π΅πβ1 β ]
Radiosity Algorithm
42
Radiosity Algorithm
43
Lighting Simulation
44
Lighting Simulation
45
Lighting Simulation
46
Wrap Upβ’ Physical Quantities in Rendering
β Radiance
β Radiosity
β Irradiance
β Intensity
β’ Light Perception
β’ Light Source Definition
β’ Rendering Equationβ Key equation in graphics (!)
β Integral equation
β Describes global balance of radiance
47