Computer graphics III Light reflection, BRDF Jaroslav Kivnek, MFF - - PowerPoint PPT Presentation

computer graphics iii
SMART_READER_LITE
LIVE PREVIEW

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


slide-1
SLIDE 1

Computer graphics III – Light reflection, BRDF

Jaroslav Křivánek, MFF UK Jaroslav.Krivanek@mff.cuni.cz

slide-2
SLIDE 2

Basic radiometric quantities

CG III (NPGR010) - J. Křivánek 2015

Image: Wojciech Jarosz

slide-3
SLIDE 3

Interaction of light with a surface

 Absorption  Reflection  Transmission / refraction  Reflective properties of materials determine

 the relation of reflected radiance Lr

to incoming

radiance Li , and therefore

 the appearance of the object: color, glossiness, etc.

CG III (NPGR010) - J. Křivánek 2015

slide-4
SLIDE 4

Interaction of light with a surface

 Same illumination  Different materials Source: MERL BRDF database

CG III (NPGR010) - J. Křivánek 2015

slide-5
SLIDE 5

 Bidirectional Reflectance Distribution Function

dwi Lr(wo) qo n Li(wi) qi

] sr [ d cos ) ( ) ( d ) (

1 i i i i

  • r
  • i

    w q w w w w L L fr

BRDF – Formal definition

„incoming“ „outgoing“ „reflected“

5

slide-6
SLIDE 6

BRDF

 Mathematical model of the reflection properties of a

surface

 Intuition

 Value of a BRDF = probability density,

describing the event that a light energy “packet”, or “photon”, coming from direction wi gets reflected to the direction wo.

 Range:

   , ) (

  • i

w w

r

f

CG III (NPGR010) - J. Křivánek 2015

slide-7
SLIDE 7

BRDF

Westin et al. Predicting Reflectance Functions from Complex Surfaces, SIGGRAPH 1992.

 The BRDF is a model of the bulk behavior of light

  • n the microstructure when viewed from distance

CG III (NPGR010) - J. Křivánek 2015

slide-8
SLIDE 8

BRDF properties

 Helmholz reciprocity (always holds in nature, a

physically-plausible BRDF model must follow it)

CG III (NPGR010) - J. Křivánek 2015

) ( ) (

i

  • i

w w w w   

r r

f f

slide-9
SLIDE 9

BRDF properties

 Energy conservation

 A patch of surface cannot reflect more light energy than it

receives

CG III (NPGR010) - J. Křivánek 2015

slide-10
SLIDE 10

BRDF (an)isotropy

 Isotropic BRDF = invariant to a rotation around

surface normal

CG III (NPGR010) - J. Křivánek 2015

     

i

  • i
  • i

i

  • i

i

, , , ; , , ; ,   q q   q   q  q  q     

r r r

f f f

slide-11
SLIDE 11

Surfaces with anisotropic BRDF

CG III (NPGR010) - J. Křivánek 2015

slide-12
SLIDE 12

Anisotropic BRDF

 Different microscopic roughness in different directions

(brushed metals, fabrics, …)

CG III (NPGR010) - J. Křivánek 2015

slide-13
SLIDE 13

Isotropic vs. anisotropic BRDF

 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, V, N)

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

slide-14
SLIDE 14

Reflection equation

 A.k.a. reflectance equation, illumination integral,

OVTIGRE (“outgoing, vacuum, time-invariant, gray radiance

equation”)

 “How much total light gets reflected in the direction wo?“  From the definition of the BRDF, we have

i r

