AliasFree Shadow Maps Timo Aila Samuli Laine Helsinki

  • Slides: 17
Download presentation
Alias-Free Shadow Maps Timo Aila Samuli Laine Helsinki University of Technology

Alias-Free Shadow Maps Timo Aila Samuli Laine Helsinki University of Technology

Outline n Brief intro to shadow mapping ¡ ¡ n Our solution ¡ n

Outline n Brief intro to shadow mapping ¡ ¡ n Our solution ¡ n n positive/negative features what is the fundamental problem? properties, performance Future work Q&A

Shadow maps [Williams 78] n Widely used Simple General (anything that can be rasterized)

Shadow maps [Williams 78] n Widely used Simple General (anything that can be rasterized) n Aliasing artifacts n n

Aliasing: resolution issues [Sen et al. 2003]

Aliasing: resolution issues [Sen et al. 2003]

Aliasing: incorrect self-shadowing

Aliasing: incorrect self-shadowing

Step 1. From light source: n n Compute a shadow map (z-buffer) Dots are

Step 1. From light source: n n Compute a shadow map (z-buffer) Dots are sampling points ¡ depth known only at these points

Step 2. From camera: n n n Samples vs. pixels Project each visible sample

Step 2. From camera: n n n Samples vs. pixels Project each visible sample to light source Determine shadow term using shadow map

Shadow map sampling points Points where the depth is queried Points where the depth

Shadow map sampling points Points where the depth is queried Points where the depth is computed/known

Idea: why not do it right? 1. 2. n Project screen-space samples to image

Idea: why not do it right? 1. 2. n Project screen-space samples to image plane of light source Rasterize blocker geometry using them as sampling points Depth known at correct positions ¡ same result as shadow rays

Rasterization n Q: How to rasterize using irregular sampling points? blocker

Rasterization n Q: How to rasterize using irregular sampling points? blocker

Rasterization + depth test 1. Test if sampling point covered ¡ 2. we use

Rasterization + depth test 1. Test if sampling point covered ¡ 2. we use edge functions [Pineda 88] Depth test Let’s make it practical! ¡ ¡ hierarchical processing of sampling points we use axis-aligned 2 D BSP

Properties n n n Resolution issues disappear Bias term independent of scene Semi-transparent shadow

Properties n n n Resolution issues disappear Bias term independent of scene Semi-transparent shadow receivers ¡ n simply transform multiple samples per pixel Semi-transparent shadow casters ¡ can modulate the RGB color of shadows

Performance (1/2) n Scalability: random triangles @ 1024 x 768: ¡ ¡ ¡ transformation

Performance (1/2) n Scalability: random triangles @ 1024 x 768: ¡ ¡ ¡ transformation of samples: ~130 ms BSP construction: ~400 ms rasterization: 1 K 145 ms 10 K 381 ms 100 K 1568 ms 1 M 8102 ms

Performance (2/2) n n 2. 9 M semitransparent shadow casting tris @ 1536 x

Performance (2/2) n n 2. 9 M semitransparent shadow casting tris @ 1536 x 1088: 12. 6 s/frame Plenty of room for optimizations

Future work n GPU implementation ¡ ¡ n Soft shadows ¡ ¡ ¡ n

Future work n GPU implementation ¡ ¡ n Soft shadows ¡ ¡ ¡ n are HW modifications needed? many options, probably not BSP Smoothies & Penumbra maps should work soft shadow volumes with shadow maps? new physically-based methods? Applications in ray tracing?

Concurrent work ”The Irregular Z-Buffer and its Application to Shadow Mapping”, Gregory S. Johnson,

Concurrent work ”The Irregular Z-Buffer and its Application to Shadow Mapping”, Gregory S. Johnson, William R. Mark, and Christopher A. Burns, The University of Texas at Austin, Department of Computer Sciences. Technical Report TR-04 -09, April, 2004. n n n Same core idea Different implementation Propose hardware modifications

Thank you! n Questions? n Acknowledgements ¡ ¡ ¡ 3 DR group at Helsinki

Thank you! n Questions? n Acknowledgements ¡ ¡ ¡ 3 DR group at Helsinki University of Tech. Jukka Arvo, Ville Miettinen, Tim Weyrich $$ The National Technology Agency of Finland, Bitboys, Hybrid Graphics, Nokia, Remedy Entertainment.