Upload
estefania-shead
View
217
Download
2
Tags:
Embed Size (px)
Citation preview
Local Reflection Model
Jian Huang, CS 594, Fall 2002
Phong Reflection
Phong specular highlight is a simplification
Phong Model - LimitationsPhong Model - Limitations• The Phong model is based more on common sense
than physics– Perfect specular reflection only occurs on a perfect
mirror surface stroke by a thin light beam
• 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
Physically Based Specular ReflectionPhysically Based Specular Reflection
• After Phong’s work in 1975, Jim Blinn proposed physically simulated specular component
• In 1983, Cook and Torrance extended this model to account for the spectral composition of highlights, ie. dependencies on :
• Material type• Angle of incidence
• With physically based local reflection model, can computer pre-computer BRDF
Modeling the Micro-geometryModeling the Micro-geometry• In reality, surfaces are not perfect mirrors
• A physically based approach models the surface as micro-facets
• Each micro-facet is a perfect reflecting surface, ie a mirror, but oriented at an angle to the average surface normal
cross-sectionthrough themicrofacetedsurface
averagesurfacenormal
Specular ReflectionSpecular Reflection
• The specular reflection 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
Orientation of FacetsOrientation of Facets
• Only a certain proportion (D) of facets will in a particular direction, e.g. viewing direction
Heye
light
A Statistical Distribution
• Cook and Torrance give formula for D in terms of:– Gaussian distribution: D = k exp[-(/m)2]
• : angle of viewer (angle between N and H)• m: standard deviation of the distribution
• Assumptions:– Small micro-facets is still larger than the
wavelength of light in size– Diameter of the light beam can intersect a large
number of micro-facets to be statistically correct
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
Degree of Masking and Shadowing
• Dependent on the ratio l1/l2
• G = 1 - l1/l2• L: light vector, V: view vector• H = (L+V)/2
• For masking: Gm = 2(N.H)(N.V)/V.H• For shadowing: Gs = 2(N.H)(N.L)/V.H
l2 l1
The Glare Term
• Usually, as the angle between N and V approaches 90, one sees more and more glare– You are seeing more micro-facets
• Need a term to account for this effect:
1/N.V
Recap: Snell’s Law
surface1
N
v
u rreflected
rayincident
ray
surfacenormal
refractedray
1
2
1
2
2
1
2
1
sin
sin
Fresnel TermFresnel TermIn 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 term (the reflectance, F), of aperfectly smooth surface is given in terms of refractiveindex of material and angle of incidence F is wavelength dependent!
N
Fresnel Term• Don’t know how to calculate F for arbitrary
directly, so usually started with a known or measured F0.
• F is a minimum for incident light normal to the surface, ie = 0 : F0 = ( - 1 )2 / ( + 1 )2
• So different F0 for different materials
• The refractive index of a material depends on the wavelength, , so have different F0 for different – burnished copper has roughly:
F0,blue = 0.1, F0,green = 0.2, F0,red = 0.5
Fresnel Term• 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• Thus colour of specular reflection does depend on
material and incident light angle
Specular TermSpecular Term• This leads to:
Rs( ) = F( ) D G / (N.V) where:
D = proportion of microfacets aligned to viewG = fraction of light shadowed or maskedF = Fresnel termN.V glare effect term
In practice, Rs is calculated for red, green, blue
• Note it depends on angle of incidence and angle of view
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• Its BRDF does not depend on the incoming azimuth
Aluminium
Bronze
Chrome
Stainless Steel