Computer graphics III – Light reflection, BRDF
Jaroslav Křivánek, MFF UK Jaroslav.Krivanek@mff.cuni.cz
Computer graphics III Light reflection, BRDF Jaroslav Kivnek, MFF - - PowerPoint PPT Presentation
Computer graphics III Light reflection, BRDF Jaroslav Kivnek, MFF UK Jaroslav.Krivanek@mff.cuni.cz Basic radiometric quantities Image: Wojciech Jarosz CG III (NPGR010) - J. Kivnek 2015 Interaction of light with a surface
Jaroslav Křivánek, MFF UK Jaroslav.Krivanek@mff.cuni.cz
CG III (NPGR010) - J. Křivánek 2015
Image: Wojciech Jarosz
Absorption Reflection Transmission / refraction Reflective properties of materials determine
the relation of reflected radiance Lr
to incoming
the appearance of the object: color, glossiness, etc.
CG III (NPGR010) - J. Křivánek 2015
Same illumination Different materials Source: MERL BRDF database
CG III (NPGR010) - J. Křivánek 2015
Bidirectional Reflectance Distribution Function
1 i i i i
5
Mathematical model of the reflection properties of a
Intuition
Value of a BRDF = probability density,
Range:
r
CG III (NPGR010) - J. Křivánek 2015
Westin et al. Predicting Reflectance Functions from Complex Surfaces, SIGGRAPH 1992.
The BRDF is a model of the bulk behavior of light
CG III (NPGR010) - J. Křivánek 2015
Helmholz reciprocity (always holds in nature, a
CG III (NPGR010) - J. Křivánek 2015
i
r r
Energy conservation
A patch of surface cannot reflect more light energy than it
CG III (NPGR010) - J. Křivánek 2015
Isotropic BRDF = invariant to a rotation around
CG III (NPGR010) - J. Křivánek 2015
i
i
i
r r r
CG III (NPGR010) - J. Křivánek 2015
Different microscopic roughness in different directions
CG III (NPGR010) - J. Křivánek 2015
Isotropic BRDFs have only 3 degrees of freedom
Instead of i and o it is enough to consider only D i – o But this is not enough to describe an anisotropic BRDF
Description of an anisotropic BRDF
i and o are expressed in a local coordinate frame
U … tangent – e.g. the direction of brushing
V … binormal
N … surface normal … the Z axis of the local coordinate frame
CG III (NPGR010) - J. Křivánek 2015
A.k.a. reflectance equation, illumination integral,
“How much total light gets reflected in the direction wo?“ From the definition of the BRDF, we have
i r
i i i
CG III (NPGR010) - J. Křivánek 2015
Total reflected radiance: integrate contributions of incident
) ( i i
i i
x H r
CG III (NPGR010) - J. Křivánek 2015
Evaluating the reflectance equation renders images!!!
Direct illumination
Environment maps
Area light sources
etc.
CG III (NPGR010) - J. Křivánek 2015
Reflected flux per unit area (i.e. radiosity B) cannot be
CG III (NPGR010) - J. Křivánek 2015
i i i i
i i i r i i i i
18
Souce: Ngan et al. Experimental analysis of BRDF models, http://people.csail.mit.edu/addy/research/brdf/
19
Souce: Ngan et al. Experimental analysis of BRDF models, http://people.csail.mit.edu/addy/research/brdf/
20
Souce: Ngan et al. Experimental analysis of BRDF models, http://people.csail.mit.edu/addy/research/brdf/
21
Souce: Ngan et al. Experimental analysis of BRDF models, http://people.csail.mit.edu/addy/research/brdf/
Ratio of the incoming and outgoing flux
A.k.a. „albedo“ (used mostly for diffuse reflection)
Hemispherical-hemispherical reflectance
See the “Energy conservation” slide
Hemispherical-directional reflectance
The amount of light that gets reflected in direction wo when
) ( i i
x H r
CG III (NPGR010) - J. Křivánek 2015
Nonnegative Less than or equal to 1
Equal to directional-hemispherical
What is the percentage of the energy coming from the
Equality follows from the Helmholz reciprocity
CG III (NPGR010) - J. Křivánek 2015
CG III (NPGR010) - J. Křivánek 2015
CG III (NPGR010) - J. Křivánek 2015
General BRDF Ideal diffuse (Lambertian) Ideal specular Glossy, directional diffuse
CG III (NPGR010) - J. Křivánek 2015
CG III (NPGR010) - J. Křivánek 2015
A.k.a. Lambertian reflection
Johann Heinrich Lambert, „Photometria“, 1760.
Postulate: Light gets reflected to all directions with the
The corresponding BRDF is a constant function
d r d r
,
,
CG III (NPGR010) - J. Křivánek 2015
Reflection on a Lambertian surface: View independent appearance
Outgoing radiance Lo is independent of wo
Reflectance (derive)
d r H d r , ) ( i i i i ,
x
d r d
CG III (NPGR010) - J. Křivánek 2015
Mathematical idealization that does not exist in nature The actual behavior of natural materials deviates from
CG III (NPGR010) - J. Křivánek 2015
Under a covered sky we cannot tell the shape of a terrain
We do not have this problem
Why?
CG III (NPGR010) - J. Křivánek 2015
We assume sky radiance independent of direction
We also assume Lambertian reflection on snow Reflected radiance given by:
CG III (NPGR010) - J. Křivánek 2015
sky i i
sky i snow snow
d
CG III (NPGR010) - J. Křivánek 2015
CG III (NPGR010) - J. Křivánek 2015
Nishino, Nayar: Eyes for Relighting, SIGGRAPH 2004
CG III (NPGR010) - J. Křivánek 2015
Direction of the reflected ray (derive the formula)
CG III (NPGR010) - J. Křivánek 2015
i i
Definition (informal): The following holds for any f: Delta distribution is not a function (otherwise the
CG III (NPGR010) - J. Křivánek 2015 Image: Wikipedia
BRDF of the ideal mirror is a Dirac delta distribution
CG III (NPGR010) - J. Křivánek 2015
i
i
i
i ,
m r
qo n qi qo qi
BRDF of the ideal mirror is a Dirac delta distribution Verification:
CG III (NPGR010) - J. Křivánek 2015
r r i i i i i i i i
i i i i ,
m r
CG III (NPGR010) - J. Křivánek 2015
CG III (NPGR010) - J. Křivánek 2015
hi ho wi wo
Index of refraction h
Water 1.33, glass 1.6, diamond 2.4 Often depends on the wavelength
Snell’s law
i
CG III (NPGR010) - J. Křivánek 2015
Direction of the refracted ray:
i 2 2 io i io i io
io
i
i,
Image: wikipedia
CG III (NPGR010) - J. Křivánek 2015
Change of radiance
Follows from the conservation of energy (flux) When going from an optically rarer to a more dense
2 2 i
CG III (NPGR010) - J. Křivánek 2015
BRDF of the ideal refraction is a delta distribution:
CG III (NPGR010) - J. Křivánek 2015
i
i i 2 i 2
i
Read [frenel] Ratio of the transmitted and reflected light depends on
From above – more transmission From the side – more reflection
Extremely important for realistic rendering of glass,
Not to be confused with
CG III (NPGR010) - J. Křivánek 2015
Dielectrics
CG III (NPGR010) - J. Křivánek 2015
Image: Wikipedia
Dielectrics
CG III (NPGR010) - J. Křivánek 2015
From above
From the side
Try for yourself!!!
CG III (NPGR010) - J. Křivánek 2015
Metals
CG III (NPGR010) - J. Křivánek 2015
CG III (NPGR010) - J. Křivánek 2015
CG III (NPGR010) - J. Křivánek 2015
Neither ideal diffuse nor ideal mirror All real materials in fact fall in this
CG III (NPGR010) - J. Křivánek 2015
The rougher the blurrier
Microscopic surface roughness
CG III (NPGR010) - J. Křivánek 2015
CG III (NPGR010) - J. Křivánek 2015
(a.k.a meso-scale)
CG III (NPGR010) - J. Křivánek 2015
An arbitrary formula that takes wi and wo as arguments wi and wo are sometimes denoted L (Light direction) a V
Example: Phong model Arbitrary shading calculations (shaders)
CG III (NPGR010) - J. Křivánek 2015
n s d
CG III (NPGR010) - J. Křivánek 2015
r n s d
i i i
i i
i i
i r n s d Orig Phong r
CG III (NPGR010) - J. Křivánek 2015
Modification to ensure reciprocity (symmetry) and
Energy conserved when It is still an empirical formula (i.e. it does not follow from
r n s d r
modif Phong
s d
CG III (NPGR010) - J. Křivánek 2015
E.g. Torrance-Sparrow / Cook-Torrance model Based on the microfacet theory
CG III (NPGR010) - J. Křivánek 2015
CG III (NPGR010) - J. Křivánek 2015
Analytically derived Used for modeling glossy surfaces (as the Phong model)
Corresponds more closely to reality than Phong Derived from a physical model of the surface
CG III (NPGR010) - J. Křivánek 2015
Assumes that the macrosurface consists of randomly
We assume that each microfacet behaves as an ideal
We consider 3 phenomena:
CG III (NPGR010) - J. Křivánek 2015
Reflection in a single direction
Outgoing light visible surface normal aligned with the half vector
Half Vector: 𝐼 =
𝑀+𝑊 𝑀+𝑊
Each micro-mirror have a micro-normal
How many micro-mirror have their micro-normal aligned so that 𝐼 = 𝑂 ?
Statistical distribution: Normal Distribution Function (NDF)
71
i i r h i r
Fresnel term Geometry term Models shadowing and masking Microfacet distribution Part of the macroscopic surface visible by the light source Part of the macroscopic surface visible by the viewer
CG III (NPGR010) - J. Křivánek 2015
We can fit any BRDF model to the data Some BRDF models have been specifically designed for
Nonlinear optimization required to find the BRDF
CG III (NPGR010) - J. Křivánek 2015
CG III (NPGR010) - J. Křivánek 2015
UTIA University of Bonn Stanford
Techniques for speeding measurements
Sphere [Matusik et al 2003]
Cylinders [Ngan et al 2005]
10/24/2017 Efficient Representation for Measured Reflectance 75
[Matusik et al 2003]
76
Souce: Ngan et al. Experimental analysis of BRDF models, http://people.csail.mit.edu/addy/research/brdf/
77
Souce: Ngan et al. Experimental analysis of BRDF models, http://people.csail.mit.edu/addy/research/brdf/
78
Souce: Ngan et al. Experimental analysis of BRDF models, http://people.csail.mit.edu/addy/research/brdf/
79
Souce: Ngan et al. Experimental analysis of BRDF models, http://people.csail.mit.edu/addy/research/brdf/
BTDF
Bidirectional transmittance
Described light transmission
BSDF = BRDF+BTDF
Bidirectional scattering
CG III (NPGR010) - J. Křivánek 2015
SV-BRDF … Spatially Varying BRDF
BRDF parameters are spatially varying (can be given by a
BTF … Bidirectional Texture Function
Used for materials with complex structure As opposed to the BRDF, models even the meso-scale
CG III (NPGR010) - J. Křivánek 2015
BRDF
Light arriving at a point is reflected/transmitted at the
No subsurface scattering considered
BSSRDF
Bi-directional surface scattering reflectance distribution
Takes into account
CG III (NPGR010) - J. Křivánek 2015
Sub-surface scattering makes surfaces looks “softer”
BRDF BSSRDF
CG III (NPGR010) - J. Křivánek 2015
BRDF BSSRDF
CG III (NPGR010) - J. Křivánek 2015