1 / 66

CSCE 441: Computer Graphics Lighting

Learn about lighting and reflection in the 3D rendering pipeline, including transforming objects into the 3D world system, illuminating according to lighting and reflectance, transforming into the 2D camera system, and more.

pablobell
Download Presentation

CSCE 441: Computer Graphics Lighting

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. CSCE 441: Computer GraphicsLighting Jinxiang Chai

  2. 3D Rendering pipeline Modeling transformation Transform into 3D world system Illuminate according to lighting and reflectance lighting Transform into 3D camera coordinate system Viewing transformation Transform into 2D camera system Project transformation Clip primitives outside camera’s view Clipping Draw pixels (includes texturing, hidden surface, etc.) Scan conversion Image

  3. 3D Rendering pipeline Modeling transformation Transform into 3D world system Illuminate according to lighting and reflectance lighting Transform into 3D camera coordinate system Viewing transformation Transform into 2D camera system Project transformation Clip primitives outside camera’s view Clipping Draw pixels (includes texturing, hidden surface, etc.) Scan conversion Image

  4. Outline Ambient, diffuse and specular light Light attenuation & spot lights Readings: HB 17-1,12-2,17-3

  5. Lighting/Illumination • Color is a function of how light reflects from surfaces to the eye • Global illumination accounts for light from all sources as it is transmitted throughout the environment • Local illumination only accounts for light that directly hits a surface and is transmitted to the eye

  6. Direct and Indirect Light

  7. Global Illumination II

  8. Global Illumination II

  9. Lighting/Illumination Color is a function of how light reflects from surfaces to the eye Global illumination accounts for light from all sources as it is transmitted throughout the environment Local illumination only accounts for light that directly hits a surface and is transmitted to the eye

  10. Light Sources • Any object emitting radiant energy is a light source that contributes to the lighting effects for other objects in a scene • Point light sources: defined by its position and the color of the mitted light (RGB) • Infinitely distant light sources: basically a point light source very far from a scene. Defined by its direction and the color of the light (RGB)

  11. Reflection Models • Definition: Reflection is the process by which light incident on a surface interacts with the surface such that it leaves on the incident side without change in frequency.

  12. Reflection Models • Definition: Reflection is the process by which light incident on a surface interacts with the surface such that it leaves on the incident side without change in frequency.

  13. Reflection Models • Definition: Reflection is the process by which light incident on a surface interacts with the surface such that it leaves on the incident side without change in frequency.

  14. Reflection Models • Definition: Reflection is the process by which light incident on a surface interacts with the surface such that it leaves on the incident side without change in frequency.

  15. Reflection Models Definition: Reflection is the process by which light incident on a surface interacts with the surface such that it leaves on the incident side without change in frequency. Reflected light?

  16. Reflection Models Definition: Reflection is the process by which light incident on a surface interacts with the surface such that it leaves on the incident side without change in frequency. Reflected light? This depends on the surface property!

  17. Types of Reflection Functions • Ideal Specular • Reflection Law • Mirror

  18. Types of Reflection Functions • Ideal Specular • Reflection Law • Mirror • Ideal Diffuse • Lambert’s Law • Matte

  19. Types of Reflection Functions • Ideal Specular • Reflection Law • Mirror • Ideal Diffuse • Lambert’s Law • Matte • Specular • Glossy • Directional diffuse

  20. Materials Plastic Metal Matte From Apodaca and Gritz, Advanced RenderMan

  21. Illumination Model • Ambient Light • Uniform light caused by secondary reflections • Diffuse Light • Light scattered equally in all directions • Specular Light • Highlights on shiny surfaces

  22. Ambient Light • A =intensity of ambient light • ka= ambient reflection coefficient • Really 3 equations! (Red, Green, Blue) • Accounts for indirect illumination • Determines color of shadows A=R*Cr+ G*Cg+B*Cb

  23. Total Illumination

  24. Diffuse Light • Assumes that light is reflected equally in all directions • Handles both local and infinite light sources • Infinite distance: L doesn’t change • Finite distance: must calculate L for each point on surface Surface

  25. Diffuse Light • C = intensity of point light source • kd = diffuse reflection coefficient • = angle between normal and direction to light C=R*Cr+ G*Cg+B*Cb Surface

  26. Lambert’s Law • The reflected luminous intensity observed from an ideal diffusely reflecting surface is proportional to the cosine of the angle between the direction of the incident light and the surface normal Surface

  27. Lambert’s Law Beam of Light Surface

  28. Lambert’s Law Beam of Light Surface The intensity of the received light:

  29. Lambert’s Law Beam of Light Surface The intensity of the received light: The intensity of the received light:

  30. Diffuse Light Where is the light source?

  31. Diffuse Light Where is the light source?

  32. Total Illumination

  33. Total Illumination

  34. Materials Plastic Metal Matte From Apodaca and Gritz, Advanced RenderMan

  35. Specular Light • Perfect, mirror-like reflection of light from surface • Forms highlights on shiny objects (metal, plastic) Surface

  36. Specular Light • C = intensity of point light source • ks = specular reflection coefficient • = angle between reflected vector (R) and eye (E) • n = specular coefficient Surface

  37. Finding the Reflected Vector Surface

  38. Finding the Reflected Vector Surface

  39. Finding the Reflected Vector Surface

  40. Finding the Reflected Vector Surface

  41. Finding the Reflected Vector Surface

  42. Finding the Reflected Vector Surface

  43. Total Illumination

  44. Total Illumination

  45. Total Illumination

  46. Total Illumination

  47. Multiple Light Sources • Only one ambient term no matter how many lights • Light is additive; add contribution of multiple lights (diffuse/specular components)

  48. Total Illumination

  49. Total Illumination

  50. Other Lights • Attenuation caused by fog, smoke • Spot lights

More Related