Top Banner
University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2006 Don Fussell Previous lecture Reflectance I BRDF, BTDF, BSDF Ideal specular model Ideal diffuse (Lambertian) model Phong
31

University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2006 Don Fussell Previous lecture Reflectance I BRDF, BTDF, BSDF Ideal specular.

Dec 19, 2015

Download

Documents

Christian Nash
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2006 Don Fussell Previous lecture Reflectance I BRDF, BTDF, BSDF Ideal specular.

University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2006 Don Fussell

Previous lecture

Reflectance IBRDF, BTDF, BSDF

Ideal specular model

Ideal diffuse (Lambertian) model

Phong

Page 2: University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2006 Don Fussell Previous lecture Reflectance I BRDF, BTDF, BSDF Ideal specular.

University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2006 Don Fussell

Microfacet Reflectance Models

Page 3: University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2006 Don Fussell Previous lecture Reflectance I BRDF, BTDF, BSDF Ideal specular.

University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2006 Don Fussell

Outline

Microfacet modelsDiffuse

Oren-Nayar

SpecularTorrance-Sparrow

BlinnAshikhmin-Shirley (anisotropic)

WardSchlick

Lafortune’s modelTwo layer models

Page 4: University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2006 Don Fussell Previous lecture Reflectance I BRDF, BTDF, BSDF Ideal specular.

University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2006 Don Fussell

Microfacet Models (Text ch. 9.4)

Model surface as set of polygonal facetsCapture surface roughness effectsMicrofacets can be diffuse or specularUse facet distribution to model roughness

Statistical model of microscopic effects gives macroscopic appearance

More realistic, particularly at high incidence angles

Page 5: University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2006 Don Fussell Previous lecture Reflectance I BRDF, BTDF, BSDF Ideal specular.

University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2006 Don Fussell

Basic microfacet modeling

Surface normal distributionHow the surface normals of the facets are distributed about the macroscopic normal

Facet BRDFAre the facets diffuse or specular?

Page 6: University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2006 Don Fussell Previous lecture Reflectance I BRDF, BTDF, BSDF Ideal specular.

University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2006 Don Fussell

Microscopic geometry

Masking – viewer can’t see a microfacet

Shadowing – light can’t see a microfacet

Interreflection – light off one facet hits another

Aim is to capture these effects as efficiently as possible

Page 7: University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2006 Don Fussell Previous lecture Reflectance I BRDF, BTDF, BSDF Ideal specular.

University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2006 Don Fussell

Oren-Nayar model (Text ch. 9.4.1)

Model facet distribution as Gaussian with s.d. (radians)

Facet BRDF is LambertianResulting model has no closed form solution, but a good approximationSample using cosine-weighted sampling in hemisphere

tansincos,0max, oiior BAf

oi

oi

B

A

,min

,max09.0

45.0

33.021

2

2

2

2

Page 8: University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2006 Don Fussell Previous lecture Reflectance I BRDF, BTDF, BSDF Ideal specular.

University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2006 Don Fussell

Oren-Nayar effects

Lambertian Oren-Nayar

Page 9: University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2006 Don Fussell Previous lecture Reflectance I BRDF, BTDF, BSDF Ideal specular.

University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2006 Don Fussell

Torrance-Sparrow (Text ch. 9.4.2)

Specular BRDF for facets

Arbitrary (in theory) distribution of facet normals

Additional term for masking and shadowing

Explicit Fresnel term

i

n h

o

Half vector – facet orientation to produce specular transfer

Page 10: University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2006 Don Fussell Previous lecture Reflectance I BRDF, BTDF, BSDF Ideal specular.

University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2006 Don Fussell

Torrance-Sparrow BRDF

G(o , i) handles microfacet geometry

D(h) is the microfacet orientation distribution evaluated for the half angle

Changing this changes the surface appearance

Fr(o) is the Fresnel reflection coefficient

io

orhioior

FDGf

