ppt - TAMU Computer Science Faculty Pages

advertisement
CSCE 641 Computer Graphics:
Reflection Models
Jinxiang Chai
Motivation
How to model surface properties of objects?
Reflection Models
Definition: Reflection is the process by which light
incident on a surface interacts with the surface such
that it leaves on the incident side without change in
frequency.
Types of Reflection Functions
Ideal Specular

Reflection Law

Mirror
Types of Reflection Functions
Ideal Specular

Reflection Law

Mirror
Ideal Diffuse

Lambert’s Law

Matte
Types of Reflection Functions
Ideal Specular

Reflection Law

Mirror
Ideal Diffuse

Lambert’s Law

Matte
Specular

Glossy

Directional diffuse
Review: Local Illumination
I  ka A  kd C ( L  N )
Review: Local Illumination

I  ka A  C kd ( L  N )  ks ( R  E )
n 5
n

Review: Local Illumination

I  ka A  C kd ( L  N )  ks ( R  E )
n  50
n

Materials
Plastic
Metal
From Apodaca and Gritz, Advanced RenderMan
Matte
Mathematical Reflectance Models
How can we mathematically model reflectance property
of an arbitrary surface?
- what’s the dimensionality?
- how to use it to compute outgoing radiance given
incoming radiance?
Introduction
Radiometry and photometry
- Radiant intensity
- Irradiance
- Radiance
- Radiant exitance (radiosity)
Electromagnetic Spectrum
Visible light frequencies range between:

Red: 4.3x1014 hertz (700nm)

Violet: 7.5x1014 hertz (400nm)
Visible Light
The human eye can see “visible” light in the frequency between
400nm-700nm
violet
red
Spectral Energy Distribution
Three different types of lights
Spectral Energy Distribution
Three different types of lights
How can we measure the energy of light?
Photons
The basic quantity in lighting is the photon
The energy (in Joule) of a photon with wavelength λ is:
qλ = hc/λ
- c is the speed of light
In vacuum, c = 299.792.458m/s
- h ≈ 6.63*10-34Js is Planck’s constant
(Spectral) Radiant Energy
The spectral radiant energy, Qλ, in nλ photons with
wavelength λ is
Q  n q
The radiant energy, Q, is the energy of a collection of
photons, and is given as the integral of Qλ over all
possible wavelengths:

Q   Q d
0
Example: Fluorescent Bulb
Radiant Intensity
Definition: the radiant power radiated from a point on a light
source into a unit solid angle in a particular direction.
- measured in watt per steradian
d
I ( ) 
d
 W   lm


cd

candela
 sr   sr

Radiance
Definition: the radiant power per unit projected surface
area per solid angle
L ( x,  )
d
dI ( x,  )
L ( x,  ) 
dA
d 2  ( x,  )

d dA
 W   cd

lm
 sr m 2   m 2  sr m 2  nit 



dA
Radiance
Per unit projected surface area
- radiance varies with direction
- incidence radiance and exitant radiance
Radiance
Ray of light arriving at or leaving a point on a surface in a
given direction
Radiance (arriving)
Radiance (leaving)
Irradiance
Definition: the power per unit area incident on a surface.
Li ( x,  )
di
E( x) 
dA

d
dA
E( x) 
 L ( x,)cos d
i
H2
Radiant Exitance
Definition: The radiant (luminous) exitance is the
energy per unit area leaving a surface.
d o
M ( x) 
dA
In computer graphics, this quantity is often
referred to as the radiosity (B)
Directional Power Leaving a Surface
dA
d

d  o ( x,  )
2
Lo ( x,  )
d  o ( x,  )  Lo ( x,  ) cos  dAd
2
Uniform Diffuse Emitter
M
L
o
cos d
Lo ( x,  )
H2
 Lo
 cos d
H
2

dA
d
Projected Solid Angle
   cos d
d


cos d


H2
cos  d  
Uniform Diffuse Emitter
M
L
o
cos  d
H2
 Lo
Lo ( x,  )
 cos  d
H2
  Lo
Lo 

M

