1 / 41

Reflection Model

Reflection Model. 고려대학교 컴퓨터 그래픽스 연구실. Content. Shading Light sources Point, distant, and spot lights Phong reflection model Diffuse reflection Specular reflection Ambient reflection Computation of vectors Normal vectors, angle of reflection, and transmitted light. Shading.

Download Presentation

Reflection Model

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Reflection Model 고려대학교 컴퓨터 그래픽스 연구실 kucg.korea.ac.kr

  2. Content • Shading • Light sources • Point, distant, and spot lights • Phong reflection model • Diffuse reflection • Specular reflection • Ambient reflection • Computation of vectors • Normal vectors, angle of reflection, and transmitted light kucg.korea.ac.kr

  3. Shading • Determine a color for each filled pixel • How to choose a color • the color of the light source and of the surfaces determines the color of one or more pixels in the frame buffer kucg.korea.ac.kr

  4. Light and Matter • Color is determined by multiple interactions among light sources and reflective surfaces • recursive reflection of light between surfaces accounts for subtle shading Rendering Equation kucg.korea.ac.kr

  5. Light-Material Interactions • Specular surfaces – mirror • scatter reflected light in a narrow range of angle • Diffuse surfaces – chalk, clay • scatter reflected light all directions • Translucent surfaces – glass, water • refraction specular surface diffuse surface translucent surface kucg.korea.ac.kr

  6. Light Sources • Illumination function I (x, y, z, θ, φ, λ) • each point (x, y, z) on the surface • direction of emission (θ, φ) • wavelength λ light source kucg.korea.ac.kr

  7. Modeling Light Sources • Simple mathematical models: • ambient light • point light • distant light • spot light kucg.korea.ac.kr

  8. Color Sources • Three-color theory • human perceive three primary colors – red, green, and blue • three-component intensity or luminance function • independent calculations kucg.korea.ac.kr

  9. Ambient Light • Uniform lighting • identical at every point in the scene kucg.korea.ac.kr

  10. Point Sources (1/2) • Emit light equally in all directions • p0: point source location • proportional to the inverse square distance point source illuminating a surface kucg.korea.ac.kr

  11. Point Sources (2/2) • Large finite size of most light sources • umbra: full shadow • penumbra: partial shadow • Attenuation shadows created by finite-size light source kucg.korea.ac.kr

  12. Spotlights • Characterized by a narrow range of angle through which light is emitted • ps: apex of a cone • ls: direction of pointing • θ: angle to determine width • Distribution of light • concentrate in the center • light intensity drop off spotlight attenuation exponent kucg.korea.ac.kr

  13. Distant Light Sources • far from the surface  vector does not change • location  direction parallel light source kucg.korea.ac.kr

  14. Phong Reflection Model (1/5) • Efficient and close enough approximation to physical reality to produce good renderings • Use 4 vectors • n: normal at p • v: direction from p to the viewer or COP • l: direction from light source • r: direction of reflectance • 3 types of material-light interactions • ambient, diffuse, and specular vectors used by the Phong model kucg.korea.ac.kr

  15. Phong Reflection Model (2/5) • Simple analytic model: • Diffuse reflection + • Specular reflection + • Emission + • “Ambient” Based on model proposed by Phong kucg.korea.ac.kr

  16. Phong Reflection Model (2/5) • Simple analytic model: • Diffuse reflection + • Specular reflection + • Emission + • “Ambient” Based on model proposed by Phong kucg.korea.ac.kr

  17. Diffuse Reflection (1/3) • Assume surface reflects equally in all directions • Examples: chalk, clay kucg.korea.ac.kr

  18. Diffuse Reflection (2/3) • How much light is reflected? • Depends on angle of incident light • dL = dAcos Q kucg.korea.ac.kr

  19. Diffuse Reflection (3/3) • Lambertian model • Cosine law (dot product) kucg.korea.ac.kr

  20. Phong Reflection Model (2/5) • Simple analytic model: • Diffuse reflection + • Specular reflection + • Emission + • “Ambient” Based on model proposed by Phong kucg.korea.ac.kr

  21. Specular Reflection (1/3) • Reflection is strongest near mirror angle • Examples: mirrors, metals kucg.korea.ac.kr

  22. Specular Reflection (2/3) • How much light is seen? • Depends on angle of incident light and angle to viewer kucg.korea.ac.kr

  23. Specular Reflection (3/3) • Phong model • {cos(a)}n kucg.korea.ac.kr

  24. Phong Reflection Model (2/5) • Simple analytic model: • Diffuse reflection + • Specular reflection + • Emission + • “Ambient” Based on model proposed by Phong kucg.korea.ac.kr

  25. Emission • Represents light emitting directly from polygon Emission ≠ 0 kucg.korea.ac.kr

  26. Phong Reflection Model (2/5) • Simple analytic model: • Diffuse reflection + • Specular reflection + • Emission + • “Ambient” Based on model proposed by Phong kucg.korea.ac.kr

  27. Ambient Term • Represents reflection of all indirect illumination This is a total hack (avoids complexity of global illumination)! kucg.korea.ac.kr

  28. Phong Reflection Model (3/5) • Simple analytic model: • Diffuse reflection + • Specular reflection + • Emission + • “Ambient” kucg.korea.ac.kr

  29. Phong Reflection Model (4/5) • Simple analytic model: • Diffuse reflection + • Specular reflection + • Emission + • “Ambient” kucg.korea.ac.kr

  30. Phong Reflection Model (5/5) • Sum diffuse, specular, emission, and ambient kucg.korea.ac.kr

  31. Surface Illumination Calculation (1/2) • Single light source: kucg.korea.ac.kr

  32. Surface Illumination Calculation (2/2) • Multiple light sources: kucg.korea.ac.kr

  33. Computation of Reflection • Light source and reflection term • Ex. red intensity • Total Intensity kucg.korea.ac.kr

  34. Ambient Reflection • Same at every point on the surface • Ambient reflection coefficient • amount reflected • some of light source is absorbed and some is reflected • three ambient coefficients – , , and • Ambient reflection term • can be any of the individual light sources • can be a global ambient term kucg.korea.ac.kr

  35. Diffuse Reflection (1/2) • Characterized by rough surfaces • perfectly diffuse surface  so rough that there is no preferred angle of reflection • Lambert’s law • only the vertical component of light source rough surface at noon in the afternoon Lambert’s law kucg.korea.ac.kr

  36. Diffuse Reflection (2/2) • Lambert’s law (cont’) • Diffuse reflection term • incorporate a distance term Lambert’s law kucg.korea.ac.kr

  37. Specular Reflection • Specular surface is smooth • highlight in the direction of the viewer • Specular reflection term • shininess coefficient • α  infinite : mirror • 100 < α < 500 : metal • α < 100 : broad highlight specular surface specular highlights effect of shininess coefficient kucg.korea.ac.kr

  38. Illumination Equation • Including the distance term kucg.korea.ac.kr

  39. Utah Teapots with Different Material Properties kucg.korea.ac.kr

  40. p1 p0 p2 Computation of Vectors (1/2) • Normal vectors • in OpenGL • Angle of reflection n glNormal3f(nx, ny, nz); glNormal3fv(pointer_to_normal); coplanar condition ① ② by ① and ② mirror kucg.korea.ac.kr

  41. Computation of Vectors (2/2) • Halfway vector • half-angle: 2ψ=φ • Transmitted light • Snell’s law halfway vector perfect light transmission kucg.korea.ac.kr

More Related