L f L w q w w w w d cos ) ( ) ( ) ( d

i i i

  • i
  • r

   

CG III (NPGR010) - J. Křivánek 2015

slide-15
SLIDE 15

Reflection equation

 Total reflected radiance: integrate contributions of incident

radiance, weighted by the BRDF, over the hemisphere

   

) ( i i

  • i

i i

  • r

d cos ) ( ) ( ) (

x H r

f L L w q w w w w

upper hemisphere over x

CG III (NPGR010) - J. Křivánek 2015

=

slide-16
SLIDE 16

Reflection equation

 Evaluating the reflectance equation renders images!!!

 Direct illumination 

Environment maps

Area light sources

etc.

CG III (NPGR010) - J. Křivánek 2015

slide-17
SLIDE 17

Energy conservation – More rigorous

 Reflected flux per unit area (i.e. radiosity B) cannot be

larger than the incoming flux per unit surface area (i.e. irradiance E).

CG III (NPGR010) - J. Křivánek 2015

 

1 cos ) ( cos cos ) ( ) ( cos ) ( cos ) (

  • i

     

    

i i i i

  • i

i i i r i i i i

  • r

d L d d L f d L d L E B w q w w q w q w w w w q w w q w

slide-18
SLIDE 18

Surface appearance and the BRDF

18

Appearance BRDF lobe (for four different viewing directions)

Souce: Ngan et al. Experimental analysis of BRDF models, http://people.csail.mit.edu/addy/research/brdf/

slide-19
SLIDE 19

Surface appearance and the BRDF

19

Appearance BRDF lobe (for four different viewing directions)

Souce: Ngan et al. Experimental analysis of BRDF models, http://people.csail.mit.edu/addy/research/brdf/

slide-20
SLIDE 20

Surface appearance and the BRDF

20

Appearance BRDF lobe (for four different viewing directions)

Souce: Ngan et al. Experimental analysis of BRDF models, http://people.csail.mit.edu/addy/research/brdf/

slide-21
SLIDE 21

Surface appearance and the BRDF

21

Appearance BRDF lobe (for four different viewing directions)

Souce: Ngan et al. Experimental analysis of BRDF models, http://people.csail.mit.edu/addy/research/brdf/

slide-22
SLIDE 22

Reflectance

 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

illuminated by the unit, uniform incoming radiance.

  

) ( i i

  • i
  • d

cos ) ( ) ( ) (

x H r

f a w q w w w w 

CG III (NPGR010) - J. Křivánek 2015

slide-23
SLIDE 23

Hemispherical-directional reflectance

 Nonnegative  Less than or equal to 1

(energy conservation)

 Equal to directional-hemispherical

reflectance

 What is the percentage of the energy coming from the

incoming direction wi that gets reflected (to any direction)?“

 Equality follows from the Helmholz reciprocity

 

1 , ) (

w 

CG III (NPGR010) - J. Křivánek 2015

slide-24
SLIDE 24

CG III (NPGR010) - J. Křivánek 2015

slide-25
SLIDE 25

CG III (NPGR010) - J. Křivánek 2015

slide-26
SLIDE 26

BRDF components

General BRDF Ideal diffuse (Lambertian) Ideal specular Glossy, directional diffuse

CG III (NPGR010) - J. Křivánek 2015

slide-27
SLIDE 27

Ideal diffuse reflection

slide-28
SLIDE 28

Ideal diffuse reflection

CG III (NPGR010) - J. Křivánek 2015

slide-29
SLIDE 29

Ideal diffuse reflection

 A.k.a. Lambertian reflection

Johann Heinrich Lambert, „Photometria“, 1760.

 Postulate: Light gets reflected to all directions with the

same probability, irrespective of the direction it came from

 The corresponding BRDF is a constant function

(independent of wi , wo)

d r d r

f f

,

  • i

,

) (  w w

CG III (NPGR010) - J. Křivánek 2015

slide-30
SLIDE 30

Ideal diffuse reflection

 Reflection on a Lambertian surface:  View independent appearance

 Outgoing radiance Lo is independent of wo

 Reflectance (derive)

E f L f L

d r H d r , ) ( i i i i ,

  • d

cos ) ( ) (  

x

w q w w

d r d

f ,   

irradiance

CG III (NPGR010) - J. Křivánek 2015

slide-31
SLIDE 31

Ideal diffuse reflection

 Mathematical idealization that does not exist in nature  The actual behavior of natural materials deviates from

the Lambertian assumption especially for grazing incidence angles

CG III (NPGR010) - J. Křivánek 2015

slide-32
SLIDE 32

White-out conditions

 Under a covered sky we cannot tell the shape of a terrain

covered by snow

 We do not have this problem

close to a localized light source.

 Why?

CG III (NPGR010) - J. Křivánek 2015

slide-33
SLIDE 33

White-out conditions

 We assume sky radiance independent of direction

(covered sky)

 We also assume Lambertian reflection on snow  Reflected radiance given by:

CG III (NPGR010) - J. Křivánek 2015

sky i i

) , ( L L  w x

sky i snow snow

  • L

L

d

  

White-out!!!

slide-34
SLIDE 34

Ideal mirror reflection

slide-35
SLIDE 35

Ideal mirror reflection

CG III (NPGR010) - J. Křivánek 2015

slide-36
SLIDE 36

CG III (NPGR010) - J. Křivánek 2015

slide-37
SLIDE 37

Nishino, Nayar: Eyes for Relighting, SIGGRAPH 2004

CG III (NPGR010) - J. Křivánek 2015

slide-38
SLIDE 38

The law of reflection

 Direction of the reflected ray (derive the formula)

CG III (NPGR010) - J. Křivánek 2015

i i

  • w

w w    n n) ( 2 qo n qi qo  qi o  i +  mod 2

o i

slide-39
SLIDE 39

Digression: Dirac delta distribution

 Definition (informal):  The following holds for any f:  Delta distribution is not a function (otherwise the

integrals would = 0)

CG III (NPGR010) - J. Křivánek 2015 Image: Wikipedia

slide-40
SLIDE 40

BRDF of the ideal mirror

 BRDF of the ideal mirror is a Dirac delta distribution

CG III (NPGR010) - J. Křivánek 2015

) , ( ) ( ) , (

  • i

i

  • r

  q q  q   L R L

i

  • i
  • i

i

  • i

i ,

cos ) ( ) cos (cos ) ( ) , ; , ( q     q q  q  q  q     R f

m r

qo n qi qo  qi

Fresnel reflectance (see below) We want:

slide-41
SLIDE 41

BRDF of the ideal mirror

 BRDF of the ideal mirror is a Dirac delta distribution  Verification:

CG III (NPGR010) - J. Křivánek 2015

) , ( ) ( cos ) , ( cos ) ( ) cos (cos ) ( cos (.) (.) ) , (

r r i i i i i i i i

  • i
  • i

i i i i ,

  • r

  q q w q  q q     q q  q w q  q       

 

L R d L R d L f L

m r

slide-42
SLIDE 42

CG III (NPGR010) - J. Křivánek 2015

slide-43
SLIDE 43

Ideal refraction

slide-44
SLIDE 44

Ideal refraction

CG III (NPGR010) - J. Křivánek 2015

slide-45
SLIDE 45

hi ho wi wo

Ideal refraction

 Index of refraction h

 Water 1.33, glass 1.6, diamond 2.4  Often depends on the wavelength

 Snell’s law

  • i

i

q h q h sin sin 

CG III (NPGR010) - J. Křivánek 2015

slide-46
SLIDE 46

Ideal refraction

 Direction of the refracted ray:

 n

) cos 1 ( 1 cos

i 2 2 io i io i io

  • q

h q h w h w      

  • i

io

h h h 

if < 0, total internal reflection Critical angle:

        

i

  • c

i,

arcsin h h q

Image: wikipedia

CG III (NPGR010) - J. Křivánek 2015

slide-47
SLIDE 47

Ideal refraction

 Change of radiance

 Follows from the conservation of energy (flux)  When going from an optically rarer to a more dense

medium, light energy gets “compressed” in directions => higher energy density => higher radiance

2 2 i

  • i
  • L

L h h 

CG III (NPGR010) - J. Křivánek 2015

slide-48
SLIDE 48

 BRDF of the ideal refraction is a delta distribution:

BRDF of ideal refraction

CG III (NPGR010) - J. Křivánek 2015

i

  • i
  • i

i i 2 i 2

  • i

i

cos ) ( ) sin sin ( )) ( 1 ( ) , ; , ( q     q h q h  q h h  q  q      R ft

Fresnel transmittance Change of radiance Snell’s law Refracted ray stays in the incidence plane

slide-49
SLIDE 49

Fresnel equations

slide-50
SLIDE 50

Fresnel equations

 Read [frenel]  Ratio of the transmitted and reflected light depends on

the incident direction

 From above – more transmission  From the side – more reflection

 Extremely important for realistic rendering of glass,

water and other smooth dielectrics

 Not to be confused with

Fresnel lenses (used in lighthouses)

CG III (NPGR010) - J. Křivánek 2015

slide-51
SLIDE 51

Fresnel equations

 Dielectrics

CG III (NPGR010) - J. Křivánek 2015

Image: Wikipedia

slide-52
SLIDE 52

Fresnel equations

 Dielectrics

CG III (NPGR010) - J. Křivánek 2015

slide-53
SLIDE 53

Fresnel equations

From above

  • little reflection
  • more transmission

From the side

  • little transmission
  • more reflection

Try for yourself!!!

CG III (NPGR010) - J. Křivánek 2015

slide-54
SLIDE 54

Fresnel equations

 Metals

CG III (NPGR010) - J. Křivánek 2015

slide-55
SLIDE 55

CG III (NPGR010) - J. Křivánek 2015

slide-56
SLIDE 56

CG III (NPGR010) - J. Křivánek 2015

slide-57
SLIDE 57

Glossy reflection

slide-58
SLIDE 58

Glossy reflection

 Neither ideal diffuse nor ideal mirror  All real materials in fact fall in this

category

CG III (NPGR010) - J. Křivánek 2015

slide-59
SLIDE 59

Surface roughness and blurred reflections

 The rougher the blurrier

Microscopic surface roughness

CG III (NPGR010) - J. Křivánek 2015

slide-60
SLIDE 60

CG III (NPGR010) - J. Křivánek 2015

slide-61
SLIDE 61

BRDF models

slide-62
SLIDE 62

BRDF modeling

BRDF is a model

  • f the bulk

behavior of light when viewing a surface from distance

BRDF models

Empirical

Physically based

Approximation

  • f measured

data

(a.k.a meso-scale)

CG III (NPGR010) - J. Křivánek 2015

slide-63
SLIDE 63

Empirical BRDF models

 An arbitrary formula that takes wi and wo as arguments  wi and wo are sometimes denoted L (Light direction) a V

(Viewing direction)

 Example: Phong model  Arbitrary shading calculations (shaders)

CG III (NPGR010) - J. Křivánek 2015

slide-64
SLIDE 64

Phong shading model

 

n s d

R V k L N k I C ) ( ) (     L R V N L N L N R    ) ( 2

CG III (NPGR010) - J. Křivánek 2015

slide-65
SLIDE 65

Phong shading model in the radiometric notation

 

r n s d

k k L L q q w w cos cos ) ( ) (

i i i

i i

  • r

w w w q      n n r r ) ( 2 cos

BRDF

i i

  • r

L L f q cos 

i r n s d Orig Phong r

k k f q q cos cos   Original shading model

wi r wo n

CG III (NPGR010) - J. Křivánek 2015

slide-66
SLIDE 66

Physically-plausible Phong BRDF

 Modification to ensure reciprocity (symmetry) and

energy conservation

 Energy conserved when  It is still an empirical formula (i.e. it does not follow from

physical considerations), but at least it fulfills the basic properties of a BRDF

r n s d r

n f q     cos 2 2

modif Phong

   1  

s d

 

CG III (NPGR010) - J. Křivánek 2015

slide-67
SLIDE 67

Physically-plausible BRDF models

 E.g. Torrance-Sparrow / Cook-Torrance model  Based on the microfacet theory

CG III (NPGR010) - J. Křivánek 2015

slide-68
SLIDE 68

CG III (NPGR010) - J. Křivánek 2015

slide-69
SLIDE 69

Microfacet BRDF

 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

microgeometry (as opposed to “because it looks good”- approach used for the Phong model)

CG III (NPGR010) - J. Křivánek 2015

slide-70
SLIDE 70

Microfacet BRDF

 Assumes that the macrosurface consists of randomly

  • riented microfacets

 We assume that each microfacet behaves as an ideal

mirror.

 We consider 3 phenomena:

Shadowing Masking Reflection

CG III (NPGR010) - J. Křivánek 2015

slide-71
SLIDE 71

Microfacet BRDF

Microfacet theory [Cook et Torrance 1982]

A perfect mirror

Reflection in a single direction

Outgoing light visible surface normal aligned with the half vector

Half Vector: 𝐼 =

𝑀+𝑊 𝑀+𝑊

Aggregation of micro-mirrors (micro-facets)

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

slide-72
SLIDE 72

Microfacet BRDF

( ) ( , ) ( ) 4cos( )cos( )

i i r h i r

F G D f q w w q q q 

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

slide-73
SLIDE 73

Approximation of measured data

 We can fit any BRDF model to the data  Some BRDF models have been specifically designed for

the purpose of fitting measured data, e.g. Ward BRDF, Lafortune BRDF

 Nonlinear optimization required to find the BRDF

parameters

CG III (NPGR010) - J. Křivánek 2015

slide-74
SLIDE 74

BRDF measurements – Gonio-reflectometer

CG III (NPGR010) - J. Křivánek 2015

UTIA University of Bonn Stanford

slide-75
SLIDE 75

Measured Material

 Techniques for speeding measurements

Mirrors

Objects coated by the material:

Sphere [Matusik et al 2003]

Cylinders [Ngan et al 2005]

10/24/2017 Efficient Representation for Measured Reflectance 75

[Matusik et al 2003]

slide-76
SLIDE 76

Surface appearance and the BRDF

76

Appearance BRDF lobe (for four different viewing directions)

Souce: Ngan et al. Experimental analysis of BRDF models, http://people.csail.mit.edu/addy/research/brdf/

slide-77
SLIDE 77

Surface appearance and the BRDF

77

Appearance BRDF lobe (for four different viewing directions)

Souce: Ngan et al. Experimental analysis of BRDF models, http://people.csail.mit.edu/addy/research/brdf/

slide-78
SLIDE 78

Surface appearance and the BRDF

78

Appearance BRDF lobe (for four different viewing directions)

Souce: Ngan et al. Experimental analysis of BRDF models, http://people.csail.mit.edu/addy/research/brdf/

slide-79
SLIDE 79

Surface appearance and the BRDF

79

Appearance BRDF lobe (for four different viewing directions)

Souce: Ngan et al. Experimental analysis of BRDF models, http://people.csail.mit.edu/addy/research/brdf/

slide-80
SLIDE 80

BRDF, BTDF, BSDF: What’s up with all these abbreviations?

 BTDF

 Bidirectional transmittance

distribution function

 Described light transmission

 BSDF = BRDF+BTDF

 Bidirectional scattering

distribution function

CG III (NPGR010) - J. Křivánek 2015

slide-81
SLIDE 81

SBRDF, BTF

 SV-BRDF … Spatially Varying BRDF

 BRDF parameters are spatially varying (can be given by a

surface texture)

 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

slide-82
SLIDE 82

BSSRDF

 BRDF

 Light arriving at a point is reflected/transmitted at the

same point

 No subsurface scattering considered

 BSSRDF

 Bi-directional surface scattering reflectance distribution

function

 Takes into account

scattering of light under the surface

CG III (NPGR010) - J. Křivánek 2015

slide-83
SLIDE 83

BSSRDF

 Sub-surface scattering makes surfaces looks “softer”

BRDF BSSRDF

CG III (NPGR010) - J. Křivánek 2015

slide-84
SLIDE 84

BSSRDF

BRDF BSSRDF

CG III (NPGR010) - J. Křivánek 2015