Light PDF

Download as pdf or txt
Download as pdf or txt
You are on page 1of 14

Lighting and Reflectance Models

Basic principles of illumination and reflectance are introduced. They


are central to understanding the dependence of image colour and
intensity on material reflectance, geometry, and lighting.

Basic Radiometry:

• irradiance and radiance


• point light sources and extended illuminants

Reflectance Models:

• BRDF: Bidirectional Reflectance Distribution Function


• diffuse (Lambertian) and specular reflectance
• Phong model

Suggested Reading: Fleet, D. and Hertzmann, A.: Chapters 8 and


12 of notes for CSC418/D18.

Matlab Tutorials: phongDemo.m, phongShade.m, and colourTu-


torial.m
2503: Lighting and Reflectance Models A.D.
c Jepson and D.J. Fleet, 2011 Page: 1
Light Tube Analogy

Light density: Treat light as a continuous quantity (density) as op-


posed to discrete photon counts.

Assume a non-absorbing, non-scattering, uniform medium, such as


a vacuum or (apprx) air. Then geometrical optics models light as
travelling along straight lines called rays.

Ignore time-delays due to the finite speed of light, and ignore the
diffraction of light.

Light Tube

Given a collection of rays that lie within a tube and which cross both
ends of the tube (i.e. A and B), but do not cross the sides of the tube,
then the radiant power of the light impinging on end A, due to these
rays, is equal to the power impinging on B (due to the same rays).

Visual perception depends critically on wavelength. We use the term


spectral density to capture the dependence of light density on wave-
length λ (typically between 400 and 700nm).

2503: Lighting and Reflectance Models Page: 2


Overview: Basic Radiometric Definitions

Flux (Power): Rate at which light is emitted from, or absorbed by,


a (virtual) surface. Radiant power is specified in Watts (1W = 1 Js ).

Irradiance: Measure of light arriving at a surface (real or virtual),


as a function of surface position; i.e., as power per unit surface area,
W W
m2
. Irradiance spectral density is specified in units (nm)m2
.
Irradiance is central to sensor (camera) measurements.

Radiance Measure of light as a function of direction and surface


area, i.e., power per unit surface area per steradian, mW2 sr (or (nm)m
W
2 sr ).

This allows us to describe the light emitted or reflected from a sur-


face as a function of direction.

Steradian: Measure of solid angle (angular extent in 3D).


• 2D angular extent or a curve (in radians) is its projected length
onto a circle of radius 1, i.e., l/r (1 half circle = π radians)
• Solid angle (of patch S w.r.t. point ~q) is measured in steradians
(denoted sr), defined as the ratio of projected area on a sphere
to its squared radius, a/r2. One hemisphere is 2π steradians.

