1 / 32

Pismo

Pismo. P arallax- I nterpolated S hadow M ap O cclusion. Ivan Neulander. 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.

marli
Download Presentation

Pismo

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. Pismo Parallax-Interpolated Shadow Map Occlusion Ivan Neulander

  2. Introduction:Soft Shadows • Problem: Render soft shadows from an area light source • Light source can be any polygonal model • Want fast solution, of sufficientquality for visual effects • Want speed vs. quality control Area Light Umbra Penumbra

  3. Introduction:Soft Shadows • Some Solutions: • Ray tracing • Very high quality, physically accurate but usually slow • “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 • Efficient Image-Based Methods for Rendering Soft Shadows: Agarwala et al • Use many shadow maps: overlapping shadows • Fast at low quality but very slow at high • Use many shadow maps: Pismo • Almost as fast as (c), but much higher quality • Samples shadow map few times per ray 4 Shadow Maps 8 Shadow Maps 16 Shadow Maps 32 Shadow Maps 64 Shadow Maps 128 Shadow Maps 256 Shadow Maps Pismo with 4 Shadow Maps

  4. Soft Shadow Example Area Light

  5. Hard Shadows from 3 Point Lights with Shadow Maps

  6. Pismo Shadow Estimation: Problem • Problem: Estimate shadow ray PL, extending from P to arbitrary point L on area light • Use the 3 shadow maps rendered from thetriangle vertices, all fixated on a common focal point F P L

  7. Pismo Shadow Estimation: Solution • Solution: 1) Compute position of putative occluder O • Displace P toward L by distance d • How to compute d ? P d O L

  8. Pismo Shadow Estimation: SolutionShadow Map #1 • Solution: 2) Project Ointo screen space of Shadow Map #1 • Use depth value at this pixel to compute ray occlusion • Using O instead of P accounts for parallaxshift between view from Shadow Mapcamera and view from L P d O L

  9. Pismo Shadow Estimation: SolutionShadow Map #2 • Likewise, project Ointo screen space of Shadow Map #2 P d O L

  10. Pismo Shadow Estimation: Solution Shadow Map #3 • Likewise, project Ointo screen space of Shadow Map #3 P d O L

  11. Pismo Shadow Estimation: Solution Blending the Three Shadow Maps • Barycentrically blend the 3 shadow maps’ occlusion resultsto get the final occlusion estimate for the shadow ray PL • Uses 3 shadow map queries per ray P d O L

  12. Pismo Shadow Estimation: Solution Compute Multiple Shadow Rays • Repeat the process for multiple shadow rays between Pand other light positions on the area light P

  13. Estimating Initial Depth d:Preprocess Shadow Maps • For each Shadow Map, we generate aBled Shadow Map: an image-processedcopy where we • bleed out silhouette pixels • apply a slight blur • One-time preprocess per shadow map • Regular Shadow Map stores multipleoccluder depths per pixel (layered) • Bled Shadow Map stores max depth only

  14. Estimating Initial Depth d:Compute d1 • Project P to a pixel in Bled Shadow Map #1 • If queried depth is less than depth from Pto L, subtract and we’re done; else, compute following average: • Sample multiple jittered pixels in(layered) Shadow Map, centeredabout original pixel • For each sample:If queried depth is less thandepth from Pto L,adddifference to average • Computed once per shading sample (not per ray) P d1 L

  15. Estimating Initial Depth d:Compute d2 • Project P to a pixel in Bled Shadow Map #2 • Estimate value for d2as above • Computed once per shading sample P d2 L

  16. Estimating Initial Depth d:Compute d3 • Project P to a pixel in Bled Shadow Map #3 • Estimate value for d3as above • Computed once per shading sample P d3 L

  17. Estimating Initial Depth d:Blend d1, d2, d3 • Barycentrically blend d1,d2,d3 to get d for given L • Use blended dvalue to compute O as shown • Computed per-ray (but no shadow map queries) P d L

  18. Depth Compensation:Problem • Depth from L to P (LP) differs from depth fromShadow Map D to P (DP) • Need to compensate depth estimatesthat use D in place of L P DP D LP L

  19. Depth Compensation:Solution • Adjust initial estimates d1,d2,d3by LP – DP • Blend d1,d2,d3 and compute O • Adjust depth queried from D (based on O)by LO – DO D (Shadow Map) L LO LP O DO P DP F (Focal Point)

  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

  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 =

  22. Results:Area Light with 4 Shadow Maps PismoOff PismoOn 128 rays / pixel Area Light

  23. Results:Area Light with 5 Shadow Maps PismoOff PismoOn 128 rays / pixel Area Light

  24. 1600x1200 resolution • 128 rays / pixel • Athlon64 @ 2800 MHz Performance:Pismo vs. Ray Tracer Pismo@4 5 DMs: 33 s Final: 263 s Total: 296 s Pismo@5 5 DMs: 42 s Final: 246 s Total: 288 s Ray-Traced Total: 1073 s

  25. 4 Blurred Shadows 4 Pismo Shadows 5 Blurred Shadows 5 Pismo Shadows 9 Blurred Shadows 9 Pismo Shadows Quality:Large Area Light Ray Tracer 4 Hard Shadows 5 Hard Shadows 9 Hard Shadows

  26. 4 Blurred Shadows 4 Pismo Shadows 5 Blurred Shadows 5 Pismo Shadows 9 Blurred Shadows 9 Pismo Shadows 4 Hard Shadows 5 Hard Shadows 9 Hard Shadows

  27. Quality:Pismo@4 vs. Ray Tracer Pismo@4 Pixel Difference Ray Tracer

  28. Quality:Pismo@5 vs. Ray Tracer Pismo@5 Pixel Difference Ray Tracer

  29. Quality:Pismo@9 vs. Ray Tracer Pismo@9 Pixel Difference Ray Tracer

  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

  31. Future Work • Accelerate creation of shadow maps • Automate tessellation of light polygons • Improve blending of contact shadows • Parallelize Pismo sampling

  32. Ivan Neulander www.rhythm.com/~ivan/pubs.html ivan@rhythm.com

More Related