coscos4

),(,

Page 11: University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2006 Don Fussell Previous lecture Reflectance I BRDF, BTDF, BSDF Ideal specular.

University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2006 Don Fussell

Geometry term

Masking:

Shadowing:

Together:

oh

ohiomaskG

nn2

,

ioshadowiomaskio GGG ,,,,1min,

oh

ihioshadowG

nn2

,

io

orhioior

FDGf

coscos4

,,

Page 12: University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2006 Don Fussell Previous lecture Reflectance I BRDF, BTDF, BSDF Ideal specular.

University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2006 Don Fussell

Blinn’s microfacet distribution

Parameter e controls “roughness”

ehh

eD n

2

2

Page 13: University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2006 Don Fussell Previous lecture Reflectance I BRDF, BTDF, BSDF Ideal specular.

University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2006 Don Fussell

Sampling Blinn’s model (Text ch. 15.5.1)

Sampling from a microfacet BRDF tries to account for all the terms: G, D, F, cos

But D provides most variation, so sample according to D

The sampled direction is completely determined by halfway vector, h, so sample that

Then construct reflection ray based upon it

So how do we sample such a direction …

Page 14: University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2006 Don Fussell Previous lecture Reflectance I BRDF, BTDF, BSDF Ideal specular.

University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2006 Don Fussell

Blinn sampling continued

Need to sample spherical coords: , Book has details, and probably an error on page 684Complication: We need to return the probability of choosing i, but we have the probability of choosing h

Simple conversion term

We need to construct the reflection direction about an arbitrary vector …

Page 15: University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2006 Don Fussell Previous lecture Reflectance I BRDF, BTDF, BSDF Ideal specular.

University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2006 Don Fussell

Arbitrary reflection

Coordinate system is not nicely aligned, so use construction

hhooi 2

Page 16: University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2006 Don Fussell Previous lecture Reflectance I BRDF, BTDF, BSDF Ideal specular.

University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2006 Don Fussell

Anisotropic microfacet distributions

Parameters for x and y direction roughness, where x and y are the local BRDF coordinate system on the surface

Gives the reference frame for

22 sincos2

1

22

11

2

1yx ee

hyx

yxh ee

eeD

n

Page 17: University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2006 Don Fussell Previous lecture Reflectance I BRDF, BTDF, BSDF Ideal specular.

University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2006 Don Fussell

Sampling anisotropic distribution

Sampling is discussed in section 15.5.2 of the text Similar to Blinn but with different distributionNote that there are 4 symmetric quadrants in the tangent planeSample in a single quadrant, then map to one of 4 quadrantsTake care to maintain stratification

0 1

1st 2nd 3rd 4th

Page 18: University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2006 Don Fussell Previous lecture Reflectance I BRDF, BTDF, BSDF Ideal specular.

University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2006 Don Fussell

Ward’s isotropic model

“the simplest empirical formula that will do the job”Leaves out the geometry and Fresnel terms

Makes integration and sampling easier

3 terms, plus some angular values:d is the diffuse reflectance

s is the specular reflectance is the standard deviation of the micro-surface slope

2

22

2

tanexp

coscos

1,

h

oi

sd

iorf

Page 19: University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2006 Don Fussell Previous lecture Reflectance I BRDF, BTDF, BSDF Ideal specular.

University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2006 Don Fussell

Ward’s anisotropic model

For surfaces with oriented grooves2 terms for anisotropy:

x is the standard deviation of the surface slope in the x direction

y is the standard deviation of the surface slope in the y direction

yx

yhxhh

oi

sd

iorf

4

sincostanexp

coscos

1,

22222

Page 20: University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2006 Don Fussell Previous lecture Reflectance I BRDF, BTDF, BSDF Ideal specular.

University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2006 Don Fussell

Sampling Ward’s model

Take 1 and 2 and transform to get h and h:

Only samples one quadrant, use same trick as before to get all quadrantsNot sure about correct normalization constant for solid angle measure

22221

21

sincos

log

2tantan

yxh

x

yh

Page 21: University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2006 Don Fussell Previous lecture Reflectance I BRDF, BTDF, BSDF Ideal specular.

University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2006 Don Fussell

Schlick’s model (Schlick 94)

Empirical model well suited to samplingTwo parameters:

, a roughness factor (0 = Specular, 1 = Lambertian), an anisotropy term, (0 perfectly anisotropic, 1 = isotropic)

Page 22: University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2006 Don Fussell Previous lecture Reflectance I BRDF, BTDF, BSDF Ideal specular.

University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2006 Don Fussell

Schlick’s model

hhh

hhh

hh

h

AZD

A

Z

coscos

coscos

coscos1

2222

222

Facet Distribution:

Geometry Terms: oioi

oooo

iiii

GGG

G

G

,

coscoscos

coscoscos

Page 23: University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2006 Don Fussell Previous lecture Reflectance I BRDF, BTDF, BSDF Ideal specular.

University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2006 Don Fussell

Putting it together

Term to account for inter-reflectionNot a Torrance-Sparrow modelAs before, sample a half vector:

Only samples in 1 quadrantUse trick from before

Normalization not given

oi

oihoiorr

GDGFf

coscos4

,1,

22

222

22

2

11

11

12

cos

h

h

Page 24: University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2006 Don Fussell Previous lecture Reflectance I BRDF, BTDF, BSDF Ideal specular.

University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2006 Don Fussell

More to it than that

Both Ward and Schlick’s original papers define complete reflectance, including diffuse and pure specular componentsPBRT calls these materials, because they are simply linear sums of individual componentsSchlick’s paper also includes a way to decide how to combine the diffuse, specular and glossy terms based on the roughnessBoth Ward and Schlick discuss sampling from the complete distribution

Page 25: University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2006 Don Fussell Previous lecture Reflectance I BRDF, BTDF, BSDF Ideal specular.

University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2006 Don Fussell

Phong reloaded

The Phong model can be revised to make it physically reasonable – energy conserving and reciprocal

In canonical BRDF coordinate system (z axis is normal)

eooior Rf np ,,,

eozoyoxie

ozoyoxiiorf 1,1,1,,,,p

Page 26: University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2006 Don Fussell Previous lecture Reflectance I BRDF, BTDF, BSDF Ideal specular.

University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2006 Don Fussell

Oriented Phong

Define an orientation vector – the direction in which the Phong reflection is strongest

For standard Phong, o=(-1,-1,1)

To get “off specular” reflection, change o

Can get retro-reflection, more reflection at grazing, etc.

eozzoyyoxxiior ooof ,,,, p

Page 27: University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2006 Don Fussell Previous lecture Reflectance I BRDF, BTDF, BSDF Ideal specular.

University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2006 Don Fussell

Lafortune’s model (Text ch. 9.5)

A diffuse component plus a sum of Phong lobes

Allow all parameters to vary with wavelength

Lots of parameters, 12 for each lobe, so suited for fitting to data

It’s reasonably easy to fit

Parameters for many surfaces are available

nlobes

j

eizzjiyyjixxjo

dior

jooof1

,,, ,,,, p

Page 28: University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2006 Don Fussell Previous lecture Reflectance I BRDF, BTDF, BSDF Ideal specular.

University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2006 Don Fussell

Lafortune’s clay

Page 29: University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2006 Don Fussell Previous lecture Reflectance I BRDF, BTDF, BSDF Ideal specular.

University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2006 Don Fussell

Sampling Lafortune

First choose a lobe (or diffuse)Could be proportional to lobe’s contribution to outgoing direction

But that might be expensive

Then sample a direction according to that lobe’s distribution

Just like sampling from Blinn’s microfacet distribution, but sampling the direction directly

Page 30: University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2006 Don Fussell Previous lecture Reflectance I BRDF, BTDF, BSDF Ideal specular.

University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2006 Don Fussell

Two-layer models (Text chs. 9.6 and 15.5.3))

Captures the effects of a thin glossy layer over a diffuse substrate

Common in practice – polished painted surfaces, polished wood, …

Glossy dominates at grazing angles, diffuse dominates at near-normal angles

Don’t need to trace rays through specular surface to hit diffuse

Page 31: University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2006 Don Fussell Previous lecture Reflectance I BRDF, BTDF, BSDF Ideal specular.

University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2006 Don Fussell

Fresnel blend model