2D 3D
l
r S
a
q
q
r
2503: Lighting and Reflectance Models Page: 3
Irradiance for a Distant Point Light Source
Let I(λ, ~xp) denote the irradiance on a small patch (real or virtual)
~ p ) to express dependence of
at position ~xp. We often write I(λ, ~xp; N
~ p).
irradiance on surface orientation (i.e., the surface normal, N
~ with a small
For a light source that is far away, in unit direction L,
angular extent (eg, the sun), the light rays are approximately parallel:

! !xp
−L
!p
N

A surface patch with normal N ~p = L~ will maximize the amount of


~
light caught by the patch. Its irradiance is I(λ, ~xp; L).

~p =
For a small patch of area dAp , in general (i.e., N ~ irradiance
6 L),
is the power passing through the area of the patch projected onto a
~ i.e., dAL = | cos θ| dAp = |N
plane perpendicular L, ~ p · L|
~ dAp .

!p !
L
N !
−L
!
−L !p
N θ
θ dAp
| cos θ| dAp dAp
dAL

For opaque surfaces we require N ~ p ·L


~ ≥ 0 (otherwise it’s in shadow).
~ p ) = ⌊N
So, I(λ, ~xp; N ~ p · L⌋I(λ,
~ ~ where ⌊x⌋ = max(x, 0).
~xp; L),
2503: Lighting and Reflectance Models Page: 4
Irradiance for a Proximal Point Source
test patch
!p dAp
N
!xp

dΩp
!x0 d!p

unit sphere

Radiant intensity Rs(λ, d~p) of a point source is the power, per unit
wavelength per unit solid angle, caught by a patch in direction d~p .
W
Units: (nm)(sr)
.

The solid angle, dΩp, subtended by a small patch at position ~xp, de-
creases due to foreshortening, and distance to the source at ~x0; i.e.,
~ p · L|
|N ~
dΩp = dAp,
||~xp − ~x0||2
~ = ~x0 −~xp is the light source direction from ~xp; ie, L
where L ~ = −d~p.
||~x0 −~xp ||

The irradiance on the test patch due to the proximal point light source
is simply the amount of light (power) that reaches the patch divided
by the area of the patch
~ dΩp
Rs(λ, −L) ~ p · L⌋
⌊N ~
~
I(λ, ~xp; Np ) = = ~ .
Rs(λ, −L)
dAp ||~xp − ~x0|| 2

2503: Lighting and Reflectance Models Page: 5


Radiance

Radiance parameterizes light as a function of the direction, as well


as position and wavelength, denoted R(λ, ~x, d~ ) :

• R(λ, ~x, d~ ) is the radiance of a (possibly virtual) surface patch in


the neighborhood of ~x into directions about d~ .
W
• Units: (nm) m2 sr
. I.e., power, per unit wavelength, per unit sur-
face area, per unit solid angle.
• By convention, the surface area is measured perpendicular to the
direction d~ (i.e., foreshortened area, cos θ dAp ).

!p
N
cos θ dAp
d!

dAp

Radiance is often used to quantify

• surface reflection as a function of an emittant direction.


• the light emitted from an extended light source in the direction
of a small surface patch.
• the light field: measure of the light in a 3D environment as a
function of position and direction (and wavelength).

2503: Lighting and Reflectance Models Page: 6


Irradiance for Extended Light Sources
Light combines linearly. So the contributions to irradiance at a cam-
era sensor from different light sources are simply added (integrated).

For an extended light source, light is emitted as a function of position


over the surface of the source. What’s the irradiance at a test patch?

test patch
dΩ0
!p !xp
N

!x0 dΩ1

extended
light source !x1

The irradiance on a small test patch at ~xp is obtained by integrating


contributions from infinitesimal patches over the entire light source.
• The contribution from the small light source patch at ~x is the
~ xp, ~x) :
light (radiance) emitted in the direction of the test patch d(~
⌊N~ p · L(~
~ x, ~xp)⌋
~ xp, ~x)) d~x .
R(λ, ~x, d(~
||~x − ~xp|| 2

This is radiance, times solid angle of the test patch, times areas
on the light source, divided by the area of the patch.
2503: Lighting and Reflectance Models Page: 7
Two Basic Types of Reflectance

light
source
specular
!
−L
diffuse

• Specular Reflectance: Reflectance from the surface, primarily


in the “mirror reflection” direction. The spectral distribution of
the reflected light can be the same as the incident light.

• Diffuse Reflectance: Light is absorbed and re-emitted from the


body, scattering in all directions. The spectral distribution of the
reflected light depends on the pigmentation of the object.

2503: Lighting and Reflectance Models Page: 8


Bidirectional Reflectance Distribution Function

The Bidirectional Reflection Distribution Function (BRDF) is used


to model a wide range of material reflectance properties.

~ V
The BRDF r(λ, L, ~ ) captures the dependence of reflectance on the
incident and emittant directions:
~ V~ ) gives the proportion of the incident light, from direc-
• r(λ, L,
~ at wavelength λ, scattered in the viewing direction V
tion L, ~.
~ and V~ are unit vectors)
(L

• It is defined as the ratio of radiance to irradiance. (Units: (sr)−1)

Suppose that irradiance on a surface patch due to light coming from


~ is I(λ, ~xp; N
direction L ~ p).

!p
N
!
L !
V
dAV
dAL

!xp dAN

The corresponding radiance (of the reflected light) is given by:

~ ) = r(λ, L,
R(λ, ~xp, V ~ V~ ) I(λ, ~xp; N
~ p)

2503: Lighting and Reflectance Models Page: 9


Lambertian Reflectance

Diffusely reflecting objects appear similarly from all viewing direc-


tions. I.e., the radiance is not dependent on the viewing direction.

Lambertian Approximation: The BRDF is assumed to be invariant


~ and V
of both L ~ , that is r(λ, L,
~ V~ ) = r(λ).

Consider a distant point light source from direction:

!p
N

!
L !
V
dΩ

!xp

~ p ) is given by
The irradiance on the surface (w.r.t. normal N

~ p ) = ⌊N
I(λ, ~xp; N ~ p · L⌋I(λ,
~ ~
~xp; L)

~ ), due
It follows that the radiance (per unit area perpendicular to V
to diffuse reflection from a Lambertian surface, is given by

R(λ, ~xp, V~ ) = r(λ) ⌊N


~ p · L⌋
~ I(λ, ~xp; L)
~

~.
Note that this does not depend on the viewing direction V

2503: Lighting and Reflectance Models Page: 10


Specular Reflectance
~ Here the
Consider a distant point source with irradiance I i(λ; L).
superscript ‘i’ denotes the ‘incident’ irradiance.
!
N
!
L !
M

~ is the surface normal, L


Here N ~ is the light-source direction, and M
~
is the mirror reflection direction. These directions are related by
h i
~ ~ ~ ~
M = − L + 2N N · L . ~

~ ) is given by
The reflected irradiance I r (λ, M

~ = F (λ, L)
I r (λ; M) ~ I i(λ; L).
~

~ dictates any change in the spectral


Here the Fresnel term, F (λ, L),
distribution.

Scattering of the specular reflection around the mirror reflection di-


~ , can also be modelled (see the Phong model below).
rection, M

2503: Lighting and Reflectance Models Page: 11


The ‘Colour’ of Highlights

~ is given by
For specular reflection the reflected irradiance I r (λ; M)

~ = F (λ, L)
I r (λ; M) ~ I i(λ; L).
~

~ ≈ f (L
For plastics, F (λ, L) ~ ·N
~ ), so there is little spectral change
between the incident and reflected light.

However, metals do show spectral changes. Moreover these changes


depend on the incident angle. For example, for bronze:

1 ! ·L
N ! =ǫ

! ·L
N ! =1
"
F (λ, L)
Bronze

400 700

Ref: Cook and Torrance, A reflectance model for computer graphics, ACM Trans.
on Graphics, 1(1), Jan. 1982, pp. 7-24.

2503: Lighting and Reflectance Models Page: 12


Phong Reflectance Model
The Phong model, commonly used in computer graphics, is an ap-
proximation to the reflected radiance of a surface. Suppose a distant
~ with irradiance I(λ) ≡ I(λ, ~x; L).
light source from direction L, ~

The reflected radiance according to the Phong model, for surface


~ p , per unit area perpendicular to the viewing
point ~xp with normal N
~ , is
direction V

R(λ, ~xp, V~ ) = ka r(λ) + kd r(λ) ⌊N


~ · L⌋
~ I(λ) + ks S(λ)(M
~ ·V
~ )k e

where

• r(λ) is the diffuse spectral reflectance distribution for the sur-


face;
~ is the mirror reflection direction computed from L
•M ~ and N
~ p;

• ka, kd , ks are non-negative coefficients for the ambient, diffuse,


and specular reflection terms, respectively;
• ke is the spectral exponent, controlling the spread of the off-axis
specular reflection (rougher surfaces modelled by smaller ke);
• S(λ) is the spectral distribution of the specular reflection. It is
just I(λ) for painted or plastic surfaces. For metals it can be
approximated by some linear combination of I(λ) and r(λ).

See phongDemo.m.

2503: Lighting and Reflectance Models Page: 13


See the Light

Our visual systems provide us with an interpretation of the scene.

It takes practice to actually pay attention to the stimulus, instead.


That is, we may wish to “see the light” as opposed to the scene.
(Note the reflectance illusions from the previous lecture illustrate
some of the difficulties we might have.)

Once you can see the light, consider perception:

• How do we identify light sources (they aren’t always the bright-


est objects in the image)?

• How do we identify highlights? Transparency? Haze?

• How do we identify metallic surfaces? Wax? Pearls?

• How do we perceive the pigmentation of a surface, r(λ), sep-


~ and surface orientation N
arately from the illuminant I(λ; L) ~,
given only the reflected radiance R? Naively, this looks like,
~ , given only the radiance R = r I ⌊N
“Find r, I, and N ~ · L⌋.”
~
(See p. 10.)

• ... and so on.

2503: Lighting and Reflectance Models Page: 14

You might also like