1 / 49

Illumination and Shading

Illumination and Shading. Prof. Lizhuang Ma Shanghai Jiao Tong University. Contents. Illumination Models Shading Models for Polygons Surface Detail Shadows Transparency Global Illumination Recursive Ray Tracing Radiosity The Rendering Pipeline. Illumination Models. Ambient Light:

pbrandi
Télécharger la présentation

Illumination and Shading

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. Illumination and Shading Prof. Lizhuang Ma Shanghai Jiao Tong University

  2. Contents • Illumination Models • Shading Models for Polygons • Surface Detail • Shadows • Transparency • Global Illumination • Recursive Ray Tracing • Radiosity • The Rendering Pipeline

  3. Illumination Models • Ambient Light: • :intensity of the ambient light • :ambient-reflection coefficient: 0~1 • Diffuse reflection: • :point light source’s intensity • :diffuse-reflection coefficient: 0~1 • :angle:

  4. Diffuse Reflection

  5. Examples

  6. Illumination Models • :light-source attenuation factor • If the light is a point source • Diffuse reflection: where is the distance the light travels from the point source to the surface

  7. Examples

  8. Colored Lights and Surfaces • If an object’s diffuse color is • where for the red component • however, it should be generally • where is the wavelength then

  9. Specular Reflection

  10. The Phong Illumination Model • : specular-reflection coefficient: 0~1 • So, the Eq. can be rewritten as: • Consider the object’s specular color: • : specular color

  11. The Phong Model

  12. The Phong Illumination Model

  13. Examples

  14. Calculating the Reflection Vector

  15. The Halfway Vector

  16. Multiple Light Sources • If there are m light sources, then

  17. Shading Models for Polygons • Constant Shading • Faceted Shading • Flat Shading • Gouraud Shading • Intensity Interpolation Shading • Color Interpolation Shading • Phong Shading • Normal-Vector Interpolation Shading

  18. Constant Shading • Assumption • The light source is at infinity • The viewer is at infinity • The polygon represents the actual surface being modeled and is not an approximation to a curved surface: • Note that N.L ,N.V are constant across the polygon face

  19. Gouraud Shading

  20. Gouraud v.s. Phong Shading

  21. Phong Shading

  22. Texture Mapping = Pattern Mapping

  23. Bump Mapping &Displacement Mapping

  24. Shadows If light I is blocked at this point If light I is not blocked at this point

  25. Shadows If light I is blocked at this point If light I is not blocked at this point

  26. Scan-Line Generation of Shadows

  27. Shadow Volumes

  28. Shadow Volumes

  29. Shadow

  30. Transparency • Interpolated transparency • : transparency: 0~1 • Filtered transparency • :transparency color

  31. Global Illumination Direct & indirect (reflected) light sources

  32. The Rendering Equation • : intensity passing from to • : emitted light intensity from to • : intensity of light reflected from to from the surface at (indirect light sources) • : the distance between and • : all surfaces if is invisible from if is visible from

  33. Recursive Ray Tracing surface normal reflected ray shadow ray transmitted ray

  34. Recursive Ray Tracing surface normal reflected ray shadow ray transmitted ray

  35. Traditional Ray Tracing

  36. Ray Tracing + Soft Shadows

  37. The Ray Tree Intensity of reflected ray Transmission coefficient :0~1 Intensity of transmitted ray

  38. The Radiosity Equation • : radiosity of patch i • : rate at which light is emitted form patch i • : reflectivity of patch i • : form factor (configuration factor) • : area of patch i • Since • Thus

  39. The Radiosity Equation • Rearranging terms • Therefore • Progressive refinement

  40. Radiosity vs. Ray Tracing Original Ray traced image. Image rendered with radiosity.

  41. Computing Form Factors

  42. Hemisphere

  43. Hemicube

  44. The Rendering Pipeline • Local Illumination Pipelines • z-buffer and Gouraud shading • z-buffer and Phong shading • List-priority algorithm and Phong shading • Global Illumination Pipelines • Radiosity • Ray tracing

  45. Rendering Pipeline forz-buffer & Gouraud Shading

  46. Rendering Pipeline forz-buffer & Phone shading

  47. Rendering Pipeline forList-priority Algorithm & Gouraud Shading

  48. Rendering Pipeline forList-priority Algorithm & Phong Shading

  49. Rendering Pipeline forRay Tracing

More Related