local reflection models
play

Local Reflection Models CS5502 Fall 2006 (c) Chun-Fa Chang Local - PDF document

Local Reflection Models CS5502 Fall 2006 (c) Chun-Fa Chang Local vs. Global CS5502 Fall 2006 (c) Chun-Fa Chang Phong Reflection Model I = Ka*Ia + kd*Id + Ks*Is specular diffuse ambient Not completely correct, but good enough.


  1. Local Reflection Models CS5502 Fall 2006 (c) Chun-Fa Chang Local vs. Global CS5502 Fall 2006 (c) Chun-Fa Chang

  2. Phong Reflection Model • I = Ka*Ia + kd*Id + Ks*Is specular diffuse ambient • Not completely correct, but good enough. CS5502 Fall 2006 (c) Chun-Fa Chang Ambient Component • Accounting for light scatter around. • Ia is constant. CS5502 Fall 2006 (c) Chun-Fa Chang

  3. Diffuse Component • Id = Ii * N·L • Not affected by viewing direction. – i.e., incoming light is reflected L to all directions. N CS5502 Fall 2006 (c) Chun-Fa Chang Glossy (Specular) Component (Phong Reflection Model) • To model imperfect reflection. • Is = Ii(N · H) n L H N V CS5502 Fall 2006 (c) Chun-Fa Chang

  4. Summary of Phong Reflection Model • I = Ka*Ia + kd*Id + Ks*Is = Ka*Ia + {Kd*(N · L)+ Ks* (N · H) n } * Ii • Where is color? Set Ka and Kd for RGB. Ir = Ka_r*Ia + {Kd_r*(N · L)+ Ks_r* (N · H) n } * Ii Ig =Ka_g*Ia + {Kd_g*(N · L)+ Ks_g* (N · H) n } * Ii Ib =Ka_b*Ia + {Kd_b*(N · L)+ Ks_b* (N · H) n } * Ii • Ka and Kd depend on material color, Ks depends on the light (which is white in the above case). CS5502 Fall 2006 (c) Chun-Fa Chang Phong Reflection Model (continued) • We had: Ir = Kar*Ia + {Kdr*(N · L)+ Ksr* (N · H) n } * Ii Ig =Kag*Ia + {Kdg*(N · L)+ Ksg* (N · H) n } * Ii Ib =Kab*Ia + {Kdb*(N · L)+ Ksb* (N · H) n } * Ii • Alternatively: I ={Ka*Ia + Kd*Ii*(N · L)} * object_color + Ks* Ii*(N · H) n * light_color CS5502 Fall 2006 (c) Chun-Fa Chang

  5. “But, they all look like plastic…” CS5502 Fall 2006 (c) Chun-Fa Chang Specular Component (Cook & Torrance Model) • Consider specular reflection as perfect reflection of micro-facets. (See Watt’s Section 7.6) • Specular= DGF /( N·V) D: Distribution term G: Geometry (shadowing and masking) term F: Fresnel term CS5502 Fall 2006 (c) Chun-Fa Chang

  6. D Term (Cook & Torrance) • Modeling the distribution of micro- geometry. • Gaussian distribution can be used: D = k e -( α /m)2 CS5502 Fall 2006 (c) Chun-Fa Chang G Term (Cook & Torrance) CS5502 Fall 2006 (c) Chun-Fa Chang

  7. The Fresnel Term • Color and ratio of reflected/transmitted light vary with the incident and viewing angles. • Detailed in Pharr’s 9.2.1 and Watt’s 7.6.4 CS5502 Fall 2006 (c) Chun-Fa Chang From Watt’s color plate Figure 7.8. These would be difficult to obtain by fine- tuning the parameters in Phong model. CS5502 Fall 2006 (c) Chun-Fa Chang

  8. “Now, are all materials covered?” No! Let’s try a sample-based method instead… CS5502 Fall 2006 (c) Chun-Fa Chang BRDF • BRDF=f( θ in , φ in , θ ref , φ ref )=f(L,V) CS5502 Fall 2006 (c) Chun-Fa Chang

  9. Watch Out for Subtly in BRDF! • Ask yourself these questions: – Why not just consider N · H as in the Phong’s glossy term? (Hint: Does incidence matter?) – Does φ in really matter? Difference between isotropic and anisotropic reflection! CS5502 Fall 2006 (c) Chun-Fa Chang Why Not Always Using BRDF? • Difficult to find a “closed form” representation of BRDF. • The Phong model and Cook & Torrance model are approximation of BRDF. – They are not 100% match of BRDF, but they are easy to compute. CS5502 Fall 2006 (c) Chun-Fa Chang

  10. Other Reflection Models • Pharr’s 9.4: other microfacet models – Oren-Nayar – Torrance-Sparrow – Blinn microfacet distribution – Anisotropic microfacet model • Pharr’s 9.5: Lafortune model • Models for particular materials: e.g., for finished wood (in SIGGRAPH 2005) CS5502 Fall 2006 (c) Chun-Fa Chang Lafortune Model • Phong model assumes the glossy reflection (lobe) appears in the direction opposite to the incident light. • This assumption is relaxed in the Lafortune model. • Multiple lobes can be used. CS5502 Fall 2006 (c) Chun-Fa Chang

  11. Gouraud Shading and Phong Shading • Gouraud and Phong shadings are interpolative techniques for rasterization. – Polygon vertices are shaded first. – Vertex colors are then interpolated to the interior pixels. CS5502 Fall 2006 (c) Chun-Fa Chang

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend