1 / 24

CS361

Week 9 - Friday. CS361. Last time. What did we talk about last time? Area lighting Environment mapping Blinn and Newell's method Sphere mapping Cubic environmental mapping. Questions?. Project 3. Assignment 4. XNA Skyboxes and Environment Mapping. Student Lecture: Global Illumination.

lucius
Télécharger la présentation

CS361

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. Week 9 - Friday CS361

  2. Last time • What did we talk about last time? • Area lighting • Environment mapping • Blinn and Newell's method • Sphere mapping • Cubic environmental mapping

  3. Questions?

  4. Project 3

  5. Assignment 4

  6. XNA Skyboxes and Environment Mapping

  7. Student Lecture:Global Illumination

  8. Global Illumination

  9. The true rendering equation • The reflectance equation we have been studying is: • The full rendering equation is: • The difference is the Lo(r(p,l),-l) term which means that the incoming light to our point is the outgoing light from some other point • Unfortunately, this is all recursive (and can go on nearly forever)

  10. Local lighting • Real-time rendering uses local (non-recursive) lighting whenever possible • Global illumination causes all of our problems (unbounded object-object interaction) • Transparency • Reflections • Shadows

  11. Light paths • We can describe a path that light L makes to the eye E using the following notation

  12. Shadows

  13. Which ball is closer?

  14. The blue one!

  15. No, wait…

  16. Shadows • Shadow terminology: • Occluder: object that blocks the light • Receiver: object the shadow is cast onto • Point lights cast hard shadows (regions are completely shadows or not) • Area lights cast soft shadows • Umbra is the fully shadowed part • Penumbra is the partially shadowed part

  17. Projection shadows • A planar shadow occurs when an object casts a shadow on a flat surface • Projection shadows are a technique for making planar shadows: • Render the object normally • Project the entire object onto the surface • Render the object a second time with all its polygons set to black • The book gives the projection matrix for arbitrary planes

  18. Problems with projection shadows • We need to bias (offset) the plane just a little bit • Otherwise, we get z fighting and the shadows can be below the surface • Shadows can be draw larger than the plane • The stencil buffer can be used to fix this • Only opaque shadows work • Partially transparent shadows will make some parts too dark • Z-buffer and stencil buffer tricks can help with this too Hard to see example from Shogo: MAD

  19. Other projection shadow issues • Another fix for projection shadows is rendering them to a texture, then rendering the texture • Effects like blurring the texture can soften shadows softer • If the light source is between the occluder and the receiver, an antishadow is generated

  20. Soft shadows • True soft shadows occur due to area lights • We can simulate area lights with a number of point lights • For each point light, we draw a shadow in an accumulation buffer • We use the accumulation buffer as a texture drawn on the surface • Alternatively, we can move the receiver up and down slightly and average those results • Both methods can require many passes to get good results

  21. Convolution (blurring) • You can just blur based on the amount of distance from the occluder to the receiver • It doesn't always look right if the occluder touches the receiver • Haines's method is to paint the silhouette of the hard shadow with gradients • The width is proportional to the height of the silhouette edge casting the shadow

  22. Upcoming

  23. Next time… • More on shadows • Ambient occlusion

  24. Reminders • Keep working on Project 3 • Get to work on Assignment 4! • Keep reading Chapter 9

More Related