10illumination

835 views

Published on

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
835
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
17
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

10illumination

  1. 1. Illumination Model 고려대학교 컴퓨터 그래픽스 연구실
  2. 2. Illumination <ul><li>How do We Compute Radiance for a Sample Ray? </li></ul><ul><ul><li>Must derive computer models for ... </li></ul></ul><ul><ul><ul><li>Emission at light sources </li></ul></ul></ul><ul><ul><ul><li>Scattering at surfaces </li></ul></ul></ul><ul><ul><ul><li>Reception at the camera </li></ul></ul></ul>Wireframe Without Illumination Direct Illumination
  3. 3. Overview <ul><li>Direct Illumination </li></ul><ul><ul><li>Emission at light sources </li></ul></ul><ul><ul><li>Scattering at surfaces </li></ul></ul><ul><li>Global Illumination </li></ul><ul><ul><li>Shadows </li></ul></ul><ul><ul><li>Refractions </li></ul></ul><ul><ul><li>Inter-object reflections </li></ul></ul>Direct Illumination
  4. 4. Overview <ul><li>Direct Illumination </li></ul><ul><ul><li>Emission at light sources </li></ul></ul><ul><ul><li>Scattering at surfaces </li></ul></ul><ul><li>Global Illumination </li></ul><ul><ul><li>Shadows </li></ul></ul><ul><ul><li>Refractions </li></ul></ul><ul><ul><li>Inter-object reflections </li></ul></ul>Direct Illumination
  5. 5. Modeling Light Source <ul><li>I L ( x,y,z,  ) </li></ul><ul><ul><li>Describes the intensity of energy, </li></ul></ul><ul><ul><li>Leaving a light source </li></ul></ul><ul><ul><li>Arriving at location(x,y,z) </li></ul></ul><ul><ul><li>From direction (  ) </li></ul></ul><ul><ul><li>With wavelength  </li></ul></ul>
  6. 6. Empirical Model <ul><li>Ideally Measure Irradiant Energy for “All” Situations </li></ul><ul><ul><li>Too much storage </li></ul></ul><ul><ul><li>Difficult in practice </li></ul></ul>
  7. 7. Light Source Model <ul><li>Simple Mathematical Models: </li></ul><ul><ul><li>Point light </li></ul></ul><ul><ul><li>Directional light </li></ul></ul><ul><ul><li>Spot light </li></ul></ul>
  8. 8. Point Light Source <ul><li>Models Omni-Directional Point Source (E.g., Bulb) </li></ul><ul><ul><li>Intensity (I 0 ) </li></ul></ul><ul><ul><li>Position (px, py, pz) </li></ul></ul><ul><ul><li>Factors (k c , k l , k q ) for attenuation with distance (d) </li></ul></ul>
  9. 9. Directional Light Source <ul><li>Models Point Light Source at Infinity (E.g., Sun) </li></ul><ul><ul><li>Intensity (I 0 ) </li></ul></ul><ul><ul><li>Direction (dx,dy,dz) </li></ul></ul>No attenuation with distance
  10. 10. Spot Light Source <ul><li>Models Point Light Source with Direction (E.g., Luxo) </li></ul><ul><ul><li>Intensity (I 0 ), </li></ul></ul><ul><ul><li>Position (px, py, pz) </li></ul></ul><ul><ul><li>Direction (dx, dy, dz) </li></ul></ul><ul><ul><li>Attenuation </li></ul></ul>
  11. 11. Overview <ul><li>Direct Illumination </li></ul><ul><ul><li>Emission at light sources </li></ul></ul><ul><ul><li>Scattering at surfaces </li></ul></ul><ul><li>Global Illumination </li></ul><ul><ul><li>Shadows </li></ul></ul><ul><ul><li>Refractions </li></ul></ul><ul><ul><li>Inter-object reflections </li></ul></ul>Direct Illumination
  12. 12. Modeling Surface Reflection <ul><li>R s (  ,  ) </li></ul><ul><ul><li>Describes the amount of incident energy </li></ul></ul><ul><ul><li>Arriving from direction (  ) </li></ul></ul><ul><ul><li>Leaving in direction (  ,  ) </li></ul></ul><ul><ul><li>With wavelength  </li></ul></ul>
  13. 13. Empirical Model <ul><li>Ideally Measure Radiant Energy for “All” Combinations of Incident Angles </li></ul><ul><ul><li>Too much storage </li></ul></ul><ul><ul><li>Difficult in practice </li></ul></ul>
  14. 14. Reflectance Model <ul><li>Simple Analytic Model: </li></ul><ul><ul><li>Diffuse reflection + </li></ul></ul><ul><ul><li>Specular reflection + </li></ul></ul><ul><ul><li>Emission + </li></ul></ul><ul><ul><li>“ Ambient” </li></ul></ul>Based on model proposed by Phong
  15. 15. Reflectance Model <ul><li>Simple Analytic Model: </li></ul><ul><ul><li>Diffuse reflection + </li></ul></ul><ul><ul><li>Specular reflection + </li></ul></ul><ul><ul><li>Emission + </li></ul></ul><ul><ul><li>“ Ambient” </li></ul></ul>Based on model proposed by Phong
  16. 16. Diffuse Reflection <ul><li>Assume Surface Reflects Equally in All Directions </li></ul><ul><ul><li>Examples: chalk, clay </li></ul></ul>
  17. 17. Diffuse Reflection <ul><li>How Much Light is Reflected? </li></ul><ul><ul><li>Depends on angle of incident light </li></ul></ul><ul><ul><li>dL  dA  cos  </li></ul></ul>
  18. 18. Diffuse Reflection <ul><li>Lambertian Model </li></ul><ul><ul><li>Cosine law (dot product) </li></ul></ul>
  19. 19. Reflectance Model <ul><li>Simple Analytic Model: </li></ul><ul><ul><li>Diffuse reflection + </li></ul></ul><ul><ul><li>Specular reflection + </li></ul></ul><ul><ul><li>Emission + </li></ul></ul><ul><ul><li>“ Ambient” </li></ul></ul>Based on model proposed by Phong
  20. 20. Specular Reflection <ul><li>Reflection is Strongest Near Mirror Angle </li></ul><ul><ul><li>Examples: mirrors, metals </li></ul></ul>
  21. 21. Specular Reflection <ul><li>How Much Light is Seen? </li></ul><ul><ul><li>Depends on angle of incident light and angle to viewer </li></ul></ul>
  22. 22. Specular Reflection <ul><li>Phong Model </li></ul><ul><ul><li>{cos(  )} n </li></ul></ul>
  23. 23. Reflectance Model <ul><li>Simple Analytic Model: </li></ul><ul><ul><li>Diffuse reflection + </li></ul></ul><ul><ul><li>Specular reflection + </li></ul></ul><ul><ul><li>Emission + </li></ul></ul><ul><ul><li>“ Ambient” </li></ul></ul>Based on model proposed by Phong
  24. 24. Emission <ul><li>Represents Light Emitting Directly From Polygon </li></ul>Emission ≠ 0
  25. 25. Reflectance Model <ul><li>Simple Analytic Model: </li></ul><ul><ul><li>Diffuse reflection + </li></ul></ul><ul><ul><li>Specular reflection + </li></ul></ul><ul><ul><li>Emission + </li></ul></ul><ul><ul><li>“ Ambient” </li></ul></ul>Based on model proposed by Phong
  26. 26. Ambient Term <ul><li>Represents Reflection of All Indirect Illumination </li></ul>This is a total hack (avoids complexity of global illumination)!
  27. 27. Reflectance Model <ul><li>Simple Analytic Model: </li></ul><ul><ul><li>Diffuse reflection + </li></ul></ul><ul><ul><li>Specular reflection + </li></ul></ul><ul><ul><li>Emission + </li></ul></ul><ul><ul><li>“ Ambient” </li></ul></ul>
  28. 28. Reflectance Model <ul><li>Simple Analytic Model: </li></ul><ul><ul><li>Diffuse reflection + </li></ul></ul><ul><ul><li>Specular reflection + </li></ul></ul><ul><ul><li>Emission + </li></ul></ul><ul><ul><li>“ Ambient” </li></ul></ul>
  29. 29. Reflectance Model <ul><li>Sum Diffuse, Specular, Emission, and Ambient </li></ul>
  30. 30. Surface Illumination Calculation <ul><li>Single Light Source: </li></ul>
  31. 31. Surface Illumination Calculation <ul><li>Multiple Light Sources: </li></ul>
  32. 32. Overview <ul><li>Direct Illumination </li></ul><ul><ul><li>Emission at light sources </li></ul></ul><ul><ul><li>Scattering at surfaces </li></ul></ul><ul><li>Global Illumination </li></ul><ul><ul><li>Shadows </li></ul></ul><ul><ul><li>Refractions </li></ul></ul><ul><ul><li>Inter-object reflections </li></ul></ul>Global Illumination
  33. 33. Global Illumination
  34. 34. Shadows <ul><li>Shadow Terms Tell Which Light Sources are Blocked </li></ul><ul><ul><li>Cast ray towards each light source L i </li></ul></ul><ul><ul><li>S i = 0 if ray is blocked, S i = 1 otherwise </li></ul></ul>Shadow Term
  35. 35. Ray Casting <ul><li>Trace Primary Rays from Camera </li></ul><ul><ul><li>Direct illumination from unblocked lights only </li></ul></ul>
  36. 36. Recursive Ray Tracing <ul><li>Also Trace Secondary Rays from Hit Surfaces </li></ul><ul><ul><li>Global illumination from mirror reflection and transparency </li></ul></ul>
  37. 37. Mirror Reflection <ul><li>Trace Secondary Ray in Direction of Mirror Reflection </li></ul><ul><ul><li>Evaluate radiance along secondary ray and include it into illumination model </li></ul></ul>Radiance for mirror reflection ray
  38. 38. Transparency <ul><li>Trace Secondary Ray in Direction of Refraction </li></ul><ul><ul><li>Evaluate radiance along secondary ray and include it into illumination model </li></ul></ul>Radiance for refraction ray
  39. 39. Transparency <ul><li>Transparency coefficient is fraction transmitted </li></ul><ul><ul><li>K T = 1 if object is translucent, K T = 0 if object is opaque </li></ul></ul><ul><ul><li>0 < K T < 1 if object is semi-translucent </li></ul></ul>Transparency Coefficient
  40. 40. Refractive Transparency <ul><li>For Thin Surfaces, Can Ignore Change in Direction </li></ul><ul><ul><li>Assume light travels straight through surface </li></ul></ul>
  41. 41. Refractive Transparency <ul><li>For Solid Objects, Apply Snell’s Law: </li></ul><ul><ul><li> r sin  r  i  sin  i  </li></ul></ul>
  42. 42. Summary <ul><li>Direct Illumination </li></ul><ul><ul><li>Ray casting </li></ul></ul><ul><ul><li>Usually use simple analytic approximations for light source emission and surface reflectance </li></ul></ul><ul><li>Global illumination </li></ul><ul><ul><li>Recursive ray tracing </li></ul></ul><ul><ul><li>Incorporate shadows, mirror reflections, </li></ul></ul><ul><ul><li>and pure refractions </li></ul></ul>
  43. 43. Illumination Terminology <ul><li>Radiant power [flux] ( Φ ) </li></ul><ul><ul><li>Rate at which light energy is transmitted (in Watts). </li></ul></ul><ul><li>Radiant Intensity (I) </li></ul><ul><ul><li>Power radiated onto a unit solid angle in direction( in Watt/sr) </li></ul></ul><ul><ul><ul><li>e.g.: energy distribution of a light source (inverse square law) </li></ul></ul></ul><ul><li>Radiance (L) </li></ul><ul><ul><li>Radiant intensity per unit projected surface area( in Watts/m 2 sr) </li></ul></ul><ul><ul><ul><li>e.g.: light carried by a single ray (no inverse square law) </li></ul></ul></ul><ul><li>Irradianc (E) </li></ul><ul><ul><li>Incident flux density on a locally planar area (in Watts/m 2 ) </li></ul></ul><ul><li>Radiosity (B) </li></ul><ul><ul><li>Exitant flux density from a locally planar area ( in Watts/m 2 ) </li></ul></ul>

×