32
Reflection models Digital Image Synthesis Yung-Yu Chuang 11/01/2005 with slides by Pat Hanrahan and Matt Pharr

Reflection models Digital Image Synthesis Yung-Yu Chuang 11/01/2005 with slides by Pat Hanrahan and Matt Pharr

Embed Size (px)

Citation preview

Page 1: Reflection models Digital Image Synthesis Yung-Yu Chuang 11/01/2005 with slides by Pat Hanrahan and Matt Pharr

Reflection models

Digital Image SynthesisYung-Yu Chuang11/01/2005

with slides by Pat Hanrahan and Matt Pharr

Page 2: Reflection models Digital Image Synthesis Yung-Yu Chuang 11/01/2005 with slides by Pat Hanrahan and Matt Pharr

Rendering equation

Page 3: Reflection models Digital Image Synthesis Yung-Yu Chuang 11/01/2005 with slides by Pat Hanrahan and Matt Pharr

Taxonomy 1

( , , , , , ) ( , , , , , )in outx y t x y t

General function = 12D

Scattering function = 9D

Assume time doesn’t matter (no phosphorescence)

Assume wavelengths are equal (no fluorescence)

Single-wavelength Scattering function = 8D

Assume wavelength is discretized or integrated into RGB(This is a common assumption for computer graphics)

( , , , ) ( , , , )in outx y x y

Page 4: Reflection models Digital Image Synthesis Yung-Yu Chuang 11/01/2005 with slides by Pat Hanrahan and Matt Pharr

Taxonomy 2

Single-wavelength Scattering function = 8D( , , , ) ( , , , )in outx y x y

Bidirectional Texture Function (BTF)Spatially-varying BRDF (SVBRDF) = 6D

Ignore subsurface scattering (x,y) in = (x,y) out

Bidirectional Subsurface ScatteringDistribution Function (BSSRDF) = 6D

Ignore dependence on position

Light Fields, Surface LFs = 4D

Ignore direction of incident light

( , , , )outx y

Texture Maps = 2D

Assume Lambertian

( , )outx y

3D

Assume isotropy

BRDF = 4D

Ignore subsurface scattering

( , ) ( , )in out

Ignore dependenceon position

Page 5: Reflection models Digital Image Synthesis Yung-Yu Chuang 11/01/2005 with slides by Pat Hanrahan and Matt Pharr

Properties of BRDFs

Page 6: Reflection models Digital Image Synthesis Yung-Yu Chuang 11/01/2005 with slides by Pat Hanrahan and Matt Pharr

Properties of BRDFs

Page 7: Reflection models Digital Image Synthesis Yung-Yu Chuang 11/01/2005 with slides by Pat Hanrahan and Matt Pharr

Isotropic and anisotropic

Page 8: Reflection models Digital Image Synthesis Yung-Yu Chuang 11/01/2005 with slides by Pat Hanrahan and Matt Pharr

Reflection models

• BRDF/BTDF/BSDF• Scattering from realistic surfaces is best descri

bed as a mixture of multiple BRDFs and BSDFs.• Material = BSDF that combines multiple BRDFs

and BSDFs. (chap. 10)• Textures = reflection and transmission propert

ies that vary over the surface. (chap. 11)

Page 9: Reflection models Digital Image Synthesis Yung-Yu Chuang 11/01/2005 with slides by Pat Hanrahan and Matt Pharr

Surface reflection models

• Measured data• Phenomenological models: models with intui

tive parameters• Simulation• Physical optics: solve Maxwell’s equation• Geometric optics: microfacet models

Page 10: Reflection models Digital Image Synthesis Yung-Yu Chuang 11/01/2005 with slides by Pat Hanrahan and Matt Pharr

Reflection categories

diffuse

perfect specular retro-reflective

glossy specular

Page 11: Reflection models Digital Image Synthesis Yung-Yu Chuang 11/01/2005 with slides by Pat Hanrahan and Matt Pharr

Geometric setting

n

t

s

sinsin ,

sincos

1sin ,cos 2

yx

zz

Page 12: Reflection models Digital Image Synthesis Yung-Yu Chuang 11/01/2005 with slides by Pat Hanrahan and Matt Pharr

BxDF

• BSDF_REFLECTION, BSDF_TRANSMISSION• BSDF_DIFFUSE, BSDF_GLOSSY (retro-reflective), BSDF_SPECULAR

• Spectrum f(Vector &wo, Vector &wi);• Spectrum Sample_f(Vector &wo, Vector *wi, float u1, float u2, float *pdf);

• Spectrum rho(Vector &wo, int nSamples, float *samples);

• Spectrum rho(int nSamples, float *samples);

Page 13: Reflection models Digital Image Synthesis Yung-Yu Chuang 11/01/2005 with slides by Pat Hanrahan and Matt Pharr

Specular reflection and transmission• Reflection: • Transmission: (Snell’s law)

oi

ttii sinsin

n

i o

n

i

t

index of refraction dispersion

Page 14: Reflection models Digital Image Synthesis Yung-Yu Chuang 11/01/2005 with slides by Pat Hanrahan and Matt Pharr

