pismo ivan neulander parallax-interpolated shadow map occlusion

Download Pismo Ivan Neulander Parallax-Interpolated Shadow Map Occlusion

If you can't read please download the document

Upload: nico-alston

Post on 14-Dec-2015

217 views

Category:

Documents


1 download

TRANSCRIPT

  • Slide 1

Pismo Ivan Neulander Parallax-Interpolated Shadow Map Occlusion Slide 2 Introduction: Soft Shadows Problem: Render soft shadows from an area light source Light source can be any polygonal model Want fast solution, of sufficient quality for visual effects Want speed vs. quality control Area Light Penumbra Umbra Slide 3 Introduction: Soft Shadows Some Solutions: a) Ray tracing Very high quality, physically accurate but usually slow b) Shadow Map ray tracing: project ray to map Lower quality, relatively fast Samples shadow map many times per ray Soft Shadows by Ray Tracing Multilayer Transparent Shadow Maps: Xie, Tabellion, Pearce Soft Shadows by Ray Tracing Multilayer Transparent Shadow Maps Efficient Image-Based Methods for Rendering Soft Shadows: Agarwala et al Efficient Image-Based Methods for Rendering Soft Shadows c) Use many shadow maps: overlapping shadows Fast at low quality but very slow at high d) Use many shadow maps: Pismo Almost as fast as (c), but much higher quality Samples shadow map few times per ray 4 Shadow Maps8 Shadow Maps16 Shadow Maps32 Shadow Maps64 Shadow Maps128 Shadow Maps256 Shadow MapsPismo with 4 Shadow Maps Slide 4 Soft Shadow Example Area Light Slide 5 Hard Shadows from 3 Point Lights with Shadow Maps Slide 6 Pismo Shadow Estimation: Problem P L Problem: Estimate shadow ray PL, extending from P to arbitrary point L on area light Use the 3 shadow maps rendered from the triangle vertices, all fixated on a common focal point F Slide 7 Pismo Shadow Estimation: Solution P O d L Solution: 1) Compute position of putative occluder O Displace P toward L by distance d How to compute d ? Slide 8 Pismo Shadow Estimation: Solution Shadow Map #1 P O d L Solution: 2) Project O into screen space of Shadow Map #1 Use depth value at this pixel to compute ray occlusion Using O instead of P accounts for parallax shift between view from Shadow Map camera and view from L Slide 9 Pismo Shadow Estimation: Solution Shadow Map #2 P O d L Likewise, project O into screen space of Shadow Map #2 Slide 10 Pismo Shadow Estimation: Solution Shadow Map #3 P O d L Likewise, project O into screen space of Shadow Map #3 Slide 11 Pismo Shadow Estimation: Solution Blending the Three Shadow Maps P O d L Barycentrically blend the 3 shadow maps occlusion results to get the final occlusion estimate for the shadow ray PL Uses 3 shadow map queries per ray Slide 12 Pismo Shadow Estimation: Solution Compute Multiple Shadow Rays Repeat the process for multiple shadow rays between P and other light positions on the area light P Slide 13 Estimating Initial Depth d: Preprocess Shadow Maps For each Shadow Map, we generate a Bled Shadow Map: an image-processed copy where we bleed out silhouette pixels apply a slight blur One-time preprocess per shadow map Regular Shadow Map stores multiple occluder depths per pixel (layered) Bled Shadow Map stores max depth only Slide 14 Estimating Initial Depth d: Compute d 1 P d1d1 L Project P to a pixel in Bled Shadow Map #1 If queried depth is less than depth from P to L, subtract and were done; else, compute following average: Sample multiple jittered pixels in (layered) Shadow Map, centered about original pixel For each sample: If queried depth is less than depth from P to L, add difference to average Computed once per shading sample (not per ray) Slide 15 Estimating Initial Depth d: Compute d 2 P d2d2 L Project P to a pixel in Bled Shadow Map #2 Estimate value for d 2 as above Computed once per shading sample Slide 16 Estimating Initial Depth d: Compute d 3 P d3d3 L Project P to a pixel in Bled Shadow Map #3 Estimate value for d 3 as above Computed once per shading sample Slide 17 Estimating Initial Depth d: Blend d 1, d 2, d 3 P d L Barycentrically blend d 1,d 2,d 3 to get d for given L Use blended d value to compute O as shown Computed per-ray (but no shadow map queries) Slide 18 D Depth Compensation: Problem P L Depth from L to P (LP) differs from depth from Shadow Map D to P (DP) Need to compensate depth estimates that use D in place of L LPLP DPDP Slide 19 Depth Compensation: Solution Adjust initial estimates d 1,d 2,d 3 by LP DP Blend d 1,d 2,d 3 and compute O Adjust depth queried from D (based on O) by LO DO DPDP LPLP DODO LOLO O P D (Shadow Map) F (Focal Point) L Slide 20 Contact Shadows Problem: Pismo requires a higher shadow bias than regular shadowing to avoid self-shadow artifacts This attenuates crisp short-range shadows Solution: Compute contact shadows at close range and blend them in with Pismo Shadows Slide 21 Contact Shadows: Implementation A Contact Shadow: is based on hard shadows from discrete shadow maps consists of 2 or more such shadows that overlap fades out beyond Pismo shadow bias distance is blended with Pismo shadow over bias distance blend = Slide 22 Results: Area Light with 4 Shadow Maps Pismo OffPismo On 128 rays / pixel Area Light Slide 23 Results: Area Light with 5 Shadow Maps Pismo OffPismo On 128 rays / pixel Area Light Slide 24 Performance: Pismo vs. Ray Tracer Pismo@5 5 DMs: 42 s Final: 246 s Total: 288 s Ray-Traced Total: 1073 s 1600x1200 resolution 128 rays / pixel Athlon64 @ 2800 MHz Pismo@4 5 DMs: 33 s Final: 263 s Total: 296 s Slide 25 4 Hard Shadows5 Hard Shadows9 Hard Shadows Quality: Large Area Light Ray Tracer 9 Blurred Shadows4 Blurred Shadows5 Blurred Shadows9 Pismo Shadows4 Pismo Shadows5 Pismo Shadows Slide 26 4 Hard Shadows5 Hard Shadows9 Hard Shadows 9 Blurred Shadows4 Blurred Shadows5 Blurred Shadows 9 Pismo Shadows4 Pismo Shadows5 Pismo Shadows Slide 27 Quality: Pismo@4 vs. Ray Tracer Pismo@4Ray TracerPixel Difference Slide 28 Quality: Pismo@5 vs. Ray Tracer Pismo@5Ray TracerPixel Difference Slide 29 Quality: Pismo@9 vs. Ray Tracer Pismo@9Ray TracerPixel Difference Slide 30 Conclusions Pismo is a useful enhancement to rendering soft shadows with multiple shadow maps Conceptually simple & easy to implement integrates easily into an existing rendering pipeline Provides an intuitive control over speed/quality Creation of multiple shadow maps easily accelerated: Multiprocessing GPU rendering Morphing Slide 31 Future Work Accelerate creation of shadow maps Automate tessellation of light polygons Improve blending of contact shadows Parallelize Pismo sampling Slide 32 Ivan Neulander www.rhythm.com/~ivan/pubs.html [email protected]