dA
d
Reflection Models
Outline
- Types of reflection models
- The BRDF and reflectance
- The reflection equation
- Ideal reflection
- Ideal diffuse
- Cook-Torrance Model
Reflection Models
Definition: Reflection is the process by which light
incident on a surface interacts with the surface such
that it leaves on the incident side without change in
frequency.
Reflection Models
Definition: Reflection is the process by which light
incident on a surface interacts with the surface such
that it leaves on the incident side without change in
frequency.
Reflection Models
Definition: Reflection is the process by which light
incident on a surface interacts with the surface such
that it leaves on the incident side without change in
frequency.
Reflection Models
Definition: Reflection is the process by which light
incident on a surface interacts with the surface such
that it leaves on the incident side without change in
frequency.
Types of Reflection Functions
Ideal Specular

Reflection Law

Mirror
Types of Reflection Functions
Ideal Specular

Reflection Law

Mirror
Ideal Diffuse

Lambert’s Law

Matte
Types of Reflection Functions
Ideal Specular

Reflection Law

Mirror
Ideal Diffuse

Lambert’s Law

Matte
Specular

Glossy

Directional diffuse
Mathematical Reflectance Models
How can we mathematically model reflectance property
of an arbitrary surface?
- what’s the dimensionality?
- how to use it to compute outgoing radiance given
incoming radiance?
The Reflection Equation
Li ( x, i )
Lr ( x, r )
N̂
r
r
i
d i
i
The Reflection Equation
Li ( x, i )
Lr ( x, r )
N̂
r
r
i
d i
i
How to model surface reflectance property?
The Reflection Equation
Li ( x, i )
Lr ( x, r )
N̂
r
r
i
d i
i
How to model surface reflectance property?
f ( x, i   r ) 
Lr ( x, r )
Ei
The Reflection Equation
Li ( x, i )
Lr ( x, r )
N̂
r
r
i
d i
i
How to model surface reflectance property?
f ( x, i   r ) 
Lr ( x, r )
Ei
for a given incoming direction, the amount of light
that is reflected in a certain outgoing direction
The Reflection Equation
Li ( x, i )
N̂
Lr ( x, r )
r
r
Lr ( x, r ) 

H2
i
d i
i
fr ( x, i  r )Li ( x, i ) cos  i di
The Reflection Equation
Li ( x, i )
N̂
Lr ( x, r )
r
r
Lr ( x, r ) 

i
d i
i
fr ( x, i  r )Li ( x, i ) cos  i di
H2
Directional irradiance
The BRDF
Bidirectional Reflectance Distribution Function
Li ( x, i )
dLr ( x, r )
N̂
r
i
r
dLr (i  r )
fr (i  r ) 
dEi
d i
i
1
 sr 
Dimensionality of the BRDF
This is 6-D function
- x: 2D position
- (θi,φi): incoming direction
- (θr,φr): outgoing direction
Usually represented as 4-D
- ignoring x
- homogenous material property
Gonioreflectometer
Scattering Models
The BSSRDF
Bidirectional Surface Scattering Reflectance-Distribution
Function
dLr ( x, r )
r
xr
N̂
Li ( x, i )
i
d i
xi
r
i
dLr ( xi , i  xr , r )
S ( xi ,  i  xr ,  r ) 
d i
Translucency
Properties of BRDF’s
1. Linearity
From Sillion, Arvo, Westin, Greenberg
Properties of BRDF’s
1. Linearity
From Sillion, Arvo, Westin, Greenberg
2. Reciprocity principle
fr (r  i )  fr (i  r )
Properties of BRDF’s
3. Isotropic vs. anisotropic
fr (i ,i ;r ,r )  fr (i ,r ,r  i )
Reciprocity and isotropy
fr (i ,r ,r  i )  fr (r ,i ,i  r )  fr (i ,r , r  i )
Properties of BRDF’s
3. Isotropic vs. anisotropic
fr (i ,i ;r ,r )  fr (i ,r ,r  i )
Reciprocity and isotropy
fr (i ,r ,r  i )  fr (r ,i ,i  r )  fr (i ,r , r  i )
4. Energy conservation
Energy Conservation
Definition: Reflectance is ratio of reflected to incident power
d r

d i
 L ( ) cos
r
r
r
r
dr
r
 L ( ) cos d
i
i
i
i
i
  f (
r

r i
i
 r ) Li (i )cos  i di cos  r dr
 L ( ) cos d
i
i
1
i
i
i
i
Energy Conservation
Definition: Reflectance is ratio of reflected to incident power
d r

d i
 L ( ) cos
r
r
r
r
dr
r
 L ( ) cos d
i
i
i
i
i
  f (
r

r i
i
 r ) Li (i )cos  i di cos  r dr
 L ( ) cos d
i
i
1
i
i
i
i
Energy Conservation
Definition: Reflectance is ratio of reflected to incident power
d r

d i
 L ( ) cos
r
r
r
r
dr
r
 L ( ) cos d
i
i
i
i
i
  f (
r

r i
i
 r ) Li (i )cos  i di cos  r dr
 L ( ) cos d
i
i
i
i
i
1
Conservation of energy: 0 <
r<1
Units: r [dimensionless], fr [1/steradians]
i
BRDF
What’s the BRDF for a mirror surface?
Law of Reflection
Î
N̂
 i r
r  i
R̂
i
r
r  i    mod 2
Ideal Reflection (Mirror)
Lr (r ,r )
Li (i ,i )
 i r
Lr ,m ( r ,  r )  Li ( r ,  r   )
Ideal Reflection (Mirror)
Lr (r ,r )
Li (i ,i )
 i r
fr ,m (i ,  i ; r ,  r ) 
Lr ,m ( r ,  r )  Li ( r ,  r   )
 (cos i  cos r )
 ( i   r   )
cos i
Ideal Reflection (Mirror)
Lr (r ,r )
Li (i ,i )
 i r
fr ,m (i ,  i ; r ,  r ) 
Lr ,m ( r ,  r )  Li ( r ,  r   )
 (cos i  cos r )
 ( i   r   )
cos i
Lr ,m ( r ,  r )   fr ,m ( i ,  i ; r ,  r ) Li (i ,  i ) cos i d cos i d i
 (cos i  cos r )

 ( i   r   )Li ( i , i ) cos i d cos i d i
cos i
 Li (r ,  r   )
Ideal Diffuse Reflection
Assume light is equally likely to be reflected in any
output direction (independent of input direction).
Lr ,d (r )   fr ,d Li (i ) cos  i di
 fr ,d  Li (i ) cos  i di
fr ,d  c
 fr ,d E
M   Lr (r ) cos r dr  Lr  cos r dr   Lr
M  Lr  fr ,d E
rd  

  fr ,d
E
E
E
Lambert’s Cosine Law

fr ,d
rd


M  rd E  rd Es cos s
Diffuse Light
I  C kd cos( )  C kd ( L  N )
C = intensity of point light source
kd = diffuse reflection coefficient
= angle between normal and direction to light
cos( )  L N
L
N

Surface
Phong Model
R(L)
E
E
N
L
Reciprocity:
N
R(E)
L
Phong Model
Diffuse
Mirror
s
BRDF Models
Phenomenological
- Phong [75]
- Blinn-Phong [77]
- Ward [92]
- Larfortune et al [97]
[Larfortune et al 97]
- Ashikhmin et al [00]
Physical
- Cook-torrence [81]
- He et al [91]
[Cook-Torrence 81]
Data-driven
[Matusik et al 2003]
BRDF Models
Phenomenological
- Phong [75]
- Blinn-Phong [77]
- Ward [92]
- Larfortune et al [97]
[Larfortune et al 97]
- Ashikhmin et al [00]
Physical
- Cook-torrence [81]
- He et al [91]
[Cook-Torrence 81]
Data-driven
[Matusik et al 2003]
Cook-Torrance Model
More sophisticated for specular reflection
Surface is made of reflecting microfacets
Cook-Torrance Model
H: angular bisector of vector L and V
Microfacet Slope Distribution (D)
Beckman function:
D: density of microfacets along H
m: root mean square of slopes of microfacets (i.e. roughness)
The facet slope distribution function D represents the fraction of the facets that
are oriented in the direction H.
Varying m
m = 0.2
m = 0.6
Highly directional vs. spread-out
Cook-Torrance Model
H: angular bisector of vector L and V
Mask and Shadow Term
No interference
shadow
mask
The geometrical attenuation factor G accounts for the shadowing and
masking of one facet by another.
Cook-Torrance Model
H: angular bisector of vector L and V
Fresnel Term
n: refractive index
The Fresnel term F describes how light is reflected from each smooth
microfacet. It is a function of incidence angle and wavelength
Cook-Torrance Model for Metals
Reflectance of Copper as a
function of wavelength and
angle of incidence
Measured Reflectance
Light spectra
r
Approximated Reflectance
Cook-Torrance approximation

2

 F ( )  F (0) 
R  R(0)  R( / 2) 

F
(

/
2)

F
(0)



Copper spectra
Download