Com puter graphics III – Light reflection, BRDF
Jaroslav Křivánek, MFF UK Jaroslav.Krivanek@mff.cuni.cz
Com puter graphics III Light reflection, BRDF Jaroslav Kivnek, MFF - - PowerPoint PPT Presentation
Com puter graphics III Light reflection, BRDF Jaroslav Kivnek, MFF UK Jaroslav.Krivanek@mff.cuni.cz Basic radiom etric 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 incom ing
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 (cz: Dvousměrová distribuční funkce odrazu)
1 i i i i
i
−
CG III (NPGR010) - J. Křivánek 2015
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 m odel of the bulk behavior of light
CG III (NPGR010) - J. Křivánek 2015
Helm holz reciprocity (always holds in nature, a
CG III (NPGR010) - J. Křivánek 2015
i
r r
Energy conservation
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 r
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 ∆φ = φ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 fram e
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 ωo?“ From the definition of the BRDF, we have
i r
i i i
CG III (NPGR010) - J. Křivánek 2015
Integrating the contributions dLr over the entire
) ( 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
Ratio of the incom ing and outgoing flux
A.k.a. „albedo“ (used mostly for diffuse reflection)
Hem ispherical-hem ispherical reflectance
See the “Energy conservation” slide
Hem ispherical-directional reflectance
The amount of light that gets reflected in direction ωo when
) ( i i
x
H r
CG III (NPGR010) - J. Křivánek 2015
Nonnegative Less than or equal to 1
Equal to directional-hem ispherical
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 ωo
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
θo n θi θo = θi
BRDF of the ideal mirror is a Dirac delta distribution Varification:
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
ηi ηo ωi ωo
Index of refraction η
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 ωi and ωo as arguments ωi and ωo 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
i i r h i r
Fresnel term Geom etry 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 optim ization required to find the BRDF
CG III (NPGR010) - J. Křivánek 2015
CG III (NPGR010) - J. Křivánek 2015
CG III (NPGR010) - J. Křivánek 2015
CG III (NPGR010) - J. Křivánek 2015
CG III (NPGR010) - J. Křivánek 2015
CG III (NPGR010) - J. Křivánek 2015
CG III (NPGR010) - J. Křivánek 2015
BTDF
Bidirectional transm ittance
Described light transmission
BSDF = BRDF+BTDF
Bidirectional scattering
CG III (NPGR010) - J. Křivánek 2015
SV-BRDF …
BRDF parameters are spatially varying (can be given by a
BTF …
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