using interactive ray tracing for interactive global illumination computer graphics lab saarland...
TRANSCRIPT
Using Interactive Ray Tracing forInteractive Global Illumination
Using Interactive Ray Tracing forInteractive Global Illumination
Computer Graphics Lab
Saarland University, Germany
http://graphics.cs.uni-sb.de
Februar 3th, 2003 Interactive Global Illumination 1
Interactive Global Illumination - Goals
Interactive Global Illumination - Goals
• Support for all relevant features– Complete direct & indirect diffuse illumination– Specular Effects: Refractions, Reflections, Caustics
● Be independent of geometry (scalability) !● Interactive: > 1 fps at video resolution (640x480)● Full recomputation every frame
➢ Lights, Materials, Geometry, Camera, …➢ No approximative or image-based techniques
• Interactive, user-controllable speed/quality tradeoff– E.g. trade some flickering or aliasing for speed …– Automatic and progressive convergence to high-quality solution
when possible (e.g within 2-5 sec)
Februar 3th, 2003 Interactive Global Illumination 1
Interactive Global Illumination - Goals
Interactive Global Illumination - Goals
Februar 3th, 2003 Interactive Global Illumination 1
Interactive Global Illumination
Interactive Global Illumination
• Previous solutions: – Image-Based approaches
Artifacts
– Radiosity + OpenGLMissing specularities, Meshing artifacts, …
• High-quality Global Illumination uses ray tracing anyway• Ray Tracing is now interactive
Februar 3th, 2003 Interactive Global Illumination 1
Interactive Global Illumination
Interactive Global Illumination
• Previous solutions: – Image-Based approaches
Artifacts
– Radiosity + OpenGLMissing specularities, Meshing artifacts, …
• High-quality Global Illumination uses ray tracing anyway• Ray Tracing is now interactive
Simplisitic Idea: “Interactive ray tracing”+“Ray-traced global illumination”= Interactive global illumination
Februar 3th, 2003 Interactive Global Illumination 1
Interactive Global Illumination
Interactive Global Illumination
But: Real World isn’t simplistic…Problem: GlobIllum often doesn’t scale (shared-memory)…•Radiosity:
-Shared global data for radiosities, geometry-dependency
•Photon Map: -KD-Tree reconstruction every frame, global photon map data, …
Have to live with extremely low sample rates-Even 16 MRays/sec is only 16 rays/pixel at 640x480x3Hz…-Path-Tracing and Bidirectional Path-Tracing too noisy …
Need another approach …
Februar 3th, 2003 Interactive Global Illumination 1
Instant Global IlluminationInstant Global Illumination
Our approach: “Instant Global Illumination”• Done in cooperation with Kaiserslautern University
(Alex Keller and Thomas Kollig)– Most of the algorithms are based on their work !
Idea: Combine advantages of several, differentseveral, different algorithms:– Instant Radiosity: smooth diffuse lighting– Ray Tracing: reflections, refractions, visibility testing– Interleaved Sampling (ILS): better quality, easy to parallelize– Discontinuity Buffer: removes ILS artifacts– Caustic Photon Mapping: the only way for sensible caustics
Our approach: “Instant Global Illumination”• Done in cooperation with Kaiserslautern University
(Alex Keller and Thomas Kollig)– Most of the algorithms are based on their work !
Idea: Combine advantages of several, differentseveral, different algorithms:– Instant Radiosity: smooth diffuse lighting– Ray Tracing: reflections, refractions, visibility testing– Interleaved Sampling (ILS): better quality, easy to parallelize– Discontinuity Buffer: removes ILS artifacts– Caustic Photon Mapping: the only way for sensible caustics
Februar 3th, 2003 Interactive Global Illumination 1
Basic Ingredient: Instant Radiosity [Keller]
Basic Ingredient: Instant Radiosity [Keller]
• Trace few (10-20) particles from (area) light sources• Use these to light the scene as ‘virtual point lights’ (VPLs)
– Contains both direct and indirect diffuse illumination– Shadows originally with OpenGL, now with Ray Tracing– Raytracing gives reflections/refractions for free
• Inherently smooth, since radiosity-based– Artifacts for few VPLs– Converges, but at only 10-20
VPLs clearly visible
• Plus: Add PhotonMapfor Caustics – Hack for faster query…
Februar 3th, 2003 Interactive Global Illumination 1
Too few samplesAdd Interleaved Sampling
Too few samplesAdd Interleaved Sampling
• Use different sets of virtual point lights for diff. Pixels– Every SxS’th pixel uses same set of VPLs and caustic photons– Recomputing VPL’s and photons for every pixel too costly…
• Better quality:– 9 times as many VPLs
per image than without– Same for photons !– Still cheap pixels !
• Easily parallelizable– Each CPU needs only 1 set
Scales with #CPUs !!!
• Aliasing– Can see SxS grid …
Februar 3th, 2003 Interactive Global Illumination 1
ILS Aliasing Add Filtering
ILS Aliasing Add Filtering
• Discontinuity Buffer [Keller, Kollig]– Filter irradiances of neighbouring pixels
Smoothing/removal of ILS-artifactsLike irradiance caching, but more stable
– Only filter in smooth regions, detect discontinuities• Criterion: normal & distance
• Problem: Clients don’t have neighboring pixels !– Server has to filter
High server load
– Server has to get required data• Normal, irradiance, distanceHigh network bandwidth !
Februar 3th, 2003 Interactive Global Illumination 1
Finally, add QMCFinally, add QMC
• Use Randomized Quasi Monte Carlo [Keller et al]– Much faster convergence, especially for such small sample rates !– Can be combined easily with Interleaved sampling
• Plus: ‘Technical’ advantages of QMC– Fast random number generation (table lookup + bit-ops)– Can reproduce any sequence of samples based on single seed
valueCan easily synchronize different clients on same dataEach client can easily reproduce the sample set of any other client
– Avoid ‘jumping’ of VPLs:Just start with same seed every frame
– For progressive convergence, just advance the seed value…• QMC sequences perfectly combine into the future…
Februar 3th, 2003 Interactive Global Illumination 1
SummarySummary
• Base ingredient– Instant Radiosity + Ray Tracing – Plus fast caustic photon maps
• Combine with Interleaved Sampling– Better quality– Parallelizable
• Remove ILS artifacts with Disco-Buffer– Faster convergence– Better parallelizability
• Use randomized QMC– Low sampling rates, parallelizability
• Result: Definitely not perfect– But not too bad for only ~20 rays/pixel !
Februar 3th, 2003 Interactive Global Illumination 1
Parallelization & ScalabilityParallelization & Scalability
• Adapt Scheduler to ILS:– Different clients work on different sets– Same client preferably works on same set
In theory, each client only has to compute one sample set– In practice, its still about only 1.5-2 out of 9
Very small overhead (few redundant operations)
• But: Server Bottleneck due to Disco-Buffer– Filtering cost and Network bandwidth limit max. framerate– Currently: On dual-Athlon 1800+: max. framerate of ~5 fps..– But: Can still scale in quality
• Twice #CPUs = Twice #VPLs/pixel at same framerate !
Limited only by max. framerate, not by number of clients !
Februar 3th, 2003 Interactive Global Illumination 1
ResultsResults
• Up to 5 fps at video resolution (640x480)• With 8+ dual Athlon MP 1800+• All targeted effects
– Reflections, refractions and caustics– Smooth direct and indirect diffuse illumination
• Everything recomputed every frameNo limitation on interaction types
• All parameters can be changed interactively– Sampling rate, photon query radius, filter size, …
• Automatic convergence to high-quality solution– high good quality in about 2-5 sec.
Februar 3th, 2003 Interactive Global Illumination 1
Current ResearchCurrent Research
• Have implemented a new improved system from scratch• Main Features:
– 2-3 times faster through ray packet traversal and streaming architecture
– Removed photon shooting– Support for accumulation on client side, necessary for
providing high quality during interaction and animation– Nearly linear scalability
• up to 22 fps at 640x480 with reduced quality– Sub-linear costs in image resolution– Fully programmable shading
Februar 3th, 2003 Interactive Global Illumination 1
Example ImagesExample Images
Februar 3th, 2003 Interactive Global Illumination 1
Remaining Problems& Future Work
Remaining Problems& Future Work
• Still to slow (it’s always too slow…)• Incorporate glossyness/arbitrary BRDF’s• Emission properties for light sources• Caustics• Main Limitation: Inefficient in highly occluded scenes !
– We’re working on it …
Februar 3th, 2003 Interactive Global Illumination 1
Questions ?Questions ?
Februar 3th, 2003 Interactive Global Illumination 1
Missing Caustics: Add Caustic Photon Map
Missing Caustics: Add Caustic Photon Map
• Basically just like standard photon mapping [Jensen]– Shoot directly at ‘caustic generators’ – But: too slow for our purpose : (Cost(Query)=10Rays)
Fix query radius to a fixed R– Can be interactively changed by the user …– Store photons in grid with width 2RHave to touch only 8 voxels
for each query !– Can use hashing to keep
reduce storage cost
• Fast, but not perfect… – Can afford only few photons
(reconstruction cost too high)– Looks bad if R is chosen bad