CS 775 - Advanced Computer Graphics - IIT Bombayparagc/teaching/2012/cs775/lectures/07... · CS...

23
CS 775: Advanced Computer Graphics Lecture 7 : The BRDF

Transcript of CS 775 - Advanced Computer Graphics - IIT Bombayparagc/teaching/2012/cs775/lectures/07... · CS...

Page 1: CS 775 - Advanced Computer Graphics - IIT Bombayparagc/teaching/2012/cs775/lectures/07... · CS 775: Lecture 7 Parag Chaudhuri, 2012 Microfacet BRDFs ωi In BlinnPhong, the distribution

CS 775: Advanced Computer Graphics

Lecture 7 : The BRDF

Page 2: CS 775 - Advanced Computer Graphics - IIT Bombayparagc/teaching/2012/cs775/lectures/07... · CS 775: Lecture 7 Parag Chaudhuri, 2012 Microfacet BRDFs ωi In BlinnPhong, the distribution

CS 775: Lecture 7 Parag Chaudhuri, 2012

The BRDF

ωoωi

n⃗

p

Differential Irradiance at p is dE ( p ,ωi)=Li( p ,ωi)cosθid ωi

Page 3: CS 775 - Advanced Computer Graphics - IIT Bombayparagc/teaching/2012/cs775/lectures/07... · CS 775: Lecture 7 Parag Chaudhuri, 2012 Microfacet BRDFs ωi In BlinnPhong, the distribution

CS 775: Lecture 7 Parag Chaudhuri, 2012

The BRDF

ωoωi

n⃗

p

Differential Irradiance at p is dE ( p ,ωi)=Li( p ,ωi)cosθid ωi

Reflected differential radiance is then given by dLo( p ,ωo)∝dE ( p ,ωi)

Page 4: CS 775 - Advanced Computer Graphics - IIT Bombayparagc/teaching/2012/cs775/lectures/07... · CS 775: Lecture 7 Parag Chaudhuri, 2012 Microfacet BRDFs ωi In BlinnPhong, the distribution

CS 775: Lecture 7 Parag Chaudhuri, 2012

The BRDF

ωoωi

n⃗

p

Differential Irradiance at p is dE ( p ,ωi)=Li( p ,ωi)cosθid ωi

Reflected differential radiance is then given by dLo( p ,ωo)∝dE ( p ,ωi)

f r ( p ,ωo ,ωi)=dLo( p ,ωo)

dE ( p ,ωi)

Page 5: CS 775 - Advanced Computer Graphics - IIT Bombayparagc/teaching/2012/cs775/lectures/07... · CS 775: Lecture 7 Parag Chaudhuri, 2012 Microfacet BRDFs ωi In BlinnPhong, the distribution

CS 775: Lecture 7 Parag Chaudhuri, 2012

The BRDF

● Reciprocity

● Energy Conservationf r ( p ,ωo ,ωi)=

dLo( p ,ωo)

dE ( p ,ωi)

f r ( p ,ωo ,ωi)= f r ( p.ωi ,ωo)

