csce 641 computer graphics: reflection models jinxiang chai

76
CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

Upload: mervin-jacobs

Post on 29-Jan-2016

219 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

CSCE 641 Computer Graphics:

Reflection Models

Jinxiang Chai

Page 2: CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

Motivation

How to model surface properties of objects?

Page 3: CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

Reflection Models

Definition: Reflection is the process by which light incident on a surface interacts with the surface such that it leaves on the incident side without change in frequency.

Page 4: CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

Types of Reflection Functions

Ideal Specular Reflection Law

Mirror

Page 5: CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

Types of Reflection Functions

Ideal Specular Reflection Law

Mirror

Ideal Diffuse Lambert’s Law

Matte

Page 6: CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

Types of Reflection Functions

Ideal Specular Reflection Law

Mirror

Ideal Diffuse Lambert’s Law

Matte

Specular Glossy

Directional diffuse

Page 7: CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

Review: Local Illumination

)( NLCkAkI da

Page 8: CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

Review: Local Illumination

nsda ERkNLkCAkI )()(

5n

Page 9: CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

Review: Local Illumination

nsda ERkNLkCAkI )()(

50n

Page 10: CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

Materials

Plastic Metal Matte

From Apodaca and Gritz, Advanced RenderMan

Page 11: CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

Mathematical Reflectance Models

How can we mathematically model reflectance property of an arbitrary surface?

- what’s the dimensionality?

- how to use it to compute outgoing radiance given incoming radiance?

Page 12: CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

Introduction

Radiometry and photometry

- Radiant intensity

- Irradiance

- Radiance

- Radiant exitance (radiosity)

Page 13: CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

Electromagnetic Spectrum

Visible light frequencies range between:

Red: 4.3x1014 hertz (700nm)

Violet: 7.5x1014 hertz (400nm)

Page 14: CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

Visible Light

The human eye can see “visible” light in the frequency between 400nm-700nm

redviolet

Page 15: CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

Spectral Energy Distribution

Three different types of lights

Page 16: CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

Spectral Energy Distribution

Three different types of lights

How can we measure the energy of light?

Page 17: CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

Photons

The basic quantity in lighting is the photon

The energy (in Joule) of a photon with wavelength λ is: qλ = hc/λ

- c is the speed of light

In vacuum, c = 299.792.458m/s

- h ≈ 6.63*10-34Js is Planck’s constant

Page 18: CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

(Spectral) Radiant Energy

The spectral radiant energy, Qλ, in nλ photons with wavelength λ is

The radiant energy, Q, is the energy of a collection of photons, and is given as the integral of Qλ over all possible wavelengths:

qnQ

0

dQQ

Page 19: CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

Example: Fluorescent Bulb

Page 20: CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

Radiant Intensity

( )d

Id

W lmcd candela

sr sr

Definition: the radiant power radiated from a point on a light source into a unit solid angle in a particular direction.

- measured in watt per steradian

Page 21: CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

Radiance

Definition: the radiant power per unit projected surface area per solid angle

2

( , )( , )

( , )

dI xL x

dA

d x

d dA

2 2 2

W cd lmnit

sr m m sr m

dA

d

( , )L x

Page 22: CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

Radiance

Per unit projected surface area

- radiance varies with direction

- incidence radiance and exitant radiance

Page 23: CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

Radiance

Ray of light arriving at or leaving a point on a surface in a given direction

Radiance (arriving) Radiance (leaving)

Page 24: CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

Irradiance

Definition: the power per unit area incident on a surface.

( ) id

E xdA

2

( ) ( , )cosi

H

E x L x d

( , )iL x

dA

d

Page 25: CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

Radiant Exitance

Definition: The radiant (luminous) exitance is the

energy per unit area leaving a surface.

In computer graphics, this quantity is often

referred to as the radiosity (B)

( ) odM x

dA

Page 26: CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

Directional Power Leaving a Surface

2 ( , ) ( , )coso od x L x dAd

dA d

( , )oL x

2 ( , )od x

Page 27: CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

Uniform Diffuse Emitter

( , )oL x

dA

d

2

2

cos

cos

o

H

o

H

M L d

L d

Page 28: CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

Projected Solid Angle

cos d

2

cosH

d

d cos d

Page 29: CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

Uniform Diffuse Emitter

( , )oL x

dA

d

2

2

cos

cos

o

H

o

H

o

M L d

L d

L

o

ML

Page 30: CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

Reflection Models

Outline

- Types of reflection models

- The BRDF and reflectance

- The reflection equation

- Ideal reflection

- Ideal diffuse

- Cook-Torrance Model

Page 31: CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

Reflection Models

Definition: Reflection is the process by which light incident on a surface interacts with the surface such that it leaves on the incident side without change in frequency.

Page 32: CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

Reflection Models

Definition: Reflection is the process by which light incident on a surface interacts with the surface such that it leaves on the incident side without change in frequency.

Page 33: CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

Reflection Models

Definition: Reflection is the process by which light incident on a surface interacts with the surface such that it leaves on the incident side without change in frequency.

Page 34: CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

Reflection Models

Definition: Reflection is the process by which light incident on a surface interacts with the surface such that it leaves on the incident side without change in frequency.

Page 35: CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

Types of Reflection Functions

Ideal Specular Reflection Law

Mirror

Page 36: CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

Types of Reflection Functions

Ideal Specular Reflection Law

Mirror

Ideal Diffuse Lambert’s Law

Matte

Page 37: CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

Types of Reflection Functions

Ideal Specular Reflection Law

Mirror

Ideal Diffuse Lambert’s Law

Matte

Specular Glossy

Directional diffuse

Page 38: CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

Mathematical Reflectance Models

How can we mathematically model reflectance property of an arbitrary surface?

- what’s the dimensionality?

- how to use it to compute outgoing radiance given incoming radiance?

Page 39: CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

The Reflection Equation

( , )r rL x

( , )i iL x

idi

r

r i

N

Page 40: CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

The Reflection Equation

( , )r rL x

( , )i iL x

idi

r

r i

N

How to model surface reflectance property?

Page 41: CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

The Reflection Equation

( , )r rL x

( , )i iL x

idi

r

r i

N

i

rrri E

xLxf

),(),(

How to model surface reflectance property?

Page 42: CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

The Reflection Equation

( , )r rL x

( , )i iL x

idi

r

r i

N

i

rrri E

xLxf

),(),(

How to model surface reflectance property?

for a given incoming direction, the amount of light that is reflected in a certain outgoing direction

Page 43: CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

The Reflection Equation

2

( , ) ( , ) ( , )cosr r r i r i i i i

H

L x f x L x d

( , )r rL x

( , )i iL x

idi

r

r i

N

Page 44: CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

The Reflection Equation

2

( , ) ( , ) ( , )cosr r r i r i i i i

H

L x f x L x d

( , )r rL x

( , )i iL x

idi

r

r i

N

Directional irradiance

Page 45: CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

The BRDF

Bidirectional Reflectance Distribution Function

( ) 1( ) r i r

r i ri

dLf

dE sr

( , )r rdL x

( , )i iL x

idi

r

ri

N

Page 46: CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

Dimensionality of the BRDF

This is 6-D function

- x: 2D position

- (θi,φi): incoming direction

- (θr,φr): outgoing direction

Usually represented as 4-D

- ignoring x

- homogenous material property

Page 47: CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

Gonioreflectometer

Page 48: CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

Scattering Models

Page 49: CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

The BSSRDF

Bidirectional Surface Scattering Reflectance-Distribution Function

( , , )( , , ) r i i r r

i i r ri

dL x xS x x

d

( , )r rdL x

( , )i iL x

idi

r

ri

N

rx ix

Translucency

Page 50: CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

Properties of BRDF’s

From Sillion, Arvo, Westin, Greenberg

1. Linearity

Page 51: CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

Properties of BRDF’s

( ) ( )r r i r i rf f

From Sillion, Arvo, Westin, Greenberg

1. Linearity

2. Reciprocity principle

Page 52: CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

Properties of BRDF’s

3. Isotropic vs. anisotropic

( , ; , ) ( , , )r i i r r r i r r if f

( , , ) ( , , ) ( , , )r i r r i r r i i r r i r r if f f

Reciprocity and isotropy

Page 53: CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

Properties of BRDF’s

3. Isotropic vs. anisotropic

4. Energy conservation

( , ; , ) ( , , )r i i r r r i r r if f

( , , ) ( , , ) ( , , )r i r r i r r i i r r i r r if f f

Reciprocity and isotropy

Page 54: CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

Energy Conservation

( )cos

( )cos

( ) ( )cos cos

( )cos

1

r

i

r i

i

r r r r

r

i i i i i

r i r i i i i r r

i i i i

L dd

d L d

f L d d

L d

ir

Definition: Reflectance is ratio of reflected to incident power

Page 55: CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

Energy Conservation

( )cos

( )cos

( ) ( )cos cos

( )cos

1

r

i

r i

i

r r r r

r

i i i i i

r i r i i i i r r

i i i i

L dd

d L d

f L d d

L d

ir

Definition: Reflectance is ratio of reflected to incident power

Page 56: CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

Energy Conservation

( )cos

( )cos

( ) ( )cos cos

( )cos

1

r

i

r i

i

r r r r

r

i i i i i

r i r i i i i r r

i i i i

L dd

d L d

f L d d

L d

ir

Definition: Reflectance is ratio of reflected to incident power

Conservation of energy: 0 < < 1

Units: [dimensionless], fr [1/steradians]

Page 57: CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

BRDF

What’s the BRDF for a mirror surface?

Page 58: CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

Law of Reflection

r i

rii r

mod2r i

N RI

Page 59: CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

Ideal Reflection (Mirror)

, ( , ) ( , )r m r r i r rL L ri

( , )i i iL ( , )r r rL

Page 60: CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

Ideal Reflection (Mirror)

,

(cos cos )( , ; , ) ( )

cosi r

r m i i r r i ri

f

, ( , ) ( , )r m r r i r rL L ri

( , )i i iL ( , )r r rL

Page 61: CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

, ,( , ) ( , ; , ) ( , )cos cos

(cos cos )( ) ( , )cos cos

cos

( , )

r m r r r m i i r r i i i i i i

i ri r i i i i i i

i

i r r

L f L d d

L d d

L

Ideal Reflection (Mirror)

,

(cos cos )( , ; , ) ( )

cosi r

r m i i r r i ri

f

, ( , ) ( , )r m r r i r rL L ri

( , )i i iL ( , )r r rL

Page 62: CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

Ideal Diffuse Reflection

Assume light is equally likely to be reflected in any output direction (independent of input direction).

, ,

,

,

( ) ( )cos

( )cos

r d r r d i i i i

r d i i i i

r d

L f L d

f L d

f E

( )cos cosr r r r r r r rM L d L d L ,

, ,r d dr

d r d r d

f EM Lf f

E E E

cosd d s sM E E Lambert’s Cosine Law

,r df c

Page 63: CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

Diffuse Light

C = intensity of point light source

kd = diffuse reflection coefficient

= angle between normal and direction to light

)()cos( NLkCkCI dd

LN

Surface

NL)cos(

Page 64: CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

Phong Model

E

L

NR(L) E

L

N R(E)

Reciprocity:

Page 65: CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

s

Phong Model

Mirror Diffuse

Page 66: CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

BRDF Models

Phenomenological

- Phong [75]

- Blinn-Phong [77]

- Ward [92]

- Larfortune et al [97]

- Ashikhmin et al [00]

Physical - Cook-torrence [81]

- He et al [91]

Data-driven

[Matusik et al 2003]

[Cook-Torrence 81]

[Larfortune et al 97]

Page 67: CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

BRDF Models

Phenomenological

- Phong [75]

- Blinn-Phong [77]

- Ward [92]

- Larfortune et al [97]

- Ashikhmin et al [00]

Physical - Cook-torrence [81]

- He et al [91]

Data-driven

[Matusik et al 2003]

[Cook-Torrence 81]

[Larfortune et al 97]

Page 68: CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

Cook-Torrance Model

More sophisticated for specular reflection

Surface is made of reflecting microfacets

Page 69: CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

Cook-Torrance Model

H: angular bisector of vector L and V

Page 70: CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

Microfacet Slope Distribution (D)

D: density of microfacets along H

m: root mean square of slopes of microfacets (i.e. roughness)

Beckman function:

The facet slope distribution function D represents the fraction of the facets thatare oriented in the direction H.

Page 71: CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

Varying m

m = 0.2 m = 0.6

Highly directional vs. spread-out

Page 72: CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

Cook-Torrance Model

H: angular bisector of vector L and V

Page 73: CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

Mask and Shadow Term

No interference

shadow mask

The geometrical attenuation factor G accounts for the shadowing andmasking of one facet by another.

Page 74: CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

Cook-Torrance Model

H: angular bisector of vector L and V

Page 75: CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

Fresnel Term

n: refractive index

The Fresnel term F describes how light is reflected from each smooth microfacet. It is a function of incidence angle and wavelength

Page 76: CSCE 641 Computer Graphics: Reflection Models Jinxiang Chai

Cook-Torrance Model for Metals

Measured Reflectance

Reflectance of Copper as afunction of wavelength and

angle of incidence

2

Light spectra

Copper spectra

Approximated Reflectance

( ) (0)(0) ( / 2)

( / 2) (0)

F FR R R

F F

Cook-Torrance approximation