5.1 Environments
We tested our system on an NVIDIA GTX260-based graphics card with 768MB graph-ics memory and an Intel Core i7-920 CPU. Our test scene was a trianglized version [8] of Crytek's Sponza model [1] which consisted of some 262 thousand triangles. We rendered both RSM and final image in 512×512 resolution, and indirect illumination in 256×256.
Average render time of each frame will be used to compare the performance between dif-ferent parameter settings.
5.2 Results
As previously illustrated, in comparison with the approach of original RSM, relatively fewer samples are sufficient to render aliasing-free approximate indirect illumination with randomly jittered sampling pattern. The unwanted high frequency noises produced by our sampling process can be effectively eliminated by an edge-aware blur in post processing.
Figure 5.1 presents the comparison of our visibility approximation with a non-occlusion version. Gathered irradiance is visualized because it represents the contribution from sam-pled pixel lights. If, for instance, pixel lights with green color should be occluded to some geometric areas, one can obverse the irradiance lacking some specific channel there. In the figure, directional shadows' presence in certain areas can be easily noticed and appears more realistic than the non-occlusion counterpart. We also provide a reference image
gen-(a) (b)
(c) (d)
Figure 5.1: Comparison of indirect irradiance with and without visibility approximation.
(a) Result without visibility approximation. (b) Result with our visibility approximation algorithm. (c) Amplified difference of luminance of (a) and (b). (d) Reference image generated by gathering all pixel lights on RSM with visibility determination using ray casting.
erated on CPU in which all pixel lights on RSM are gathered for every shading point, with visibility determination by ray casting. The shapes and locations of soft indirect shadows rendered by our approach generally match those in the reference image.
Three more sets of results are shown in Figures 5.2, 5.3, and 5.4. They are all parts of the Sponza scene model with different lighting and camera views. Difference images in Figure 5.5 present areas where soft indirct shadows appear.
5.3 Performance
Table 5.1 lists the performance of our system with different parameter settings. Al-though introducing the micro linear buffer consumes more graphics memory and adds an if-else branch, the overhead of visibility approximation takes merely 13% of the render time without occlusion in the three test cases.
The performance gain from lower resolution of indirect illumination is shown in Table 5.2. It is clear that the render time has dropped dramatically. In addition, the overhead of visibility approximation increases with the resolution from 13% of render time in 256×256 to 17% in 512×512. Higher resolution of indirect illumination are still possible for real-time application with future generations of graphics hardware to provide even better image quality.
Table 5.3 further shows the fraction of render time spent on each render pass. The first two passes, RSM and G-buffer generation, take the whole scene as input. In spite of our test scene consists of 252 thousand triangles which can be considered large and com-plex, the results have illustrated the capability of modern GPUs to rapidly render complex geometry. Due to our deferred shading pipeline, the other passes do not depend on the scene complexity. We also experimented the case in which deferred shading was not in-corporated with, and the frame rate would drop from around 30 fps to approximately 20 fps or sometimes even worse. In addition, to better eliminate the high frequency noises, a relatively large kernel size of 17 is used in post processing, which results in a noticeable, yet acceptable, render time roughly a quarter of the total amount.
(a) (b)
(c) (d)
(e) (f)
Figure 5.2: Test case A. (a) Global illumination without indirect shadows. (b) Global
il-(a) (b)
(c) (d)
(e) (f)
Figure 5.3: Test case B. (a) Global illumination without indirect shadows. (b) Global il-lumination with our visibility approximation for indirect lights. (c) Indirect ilil-lumination only, without visibility test. (d) Indirect illumination only, with our visibility approxima-tion. (e) Enlarged regions of (c) and (d), where on the bottom is the result of our visibility approximation. (f) Enlarged regions of (c) and (d), where on the right is the result of our visibility approximation.
(a) (b)
(c) (d)
(e) (f)
Figure 5.4: Test case C. (a) Global illumination without indirect shadows. (b) Global
il-Figure 5.5: Amplified difference between results with and without visibility approxima-tion. From left to right: difference images of results from test cases A, B, and C.
Table 5.1: Average render time with and without visibility approximation.
Test case Render time without Render time with Time visibility approximation visibility approximation increasement
A 31.6 ms (32.1 fps) 35.9 ms (27.9 fps) 14%
B 32.4 ms (30.9 fps) 36.5 ms (27.4 fps) 13%
C 33.0 ms (30.3 fps) 37.3 ms (26.8 fps) 13%
Table 5.2: Timing for different indirect illumination resolution in test case A.
Visibility Indirect illumination
Render time approximation resolution
No 256×256 31.6 ms (32.1 fps)
Yes 256×256 35.9 ms (27.9 fps)
No 512×512 79.8 ms (12.5 fps)
Yes 512×512 93.4 ms (10.8 fps)
Table 5.3: Timing for different render passes in test case A.
Render pass Render time Percentage
RSM generation 2.03 ms 5.7%
G-buffer generation 2.47 ms 6.9%
RSM sampling 21.8 ms 60.7%
Post processing 9.60 ms 26.7%
Total 35.9 ms 100.0%
Chapter 6 Conclusions
We improved RSM by integrating visibility approximation for indirect illumination to the process of sampling. The main contributions of our work include a new sampling pat-tern and a visibility approximation approach using micro linear buffer. Our results have shown that light leakage problem produced by many previous RSM-based works has been relieved. Besides, our algorithm produces soft indirect shadows that make the global illu-mination result more realistic without sacrificing advantages of the original RSM method.
In other words, we can obtain better quality without compromise of high performance.
Moreover, a GPU-based implementation and performance analysis are also presented in this thesis. We believe our performance-tuning techniques can be widely adopted to other GPU applications where render budget for each frame is of major concern. Finally, our approach is fully image-based and dynamic. It requires no precomputation of neither the scene nor the lights, and thus it is appropriate for real-time application like games or in-teractive designing tools.
Bibliography
[1] M. Dabrovic and F. Meinl. Crytek sponza model. http://www.crytek.com/cryengine/
cryengine3/downloads.
[2] C. Dachsbacher and M. Stamminger. Reflective shadow maps. In Proceedings of the 2005 symposium on Interactive 3D graphics and games, I3D '05, pages 203--231,
New York, NY, USA, 2005. ACM.
[3] C. Dachsbacher and M. Stamminger. Splatting indirect illumination. In Proceedings of the 2006 symposium on Interactive 3D graphics and games, I3D '06, pages
93--100, New York, NY, USA, 2006. ACM.
[4] C. Dachsbacher, M. Stamminger, G. Drettakis, and F. Durand. Implicit visibility and antiradiance for interactive global illumination. ACM Trans. Graph., 26, July 2007.
[5] Z. Dong, T. Grosch, T. Ritschel, J. Kautz, and H.-P. Seidel. Real-time indirect illu-mination with clustered visibility. In Proceedings of Vision, Modeling, and Visual-ization Workshop, 2009.
[6] A. Kaplanyan and C. Dachsbacher. Cascaded light propagation volumes for real-time indirect illumination. In Proceedings of the 2010 ACM SIGGRAPH symposium on Interactive 3D Graphics and Games, I3D '10, pages 99--107, New York, NY,
USA, 2010. ACM.
[7] D. Kirk and W. mei Hwu. Programming Massively Parallel Processors: A Hands-on Approach. Morgan Kaufmann, Februrary 2010.
[8] A. Kirsch. A trianglized version of the crytek sponza model. http://blog.blackhc.net/
2010/07/light-propagation-volumes/.
[9] G. Nichols, J. Shopf, and C. Wyman. Hierarchical image-space radiosity for inter-active global illumination. Computer Graphics Forum (Proceedings of EGSR), 28, June 2009.
[10] G. Nichols and C. Wyman. Interactive indirect illumination using adaptive multires-olution splatting. IEEE Transactions on Visualization and Computer Graphics, 16, September 2010.
[11] T. Ritschel, T. Grosch, M. H. Kim, H.-P. Seidel, C. Dachsbacher, and J. Kautz. Im-perfect shadow maps for efficient computation of indirect illumination. ACM Trans.
Graph., 27:129:1--129:8, December 2008.
[12] T. Ritschel, T. Grosch, and H.-P. Seidel. Approximating Dynamic Global Illumina-tion in Screen Space. In Proceedings ACM SIGGRAPH Symposium on Interactive 3D Graphics and Games, 2009.
[13] M. Segal and K. Akeley. The OpenGL Graphics System: A Specification (Version 3.1). Khronos Group Inc., March 2009.
[14] P. Shanmugam and O. Arikan. Hardware accelerated ambient occlusion techniques on gpus. In Proceedings of the 2007 symposium on Interactive 3D graphics and games, I3D '07, pages 73--80, New York, NY, USA, 2007. ACM.
[15] W. A. Stokes, J. A. Ferwerda, B. Walter, and D. P. Greenberg. Perceptual illumination components: a new approach to efficient, high quality global illumination rendering.
ACM Trans. Graph., 23:742--749, August 2004.
[16] S. Thiedemann, N. Henrich, T. Grosch, and S. Müller. Voxel-based global illumina-tion. In Symposium on Interactive 3D Graphics and Games, I3D '11, pages 103--110, New York, NY, USA, 2011. ACM.