150 likes | 267 Vues
This document delves into advanced local illumination models in computer graphics, focusing on concepts such as surface properties, incident light, view vectors, and reflected radiance. It discusses various reflection models including Phong, Blinn-Phong, and Cook-Torrance, emphasizing physically based rendering techniques. Key topics include the Fresnel effect, roughness terms, and geometry terms in BRDF. The interplay of diffuse and specular reflection, along with practical hacks and model variations, are also explored. Designed for advanced learners, this resource is pivotal for understanding modern reflectance models in graphics.
E N D
Reflectance Models CS 319 Advanced Topics in Computer Graphics John C. Hart
N Local Illum. Context H (R) (S) S R • Surface point (x) and normal (N) • Light source (S, not L) • Vector from x to light “source” • Dir. incident radiance Li = L(S) comes from (like wind direction) • View vector (V) • Direction from x to “viewer” • Reflected radiance Lr = L(V) dir. • Reflection vector (R) R = 2(N S)N – S • Halfway vector (H) H = (V+S)/||V+S|| V x All vectors are unit length
Some Spec(tac)ular Hacks • Decompose BRDF diffuse+specular Lr = (fd + fs(S,V)) LiN S • Phong: fs = ks max(V R,0)n / (N S) • Blinn: fs = ks max(N H,0)n / (N S) • Blinn n = 4 Phong n • Not based on anyphysical model • Not bidirectional Phong, n=11 Blinn, n=11 Blinn, n=11 Phong, n=11 Blinn, n=44 Blinn, n=44
Cook-Torrance Torrance-Sparrowmicrofacet model • Based on Torrance-Sparrow model • Physically plausible • Bidirectional, energy conserving • Models specular BRDF component • Fh(S,V) – Fresnel term • Dm(N,H) – Roughness term • G(N,S,V) – Geometry term • Denominator counteracts foreshortening but retains bidirectionality Fh(S,V)Dm(N,H)G(N,S,V)
Fresnel Effect sheen • % of light reflected increases as “halfway incidence angle” qh increases • Normal N of rough surface not well defined, so need H instead • S and V nearly constant across surface • Fresnel effect independent of N • Nearly constant across surface • Affects color of reflected light • Normal incidencesurface color • Tangent incidencelight color • Photographic trick: place brightlight behind subject to create a Fresnel outline of features/profile pigment H S qh qh V
Fresnel Term H S qh qh V • Fresnel term F controls portion of light reflected v. portion refracted (1 – F) • Physically accurate Fresnel function • Parameterized by index of refraction h • where c = S H and g2 =2 + c2 – 1 • Schlick’s hack Fs(S,V) = F0 + (1 – F0)(1 – S H)5 • Parameter h implicit in F0 • F0 = Specular reflectance at normalincidence (S H = 1) qt cos qh = S H = V H But how do we find ? Fs(cos qr) F0 F(cos qr) qh
Roughness Term small mbig m • Statistical model of light reflectance • Roughness m = RMS of slope • Blinn’s hack Dm,c(N,H) = c exp(–a2 / m2) • Angle a = cos-1(NH) [0,p/2] • Arbitrary scale c • Creates BRDF bulge at R • Beckman’s distribution function • Bulge in BRDF diffuses around R D/c m=½ m=1 m=2 a D m=½ m=2 m=1 a
Blinn v. Beckman S m=½ m=1 m=2 Blinn Beckman
Geometry Term • Shadowing • Incident light does not reach material Gs(N,S,V) = 2(NH)(NS)/(SH) • Masking • Reflected light does not reach viewer Gm(N,S,V) = 2(NH)(NV)/(VH) • Geometry term = shadow AND mask G(N,S,V) = min{Gs(N,S,V), Gm(N,S,V), 1} • Clamp to one to keep demoninators in check x S Gs Gm G
Cook-Torrance Demo All: h=2 SV=1 SV=.707 SV=0 SV= -.707 m=½ m=2 (brighter light)
Seeliger Skin • Model for diffuse reflectance from skin • Softer appearance than Lambertian • Used as a basis for subsurface scattering in volumetric skin models • See Hanrahan & Krueger S93 Lambert Seeliger
Hair • From Kajiya & Kay S88 • Anisotropic • Uses tangent vector T • Diffuse anisotropic fd = sin(T,S) • Specular anisotropic fs = ((TS) (TV) + sin(T,S) sin(T,V))n S S T sin(A,B) = sqrt(1-(AB)2) Chang, Jin &Yu, 2001
Hair Examples diffuse spec., n=1 spec., n=8 diff+spec
Fur • Goldman S97 • Scattering of light by fur • Dihedral angle between hair-light plane and hair-view plane • Opacity is an inverted Gaussian
Fur Examples scattering opacity fake fur