Upload
others
View
3
Download
0
Embed Size (px)
Citation preview
Chapter 8.
The Rendering Equation
Graphics Programming, 29th Sep.
Graphics and Media Lab.
Seoul National University 2011 Fall
3D Rendering by David Keegan
Goal of This Chapter
• Understand the basic radiometry
• Understand BRDF and reflection models
• Understand the rendering equation
Solid Angle
• A quantity that measures the relative coverage of a hemisphere.
– Unit: sr – steradian
• The whole hemisphere is 2π sr.
(Radiant) Flux F
• Time rate of the flow of radiant energy Q
– Amount of energy arriving at a surface during 1 sec.
– Unit: Watt
Irradiance E
• Flux arriving at a surface location x
– Unit: W/m2
– Positional distribution of flux
surface
(Radiant) Intensity I
• Radiant flux per unit solid angle
– Unit: W/sr
– Directional distribution of flux
Radiance L
• Radiant intensity per unit projected area
– Unit: W/m2sr
– Flux density per unit projected area per unit solid angle
surface
Radiance L
• Radiant intensity per unit projected area
– Unit: W/m2sr
– Irradiance in terms of radiance:
dxLxE cos),()(
Radiance L
• Radiant intensity per unit projected area
– Unit: W/m2sr
– Flux in terms of radiance:
Light Emission Example
• Assume a point light source with power
• What is the irradiance E at a surface?
• What is the radiance L at a surface?
Light Scattering
• Materials interact with light in different ways.
• Different materials have different appearances given the same lighting conditions.
• The reflectance properties of a surface are described by a reflectance function, which models the interaction of light reflecting at a surface.
• The bi-directional reflectance distribution function (BRDF) is the most general expression of reflectance of a material
The BRDF
• The BRDF is defined as the ratio between differential radiance reflected in an exitant direction, and incident irradiance through a differential solid angle
• The BRDF is defined as the ratio between differential radiance reflected in an exitant direction, and incident irradiance through a differential solid angle
The BRDF
incoming
outgoing
Why BRDF is Complicated? • How about
• Differential irradiance dE(p,w’) – dEi(x,w’) Li(x,w’)cosi dw’ – Why do we put d in front of E?
• dLr(x,w) differential exitance radiance due to dEi(x,w’) • dLr(x,w) dEi(x,w’)
– Why? – The relationship is called the “linearity assumption”.
• fr(x,w,w’) fr(x,w’,w) – Reciprocity: the value of the BRDF will remain unchanged if the
incident and exitant directions are interchanged.
ww
w
w
www
dpL
xdL
xdE
xdLxf
ii
r
i
rr
cos),(
),(
),(
),(),,(
),(
),(),,(
w
www
xL
xLxf
i
rr
The Scattering Equation
wwwww
wwwww
dxLpf
dxLpfxL
ir
iirr
)(n ),(),,(
cos ),(),,(),(
• Calculation of the exitant radiance from x toward w, by summing contributions made by all the incident radiances.
Reflectance r
• Why dF instead of F?
• BRDF vs. Reflectance – Both are about a surface point x.
– Reflectance: General (or average) tendency of reflection
– BRDF: Bi-directional reflection distribution
Object Color and Reflectance
• How do we see the color? – The surface absorbs photons of certain range of l
– Is it general or direction specific behavior of the surface?
• Object color is represented with the reflectance! – For red, use the vector reflectance r(1,0,0).
– For yellow, use r(0.5,0.5,0).
– …
Diffuse Reflection
• A diffuse surface reflects light in all directions
– A special case of diffuse reflection is Lambertian: the reflection is uniform over the whole hemisphere.
Rendered using Mitsuba
Lambertian
• For a Lambertian surface, the reflected radiance is constant in all directions regardless of the irradiance.
• This gives a constant BRDF:
)(
)(
)(
),()(,
xE
xL
xE
xLxf
i
r
i
rdr
w
Constant wrt w
Specular Reflection
• Specular reflection happens when light strikes a smooth surface – e.g. Metal, glass, and water
Specular Reflection
• Specular reflection happens when light strikes a smooth surface – e.g. Metal, glass, and water
• The reflected radiance due to specular reflection is:
and the reflection direction is:
Relationship Between Reflectance and Index of Refraction
• From left-to-right, only the index of refraction is varied. – We can observe the reflectance is related with the IOR.
– Why such thing happens?
Image from Maya 2009 Mental Ray Document
The Fresnel Equations
• For smooth homogeneous metals and dielectrics, specular reflectance is given by the following formulae for polarized lights:
Specular Reflectance for Unpolarized Light
• For unpolarized light the specular reflectance becomes:
• The amount of refracted ray is computed as:
)(2
1)( 22
|| rrr rs F
More General Reflection Models
• Phong
• Microfacet models
– Torrance-Sparrow
– Oren-Nayar
• Lafortune
• BSSDF
What’s Next?
• Now, we know how to describe light.
• We also know how it gets reflected.
• From now on, let’s talk about how light travels around!
The Rendering Equation
• Introduced by David Immel et al. and James Kajiya in 1986.
• The rendering equation describes the total amount of light coming from a point x along a particular viewing direction. – Based on the law of conservation of energy.
Image from Wikipedia
The Rendering Equation
• In short, the outgoing radiance Lo is the sum of the emitted radiance Le and the reflected radiance Lr:
• Using BRDF, we can rewrite about eq. as:
• How can we solve the above eq?
– Difficult!
Understanding the Situation
E
D
S
L
D
E: Eye, D: Diffuse, S: Specular
Light -> Eye
E
D
S
L
D
E: Eye, D: Diffuse, S: Specular
Light -> Diffuse -> Eye
E
D
S
L
D
E: Eye, D: Diffuse, S: Specular
Light -> Specular -> Eye
E
D
S
L
D
E: Eye, D: Diffuse, S: Specular
Light -> Specular -> Specular -> Diffuse -> Eye
E
D
S
L
D
E: Eye, D: Diffuse, S: Specular
Light -> Specular -> Specular -> Diffuse -> Diffuse -> Specular -> Diffuse -> Specular -> … -> Eye
E
D
S
L
D
E: Eye, D: Diffuse, S: Specular
Computing Rendering Equation
• You might have felt that solving the rendering eq won’t be a trivial job.
– How can we evaluate this integral numerically?
• Let’s rewrite the eq in more readable (and computable) form.
1. Neumann series expansion
2. Light transport notation
Neumann Series Expansion
• The rendering eq can be represented using the following compact form:
where the integral operator T is:
Neumann Series Expansion
• Then, recursive evaluation of L=Le+TL gives:
E
D
S
L
D
Light Transport Notation
• We can also represent light traversals in general form. – L: a light source
– E: the eye
– S: a specular reflection/refraction
– D: a diffuse reflection
• Using regular expression: – (k)+: one or more of k events
– (k)*: zero or more of k events
– (k)?: zero or one k events
– (k|k’): a k or a k’ events
LE
E
D
S
L
D
LSE
E
D
S
L
D
LSSDE
E
D
S
L
D
L(S|D)+DE
E
D
S
L
D
Ray Tracing Models
• Appel’s Method (1968) – E(D|G)L – aka. Ray casting – Only computes local illuminations
• Whitted’s Method (1980) – ES*(D|G)L – aka. (Recursive) ray tracing – Only computes local illuminations
• Kajiya’s Method (1986) – E[(D|G|S)+(D|G)]L – aka. Path tracing – Fully computes local and global illuminations
* G is glossy reflection
How to Solve the Rendering Equation
• Trace all possible paths, and integrates every contribution
– Called the “path tracing”
– Extremely expensive.
• The next two lectures will teach how to integrate the equation numerically.
– Monte-Carlo integration
E
D
S
L
D