1gr2-00 gr2 advanced computer graphics agr lecture 6 physically based reflection model

19
1 GR2-00 GR2 Advanced Computer Graphics AGR Lecture 6 Physically Based Reflection Model

Upload: angelina-patterson

Post on 28-Mar-2015

217 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 1GR2-00 GR2 Advanced Computer Graphics AGR Lecture 6 Physically Based Reflection Model

1GR2-00

GR2Advanced Computer

GraphicsAGR

GR2Advanced Computer

GraphicsAGR

Lecture 6Physically Based Reflection Model

Page 2: 1GR2-00 GR2 Advanced Computer Graphics AGR Lecture 6 Physically Based Reflection Model

2GR2-00

Phong ReflectionPhong Reflection

Objects tend to have plastic appearance

Page 3: 1GR2-00 GR2 Advanced Computer Graphics AGR Lecture 6 Physically Based Reflection Model

3GR2-00

Phong Model - LimitationsWhat’s Wrong with PhongPhong Model - LimitationsWhat’s Wrong with Phong

The Phong model is based more on common sense than physics

However it fails to handle two aspects of specular reflection that are observed in real life:– intensity varies with angle of incidence

of light, increasing particularly when light nearly parallel to surface

– colour of highlight DOES depend on material, and also varies with angle of incidence

Page 4: 1GR2-00 GR2 Advanced Computer Graphics AGR Lecture 6 Physically Based Reflection Model

4GR2-00

Physically Based ModelPhysically Based Model

Cook and Torrance have proposed an alternative model which has a basis in physics and which more accurately represents specular highlights

Diffuse reflection handled as in Phong model

Start by assuming perfectly smooth surface, ie mirror type surface

Page 5: 1GR2-00 GR2 Advanced Computer Graphics AGR Lecture 6 Physically Based Reflection Model

5GR2-00

Fresnel EquationFresnel Equation

In general, light is partlyreflected, partly refracted

Reflectance = fraction reflected

reflected

refracted

Refractive Index: = sin / sin [Note that varies with the wavelength of light]

The Fresnel equation gives the reflectance, F, of aperfectly smooth surface in terms of refractiveindex of material and angle of incidence

N

Page 6: 1GR2-00 GR2 Advanced Computer Graphics AGR Lecture 6 Physically Based Reflection Model

6GR2-00

Fresnel EquationFresnel Equation Reflectance, F, is a minimum for incident

light normal to the surface, ie = 0 :F0 = ( - 1 )2 / ( + 1 )2

So different F0 for different materials Because the refractive index of a

material depends on the wavelength of light, , so we also have different F0 for different wavelengths– burnished copper has roughly:

F0,blue = 0.1, F0,green = 0.2, F0,red = 0.5 Thus colour of specular reflection does

depend on material

Page 7: 1GR2-00 GR2 Advanced Computer Graphics AGR Lecture 6 Physically Based Reflection Model

7GR2-00

Fresnel EquationFresnel Equation

As increases from 0 ...F = F0 + ( 1 - cos )5 ( 1 - F0 )

– so, as increases, then F increases until F90 = 1 (independent of )

This means that when light is tangential to the surface:– full reflectance, independent of – reflected colour independent of the material

Thus reflectance does depend on angle of incidence

Page 8: 1GR2-00 GR2 Advanced Computer Graphics AGR Lecture 6 Physically Based Reflection Model

8GR2-00

In Reality...In Reality...

In reality, surfaces are not perfect mirrors

A physically based approach models the surface as microfacets

Each microfacet is a perfect reflecting surface, ie a mirror, but oriented at an angle to the average surface normal

cross-sectionthrough themicrofacetedsurface

averagesurfacenormal

Page 9: 1GR2-00 GR2 Advanced Computer Graphics AGR Lecture 6 Physically Based Reflection Model

9GR2-00

Specular Reflection from Microfaceted Surface

Specular Reflection from Microfaceted Surface

The specular reflectance from this surface depends on three factors:– the number of facets oriented

correctly to the viewer (remember facets are mirrors)

– incident light may be shadowed, or reflected light may be masked

– Fresnel’s reflectance equations predict colour change depending on angle of incidence

Page 10: 1GR2-00 GR2 Advanced Computer Graphics AGR Lecture 6 Physically Based Reflection Model

10GR2-00

Orientation of FacetsOrientation of Facets

Only a certain proportion (D) of facets will be correctly aligned with the viewer

Cook and Torrancegive formula for Din terms of:- angle of viewer- average roughness

Heye

light

Page 11: 1GR2-00 GR2 Advanced Computer Graphics AGR Lecture 6 Physically Based Reflection Model

11GR2-00

Shadowing and MaskingShadowing and Masking

Light can be fully reflected

Some reflected light may hit other facets

Some incident light may never reach a facet

Cook and Torrance give formula for G, fraction of reflected light,depending on angle of incidence and angle of view

Page 12: 1GR2-00 GR2 Advanced Computer Graphics AGR Lecture 6 Physically Based Reflection Model

12GR2-00

Specular TermSpecular Term

This leads to:

Rs( ) = F( ) D G / (N.V)

where:D = proportion of microfacets correctly alignedG = fraction of light shadowed or maskedF = Fresnel factorN.V adjusts for facets visible to viewer

In practice, Rs is calculated for red, green, blue Note it depends on angle of incidence and

angle of view

Page 13: 1GR2-00 GR2 Advanced Computer Graphics AGR Lecture 6 Physically Based Reflection Model

13GR2-00

Cook and Torrance Reflection Model

Cook and Torrance Reflection Model

The specular term is calculated as described and combined with a uniform diffuse term:– Reflection (angle of incidence, viewing angle) =

s Rs + d Rd

(where s + d = 1)– Known as bi-directional reflectance

For metals: d = 0, s = 1 For shiny plastics: d = 0.9, s = 0.1 Further reading: Watt (3rd ed) Chap 7;

Foley et al, Ch 16

Page 14: 1GR2-00 GR2 Advanced Computer Graphics AGR Lecture 6 Physically Based Reflection Model

14GR2-00

AluminiumAluminium

Page 15: 1GR2-00 GR2 Advanced Computer Graphics AGR Lecture 6 Physically Based Reflection Model

15GR2-00

BronzeBronze

Page 16: 1GR2-00 GR2 Advanced Computer Graphics AGR Lecture 6 Physically Based Reflection Model

16GR2-00

ChromeChrome

Page 17: 1GR2-00 GR2 Advanced Computer Graphics AGR Lecture 6 Physically Based Reflection Model

17GR2-00

Stainless SteelStainless Steel

Page 18: 1GR2-00 GR2 Advanced Computer Graphics AGR Lecture 6 Physically Based Reflection Model

18GR2-00

Phong MoviePhong Movie

Page 19: 1GR2-00 GR2 Advanced Computer Graphics AGR Lecture 6 Physically Based Reflection Model

19GR2-00

Physically Based MoviePhysically Based Movie