seminar
play

Seminar LIGHTING MODELS What is a light? Types of light - PowerPoint PPT Presentation

Computer Graphics Seminar LIGHTING MODELS What is a light? Types of light Illumination models Shading models What is a light? Illumination models Shading models Lighting models What is a light? Delta Lights


  1. Computer Graphics Seminar LIGHTING MODELS

  2.  What is a light?  Types of light  Illumination models  Shading models

  3.  What is a light?  Illumination models  Shading models  Lighting models

  4. What is a light?

  5. Delta Lights  Light entities with no physical size  Used because simulating area lights was for a very long time too expensive  today should be avoided as much as possible

  6.  What is a light?  Types of light  Illumination models  Shading models

  7. Types of light  Directional light  Point light  Spotlight

  8. Directional light

  9. Point Light

  10. Point light VS Spotlight

  11. Spotlight

  12.  What is a light?  Types of lights  Illumination models  Shading models

  13. Illumination Models Global Illumination = Ambient Light + Diffuse Light + Specular Light + Emissive Light

  14. The emissive ligthing • Each polygon is self-luminous (it lights itself, but does not give off light) • There are no lights in the scene • Each polygon has its own colour which is constant Over its surface That color is not affected by anything else in the world position of viewer is not important

  15. Calculating Emissive Term emissive = K e where: K e is the material's emissive color.

  16. The Ambient Term Ambient light does not appear to come from any particular direction, rather it appears to come from all directions, because of this it does not depend on light source position.

  17. Calculating Ambient Term ambient = K a x globalAmbient Where : K a is the material's ambient colour  globalAmbient is the color of the  incoming ambient light.

  18. Diffuse Term comes from a specific direction

  19. Diffuse Term The diffuse term accounts for directed light reflected off a surface equally in all directions.

  20. The Diffuse Term diffuse = K d x lightColor x max( N · L , 0) Kd is the material's diffuse color lightColor is the color of the incoming diffuse light N is the normalized surface normal P is the point being shaded. L is the normalized vector toward the light source

  21. The Specular Term Rendering the specular term Light is reflected from the surface in mirror direction brightness depends on theta - angle between surface normal (N) and the direction to the light source

  22. The specular Term

  23. Specular Term

  24. Adding The terms together

  25. Ambient+Diffuse+Specular

  26. Material Properties Demo diffuse color -how the material reflects light diffusely specular color – how material reflects light specularly  http://math.hws.edu/graphicsbook/c4/s1 .html

  27. Different Lighting Models

  28. Phong Lighting Model

  29. Phong Ligthing model

  30. Blinn-Phong Lighting Model Another, a bit more realistic, lighting model is the Blinn- Phong model that calculates the specular term somewhat differently.

  31. Blinn phong VS phong

  32. real-world photograph

  33.  What is a light?  Types of light  Illumination models  Shading models

  34. What is shading?

  35. Shading models There are three main shading models that are used for different result. Flat Shading Gouraud Shading (per vertex) Phong Shading (per fragment)

  36. Three main shading models

  37. 3D mesh Consists of: Vertices, edges that form faces, Face normals - orthogonal to the face. Normals + light source we determine Colour of the face.

  38. Flat Shading (per polygon)  It defines a single color for a face.  main idea is that we use only one surface normal per polygon  The color itself is uniform (unchanging) on that polygon.

  39. Flat shading is in screen space ⊕ easiest to implement, really fast ⊖ ugly results, only good results if mesh resolution is such that one face corresponds to one pixel on the screen, this breaks down when zooming in.

  40. Example of Flat Shading Model

  41. Linear interpolation

  42. Positive and Negative sides of Gouraud Shading is in screen space - ⊕ pretty efficient and not too hard to implement, nice shading on medium to high mesh resolution ⊖ looks bad on low mesh resolution, has perspective distortion, which can also be noticed on rotation of the object or if you change the triangle shapes. ⊖ if the light source is specular and focused on a very small area, Gouraud Shading might not render it correctly (if it doesn’t hit and illuminate a vertex, but only hits a face or an edge of the mesh)

  43. Example of Gouraud Shading

  44. Phong shading

  45. Results of Phong Shading ⊕ great shading of round and smooth objects at any mesh resolution ⊖ can’t change the mesh contour ⊖ is more challenging to implement and takes longer to compute than the other two algorithms ⊖ always assumes a smooth basic shape, i.e. if the object we want to display has sharp edges that should actually be sharp (e.g. if we try to render a cube), it will make the edges look somewhat round instead of shading the faces in different light.

  46. Example of Phong Shading http://multivis.net/lecture/phong.html

  47. If the object resolution is higher

  48. Fog Fog makes objects that are further away look less distinct than near objects

  49. Why is fog shading needed ?

  50. The monster sees a much softer horizon

  51. Thank you !

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