Title: Realtime Shading with Filtered Importance Sampling
1Real-time Shading with Filtered Importance
Sampling
- Jaroslav Krivánek
- Czech Technical University in Prague
- Mark Colbert
- University of Central Florida
2Motivation
- material design interfaces
- rendering algorithm to back up the interface
- immediate feedback
3Goal
- image-based lighting (environment maps)
- improves material perception Fleming et al.
2003
images Fleming et al. 2003
natural light
point light
4Goal
- arbitrary materials
- low to high gloss, different BRDF models
images by Pat Hanrahan
5Goal
- dynamic materials, geometry, lighting
- no pre-computation
- production pipeline friendly
- minimal code base / single GPU shader
- real-time shadows (env. map)
- not necessarily
6Desired Results
7Related 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
8Overview
- Motivation
- Goal
- Related Work
- Shading Algorithm
- Theory
- Real-time Shadows
- Results
- Conclusion
9BRDF Importance Sampling
- standard in MC ray tracing
- not used on the GPU
10Deterministic Sampling
40 samples per pixel
11Our Approach
- filtered importance sampling
- less filtering where samples are denser
- more filtering where they are sparser
12Filtering
- MIP-maps
- level proportional to log of filter size
- independent of the BRDF
13Filtered Importance Sampling
40 samples per pixel
14Overview
- Motivation
- Goal
- Related Work
- Shading Algorithm
- Theory
- Real-time Shadows
- Results
- Conclusion
15Underlying Theory
- why theory?
- identify approximations
- suggest improvements
- sampling filtering
- signal processing
16Sampling and Reconstruction
sample
reconstruct
aliased original
Krivánek, ColbertReal-time shading with Filtered
Importance Sampling
16
17Application to Importance Sampling
- problem non-uniform samples
18Conceptual Procedure
19Practice
- isotropic filter approximation
Krivánek, ColbertReal-time shading with Filtered
Importance Sampling
19
20Approximations
- isotropic filter shape
- constant BRDF / PDF ratio across filter support
- tri-linear filtering (MIP-map)
21Anisotropic Filtering Experiments
- anisotropic filter approximation
Krivánek, ColbertReal-time shading with Filtered
Importance Sampling
21
22Anisotropic Filtering Experiments
- tex2Dgrad for anisotropic texture look-up
- worse image quality still dont know why
16x anisotropic filter
Krivánek, ColbertReal-time shading with Filtered
Importance Sampling
22
23Overview
- Motivation
- Goal
- Related Work
- Shading Algorithm
- Theory
- Real-time Shadows
- Results
- Conclusion
24Real-time Shadows
- environment importance sampling (bright light
sources strongest shadows)
25Real-time Shadows
- shadow map for each sample
26Real-time Shadows
- convert to spherical harmonics at each texel
visibility function
27Real-time Shadows
no filtering
after filtering
28Real-time Shadows
- use for rendering
- diffuse
- SH coefficient dot product
- glossy
- attenuate each sample by the visibility
29Overview
- Motivation
- Goal
- Related Work
- Shading Algorithm
- Theory
- Real-time Shadows
- Results
- Conclusion
Krivánek, ColbertReal-time shading with Filtered
Importance Sampling
29
30FIS Results RMS
Environment Sampling
Filtered Sampling
Reference
n 3 5 Samples
n 17 100 Samples
31FIS Results Complex Geometry
5 Samples
50 Samples
50 Samples
200 Samples
Reference
32FIS Results BRDF Anisotropy
ax 0.01 ax 0.08
ax 0.01 ax 0.29
ax 0.01 ax 0.01
33Shadows Results
Reference (30,000 Samples)
Our Method (16 Samples)
Visual
Error
SH v. Ref
8 samples
16 samples
64 samples
34Shadows Performance
- NVIDIA GeForce 8800 GTX, Intel Core2 Duo, 512x512
35Shadows Performance
- NVIDIA GeForce 8800 GTX, Intel Core2 Duo, 512x512
polygon count
Krivánek, ColbertReal-time shading with Filtered
Importance Sampling
35
36 37Conclusion
- 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/
38Acknowledgements
- Dan Sýkora
- Petr Olák
- Czech Ministry of Education
- Center for Computer Graphics
- Aktion grant
- US National Science Foundation
39Additional Slides
40Numerical Integration as Signal Reconstruction
- integral DC term
- integration by sampling
- sample the function
- reconstruct the DC term
- insufficient sampling -gt aliasing
- alias may affect the DC term -gt error
- anti-aliasing pre-filtering
41Anti-aliasing by Pre-filtering
band-limit
sample
reconstruct
42Stochastic Sampling
40 samples per pixel
Krivánek, ColbertReal-time shading with Filtered
Importance Sampling
42