1 / 57

Logarithmic perspective shadow maps

Logarithmic perspective shadow maps. 1 University of North Carolina – Chapel Hill 2 Microsoft 3 NVIDIA. Brandon Lloyd 1,2 Naga Govindaraju 2 Cory Quammen 1 Steve Molnar 3 Dinesh Manocha 1. Low error shadows for real-time applications Emphasis on performance. Goal.

long
Download Presentation

Logarithmic perspective shadow maps

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. Logarithmic perspective shadow maps 1University of North Carolina – Chapel Hill 2Microsoft 3NVIDIA Brandon Lloyd1,2 Naga Govindaraju2 Cory Quammen1 Steve Molnar3 Dinesh Manocha1

  2. Low error shadows for real-time applications Emphasis on performance Goal

  3. Standard Shadow Map undersampled aliasing

  4. Perspective Warping

  5. Logarithmic Perspective Warping

  6. Outline • Related work • Logarithmic perspective warping • Error analysis • Experimental results • Conclusion

  7. Single shadow map warping • Perspective shadow maps (PSMs) [Stamminger and Drettakis 2002] • Light-space perspective shadow maps (LiSPSMs) [Wimmer et al. 2004] • Trapezoidal shadow maps [Martin and Tan 2004]

  8. Warping cannot be used for all light directions Single shadow map warping

  9. Perspective warped cube maps[Kozlov 2004] Face partitioning

  10. z-partitioning • Cascaded shadow maps [Engel 2007] • Parallel split shadow maps [Zhang et al. 2006] • Separating-plane shadow maps[Mikkelsen 2007] z

  11. z-partitioning • Cascaded shadow maps [Engel 2007] • Parallel split shadow maps [Zhang et al. 2006] • Separating-plane shadow maps[Mikkelsen 2007] z

  12. Adaptive partitioning • Adaptive shadow maps [Fernando et al. 2001] • Queried virtual shadow maps[Geigl and Wimmer 2007] • Fitted virtual shadow maps [Geigl and Wimmer 2007] • Resolution matched shadow maps [Lefohn et al. 2007] • Tiled shadow maps[Arvo 2004] • Multiple shadow frusta [Forsyth 2006]

  13. GPU implementations[Arvo 2006; Sintorn et al. 2008] Hardware architecture[Johnson et al. 2005] Irregular z-buffer [Aila and Laine 2004;Johnson et al. 2004]

  14. Methods for better sampling • Scene-independent • Single SM warping • Face partitioning • z-partitioning • Scene-dependent • Adaptive • Irregular + Lower, nearly constant cost – Higher error + Lower error – Higher, variable cost

  15. Filtering • Percentage closer filtering[Reeves et al. 1987] • Variance shadow maps[Donnely and Lauritzen 2006; Lauritzen and McCool 2008] • Convolution shadow maps[Annen et al. 2007] • Exponential shadow maps[Salvi 2008; Annen et al. 2008]

  16. Standard Shadow Map

  17. Standard Shadow Map

  18. Perspective Warping

  19. Logarithmic Perspective Warping

  20. Logarithmic perspective shadow maps (LogPSMs) • Replace perspective warping in scene-independent • single shadow map • z-partitioning • face partitioning • Similar performance with less error • Similar error with less texture resolution

  21. Outline • Related work • Logarithmic perspective warping • Error analysis • Experimental results • Conclusion

  22. Not necessarily the best fit to required sampling distribution Perspective warping PSM LiSPSM moderate error high error y x moderate error low error

  23. Logarithmic+perspective warping low error high error y x Logarithmictransform Perspectiveprojection

  24. Logarithmic rasterization • Brute-force rasterization • use a fragment program • Slower than standardrasterization • disables optimizations • z-culling • double-speed z-only rendering • breaks linear depth compression schemes

  25. Logarithmic rasterization • Hardware rasterization[Lloyd et al. 2007] • equivalent to rasterizing on non-uniform grid • requires incremental modifications • Software rasterization • Larrabee [Seiler et al. 2008] • Performance comparable to standard rasterization

  26. Outline • Related work • Logarithmic perspective warping • Error analysis • Experimental results • Conclusion

  27. Error analysis • Need more analysis for previous methods • little analysis for point lights • limited analysis for lights in general position[Tadamura et al. 1999; Zhang et al. 2006]

  28. Combinations of algorithms P - Perspective warping LogP - Logarithmic perspective warping ZP - z-partitioning FP - face partitioning single SM Standard P LogP z-partitioning ZP ZP+P ZP+LogP face-partitioning - FP+P FP+LogP

  29. single SM Standard P LogP z-partitioning ZP ZP+P ZP+LogP face-partitioning FP+P FP+LogP Combinations of algorithms Which algorithm gives the least error for the fewest shadow maps? P - Perspective warping LogP - Logarithmic perspective warping ZP - z-partitioning FP - face partitioning

  30. Quantifying aliasing error shadow map light light image plane eye eye image plane

  31. Quantifying aliasing error shadow map light light image plane eye eye image plane

  32. Quantifying aliasing error shadow map light light image plane • Maximum error: • over a light ray • over the frustum • over all light positions eye eye image plane

  33. Near optimal, scene-independent warping • Minimizes maximum error over a face • Too complicated for practical use • Used as a baseline

  34. Maximum errorover all light positions Logarithmic perspective warping is about the best we can do for scene-independent algorithms

  35. Error distribution along a face Uniform LiSPSM PSM LogPSM max error in t max error in s far far near near Uniform LiSPSM PSM LogPSM

  36. Maximum error for varying light directions 25 Standard Perspective 20 Log+perspective 15 max error (log2 scale) direction to light 10 5 view direction 0 20 40 60 80

  37. Maximum error for varying light directions 25 Standard Perspective 20 Log+perspective FP+LogP 15 max error (log2 scale) direction to light 10 5 view direction 0 20 40 60 80

  38. error reduction error reduction error reduction error reduction error reduction z-partitioning max error (log2 scale) FP uses 1-7partitions (3.8 average) max error (log2 scale)

  39. Least error for fewest shadow maps? max error (log2 scale) FP uses 1-7partitions (3.8 average) max error (log2 scale)

  40. Outline • Related work • Logarithmic perspective warping • Error analysis • Experimental results • Conclusion

  41. LogPSMs have lower maximum error more uniform error Image resolution: 5122 Shadow map resolution: 10242 f/n = 300 Grid lines for every 10 shadow map texels Color coding for maximum texel extent in image Single shadow map LogPSM LogPSM LiSPSM LiSPSM LogPSM

  42. Partitioning schemes FP+P Standard ZP5+P FP+LogP

  43. Comparison video Cascaded = ZP5LogPSM = FP+LogP PSM = LiSPSM with PSM parameter

  44. Point lights

  45. Point lights

  46. Limitations of LogPSMs • Not currently supported in hardware • Share problems as other warping algorithms: • do not handle aliasing error due to surface orientation • face partitioning needed for most benefit • not as simple as z-partitioning • can exhibit shearing artifacts

  47. Conclusion • LogPSMs • Single shadow map • z-partitioning • face partitioning • Error analysis • LogPSMs are close to optimal for scene-independent algorithms • LogPSMs achieve low error with few shadow maps

  48. Future work • Other error metrics [Zhang et al. 2007] • Combine with scene-dependent algorithms • LiSPSM + adaptive [Giegl and Wimmer 2007] • LiSPSM + irregular [Sintorn et al. 2008]

  49. Acknowledgements • Aaron Lefohn and Taylor Holliday for town model • Ben Cloward for robot model • David Feng and Nico Galoppo • Funding agencies • NVIDIA University Fellowship • NSF Graduate Fellowship • ARO, NSF, DARPA/RDECOM, Disruptive Technology Office

  50. Questions

More Related