Shading Variation in observed color across an object strongly affected by lighting present even for homogeneous material caused by how a material reflects light depends on geometry lighting material therefore gives cues to all 3 [Philip Greenspun] © 2004 Steve Marschner • 1
Recognizing materials Human visual system is quite good at understanding shading [Dror, Adelson, & Willsky] © 2004 Steve Marschner • 2
metal dielectric Simple materials © 2004 Steve Marschner • 3 Materials - physics -> conductors and insulators (mirrors and glass) - complex interface -> glossy behavior - complex subsurface -> diffuse © 2004 Steve Marschner • 3
Adding microgeometry © 2004 Steve Marschner • 4
Classic reflection behavior ideal specular (Fresnel) rough specular Lambertian © 2004 Steve Marschner • 5
Diffuse reflection Light is scattered uniformly in all directions the surface color is the same for all viewing directions Lambert’s cosine law Top face of cube receives a certain amount of light Top face of 60º rotated cube intercepts half the light In general, light per unit area is proportional to cos = L . N © 2004 Steve Marschner • 7
Lambertian shading Shading independent of view direction illumination from source diffuse coefficient diffusely reflected light © 2004 Steve Marschner • 8
Lambertian shading Produces matte appearance [Foley et al.] © 2004 Steve Marschner • 9
Diffuse shading © 2004 Steve Marschner • 10
Q Lambertian Shading In which configuration does the Lambertian surface appear brightest? (A) (B) (C) (D) © 2004 Steve Marschner • 11
Specular shading (Phong model) Intensity depends on view direction bright near mirror configuration © 2004 Steve Marschner • 12
Specular shading (Phong model) Intensity depends on view direction bright near mirror configuration © 2004 Steve Marschner • 13
Specular shading (Phong model) Intensity depends on view direction bright near mirror configuration specularly reflected light specular coefficient © 2004 Steve Marschner • 14
Phong model—plots Increasing n narrows the lobe [Foley et al.] © 2004 Steve Marschner • 15
Phong variant: Blinn-Phong Rather than computing reflection directly, just compare to normal bisection property © 2004 Steve Marschner • 16
Specular shading Phong and Blinn-Phong [Foley et al.] © 2004 Steve Marschner • 17
Diffuse + Phong shading © 2004 Steve Marschner • 18
Q Specular Shading In which configuration does the specular surface appear brightest? (A) (B) (C) (D) © 2004 Steve Marschner • 19
reflected ambient light Ambient shading Shading does not depend on anything add constant color to account for disregarded illumination and fill in black shadows ambient coefficient reflected ambient light © 2004 Steve Marschner • 20
Putting it together Usually include ambient, diffuse, Phong in one model The final result is the sum over many lights © 2004 Steve Marschner • 21
Lighting Coefficients Q What are the coefficients for this rendering? kAmbient = 0, kDiffuse = 0, kSpecular = 0 kAmbient = 0, kDiffuse = 0.5, kSpecular = 0.5 kAmbient = 0.5, kDiffuse = 0.5, kSpecular = 0 kAmbient = 0.5, kDiffuse = 0, kSpecular = 0.5 kAmbient = 0, kDiffuse = 0, kSpecular = 0.5
Diffuse + mirror reflection (glazed) (glazed material on floor) © 2004 Steve Marschner • 23
http://www.cs.brown.edu/exploratories/freeSoftware/repository/edu/brown/cs/exploratories/applets/reflection2D/reflection_2d_java_browser.html http://www.cs.princeton.edu/~min/cs426/jar/light.html © 2004 Steve Marschner • 24
© 2004 Steve Marschner • 25
[levoy] © 2004 Steve Marschner • 26
Isotropic vs anisotropic © 2004 Steve Marschner • 27
© 2004 Steve Marschner • 28
© 2004 Steve Marschner • 29
BRDF Q (A) (B) (C) (D)