class 07 - optics - stanford university · optics. 2/30 when light hits a material: n reflection n...
TRANSCRIPT
Optics
2/30
When light hits a material:n Reflectionn Absorptionn Transmission
Opaque objects - majority of incident light is reflected/absorbed (little/no transmission)
Translucent objects - significant light transmission
Light Physics
3/30
Incoming Light
4/30
Incoming Light§ Light doesn’t just come from light sources§ Light also comes from all visible objects in the world
§ The tree’s reflection on the car is created by light from the tree (with the color/brightness of the tree) hitting the car and reflecting towards the camera
5/30
Color Bleeding• Using incoming light from all directions makes an image
appear more realistic, and also captures various physical phenomena such as color bleeding
6/30
Incoming Light
using light from all directionsusing only the light source
7/30
Measuring Incoming Light§ Place and photograph a small chrome sphere (light
probe) to collect and record the intensities of the light incoming from all directions
8/30
Measuring Incoming Light§ Technically this should be done with a very tiny
sphere and at every point on the object of interest§ But one often approximates with a single finite size
sphere for the entire object of interest§ The incoming light information can be used to render
a new synthetic object in the original scene
9/30
Object Interaction
10/30
Modeling Approximations§ BRDF (Bidirectional
Reflectance Distribution Function) models how much light is reflected
§ BTDF (Bidirectional Transmittance Distribution Function) models how much light is transmitted
§ BSSRDF (Bidirectional Surface Scattering Reflectance Distribution Function) is a combinedreflection/transmission model
11/30
Opaque (BRDF) vs. Translucent (BSSRDF)
12/30
Paint (BRDF) vs. Milk (BSSRDF)
BRDF BSSRDF
13/30
Reflection Only (BRDF)
Modeled by Stephen Stahlberg
14/30
Subsurface Scattering (BSSRDF)
Modeled by Stephen Stahlberg
15/30
BRDF
16/30
BRDF( , , , , )i o u vl w w
Dependencies
How much light is reflected depends on:• wavelength of the light• 2D incoming light direction • 2D outgoing reflected direction • spatial position on the object surface
• many real world materials (e.g. wood) consist of sub-materials with spatially varying characteristics
),( iii fqw =),( ooo fqw =
l
),( vu
17/30
Simplifying AssumptionsSpatial invariance
n Modulate the BRDF by a texture to approximation spatial variance
Three channels: R, G, Bn Variation throughout all visible wavelengths is
approximated by three separate BRDFs
Thus, 3 separate BRDFs (1 Red, 1 Green, 1 Blue), each of the form:
This is still a function of 4 variables, i.e. a 4D function!
),BRDF( oi ww
18/30
Measuring/Approximating
• 4D BRDF data can be acquired with a gonioreflectometer to obtain a 4D table of values
• Alternatively, some simpleanalytical models: • Blinn-Phong Model – simplest and
general purpose (plastic)• Cook-Torrance Model – better specular
(metal)• Ward Model – anisotropic (brushed
metal, hair)• Oren-Nayar Model – non-Lambertian
(concrete, plaster, the moon)
19/30
Lighting Equation
20/30
Summary (Road Map)• Given a point on an object:
• Light from every incoming direction hits that point• For each incoming direction , light is reflected
outwards in every direction • BRDF indicates how much light is reflected in
each of the outgoing directions given an incoming direction
• Since light is reflected in all outgoing directions, we can all see that point on the object
• But it looks different to each of us, since we all see different light
• To render a synthetic scene, figure out what light each pixel of the camera’s film sees
iw
iw
ow
owiw
21/30
The Lighting Equation
The amount of light reflected in an outgoing direction is the integral of the amount of light reflected in that direction due to light from every incoming direction:
n The BRDF gives
åÎ
=in
todue ),(i
oiioo LL ww
),( todue oiioL ww
22/30
For each pixel, integrate the BRDF across all incoming directions for every point in the projected area
iw
Outgoin
g dire
ction
All incoming directions
Image plane
pixel
in
( , ) ( )o i o i ii
L BRDF dEw w wÎ
= ò
iEoL
The Lighting Equation
iwd
Vanishingly small surface elementwithin the projected area
ow
23/30
For each pixel, integrate the BRDF across all incoming directions for every point in the projected area
iw
Outgoin
g dire
ction
All incoming directions
Image plane
pixel
in
( , ) ( )o i o i ii
L BRDF dEw w wÎ
= ò
iEoL
The Lighting Equation
iwd
Vanishingly small surface elementwithin the projected area
ow
24/30
Math L
25/30
Lights
26/30
Solid Angle
Two-dimensional angle in 3D defined by a point and a surface patch, measured by a dimensionless unit called a steradian (sr)
Angle: (a circle has 2π radians)
Solid angle: (a sphere has 4π steradians)
rlarc=q
2sphereon
rA
=w 24A rp=
2C rp=
27/30
Radiant Intensity of a Light
Power per unit solid angle:
where is the total power of the light
Note: is a function of for anisotropic light emission
The relation between power and radiant intensity for an isotropicpoint light is:
ww
dd)( F
ºI
F
I w
II pw 4dsphere
==F ò
28/30
Irradiance on a Surface
Power per unit surface area:
Irradiance decreases as you tilt the object, since less light hits it
AE
ddF
º
q
q
q
cos
cos
)( cos
tilted
EA
AE A
A
=
F=
F=
F
qcosA
F
A
Aq
qcosA
N¢ˆq
qp -2
qp -2
A
A
q
29/30
The relationship between solid angle and area is
where is the area of the orthogonal cross section
Solid Angle vs. Area
http://users.eecs.northwestern.edu/~yingwu/teaching/EECS432/Notes/lighting.pdf
2
cosddr
A qw =
qcosd A
unitsphere
surfacepatch
q
Ad
wd
0S
r N̂
30/30
No energy can flow through a point; it must go through either a solid angle or an area (interchangeable)
Total light power per unit solid angle à Radiant Intensity• Measure of how strong a (point) light source is
Total light power per unit area à Irradiance• Measure of how much light is hitting a surface• Varies based on the distance to the light and the angle of
the surface (see last slide)• The farther away and more tilted a surface area patch is,
the smaller the solid angle of light that hits that surface area patch
Summary
31/30
More Math L L
32/30
Area Lights
33/30
• Light power is emitted per unit area (not from a single point)
• This light goes in various directions, or solid angles
• Can approximate an area light by breaking it up into small area chunks, where each area chunk emits light into each of the solid angle directions • i.e. radiant intensity per area chunk
• Each direction has a cosine term similar to irradiance
• Radiance – radiant intensity per area chunk
Area Lights
2d d dcos d cos d cosI EL
dA dAq w q w qæ öF
= = =ç ÷è ø
34/30
ow
BRDFRelates the incoming light that hits a surface patch
(irradiance ) to the outgoing light emitted from the surface patch acting as if it were an area light(radiance )
We care about the outwards radiance of a surface patch in the direction of a pixel, given an incoming irradiance from a direction onto that surface patch
(An “area light” patch has radiant intensity in every outgoing direction, but we only care about the direction of our pixel)
)(d)(d),BRDF(
ii
oooi E
Lwwww =
iE
oL
iw
35/30
The Lighting Equation
Multiplying the BRDF by an incoming irradiance gives the outgoing radiance
For more realistic lighting, we bounce light all around the scene, and it is tedious to convert between irradiance and radiance --- so we use
(from two slides earlier) to obtain:
Finally, the outgoing radiance considering the light coming from all incoming directions is
qw cosdd LE =
òÎ
=in
dcos),(i
iiioio LBRDFL wqww
ioioiio EBRDFL d),(),( todue wwww =
iiioioiio LBRDFL qwwwww cosd),(),( todue =
completing the derivation
36/30
Pixels
37/30
Pixel Color
(integrating an equation from 2 slides ago)
(so we can store L instead of E, and scale later)
38/30
Summary
39/30
Question 1 (short/long form)Summarize… (use class time for short; long form 1000 words)
?