Soft Shadow Maps for Linear Lights

2,007 views

Published on

Talk on a shadow algorithm for linear lights (Rendering Workshop 2000)

Published in: Technology, Art & Photos
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
2,007
On SlideShare
0
From Embeds
0
Number of Embeds
6
Actions
Shares
0
Downloads
3
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Soft Shadow Maps for Linear Lights

  1. 1. Soft Shadow Maps for Linear Lights <ul><li>Wolfgang Heidrich </li></ul><ul><li>Stefan Brabec </li></ul><ul><li>Hans-Peter Seidel </li></ul><ul><li>{heidrich,brabec,hpseidel}@mpi-sb.mpg.de </li></ul><ul><ul><li>Max-Planck Institute for Computer Science </li></ul></ul><ul><ul><li>Saarbrücken, Germany </li></ul></ul>
  2. 2. Overview <ul><li>Motivation </li></ul><ul><li>Soft Shadow Maps </li></ul><ul><li>Hardware Implementation </li></ul><ul><li>Sampling the Light Source </li></ul><ul><li>Results </li></ul><ul><li>Conclusion </li></ul>
  3. 3. Motivation <ul><li>“Real-Time” Shadow Algorithms </li></ul><ul><ul><li>shadow volumes </li></ul></ul><ul><ul><li>shadow maps </li></ul></ul><ul><li>Soft Shadows </li></ul><ul><ul><li>e.g. sampling the light source N samples only give N-1 levels of penumbra </li></ul></ul><ul><li>Here </li></ul><ul><ul><ul><li>soft penumbra regions with very few samples ! </li></ul></ul></ul>
  4. 4. Soft Shadow Maps <ul><li>Outline </li></ul><ul><ul><li>soft penumbra regions for linear light sources </li></ul></ul><ul><ul><li>based on “traditional” shadow map algorithm </li></ul></ul><ul><ul><li>suitable for hardware and software rendering </li></ul></ul><ul><ul><li>very small number of light source samples </li></ul></ul><ul><ul><li>soft shadows at real-time / interactive frame rates </li></ul></ul>
  5. 5. Soft Shadow Maps <ul><li>Visibility of Light Source </li></ul><ul><ul><li>100% to 0% for [p1,p2] </li></ul></ul><ul><ul><li>0% for [p2,q2] </li></ul></ul><ul><ul><li>0% to 100% for [q2,q1] </li></ul></ul><ul><li>Idea </li></ul><ul><ul><li>normal shadow maps for umbra and completely lit regions </li></ul></ul><ul><ul><li>linear interpolation of visibility for penumbra regions </li></ul></ul>
  6. 6. Soft Shadow Maps <ul><li>Linear Interpolation of Visibility </li></ul><ul><ul><li>rational function: </li></ul></ul><ul><ul><li>approximation: valid because large penumbra regions when </li></ul></ul>Receiver Light Source Occluder
  7. 7. Soft Shadow Maps <ul><li>Visibility Map </li></ul><ul><ul><li>additional shadow map channel (percentage visibility) </li></ul></ul><ul><ul><li>two-channel shadow map for each sample point </li></ul></ul>
  8. 8. Soft Shadow Maps <ul><li>Generating the Visibility Map </li></ul><ul><ul><li>triangulate depth discontinuities (shadow map) </li></ul></ul><ul><ul><li>warp resulting skin polygons to other view </li></ul></ul>
  9. 9. Soft Shadow Maps <ul><li>Generating the Visibility Map </li></ul><ul><ul><li>render skin polygons to visibility map </li></ul></ul><ul><ul><li>Gouraud-Shading (linear interpolation) </li></ul></ul><ul><ul><ul><li>“ white” for vertices on receiver </li></ul></ul></ul><ul><ul><ul><li>“ black” for vertices on occluder </li></ul></ul></ul><ul><ul><li>completely lit regions </li></ul></ul><ul><ul><ul><li>default visibility 0.5 </li></ul></ul></ul><ul><ul><li>completely shadowed regions </li></ul></ul><ul><ul><ul><li>first shadow map channel </li></ul></ul></ul>
  10. 10. Soft Shadow Maps <ul><li>New shadow map algorithm </li></ul>shade(p) { if( depth 1 (p) > S 1 [p] ) l 1 = 0; else l 1 = V 1 [p] * illum(p,L 1 ); if( depth 2 (p) > S 2 [p] ) l 2 = 0; else l 2 = V 2 [p] * illum(p,L 2 ); return l 1 +l 2 ; }
  11. 11. Hardware Implementation <ul><li>Step 1: Generating Shadow Maps </li></ul><ul><ul><li>OpenGL shadow maps [Brabec et al. ’00] </li></ul></ul>left sample point right sample point camera view
  12. 12. Hardware Implementation <ul><li>Step 2: Edge Detection </li></ul><ul><ul><li>Laplacian-of-Gaussian (OpenGL Imaging Subset) </li></ul></ul>left sample point right sample point
  13. 13. Hardware Implementation <ul><li>Step 3: Generate Visibility Map </li></ul><ul><ul><li>triangulate depth values </li></ul></ul>
  14. 14. Hardware Implementation <ul><li>Step 3: Generate Visibility Map </li></ul><ul><ul><li>warp skin polygons </li></ul></ul>
  15. 15. Hardware Implementation <ul><li>Step 3: Generate Visibility Map </li></ul><ul><ul><li>Gouraud-Shading (linear interpolation) </li></ul></ul>
  16. 16. Hardware Implementation <ul><li>Step 3: Generate Visibility Map </li></ul>left sample point right sample point
  17. 17. Hardware Implementation <ul><li>Step 4: Render Scene </li></ul><ul><ul><li>shadow & visibility maps only need to be re-computed if light and/or scene changes </li></ul></ul><ul><ul><li>minimal overhead for “static walk-throughs” </li></ul></ul>
  18. 18. Sampling the Light Source <ul><li>Problem: </li></ul><ul><ul><li>undersampling artifacts: regions where portions of the light source are visible, but none of the end points ! </li></ul></ul><ul><li>Solution: </li></ul><ul><ul><li>increase sampling rate: subdivide light source (smaller linear lights) </li></ul></ul>
  19. 19. Results
  20. 20. Results <ul><li>Comparison </li></ul>ray traced 10 samples ray traced 200 samples our method 2 samples
  21. 21. Results
  22. 22. Results
  23. 23. Results
  24. 24. Conclusion <ul><li>Soft Shadow Maps for Linear Lights </li></ul><ul><ul><li>new soft shadow algorithm based on shadow maps </li></ul></ul><ul><ul><li>high-quality penumbra regions </li></ul></ul><ul><ul><li>very small number of light source samples </li></ul></ul><ul><ul><li>suitable for hardware rendering (interactive) </li></ul></ul><ul><li>Future Work </li></ul><ul><ul><li>best place to insert samples </li></ul></ul><ul><ul><li>extend to area light sources </li></ul></ul>

×