∫H 2(n⃗)f r ( p ,ωo ,ω ' )cosθ ' d ω '≤1

Lo( p ,ωo)=∫S 2 f ( p ,ωo ,ωi) Li( p ,ωi)∣cosθi∣d ωi

● Consider a general over the sphere of all directions and we get the BSDF (=BRDF+BTDF)

f ()

Page 6: CS 775 - Advanced Computer Graphics - IIT Bombayparagc/teaching/2012/cs775/lectures/07... · CS 775: Lecture 7 Parag Chaudhuri, 2012 Microfacet BRDFs ωi In BlinnPhong, the distribution

CS 775: Lecture 7 Parag Chaudhuri, 2012

The BRDF

● Sources

– Measured Data

– Phenomenological Models

– Simulation

– Physical (Wave) Optics

– Geometric optics

● Types of Surfaces

– Diffuse

– Glossy Specular

– Perfect Specular

– Retro-reflectivehttp://www.lamrug.org/resources/indirectips.html

Page 7: CS 775 - Advanced Computer Graphics - IIT Bombayparagc/teaching/2012/cs775/lectures/07... · CS 775: Lecture 7 Parag Chaudhuri, 2012 Microfacet BRDFs ωi In BlinnPhong, the distribution

CS 775: Lecture 7 Parag Chaudhuri, 2012

The Ideal Diffuse BRDF

Let f r ( p ,ωo ,ωi)=k d

∫H 2(n⃗)f ( p ,ωo ,ωi)cosθi d ωi=ρ

● Assume BRDF reflects a fraction of the incoming light

● The quantity is known as the albedo of the surface.

k d∫0

∫0

π /2cosθisin θid θi d ϕi=ρ

2π k d∫0

π/2cosθi sinθid θi=ρ

k d=ρπ

ρ

ρ

Page 8: CS 775 - Advanced Computer Graphics - IIT Bombayparagc/teaching/2012/cs775/lectures/07... · CS 775: Lecture 7 Parag Chaudhuri, 2012 Microfacet BRDFs ωi In BlinnPhong, the distribution

CS 775: Lecture 7 Parag Chaudhuri, 2012

The Ideal Diffuse BRDF

Let f r ( p ,ωo ,ωi)=k d

∫H 2(n⃗)f ( p ,ωo ,ωi)cosθi d ωi=ρ

● Assume BRDF reflects a fraction of the incoming light

● The quantity is known as the albedo of the surface.

k d∫0

∫0

π /2cosθisin θid θi d ϕi=ρ

2π k d∫0

π/2cosθi sinθid θi=ρ

k d=ρπ

ρ

ρ

N−L

Remember this?

Page 9: CS 775 - Advanced Computer Graphics - IIT Bombayparagc/teaching/2012/cs775/lectures/07... · CS 775: Lecture 7 Parag Chaudhuri, 2012 Microfacet BRDFs ωi In BlinnPhong, the distribution

CS 775: Lecture 7 Parag Chaudhuri, 2012

The Ideal Mirror BRDF

If we assume ∫H 2( n⃗)f ( p ,ωo ,ωi)cosθid ωi=F r (ωi)

● BRDF is zero everywhere except where

and we know ∫ f ( x)δ( x−xo)dx= f ( xo)

then it is easy to see that putting f r ( p ,ωo ,ωi)=F r (ωi)δ(ωi−R(ωo , n⃗))

cosθi

θo=θi

ϕo=ϕi+π

gives us Lo( p ,ωo)=∫H 2( n⃗)f r ( p ,ωo ,ωi)Li ( p ,ωi)cosθi dωi

=F r (ωr )Li ( p , R (ωo , n⃗))=F r (ωr)L i( p ,ωr )

Page 10: CS 775 - Advanced Computer Graphics - IIT Bombayparagc/teaching/2012/cs775/lectures/07... · CS 775: Lecture 7 Parag Chaudhuri, 2012 Microfacet BRDFs ωi In BlinnPhong, the distribution

CS 775: Lecture 7 Parag Chaudhuri, 2012

Fresnel Reflectance

● For conducting specular surfaces, the amount of reflected light is given by

● Obtained from solution to Maxwell's equation for reflection off smooth surfaces.

r∥=(η2+k 2)cosθi

2−2ηcosθi+1

(η2+k 2)cosθi2+2ηcosθi+1

for parallel polarized light

r ⊥=(η2+k 2)cosθi

2−2ηcosθi+cosθi2

(η2+k 2)cosθi2+2ηcosθi+cosθi

2for perpendicular polarized light

F r=12(r∥

2+r ⊥

2) for unpolarized light

Page 11: CS 775 - Advanced Computer Graphics - IIT Bombayparagc/teaching/2012/cs775/lectures/07... · CS 775: Lecture 7 Parag Chaudhuri, 2012 Microfacet BRDFs ωi In BlinnPhong, the distribution

CS 775: Lecture 7 Parag Chaudhuri, 2012

Fresnel Reflectance

● Fresnel Reflectance for pure aluminum at 550 nanometers

http://www.graphics.cornell.edu/~westin/misc/fresnel.html

Page 12: CS 775 - Advanced Computer Graphics - IIT Bombayparagc/teaching/2012/cs775/lectures/07... · CS 775: Lecture 7 Parag Chaudhuri, 2012 Microfacet BRDFs ωi In BlinnPhong, the distribution

CS 775: Lecture 7 Parag Chaudhuri, 2012

Specular Transmittance

● BTDF is zero everywhere except where

f t ( p ,ωo ,ωi)=ηo

2

ηi2 (1−F r (ωi))

δ(ωi−T (ωo , n⃗))

∣cosθi∣

cosθod θocosθi d θi

=ηiηo

Page 13: CS 775 - Advanced Computer Graphics - IIT Bombayparagc/teaching/2012/cs775/lectures/07... · CS 775: Lecture 7 Parag Chaudhuri, 2012 Microfacet BRDFs ωi In BlinnPhong, the distribution

CS 775: Lecture 7 Parag Chaudhuri, 2012

Fresnel Reflectance

● For dielectric specular surfaces, the amount of reflected light is given by

r∥=ηt cosθi−ηi cosθtηt cosθi+ηi cosθt

for parallel polarized light

r ⊥=ηi cosθi−ηt cosθtηi cosθi+ηt cosθt

for perpendicular polarized light

F r=12(r∥

2+r ⊥

2) for unpolarized light

Page 14: CS 775 - Advanced Computer Graphics - IIT Bombayparagc/teaching/2012/cs775/lectures/07... · CS 775: Lecture 7 Parag Chaudhuri, 2012 Microfacet BRDFs ωi In BlinnPhong, the distribution

CS 775: Lecture 7 Parag Chaudhuri, 2012

Fresnel Reflectance

● For a typical dielectric

http://www.graphics.cornell.edu/~westin/misc/fresnel.html

η=1.5

Page 15: CS 775 - Advanced Computer Graphics - IIT Bombayparagc/teaching/2012/cs775/lectures/07... · CS 775: Lecture 7 Parag Chaudhuri, 2012 Microfacet BRDFs ωi In BlinnPhong, the distribution

CS 775: Lecture 7 Parag Chaudhuri, 2012

Glossy BRDF

f Phong=k s (ωo . R (ωi , n̂))g

ωi

f Blinn−Phong=k s ' (ωhalf . n̂)h

ωr

ωo

n⃗

ωi

ωr

ωhalf

n⃗

Phenomenological

Also, phenomenological but gives less error

Experimental Validation of Analytical BRDF Models, Addy Ngan Fredo Durand, Wojciech Matusik , Technical Sketch, SIGGRAPH2004

ωo

Page 16: CS 775 - Advanced Computer Graphics - IIT Bombayparagc/teaching/2012/cs775/lectures/07... · CS 775: Lecture 7 Parag Chaudhuri, 2012 Microfacet BRDFs ωi In BlinnPhong, the distribution

CS 775: Lecture 7 Parag Chaudhuri, 2012

Glossy BRDFs

Experimental Validation of Analytical BRDF Models, Addy Ngan Fredo Durand, Wojciech Matusik , Technical Sketch, SIGGRAPH2004

PhongBlinn­Phong

Page 17: CS 775 - Advanced Computer Graphics - IIT Bombayparagc/teaching/2012/cs775/lectures/07... · CS 775: Lecture 7 Parag Chaudhuri, 2012 Microfacet BRDFs ωi In BlinnPhong, the distribution

CS 775: Lecture 7 Parag Chaudhuri, 2012

Microfacet BRDFs

n⃗ f

Described by a function giving the distribution of microfacet normals,      with respect to the surface normal      . Greater variation indicates a rougher surface.    

n⃗

n⃗ fn⃗

Also, necessary to describe the BRDF for the individual facets.

First described by Torrance­Sparrow (1967).  

Page 18: CS 775 - Advanced Computer Graphics - IIT Bombayparagc/teaching/2012/cs775/lectures/07... · CS 775: Lecture 7 Parag Chaudhuri, 2012 Microfacet BRDFs ωi In BlinnPhong, the distribution

CS 775: Lecture 7 Parag Chaudhuri, 2012

Microfacet BRDFs

ωi

In Blinn­Phong, the distribution of microfacet normals is approximated by an exponential falloff [Blinn 1977].

n⃗

The most likely orientation in this model is in the direction of the surface normal direction, falling off to no microfacets oriented perpendicular to the normal. For smooth surfaces the fall of is fast compared to a slow fall of for rough surfaces.

D(ωh)∝(ωh⋅n̂)h

ωo

ωh

D(ωh)=h+22π

(ωh⋅n̂)h

Page 19: CS 775 - Advanced Computer Graphics - IIT Bombayparagc/teaching/2012/cs775/lectures/07... · CS 775: Lecture 7 Parag Chaudhuri, 2012 Microfacet BRDFs ωi In BlinnPhong, the distribution

CS 775: Lecture 7 Parag Chaudhuri, 2012

Microfacet BRDFs

ωi

The complete Torrence­Sparrow BRDF isn⃗

The most likely orientation in this model is in the direction of the surface normal direction, falling off to no microfacets oriented perpendicular to the normal. For smooth surfaces the fall of is fast compared to a slow fall of for rough surfaces.

The model also assumes facets are along infinitely long V­shaped grooves.

f ( p ,ωo ,ωi)=D(ωh)G(ωo ,ωi)F r (ωi)

4 cosθocosθi

ωo

ωh

D(ωh) gives microfacet distribution

G (ωo ,ωi) resolves visibility between a given pair of directions

F r (ωi) is the Fresnel Term

Page 20: CS 775 - Advanced Computer Graphics - IIT Bombayparagc/teaching/2012/cs775/lectures/07... · CS 775: Lecture 7 Parag Chaudhuri, 2012 Microfacet BRDFs ωi In BlinnPhong, the distribution

CS 775: Lecture 7 Parag Chaudhuri, 2012

Microfacet BRDFs

Experimental Validation of Analytical BRDF Models, Addy Ngan Fredo Durand, Wojciech Matusik , Technical Sketch, SIGGRAPH2004

[2000]

[1981,1982]

[1977]

[1992][1997]

Page 21: CS 775 - Advanced Computer Graphics - IIT Bombayparagc/teaching/2012/cs775/lectures/07... · CS 775: Lecture 7 Parag Chaudhuri, 2012 Microfacet BRDFs ωi In BlinnPhong, the distribution

CS 775: Lecture 7 Parag Chaudhuri, 2012

Microfacet BRDFs

Anisotropic BRDFs

http://www.evermotion.org/tutorials/show/7875/anisotropic­shader­tutorial­using­vray­1­5­final­sp­1

Page 22: CS 775 - Advanced Computer Graphics - IIT Bombayparagc/teaching/2012/cs775/lectures/07... · CS 775: Lecture 7 Parag Chaudhuri, 2012 Microfacet BRDFs ωi In BlinnPhong, the distribution

CS 775: Lecture 7 Parag Chaudhuri, 2012

Microfacet BRDFs

● Oren-Nayar Diffuse BRDF [1994]

– Symmetric V-shaped grooves

– Gaussian Distribution of Microfacets

– Each facet is perfectly Lambertian

http://en.wikipedia.org/wiki/Oren–Nayar_reflectance_model

http://www.larrygritz.com/arman/materials.html

Oren­Nayar Ideal Diffuse

Page 23: CS 775 - Advanced Computer Graphics - IIT Bombayparagc/teaching/2012/cs775/lectures/07... · CS 775: Lecture 7 Parag Chaudhuri, 2012 Microfacet BRDFs ωi In BlinnPhong, the distribution

CS 775: Lecture 7 Parag Chaudhuri, 2012

The Rendering Equation

● Now that we know the 4D-5D BRDFs, we can write the rendering equation as:

● Next question: How to solve the rendering equation for all points in the environment.

Lo( p ,ωo)=Le( p ,ωo)+∫Ω

f r ( p ,ωo ,ωi)L i ( p ,ωi)cosθi d ωi