1 / 42

Real-time Shading with Filtered Importance Sampling

Real-time Shading with Filtered Importance Sampling. Jaroslav Křivánek Czech Technical University in Prague Mark Colbert University of Central Florida. Motivation. material design interfaces rendering algorithm to back up the interface immediate feedback. Goal.

millett
Download Presentation

Real-time Shading with Filtered Importance Sampling

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. Real-time Shading with Filtered Importance Sampling Jaroslav Křivánek Czech Technical University in Prague Mark Colbert University of Central Florida

  2. Motivation • material design interfaces • rendering algorithm to back up the interface • immediate feedback Křivánek, ColbertReal-time shading with Filtered Importance Sampling

  3. Goal • image-based lighting (environment maps) • improves material perception [Fleming et al. 2003] images [Fleming et al. 2003] natural light point light Křivánek, ColbertReal-time shading with Filtered Importance Sampling

  4. Goal • arbitrary materials • low to high gloss, different BRDF models images by Pat Hanrahan Křivánek, ColbertReal-time shading with Filtered Importance Sampling

  5. Goal • dynamic materials, geometry, lighting • no pre-computation • production pipeline friendly • minimal code base / single GPU shader • real-time shadows (env. map) • not necessarily Křivánek, ColbertReal-time shading with Filtered Importance Sampling

  6. Desired Results Křivánek, ColbertReal-time shading with Filtered Importance Sampling

  7. Related Work • pre-filtered environment maps [ Kautz et al. 2000 ] • frequency-space rendering [ Ramamoorthi et al. 2002 ], [ Ng et al. 2004 ] • Efficient Reflectance and Visibility Approximations for Environment Map Rendering [ Green et al. 2007 ] • Efficient Rendering of Spatial Bi-directional Reflectance Distribution Functions[ McAllister et al. 2002 ] Křivánek, ColbertReal-time shading with Filtered Importance Sampling

  8. Overview • Motivation • Goal • Related Work • Shading Algorithm • Theory • Real-time Shadows • Results • Conclusion Křivánek, ColbertReal-time shading with Filtered Importance Sampling

  9. BRDF Importance Sampling • standard in MC ray tracing • not used on the GPU Křivánek, ColbertReal-time shading with Filtered Importance Sampling

  10. Deterministic Sampling • aliasing 40 samples per pixel Křivánek, ColbertReal-time shading with Filtered Importance Sampling

  11. Our Approach filtered importance sampling less filtering where samples are denser more filtering where they are sparser 1 » filter size w w N p ( , ) i o Křivánek, ColbertReal-time shading with Filtered Importance Sampling

  12. Filtering • MIP-maps • level proportional to log of filter size • independent of the BRDF Křivánek, ColbertReal-time shading with Filtered Importance Sampling

  13. Filtered Importance Sampling 40 samples per pixel Křivánek, ColbertReal-time shading with Filtered Importance Sampling

  14. Overview • Motivation • Goal • Related Work • Shading Algorithm • Theory • Real-time Shadows • Results • Conclusion Křivánek, ColbertReal-time shading with Filtered Importance Sampling

  15. Underlying Theory • why theory? • identify approximations • suggest improvements • … sampling & filtering • signal processing Křivánek, ColbertReal-time shading with Filtered Importance Sampling

  16. Sampling and Reconstruction alias = integration error Ä ´ DC-term = integral sample reconstruct aliased original Křivánek, ColbertReal-time shading with Filtered Importance Sampling 16

  17. Application to Importance Sampling • problem: non-uniform samples Křivánek, ColbertReal-time shading with Filtered Importance Sampling

  18. warp (inverse BRDF IS) pre-filter (=convolve) warp back (BRDF IS) Conceptual Procedure Křivánek, ColbertReal-time shading with Filtered Importance Sampling

  19. Practice • isotropic filter approximation Křivánek, ColbertReal-time shading with Filtered Importance Sampling 19

  20. Approximations • isotropic filter shape • constant BRDF / PDF ratio across filter support • tri-linear filtering (MIP-map) Křivánek, ColbertReal-time shading with Filtered Importance Sampling

  21. Anisotropic Filtering Experiments • anisotropic filter approximation Křivánek, ColbertReal-time shading with Filtered Importance Sampling 21

  22. Anisotropic Filtering Experiments 16x anisotropic filter tex2Dgrad for anisotropic texture look-up worse image quality – still don’t know why Křivánek, ColbertReal-time shading with Filtered Importance Sampling 22

  23. Overview • Motivation • Goal • Related Work • Shading Algorithm • Theory • Real-time Shadows • Results • Conclusion Křivánek, ColbertReal-time shading with Filtered Importance Sampling

  24. Real-time Shadows environment importance sampling (bright light sources = strongest shadows) Křivánek, ColbertReal-time shading with Filtered Importance Sampling

  25. Real-time Shadows shadow map for each sample Křivánek, ColbertReal-time shading with Filtered Importance Sampling

  26. Real-time Shadows visibility function convert to spherical harmonics at each texel Křivánek, ColbertReal-time shading with Filtered Importance Sampling

  27. Real-time Shadows • spatial filtering no filtering after filtering Křivánek, ColbertReal-time shading with Filtered Importance Sampling

  28. Real-time Shadows • use for rendering • diffuse • SH coefficient dot product • glossy • attenuate each sample by the visibility Křivánek, ColbertReal-time shading with Filtered Importance Sampling

  29. Overview Motivation Goal Related Work Shading Algorithm Theory Real-time Shadows Results Conclusion Křivánek, ColbertReal-time shading with Filtered Importance Sampling 29

  30. FIS Results – RMS Environment Sampling Reference Filtered Sampling n = 3 5 Samples n = 17 100 Samples Křivánek, ColbertReal-time shading with Filtered Importance Sampling

  31. FIS Results – Complex Geometry 5 Samples 50 Samples 50 Samples 200 Samples Reference Křivánek, ColbertReal-time shading with Filtered Importance Sampling

  32. FIS Results – BRDF Anisotropy limited anisotropy ax = 0.01 ax = 0.01 ax = 0.01 ax = 0.08 ax = 0.01 ax = 0.29 Křivánek, ColbertReal-time shading with Filtered Importance Sampling

  33. Shadows Results Reference (30,000 Samples) Our Method (16 Samples) Visual Error SH v. Ref 8 samples 16 samples 64 samples Křivánek, ColbertReal-time shading with Filtered Importance Sampling

  34. Shadows Performance • NVIDIA GeForce 8800 GTX, Intel Core2 Duo, 512x512 Křivánek, ColbertReal-time shading with Filtered Importance Sampling

  35. NVIDIA GeForce 8800 GTX, Intel Core2 Duo, 512x512 Shadows Performance polygon count Křivánek, ColbertReal-time shading with Filtered Importance Sampling 35

  36. Video Křivánek, ColbertReal-time shading with Filtered Importance Sampling

  37. Conclusion • glossy surface shading • practical, relatively accurate, no pre-computation • signal processing theory • shadows • fast but very approximate • no pre-computation • implementation details: GPU Gems 3 • Code: graphics.cs.ucf.edu/gpusampling/ Křivánek, ColbertReal-time shading with Filtered Importance Sampling

  38. Acknowledgements • Dan Sýkora • Petr Olšák • Czech Ministry of Education • “Center for Computer Graphics” • Aktion grant • US NationalScience Foundation Křivánek, ColbertReal-time shading with Filtered Importance Sampling

  39. Additional Slides

  40. Numerical Integration as Signal Reconstruction • integral = DC term • integration by sampling • sample the function • reconstruct the DC term • insufficient sampling -> aliasing • alias may affect the DC term -> error • anti-aliasing – pre-filtering Křivánek, ColbertReal-time shading with Filtered Importance Sampling

  41. Ä ´ ´ Anti-aliasing by Pre-filtering band-limit sample reconstruct Křivánek, ColbertReal-time shading with Filtered Importance Sampling

  42. Stochastic Sampling noise slower on the GPU 40 samples per pixel Křivánek, ColbertReal-time shading with Filtered Importance Sampling 42

More Related