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

Post on 07-Sep-2018

222 views 0 download

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

CS 775: Advanced Computer Graphics

Lecture 7 : The BRDF

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

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)

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)

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 ()

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

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=ρπ

ρ

ρ

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?

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 )

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

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

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

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

CS 775: Lecture 7 Parag Chaudhuri, 2012

Fresnel Reflectance

● For a typical dielectric

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

η=1.5

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

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

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).  

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

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

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]

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

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

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