1 / 22

Robust Shadow Maps for Large Environments

Robust Shadow Maps for Large Environments. Daniel Scherzer. Institute of Computer Graphics and Algorithms Vienna University of Technology. Motivation: The Challenge. Huge and dynamic environments More than 100,000 visible triangles Automatic shadow generation No artifacts?.

Download Presentation

Robust Shadow Maps for Large Environments

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. Robust Shadow Maps for Large Environments Daniel Scherzer Institute of Computer Graphics and Algorithms Vienna University of Technology

  2. Motivation: The Challenge • Huge and dynamic environments • More than 100,000 visible triangles • Automatic shadow generation • No artifacts? Daniel Scherzer

  3. Motivation: Why Shadow Maps? • Independent of scene complexity • Not as fill-rate limited with many polygons as shadow volumes • Only one additional (depth only) render pass • Handle self-shadowing correctly • Handle arbitrary caster/receiver constellations Daniel Scherzer

  4. Eye Shadow Map Algorithm: Second Pass Shadow Map Algorithm: First Pass Light Eye-view Shadow map • Render scene from light-view and save depth values • Render scene from eye-view • Transform each fragment to light source space • Compare zeye with zlight value stored in shadow map • zeye > zlight fragment is in shadow Daniel Scherzer

  5. aliased okay Problem: Perspective aliasing • Sufficient resolution far from the observer • Insufficient resolution near the observer Daniel Scherzer

  6. Problem: Projection aliasing • Receivers ~ perpendicular to shadow plane Daniel Scherzer

  7. Observers‘s distance > shadow depth Incorrect self-shadowing Problem: Self-(un)shadowing Polygon Daniel Scherzer

  8. Problems of Shadow Maps Daniel Scherzer

  9. Insufficient resolution near the observer okay aliased Solution: Perspective aliasing Daniel Scherzer

  10. Insufficient resolution near the observer Redistribute shadow map samples Solution: Perspective aliasing Daniel Scherzer

  11. Sufficient resolution near the observer Redistribute shadow map samples okay now still okay Solution: Perspective aliasing Daniel Scherzer

  12. Solution: Perspective aliasing • How do we redistribute the shadow map samples? • Using a perspective transformation • Just another perspective matrix • During shadow map generation • During rendering • For further details see[WSP2004] [WSP2004] M. Wimmer, D. Scherzer, and W. Purgathofer; Light space perspective shadow maps; In Proceedings of Eurographics Symposium on Rendering 2004 Daniel Scherzer

  13. Solution: Projection aliasing • Receivers ~ perpendicular to shadow plane • Redistribution doesn‘t work • But! Daniel Scherzer

  14. N L Solution: Projection aliasing • Diffuse lighting: I = IL max( dot( L, N ), 0 ) • ~ perpendicular receivers have small I • Dark Hides artefacts! Daniel Scherzer

  15. Solution: Projection aliasing • Guidelines for the light- source • Small ambient term • Diffuse is good for hiding artefacts • Specular is no problem • Light direction and view direction nearly the same • Resolution in shadow map suffices Daniel Scherzer

  16. Solution: Projection aliasing • Screen-space blur of shadows • Hides artefacts • Shadows get softer Daniel Scherzer

  17. Polygon Biased polygon Observer‘s distance < shadow depth Self-shadowing eliminated Observers‘s distance > shadow depth Incorrect self-shadowing Problem: Self-(un)shadowing Daniel Scherzer

  18. Slope-scale biasing Constant biasing No biasing Solution: Self-(un)shadowing • How do we choose the bias? Daniel Scherzer

  19. Solution: Self-(un)shadowing • How do we choose the bias? • Perspective Z is hyperbolic, not linear! • Normal Slope-scale doesn’t work • Do slope-scale biasing • On the post-projective Z-slope • Or calculate linear Z with vertex shader Daniel Scherzer

  20. Solution: Self-(un)shadowing • Other possibility to avoid self-shadowing: Normally we use the front-side polygons Now we use the back-side polygons Daniel Scherzer

  21. Conclusions Daniel Scherzer

  22. Putting It All Together Daniel Scherzer

More Related