180 likes | 293 Views
Realishtime Radiosity And Next Shooter Selection. Jeff Pool COMP 870 Final December 4, 2008 UNC Dept. of Computer Science. Approaches to Radiosity. CPU matrix solving GPU gathering GPU scattering GPU scatter/gathering Hemicubes Hemispheres. I tried:. GPU gathering Hemicubes
E N D
RealishtimeRadiosityAnd Next Shooter Selection Jeff Pool COMP 870 Final December 4, 2008 UNC Dept. of Computer Science
Approaches to Radiosity • CPU matrix solving • GPU gathering • GPU scattering • GPU scatter/gathering • Hemicubes • Hemispheres
I tried: • GPU gathering • Hemicubes • 5 renders per subelement • No form factor calculations, though • FBOs • Hemispheres • Scatter/Gather
Approach 1 - Hemicubes • Gathering • 50x50 elements • Hemicubes • 5 renders per element • CPU processing • Bandwidth issues ~24 hours
Approach 2 – Hemicubes w/ FBO • Gathering • Hemicubes • FBO • No sending data back and forth ~5 minutes
Approach 3 – Coombe, et al. • Scatter/Gather • Hemispheres • FBO ~1/2 second
Key Points • ID Buffer • Hemispheres • Progressive refinement • Next shooter selection • (fpMipMap generation) • Texture packing for residual/full textures • (HW now has MRT)
ID Buffer • Elements rendered with ID colors for visibility (hard part of form factors) • Correlated to hemisphere rendered by shooter
Hemispheres • Only one pass, not 5 • Can be some distortion, so target framebuffer must be large for accurate visibility
Shooting Pass • Scene rendered into hemisphere by shooter • Each element is rendered as a quad • Per fragment: • Form factor computation • Visibility = Idcolor==hemisphere(projectedPos) • Energy = FF * Reflectance * Visibility
Updating the elements • Easy: Blend 1 + 1 (src + dst) = additive rendering • Render to multiple targets – residual AND full • Shooter’s residual framebuffer is simply cleared
Next Shooter Selection • Trivial to select element with most energy left • Multiply lowest mipmap level by area • HOWEVER, two things to consider • Visual impact of color bleeding • Frame-frame coherence
Problem #1 Importance of color over brightness 6 shots over 64x64 (~0.3 seconds)
Problem #2 Note the flickering as the light source descends, which can be pretty distracting
Different Preference Measures • Sum of components • Max of components • Variance (+mean) • Luminance
SO: • Radiosity at realtimeframerates (1-10 fps) • Quality tradeoffs for speed: • Size of hemisphere texture • Subdivision size • Aggregate shooting • Preferential next shooter selection • Brightness • Color • Coherence