Radiance Cache Splatting: A GPU-Friendly Global Illumination Algorithm P. Gautron J. Křivánek K. Bouatouch S. Pattanaik
EGSR 2005 – Konstanz, Germany 2 Global Illumination Why? DirectIndirect Global Illumination
EGSR 2005 – Konstanz, Germany 3 Global Illumination How? L o (P, ω o ) ∫ L i (P, ω i ) = * BRDF(ω o, ω i ) *cos(θ)dω i
EGSR 2005 – Konstanz, Germany 4 Global Illumination How? L o (P, ω o ) ∫ L i (P, ω i ) = * BRDF(ω o, ω i ) *cos(θ)dω i No analytical solution Numerical methods - Radiosity - Photon mapping - Path tracing - Bidirectional path tracing - Irradiance & Radiance caching - …
EGSR 2005 – Konstanz, Germany 5 GPUs GPU Speed Time Speed
EGSR 2005 – Konstanz, Germany 6 GPUs Versatility Time Linear algebra Fluid dynamics Signal processing Databases … And graphics! Simple 3D graphics only
EGSR 2005 – Konstanz, Germany 7 Global Illumination & GPUs CPU GPU
EGSR 2005 – Konstanz, Germany 8 Global Illumination & GPUs Previous work Hemicube Cohen et al PRT Sloan et al Photon mapping on GPU Purcell et al. 2003
EGSR 2005 – Konstanz, Germany 9 Contributions A reformulation of (Ir)Radiance caching … - No complex data structure - Fast, image-space (ir)radiance interpolation - Fast approximation of hemisphere sampling … for fast and easy GPU implementation
EGSR 2005 – Konstanz, Germany 10 Outline Introduction Irradiance & Radiance Caching Our method: Radiance Cache Splatting Results Conclusion & Future Work
EGSR 2005 – Konstanz, Germany 11 Outline Introduction Irradiance & Radiance Caching Our method: Radiance Cache Splatting Results Conclusion & Future Work
EGSR 2005 – Konstanz, Germany 12 Irradiance Caching Sparse computation of indirect diffuse lighting
EGSR 2005 – Konstanz, Germany 13 Irradiance Caching Sparse computation of indirect diffuse lighting
EGSR 2005 – Konstanz, Germany 14 Irradiance Caching Interpolation Sparse computation of indirect diffuse lighting
EGSR 2005 – Konstanz, Germany 15 Interpolation = E(P) nknk n EkEk + (n k x n) r EkEk + D t EkEk E
EGSR 2005 – Konstanz, Germany 16 Interpolation = E(P) w k (P) Σ k S w k (P) Σ k S EkEk + (n k x n) r EkEk + D t EkEk E S = { k / w k (P) > 1/a } n1n1 n n2n2 n3n3 n4n4
EGSR 2005 – Konstanz, Germany 17 Radiance Caching Extension of irradiance caching to glossy interreflections Cache directional distribution of light
EGSR 2005 – Konstanz, Germany 18 Radiance Caching Extension of irradiance caching to glossy interreflections Cache directional distribution of light Hemispherical Harmonics
EGSR 2005 – Konstanz, Germany 19 Radiance Caching HSH Incident Radiance HSH BRDF L1L1 L2L2 LnLn f1f1 f2f2 fnfn
EGSR 2005 – Konstanz, Germany 20 Implementation Ray tracing Cache Record Computation
EGSR 2005 – Konstanz, Germany 21 Implementation Cache storage
EGSR 2005 – Konstanz, Germany 22 Outline Introduction Irradiance & Radiance Caching Our method: Radiance Cache Splatting Results Conclusion & Future Work
EGSR 2005 – Konstanz, Germany 23 (Ir)Radiance Caching vs GPU (Ir)Radiance Caching GPU Ray tracingRasterization Cache stored in tree1/2/3D textures Spatial queriesTexture lookups ?
EGSR 2005 – Konstanz, Germany 24 Reformulation Octree Ray tracing (Ir)Radiance Caching Native GPU features (Ir)Radiance Caching Our method
EGSR 2005 – Konstanz, Germany 25 Outline Introduction Irradiance & Radiance Caching Our method: Radiance Cache Splatting Results Conclusion & Future Work From octree to splatting From ray tracing to rasterization Overall algorithm
EGSR 2005 – Konstanz, Germany 26 Outline Introduction Irradiance & Radiance Caching Our method: Radiance Cache Splatting Results Conclusion & Future Work From octree to splatting From ray tracing to rasterization Overall algorithm
EGSR 2005 – Konstanz, Germany 27 From Octree to Splatting = E(P) w k (P) Σ k S w k (P) Σ k S EkEk + (n k x n) r EkEk + D t EkEk E S = { k / w k (P) > 1/a } Irradiance Interpolation n1n1 n n2n2 n3n3 n4n4
EGSR 2005 – Konstanz, Germany 28 From Octree to Splatting Irradiance Caching Weighting Function nknk n P PkPk w k (P) = 1 ||P-P k || RkRk + 1-n.n k Distance Normals divergence
EGSR 2005 – Konstanz, Germany 29 From Octree to Splatting Simplified Weighting Function w k (P) = 1 ||P-P k || RkRk + 1-n.n k Distance Normals divergence nknk n PPkPk
EGSR 2005 – Konstanz, Germany 30 From Octree to Splatting Simplified Weighting Function w k (P) = 1 ||P-P k || RkRk + 1-n.n k Distance Normals divergence nknk n PPkPk w k (P) = 1 ||P-P k || RkRk Distance ~
EGSR 2005 – Konstanz, Germany 31 From Octree to Splatting Simplified Weighting Function nknk n PPkPk aR k w k (P) = ||P-P k || RkRk > 1/a ~
EGSR 2005 – Konstanz, Germany 32 From Octree to Splatting Principle w k (P) = ||P-P k || RkRk > 1/a ~
EGSR 2005 – Konstanz, Germany 33 From Octree to Splatting Principle
EGSR 2005 – Konstanz, Germany 34 From Octree to Splatting Principle w k (P)>1/a ?
EGSR 2005 – Konstanz, Germany 35 From Octree to Splatting Principle w k (P)E(P) w k (P)
EGSR 2005 – Konstanz, Germany 36 From Octree to Splatting Principle
EGSR 2005 – Konstanz, Germany 37 From Octree to Splatting Principle w k (P)E(P) w k (P) Σ k Σ k
EGSR 2005 – Konstanz, Germany 38 From Octree to Splatting Final Image Generation w k (P)E(P) Σ k w k (P) Σ k
EGSR 2005 – Konstanz, Germany 39 From Octree to Splatting Example
EGSR 2005 – Konstanz, Germany 40 Outline Introduction Irradiance & Radiance Caching Our method: Radiance Cache Splatting Results Conclusion & Future Work From octree to splatting From ray tracing to rasterization Overall algorithm
EGSR 2005 – Konstanz, Germany 41 From Ray Tracing to Rasterization CPU
EGSR 2005 – Konstanz, Germany 42 From Ray Tracing to Rasterization GPU Vertex Shader Fragment Shader Simple plane sampling
EGSR 2005 – Konstanz, Germany 43 From Ray Tracing to Rasterization GPU Vertex Shader Fragment Shader Simple plane sampling
EGSR 2005 – Konstanz, Germany 44 From Ray Tracing to Rasterization GPU Vertex Shader Fragment Shader Simple plane sampling
EGSR 2005 – Konstanz, Germany 45 From Ray Tracing to Rasterization GPU Vertex Shader Fragment Shader Simple plane sampling Incoming radiance loss
EGSR 2005 – Konstanz, Germany 46 From Ray Tracing to Rasterization GPU Vertex Shader Fragment Shader Our plane sampling
EGSR 2005 – Konstanz, Germany 47 From Ray Tracing to Rasterization GPU Vertex Shader Fragment Shader Our plane sampling Compensation of incoming radiance loss
EGSR 2005 – Konstanz, Germany 48 Our plane sampling Summary Easy implementation on GPU 3x more accurate than simple plane sampling Plausible directional information
EGSR 2005 – Konstanz, Germany 49 Outline Introduction Irradiance & Radiance Caching Our method: Radiance Cache Splatting Results Conclusion & Future Work From octree to splatting From ray tracing to rasterization Overall algorithm
EGSR 2005 – Konstanz, Germany 50 Algorithm Step 1 : information generation GPU Vertex Shader Fragment Shader
EGSR 2005 – Konstanz, Germany 51 Algorithm Step 2 : detection CPU ?
EGSR 2005 – Konstanz, Germany 52 Algorithm Step 2 : detection CPU GPU Hemisphere sampling
EGSR 2005 – Konstanz, Germany 53 Algorithm Step 2 : detection CPU ? GPU Hemisphere sampling
EGSR 2005 – Konstanz, Germany 54 Algorithm Step 2 : detection CPU ?
EGSR 2005 – Konstanz, Germany 55 Algorithm Step 2 : detection CPU
EGSR 2005 – Konstanz, Germany 56 Algorithm Step 3 : display GPU Vertex Shader Fragment Shader Vertex Shader Matrices Record information
EGSR 2005 – Konstanz, Germany 57 Algorithm Step 3 : display GPU Vertex Shader Fragment Shader Fragment Shader Record information
EGSR 2005 – Konstanz, Germany 58 Algorithm Step 3 : display GPU Vertex Shader Fragment Shader Fragment Shader
EGSR 2005 – Konstanz, Germany 59 Algorithm Summary No spatial data structure Spatial queries replaced by splatting Interpolation by blending No quality loss compared to (Ir)Radiance Caching No order constraint for image traversal Can be implemented using native GPU features
EGSR 2005 – Konstanz, Germany 60 Our renderer Record computation 1-bounce GI: shadow maps & plane sampling Indirect lighting Radiance cache splatting Direct lighting GPU per-pixel lighting & shadow maps CPU ray tracing
EGSR 2005 – Konstanz, Germany 61 Outline Introduction Irradiance & Radiance Caching Our method: Radiance Cache Splatting Results Conclusion & Future Work
EGSR 2005 – Konstanz, Germany 62 Results Sibenik Cathedral (80K triangles)
EGSR 2005 – Konstanz, Germany 63 Results Sponza Atrium (66K triangles)
EGSR 2005 – Konstanz, Germany 64 Results Comparison with Radiance Sponza AtriumSibenik Cathedral Radiance Time Our Renderer Time Speedup 645 s425 s 13,7 s14,3 s 47,129,7
EGSR 2005 – Konstanz, Germany 65 Results From Irradiance to Radiance Caching: Venus (24K triangles)
EGSR 2005 – Konstanz, Germany 66 Conclusion Reformulation of (Ir)Radiance Caching Speedup: 29x – 47x Interactive or fast, high quality rendering
EGSR 2005 – Konstanz, Germany 67 Future Work All-Frequency BRDFs More complex models Better hemisphere sampling Multiple bounces Area light sources
EGSR 2005 – Konstanz, Germany 68 Any questions? Radiance Cache Splatting on the web: