Microfacet models for reflection and refractionfor reflection and refraction Steve Marschner Cornell...

51
Microfacet models for reflection and refraction Steve Marschner Cornell University CS 6630 Spring 2012 (based on presentation for Walter, Marschner, Li, and Torrance EGSR ’07) Tuesday, February 14, 2012

Transcript of Microfacet models for reflection and refractionfor reflection and refraction Steve Marschner Cornell...

Page 1: Microfacet models for reflection and refractionfor reflection and refraction Steve Marschner Cornell University CS 6630 Spring 2012 (based on presentation for Walter, Marschner, Li,

Microfacet modelsfor reflection and refraction

Steve Marschner

Cornell University CS 6630 Spring 2012

(based on presentation forWalter, Marschner, Li, and Torrance EGSR ’07)

Tuesday, February 14, 2012

Page 2: Microfacet models for reflection and refractionfor reflection and refraction Steve Marschner Cornell University CS 6630 Spring 2012 (based on presentation for Walter, Marschner, Li,

air

dielectric

microsurface macrosurface

Microfacet scattering modelsRough dielectric surface• smooth at wavelength scale• rough at microscale• !at at macroscale

Tuesday, February 14, 2012

Page 3: Microfacet models for reflection and refractionfor reflection and refraction Steve Marschner Cornell University CS 6630 Spring 2012 (based on presentation for Walter, Marschner, Li,

Microfacet scattering models

Incident irradiance Ei illuminates macrosurface area dA from direction i. i

dA

Tuesday, February 14, 2012

Page 4: Microfacet models for reflection and refractionfor reflection and refraction Steve Marschner Cornell University CS 6630 Spring 2012 (based on presentation for Walter, Marschner, Li,

Microfacet scattering models

Incident irradiance Ei illuminates macrosurface area dA from direction i.

Scattered radiance Lr or Lt measured in direction o in solid angle dωo.

dωo

oi

Tuesday, February 14, 2012

Page 5: Microfacet models for reflection and refractionfor reflection and refraction Steve Marschner Cornell University CS 6630 Spring 2012 (based on presentation for Walter, Marschner, Li,

Microfacet scattering models

Incident irradiance Ei illuminates macrosurface area dA from direction i.

Scattered radiance Lr or Lt measured in direction o in solid angle dωo.

dωo

oi

fs(i,o) =Lr,t

Ei

Bidirectional Scattering Distribution Function

Tuesday, February 14, 2012

Page 6: Microfacet models for reflection and refractionfor reflection and refraction Steve Marschner Cornell University CS 6630 Spring 2012 (based on presentation for Walter, Marschner, Li,

io

o

G(i,o,m)shadowing–masking

D(m)normal distribution

h(i,o)“half-vector” function

ρ(i,o)attenuation

Tuesday, February 14, 2012

Page 7: Microfacet models for reflection and refractionfor reflection and refraction Steve Marschner Cornell University CS 6630 Spring 2012 (based on presentation for Walter, Marschner, Li,

Gives the one microsurface normal m that will scatter light from i to o. i

o

o

G(i,o,m)shadowing–masking

D(m)normal distribution

h(i,o)“half-vector” function

ρ(i,o)attenuation

m = h(i,o)

Tuesday, February 14, 2012

Page 8: Microfacet models for reflection and refractionfor reflection and refraction Steve Marschner Cornell University CS 6630 Spring 2012 (based on presentation for Walter, Marschner, Li,

Gives the one microsurface normal m that will scatter light from i to o. i

The size of the set of relevant normals dωm

relative to the receiving solid angle dωo is determined by h.

G(i,o,m)shadowing–masking

D(m)normal distribution

h(i,o)“half-vector” function

ρ(i,o)attenuation

dωo

dωo

dωm

Tuesday, February 14, 2012

Page 9: Microfacet models for reflection and refractionfor reflection and refraction Steve Marschner Cornell University CS 6630 Spring 2012 (based on presentation for Walter, Marschner, Li,

Measures density of microsurface area with respect to microsurface normal.

dA

G(i,o,m)shadowing–masking

D(m)normal distribution

h(i,o)“half-vector” function

ρ(i,o)attenuation

mi

Tuesday, February 14, 2012

Page 10: Microfacet models for reflection and refractionfor reflection and refraction Steve Marschner Cornell University CS 6630 Spring 2012 (based on presentation for Walter, Marschner, Li,

Measures density of microsurface area with respect to microsurface normal.

dA

G(i,o,m)shadowing–masking

D(m)normal distribution

h(i,o)“half-vector” function

ρ(i,o)attenuation

mi

Tuesday, February 14, 2012

Page 11: Microfacet models for reflection and refractionfor reflection and refraction Steve Marschner Cornell University CS 6630 Spring 2012 (based on presentation for Walter, Marschner, Li,

Measures density of microsurface area with respect to microsurface normal.

dAm = D(m) dωm dA

dAdAm

G(i,o,m)shadowing–masking

D(m)normal distribution

h(i,o)“half-vector” function

ρ(i,o)attenuation

dωm

mi

The ratio of relevant microsurface area dAm to macrosurface area dA is D(m)dωm.

Tuesday, February 14, 2012

Page 12: Microfacet models for reflection and refractionfor reflection and refraction Steve Marschner Cornell University CS 6630 Spring 2012 (based on presentation for Walter, Marschner, Li,

Measures the fraction of points with microsurface normal m that are visible in directions i and o.

G(i,o,m)shadowing–masking

D(m)normal distribution

h(i,o)“half-vector” function

ρ(i,o)attenuation

dAm = D(m) dωm dA

io

o

Tuesday, February 14, 2012

Page 13: Microfacet models for reflection and refractionfor reflection and refraction Steve Marschner Cornell University CS 6630 Spring 2012 (based on presentation for Walter, Marschner, Li,

Measures the fraction of points with microsurface normal m that are visible in directions i and o.

G(i,o,m)shadowing–masking

D(m)normal distribution

h(i,o)“half-vector” function

ρ(i,o)attenuation

dAm = D(m) dωm dA

io

o

Tuesday, February 14, 2012

Page 14: Microfacet models for reflection and refractionfor reflection and refraction Steve Marschner Cornell University CS 6630 Spring 2012 (based on presentation for Walter, Marschner, Li,

Measures the fraction of points with microsurface normal m that are visible in directions i and o.

dAm = D(m) G(i,o,m) dωm dA

G(i,o,m)shadowing–masking

D(m)normal distribution

h(i,o)“half-vector” function

ρ(i,o)attenuation

io

o

Tuesday, February 14, 2012

Page 15: Microfacet models for reflection and refractionfor reflection and refraction Steve Marschner Cornell University CS 6630 Spring 2012 (based on presentation for Walter, Marschner, Li,

Measures the fraction of points with microsurface normal m that are visible in directions i and o.

dAm = D(m) G(i,o,m) dωm dA

G(i,o,m)shadowing–masking

D(m)normal distribution

h(i,o)“half-vector” function

ρ(i,o)attenuation

io

oWe now know the size of the scattering area, which determines how much light re!ects.

Tuesday, February 14, 2012

Page 16: Microfacet models for reflection and refractionfor reflection and refraction Steve Marschner Cornell University CS 6630 Spring 2012 (based on presentation for Walter, Marschner, Li,

Gives the fraction of the power incident on the scattering area dAm that is scattered.

Φi

Φo

Φo

G(i,o,m)shadowing–masking

D(m)normal distribution

h(i,o)“half-vector” function

ρ(i,o)attenuation

dAm = D(m) G(i,o,m) dωm dA

dΦmo =

|i · m||i · n| ρ(i,o) dAmdEi

Tuesday, February 14, 2012

Page 17: Microfacet models for reflection and refractionfor reflection and refraction Steve Marschner Cornell University CS 6630 Spring 2012 (based on presentation for Walter, Marschner, Li,

Gives the fraction of the power incident on the scattering area dAm that is scattered.

Φi

Φo

Φo

G(i,o,m)shadowing–masking

D(m)normal distribution

h(i,o)“half-vector” function

ρ(i,o)attenuation

dAm = D(m) G(i,o,m) dωm dA

This scattered power is related to the incident irradiance by the attenuation and the scattering area, projected in the incident direction.

dΦmo =

|i · m||i · n| ρ(i,o) dAmdEi

Tuesday, February 14, 2012

Page 18: Microfacet models for reflection and refractionfor reflection and refraction Steve Marschner Cornell University CS 6630 Spring 2012 (based on presentation for Walter, Marschner, Li,

G(i,o,m)shadowing–masking

D(m)normal distribution

h(i,o)“half-vector” function

ρ(i,o)attenuation

dAm = D(m) G(i,o,m) dωm dA

The BSDF is the ratio of scattered radiance to incident irradiance:

dΦmo =

|i · m||i · n| ρ(i,o) dAmdEi

fs(i,o) =dLo

dEi=

dΦmo /(dA |o · n| dωo)

dEi

Tuesday, February 14, 2012

Page 19: Microfacet models for reflection and refractionfor reflection and refraction Steve Marschner Cornell University CS 6630 Spring 2012 (based on presentation for Walter, Marschner, Li,

G(i,o,m)shadowing–masking

D(m)normal distribution

h(i,o)“half-vector” function

ρ(i,o)attenuation

dAm = D(m) G(i,o,m) dωm dA

The BSDF is the ratio of scattered radiance to incident irradiance:

fs(i,o) =|i · m|

|i · n| |o · n| ρ(i,o) D(m)G(i,o,m)dωm

dωo

dΦmo =

|i · m||i · n| ρ(i,o) dAmdEi

Tuesday, February 14, 2012

Page 20: Microfacet models for reflection and refractionfor reflection and refraction Steve Marschner Cornell University CS 6630 Spring 2012 (based on presentation for Walter, Marschner, Li,

G(i,o,m)shadowing–masking

D(m)normal distribution

h(i,o)“half-vector” function

ρ(i,o)attenuation

fs(i,o) =|i · m|

|i · n| |o · n| ρ(i,o) D(m)G(i,o,m)dωm

dωo

Tuesday, February 14, 2012

Page 21: Microfacet models for reflection and refractionfor reflection and refraction Steve Marschner Cornell University CS 6630 Spring 2012 (based on presentation for Walter, Marschner, Li,

G(i,o,m)shadowing–masking

D(m)normal distribution

h(i,o)“half-vector” function

ρ(i,o)attenuation

fs(i,o) =|i · m|

|i · n| |o · n| ρ(i,o) D(m)G(i,o,m)dωm

dωo

Fresnel re!ection

Tuesday, February 14, 2012

Page 22: Microfacet models for reflection and refractionfor reflection and refraction Steve Marschner Cornell University CS 6630 Spring 2012 (based on presentation for Walter, Marschner, Li,

G(i,o,m)shadowing–masking

D(m)normal distribution

h(i,o)“half-vector” function

ρ(i,o)attenuation

fs(i,o) =|i · m|

|i · n| |o · n| ρ(i,o) D(m)G(i,o,m)dωm

dωo

surface roughnessFresnel re!ection

Tuesday, February 14, 2012

Page 23: Microfacet models for reflection and refractionfor reflection and refraction Steve Marschner Cornell University CS 6630 Spring 2012 (based on presentation for Walter, Marschner, Li,

G(i,o,m)shadowing–masking

D(m)normal distribution

h(i,o)“half-vector” function

ρ(i,o)attenuation

fs(i,o) =|i · m|

|i · n| |o · n| ρ(i,o) D(m)G(i,o,m)dωm

dωo

determined by geometry

surface roughnessFresnel re!ection

Tuesday, February 14, 2012

Page 24: Microfacet models for reflection and refractionfor reflection and refraction Steve Marschner Cornell University CS 6630 Spring 2012 (based on presentation for Walter, Marschner, Li,

i o

m

i + o parallel to m

Construction of half-vectorre!ection refraction

Tuesday, February 14, 2012

Page 25: Microfacet models for reflection and refractionfor reflection and refraction Steve Marschner Cornell University CS 6630 Spring 2012 (based on presentation for Walter, Marschner, Li,

i o

m

i + o parallel to m

Construction of half-vectorre!ection refraction

hr = normalize(i + o)

Tuesday, February 14, 2012

Page 26: Microfacet models for reflection and refractionfor reflection and refraction Steve Marschner Cornell University CS 6630 Spring 2012 (based on presentation for Walter, Marschner, Li,

i o

m

i

o

m

i + o parallel to m

Construction of half-vectorre!ection refraction

hr = normalize(i + o)

Tuesday, February 14, 2012

Page 27: Microfacet models for reflection and refractionfor reflection and refraction Steve Marschner Cornell University CS 6630 Spring 2012 (based on presentation for Walter, Marschner, Li,

i o

m

i

m

i + o parallel to m

Construction of half-vector

no

parallel to mi + no

re!ection refraction

hr = normalize(i + o)

Tuesday, February 14, 2012

Page 28: Microfacet models for reflection and refractionfor reflection and refraction Steve Marschner Cornell University CS 6630 Spring 2012 (based on presentation for Walter, Marschner, Li,

i o

m

i

m

i + o parallel to m

Construction of half-vector

no

parallel to mi + no

re!ection refraction

hr = normalize(i + o) ht = −normalize(i + no)

Tuesday, February 14, 2012

Page 29: Microfacet models for reflection and refractionfor reflection and refraction Steve Marschner Cornell University CS 6630 Spring 2012 (based on presentation for Walter, Marschner, Li,

i o

dωo

re!ection refraction

Construction of half-vector solid angle

hr = normalize(i + o) ht = −normalize(i + no)

Tuesday, February 14, 2012

Page 30: Microfacet models for reflection and refractionfor reflection and refraction Steve Marschner Cornell University CS 6630 Spring 2012 (based on presentation for Walter, Marschner, Li,

i o

dωo

re!ection refraction

Construction of half-vector solid angle

hr = normalize(i + o) ht = −normalize(i + no)

o

Tuesday, February 14, 2012

Page 31: Microfacet models for reflection and refractionfor reflection and refraction Steve Marschner Cornell University CS 6630 Spring 2012 (based on presentation for Walter, Marschner, Li,

i o

dωo

re!ection refraction

Construction of half-vector solid angle

hr = normalize(i + o) ht = −normalize(i + no)

dωo

o

Tuesday, February 14, 2012

Page 32: Microfacet models for reflection and refractionfor reflection and refraction Steve Marschner Cornell University CS 6630 Spring 2012 (based on presentation for Walter, Marschner, Li,

i o

dωo

re!ection refraction

Construction of half-vector solid angle

hr = normalize(i + o) ht = −normalize(i + no)

hr

dωo

o

Tuesday, February 14, 2012

Page 33: Microfacet models for reflection and refractionfor reflection and refraction Steve Marschner Cornell University CS 6630 Spring 2012 (based on presentation for Walter, Marschner, Li,

i o

dωo

re!ection refraction

Construction of half-vector solid angle

hr = normalize(i + o) ht = −normalize(i + no)

hr

dωm =|o · hr|�i + o�2

dωo

dωm

dωo

o

Tuesday, February 14, 2012

Page 34: Microfacet models for reflection and refractionfor reflection and refraction Steve Marschner Cornell University CS 6630 Spring 2012 (based on presentation for Walter, Marschner, Li,

i o

i

o

dωo

re!ection refraction

Construction of half-vector solid angle

hr = normalize(i + o) ht = −normalize(i + no)

hr

dωm =|o · hr|�i + o�2

dωo

dωm

dωo

dωo

o

Tuesday, February 14, 2012

Page 35: Microfacet models for reflection and refractionfor reflection and refraction Steve Marschner Cornell University CS 6630 Spring 2012 (based on presentation for Walter, Marschner, Li,

i o

i

o

dωo

re!ection refraction

Construction of half-vector solid angle

hr = normalize(i + o) ht = −normalize(i + no)

hr

dωm =|o · hr|�i + o�2

dωo

dωm

no

dωo

dωo

o

Tuesday, February 14, 2012

Page 36: Microfacet models for reflection and refractionfor reflection and refraction Steve Marschner Cornell University CS 6630 Spring 2012 (based on presentation for Walter, Marschner, Li,

i o

i

o

dωo

re!ection refraction

Construction of half-vector solid angle

hr = normalize(i + o) ht = −normalize(i + no)

hr

n2dωo

dωm =|o · hr|�i + o�2

dωo

dωm

no

dωo

dωo

o

Tuesday, February 14, 2012

Page 37: Microfacet models for reflection and refractionfor reflection and refraction Steve Marschner Cornell University CS 6630 Spring 2012 (based on presentation for Walter, Marschner, Li,

i o

i

o

ht

dωo

re!ection refraction

Construction of half-vector solid angle

hr = normalize(i + o) ht = −normalize(i + no)

hr

n2dωo

dωm =|o · hr|�i + o�2

dωo

dωm

no

dωo

dωo

o

Tuesday, February 14, 2012

Page 38: Microfacet models for reflection and refractionfor reflection and refraction Steve Marschner Cornell University CS 6630 Spring 2012 (based on presentation for Walter, Marschner, Li,

i o

i

o

ht

dωo

re!ection refraction

Construction of half-vector solid angle

hr = normalize(i + o) ht = −normalize(i + no)

hr

n2dωo

dωm =|o · hr|�i + o�2

dωo

dωm

no

dωm

dωo

dωo

o

dωm =|o · ht|

�i + no�2n2dωo

Tuesday, February 14, 2012

Page 39: Microfacet models for reflection and refractionfor reflection and refraction Steve Marschner Cornell University CS 6630 Spring 2012 (based on presentation for Walter, Marschner, Li,

Result: scattering functions

re!ection

transmission

fs(i,o) =|i · m|

|i · n| |o · n| ρ(i,o) D(m)G(i,o,m)dωm

dωo

fs(i,o) =|i · m|

|i · n| |o · n| ρ(i,o) D(m)G(i,o,m)dωm

dωo

Tuesday, February 14, 2012

Page 40: Microfacet models for reflection and refractionfor reflection and refraction Steve Marschner Cornell University CS 6630 Spring 2012 (based on presentation for Walter, Marschner, Li,

Result: scattering functions

fr(i,o) =|i·m|

|i·n| |o·n| F (i,m)D(m) G(i,o,m)|o·m|

�i + o�2

re!ection

transmission

fs(i,o) =|i · m|

|i · n| |o · n| ρ(i,o) D(m)G(i,o,m)dωm

dωo

Tuesday, February 14, 2012

Page 41: Microfacet models for reflection and refractionfor reflection and refraction Steve Marschner Cornell University CS 6630 Spring 2012 (based on presentation for Walter, Marschner, Li,

Result: scattering functions

ft(i,o) =|i·m|

|i·n| |o·n| (1− F (i,m))D(m) G(i,o,m)n2|o·m|�i + no�2

fr(i,o) =|i·m|

|i·n| |o·n| F (i,m)D(m) G(i,o,m)|o·m|

�i + o�2

re!ection

transmission

Tuesday, February 14, 2012

Page 42: Microfacet models for reflection and refractionfor reflection and refraction Steve Marschner Cornell University CS 6630 Spring 2012 (based on presentation for Walter, Marschner, Li,

Result: scattering functions

ft(i,o) =|i·m|

|i·n| |o·n| (1− F (i,m))D(m) G(i,o,m)n2|o·m|�i + no�2

fr(i,o) =|i·m| |o·m||i·n| |o·n|

F (i,m)D(m) G(i,o,m)�i + o�2

re!ection

transmission

Tuesday, February 14, 2012

Page 43: Microfacet models for reflection and refractionfor reflection and refraction Steve Marschner Cornell University CS 6630 Spring 2012 (based on presentation for Walter, Marschner, Li,

Result: scattering functions

ft(i,o) =|i·m| |o·m||i·n| |o·n|

n2(1− F (i,m))D(m) G(i,o,m)�i + no�2

fr(i,o) =|i·m| |o·m||i·n| |o·n|

F (i,m)D(m) G(i,o,m)�i + o�2

re!ection

transmission

Tuesday, February 14, 2012

Page 44: Microfacet models for reflection and refractionfor reflection and refraction Steve Marschner Cornell University CS 6630 Spring 2012 (based on presentation for Walter, Marschner, Li,

Result: scattering functions

ft(i,o) =|i·m| |o·m||i·n| |o·n|

n2(1− F (i,m))D(m) G(i,o,m)�i + no�2

re!ection

transmission

fr(i,o) =1

|i·n| |o·n|F (i,m) D(m)G(i,o,m)

4

Tuesday, February 14, 2012

Page 45: Microfacet models for reflection and refractionfor reflection and refraction Steve Marschner Cornell University CS 6630 Spring 2012 (based on presentation for Walter, Marschner, Li,

Result: scattering functions

fr(i,o) =F (i,m) D(m) G(i,o,m)

4|i·n| |o·n|

ft(i,o) =|i·m| |o·m||i·n| |o·n|

n2(1− F (i,m))D(m) G(i,o,m)�i + no�2

re!ection

transmission

Tuesday, February 14, 2012

Page 46: Microfacet models for reflection and refractionfor reflection and refraction Steve Marschner Cornell University CS 6630 Spring 2012 (based on presentation for Walter, Marschner, Li,

Fresnel re!ectance

Glas

sner,

Princ

iples

of Dig

ital Im

age S

ynth

esis

Tuesday, February 14, 2012

Page 47: Microfacet models for reflection and refractionfor reflection and refraction Steve Marschner Cornell University CS 6630 Spring 2012 (based on presentation for Walter, Marschner, Li,

Fresnel re!ectance

Glas

sner,

Princ

iples

of Dig

ital Im

age S

ynth

esis

Tuesday, February 14, 2012

Page 48: Microfacet models for reflection and refractionfor reflection and refraction Steve Marschner Cornell University CS 6630 Spring 2012 (based on presentation for Walter, Marschner, Li,

8

20–20 40–40

Normal distributions

Phong

Choice of distribution is determined by surface• Phong, Beckman are popular choices• “GGX” distribution is another option• [Smith 67] gives a way to produce smooth Gs

D(θm)Tuesday, February 14, 2012

Page 49: Microfacet models for reflection and refractionfor reflection and refraction Steve Marschner Cornell University CS 6630 Spring 2012 (based on presentation for Walter, Marschner, Li,

8

20–20 40–40

Normal distributions

PhongBeckman

Choice of distribution is determined by surface• Phong, Beckman are popular choices• “GGX” distribution is another option• [Smith 67] gives a way to produce smooth Gs

D(θm)Tuesday, February 14, 2012

Page 50: Microfacet models for reflection and refractionfor reflection and refraction Steve Marschner Cornell University CS 6630 Spring 2012 (based on presentation for Walter, Marschner, Li,

8

20–20 40–40

Normal distributions

PhongBeckmanGGX (new)

Choice of distribution is determined by surface• Phong, Beckman are popular choices• “GGX” distribution is another option• [Smith 67] gives a way to produce smooth Gs

D(θm)Tuesday, February 14, 2012

Page 51: Microfacet models for reflection and refractionfor reflection and refraction Steve Marschner Cornell University CS 6630 Spring 2012 (based on presentation for Walter, Marschner, Li,

8

20–20 40–40

Normal distributions

PhongBeckmanGGX (new)

Choice of distribution is determined by surface• Phong, Beckman are popular choices• “GGX” distribution is another option• [Smith 67] gives a way to produce smooth Gs

1

90–90

D(θm) G1(θi,o)Tuesday, February 14, 2012