Upload
corbin-binns
View
216
Download
2
Embed Size (px)
Citation preview
Technische Universität München
Fakultät für Informatik
Computer GraphicsSS 2014
Lighting
Rüdiger WestermannLehrstuhl für Computer Graphik und Visualisierung
Technische Universität München
Computer Graphics
2
Lighting
• Lighting models• Material properties• Surface orientation (normals)• Light sources
Technische Universität München
Computer Graphics
3
Lighting models
• Local– Consider only the direct illumination by point light sources,
independent of any other object, i.e. no shadows
• Global– Interaction with matter– Consider indirect effects, including multiple reflections,
transmission, shadows
eye
eye
Technische Universität München
Computer Graphics
4
Lighting models
• Physics-based lighting– Use correct units of measurement from physics– Obey material physics, includes reflection models– Numerical simulation of light transport taking into account
visibility (do two points see each other)
– Result: reflected light at the visible points in the scene as illuminated (directly and indirectly) by the light sources
Technische Universität München
Computer Graphics
5
Lighting models
• Scene description must contain– Geometry: surface and volumes– Light sources: position, orientation, power– Surface properties: reflection properties
Technische Universität München
Computer Graphics
6
Radiative transfer
• Simulation of the interaction between light and matter– Radiative transfer
Interface between materials Volumetric medium
Technische Universität München
Computer Graphics
7
Radiative transfer
• Simulation of light-matter interaction– In volumes: volume rendering using in-volume scattering– At surfaces: absorption, reflection and refraction
• Traditional computer graphics:– Surface graphics with vacuum in between, no interaction– Scattering only at surfaces
Technische Universität München
Computer Graphics
8
Radiative transfer
• Simulation of light-matter interaction
Technische Universität München
Computer Graphics
9
Radiative transfer
• Simulation of light-matter interaction
Technische Universität München
Computer Graphics
10
Radiative transfer
• Simulation of volumetric effects
Technische Universität München
Computer Graphics
11
Radiative transfer
• Radiative transfer describes the changes of radiant intensity due to absorption, emission and scattering
• Expressed by equation of transfer– Photons have energy: E=hn
• h: Planck constant• v: frequency of light wave
– Given all material properties, the radiant intensity can be computed from the transfer equation
Technische Universität München
Computer Graphics
12
Radiative transfer
• How to simulate radiative transfer?• Wave-particle dualism tells us that light exhibits
properties of both waves and of particles– Wave optics: diffraction, interference, polarization– Ray (geometric) optics: direction, position
• Assumption: structures are large with respect to wavelength of light
• Light as a set of light rays• Standard in CG
Technische Universität München
Computer Graphics
13
Radiative transfer
• Light is treated as a physical, i.e. radiometric, quantity– Radiometry: the measurement of electromagnetic radiation in
the visible range, ie. light– Photometry: the measurement of the visual sensation
produced by electromagnetic radiation– Photometry is like radiometry except that everything is
weighted by the spectral response of the eye
Technische Universität München
Computer Graphics
14
Radiometric quantities
Strahlungsenergie: radiant energy Q in Joule [J] Strahlungsleistung oder -fluss:
radiant flux or power in Watt [W=J/s]
Einfallende Flussdichte: irradiance (incident)power per area in [W/m2]
Ausgehende Flussdichte: radiosity (radiant exitance)power per area in [W/m2]
dt
dQ
dA
dE
dA
dB
Technische Universität München
Computer Graphics
15
Radiometric quantities
Strahlungsintensität (radiant intensity) power per solid angle in [W/sr]
dI
d
sr (steradian): unit for solid angleA steradian can be defined as the solid angle subtended at the center of a unit sphere by a unit area on its surface. For a general sphere of radius r, any portion of its surface with area A = r2 subtends one steradian.
Technische Universität München
Computer Graphics
16
Radiometric quantities
Strahlungsintensität (radiant intensity) power per solid angle in [W/sr]
dI
d
Because the surface area of a sphere is , the definition implies that a sphere measures 4π ≈ 12.56637 steradians. By the same argument, the maximum solid angle that can be subtended at any point is 4π sr (en.wikipedia.org/wiki/Steradiant)
Technische Universität München
Computer Graphics
17
Radiometric quantities
Radiance (Strahlungsdichte)
power per solid angle per projected area element in [W/m2sr]
The radiant power emitted by a (differential) projected surface element in the direction of a (differential) solid angle
Technische Universität München
Computer Graphics
18
Radiometric quantities
Beschreibung Definition Zeichen Einheiten Bezeichnung
Energieenergy
Qe [J] Joule Strahlungsenergieradiant energy
Leistung, Flusspower, flux
dQ/dt e [W= J/s] Strahlungsflussradiant flux
Flussdichteflux density
dQ/dAdt Ee [W/m2] Bestrahlungsstärkeirradiance
Flussdichteflux density
dQ/dAdt Me = Be [W/m2] radiom. Emissionsvermögenradiosity
Radiantdensity
dQ/dAddt Le [W/m2sr] Strahlungsdichteradiance
Intensitätintensity
dQ/ddt Ie [W/sr] Strahlungsstärkeradiant intensity
Technische Universität München
Computer Graphics
19
Light sources
• Directional (parallel) lights– E.g. sun– Specified by direction
• Point lights– Same intensity in all directions– Specified by position
• Spot lights– Limited set of directions– Point + direction + cutoff angle
Technische Universität München
Computer Graphics
20
Light sources
• Effects of different light sources
Technische Universität München
Computer Graphics
21
Light sources
• Area lights– Light sources with a finite area– Can be considered a continuum of point lights– Hard to simulate (see later in course)
umbra
penumbra
Technische Universität München
Computer Graphics
22
Light sources
• Quadratic falloff for isotropic point light sources– Assume light source with power – Light source’s radiant intensity: [– Flux along a (differential) solid angle:
– Irradiance on a differential surface element at distance r:
24 r
2)2(4 r
Technische Universität München
Computer Graphics
23
Surface orientation
Johann Friedrich Lambert (1783):Power per unit area arriving at some object point x also depends on the angle of the surface to the light direction
dA
dA´
Li
𝜃Effectively litarea: dA
dA´= dA cos
𝜃
dLln
dLlndE
i
i
)()(
)()),(cos(
n
Technische Universität München
Computer Graphics
24
Material properties
• The reflection at a surface point is described by the BRDF [1/sr]– BRDF: Bidirectional Reflection Distribution Function– Describes the fraction of the light from an incoming direction
i that is reflected into an outgoing direction r
– Color channels RGB treated separately– Directions are specified
by 2 angles• Angle to the normal• Angle around the normal
i
io
o
iω
rω
n
t
b
Technische Universität München
Computer Graphics
25
Material properties
• The reflection at a surface point is described by the BRDF
( )( , )
( ) cos( )r r
r i ri i i i
dLf
L d
i
io
o
iω
rω
n
t
b
Technische Universität München
Computer Graphics
26
Material properties
• Properties of the BRDF– In general, it is a 6-dimensional function
• 2 surface parameters, 2 x 2 direction parameters
( , )r i rf x
Technische Universität München
Computer Graphics
27
Material properties
• It is often simplified by assuming the BRDF to be constant across an isotropic material– Isotropy implies that the BRDF is invariant under rotations
around the normal vector– Then, the BRDF is only a 3-dimensional function
• The validity of certain physical laws has to be guaranteed by the BRDF
Technische Universität München
Computer Graphics
28
Material properties
• Range– 0 (Absorption) to (mirror reflections)
• Helmholtz Reciprocity– Light ray can be inverted
• Energy conservation– Sum of all outgoing energy does not exceed incoming energy
( , , ) ( , , )r i r r r if x f x
( , , ) cos 1 ,r i r i r if x θ dω x
Technische Universität München
Computer Graphics
29
The Rendering equation
• Outgoing radiance at a point x into direction r
– Here, Le is the shelf-emission at the point
• This is what we have to evaluate in physics-based rendering