Fresnel reflectance• Reflectivity and transmissiveness are view dep

endent• For dielectrics

Page 15: Reflection models Digital Image Synthesis Yung-Yu Chuang 11/01/2005 with slides by Pat Hanrahan and Matt Pharr

Fresnel reflectance• For conductors

Page 16: Reflection models Digital Image Synthesis Yung-Yu Chuang 11/01/2005 with slides by Pat Hanrahan and Matt Pharr

Perfect specular reflection

Page 17: Reflection models Digital Image Synthesis Yung-Yu Chuang 11/01/2005 with slides by Pat Hanrahan and Matt Pharr

Perfect specular transmission

Page 18: Reflection models Digital Image Synthesis Yung-Yu Chuang 11/01/2005 with slides by Pat Hanrahan and Matt Pharr

Fresnel modulation

Page 19: Reflection models Digital Image Synthesis Yung-Yu Chuang 11/01/2005 with slides by Pat Hanrahan and Matt Pharr

Lambertian reflection• It is not physically feasible, but provides a goo

d approximation to many real-world surfaces.

class COREDLL Lambertian : public BxDF {

public:

Lambertian(Spectrum &reflectance)

: BxDF(BxDFType(BSDF_REFLECTION | BSDF_DIFFUSE)),

R(reflectance), RoverPI(reflectance * INV_PI) {}

Spectrum f(Vector &wo, Vector &wi) {return RoverPI}

Spectrum rho(Vector &, int, float *) { return R; }

Spectrum rho(int, float *) { return R; }

private:

Spectrum R, RoverPI;

};

Page 20: Reflection models Digital Image Synthesis Yung-Yu Chuang 11/01/2005 with slides by Pat Hanrahan and Matt Pharr

Microfacet models• Rough surfaces can be modeled as a collection

of small microfacets.• Two components: distribution of microfacets

and how light scatters from individual microfacet → closed-form BRDF expression

n

Page 21: Reflection models Digital Image Synthesis Yung-Yu Chuang 11/01/2005 with slides by Pat Hanrahan and Matt Pharr

Important effects in microfacet models

Page 22: Reflection models Digital Image Synthesis Yung-Yu Chuang 11/01/2005 with slides by Pat Hanrahan and Matt Pharr

Oren-Nayar model• Many real-world materials such as concrete, sa

nd and cloth are not Lambertian.• A collection of symmetric V-shaped perfect La

mbertian grooves with a Gaussian distribution• Don’t have a closed-form solution, instead us

e the approximation

),min( ,),max(

09.0

45.0 ,

)33.0(21

)tansin))cos(,0max((),(

2

2

2

2

oioi

oioir

BA

BAf

Page 23: Reflection models Digital Image Synthesis Yung-Yu Chuang 11/01/2005 with slides by Pat Hanrahan and Matt Pharr

Lambertian

Page 24: Reflection models Digital Image Synthesis Yung-Yu Chuang 11/01/2005 with slides by Pat Hanrahan and Matt Pharr

Oren-Nayer model

Page 25: Reflection models Digital Image Synthesis Yung-Yu Chuang 11/01/2005 with slides by Pat Hanrahan and Matt Pharr

Torrance-Sparrow model

• One of the first microfacet models, designed to model metallic surfaces

• A collection of perfectly smooth mirrored microfacets with distribution

io

)( hD

h

Page 26: Reflection models Digital Image Synthesis Yung-Yu Chuang 11/01/2005 with slides by Pat Hanrahan and Matt Pharr

Torrance-Sparrow model

Page 27: Reflection models Digital Image Synthesis Yung-Yu Chuang 11/01/2005 with slides by Pat Hanrahan and Matt Pharr

Blinn microfacet distribution• Distribution of microfacet normals is modeled

by an exponential falloffe

hh nD )()(

ehh n

eD )(

2

2)(

Page 28: Reflection models Digital Image Synthesis Yung-Yu Chuang 11/01/2005 with slides by Pat Hanrahan and Matt Pharr

Torrance-Sparrow with Blinn distribution

Page 29: Reflection models Digital Image Synthesis Yung-Yu Chuang 11/01/2005 with slides by Pat Hanrahan and Matt Pharr

Anisotropic microfacet model

22 sincos)()1)(1()( yx ee

hyxh neeD

• Ashikmin and Shirley have developed a microfacet model for anisotropic surfaces

Page 30: Reflection models Digital Image Synthesis Yung-Yu Chuang 11/01/2005 with slides by Pat Hanrahan and Matt Pharr

Anisotropic microfacet model

Page 31: Reflection models Digital Image Synthesis Yung-Yu Chuang 11/01/2005 with slides by Pat Hanrahan and Matt Pharr

Lafortune model• An efficient BRDF model to fit measured

data to a parameterized model with a relatively small number of parameters

n

i

eziizyiiyxiixo

d

ior

iooo

pf

1,,, )),,((

),,(

Page 32: Reflection models Digital Image Synthesis Yung-Yu Chuang 11/01/2005 with slides by Pat Hanrahan and Matt Pharr

Lafortune model (for a measured clay)