Cascaded Voxel Cone-Tracing Shadows a Computational Performance Study

Total Page:16

File Type:pdf, Size:1020Kb

Cascaded Voxel Cone-Tracing Shadows a Computational Performance Study Bachelor of Science in Computer Science June 2019 Cascaded Voxel Cone-Tracing Shadows A Computational Performance Study Dan Sjödahl Faculty of Computing, Blekinge Institute of Technology, 371 79 Karlskrona, Sweden This thesis is submitted to the Faculty of Computing at Blekinge Institute of Technology in partial fulfilment of the requirements for the degree of Bachelor of Science in Computer Science. The thesis is equivalent to 10 weeks of full time studies. The authors declare that they are the sole authors of this thesis and that they have not used any sources other than those listed in the bibliography and identified as references. They further declare that they have not submitted this thesis at any other institution to obtain a degree. Contact Information: Author(s): Dan Sjödahl E-mail: [email protected] University advisors: Stefan Petersson DIDA Hans Tap DIDA Faculty of Computing Internet : www.bth.se Blekinge Institute of Technology Phone : +46 455 38 50 00 SE-371 79 Karlskrona, Sweden Fax : +46 455 38 50 57 ii ABSTRACT Background. Real-time shadows in 3D applications have for decades been implemented with a solution called Shadow Mapping or some variant of it. This is a solution that is easy to implement and has good computational performance, nevertheless it does suffer from some problems and limitations. But there are newer alternatives and one of them is based on a technique called Voxel Cone-Tracing. This can be combined with a technique called Cascading to create Cascaded Voxel Cone-Tracing Shadows (CVCTS). Objectives. To measure the computational performance of CVCTS to get better insight into it and provide data and findings to help developers make an informed decision if this technique is worth exploring. And to identify where the performance problems with the solution lies. Methods. A simple implementation of CVCTS was implemented in OpenGL aimed at simulating a solution that could be used for outdoor scenes in 3D applications. It had several different parameters that could be changed. Then computational performance measurements were made with these different parameters set at different settings. Results. The data was collected and analyzed before drawing conclusions. The results showed several parts of the implementation that could potentially be very slow and why this was the case. Conclusions. The slowest parts of the CVCTS implementation was the Voxelization and Cone- Tracing steps. It might be possible to use the CVCTS solution in the thesis in for example a game if the settings are not too high but that is a stretch. Little time could be spent during the thesis to optimize the solution and thus it’s possible that its performance could be increased. Keywords: Shadows, Voxel Cone-Tracing, Rendering, Real-Time iii ACKNOWLEDGEMENTS I would like to thank my thesis advisors Stefan Petersson and Hans Tap for their help. I would also like to thank the Stanford Computer Graphics Laboratory for use of the Stanford Dragon 3D model that I use for computational performance measurements. Lastly, I would like to thank Tobias Pogén for his opposition feedback that helped make the thesis better. iv CONTENTS ABSTRACT ......................................................................................................................................................... III ACKNOWLEDGEMENTS ................................................................................................................................ IV CONTENTS ........................................................................................................................................................... V 1 INTRODUCTION ........................................................................................................................................ 6 1.1 AIM AND OBJECTIVES ............................................................................................................................. 6 1.2 RESEARCH QUESTION ............................................................................................................................. 7 2 BACKGROUND & RELATED WORK .................................................................................................... 8 2.1 VOXEL CONE-TRACING .......................................................................................................................... 8 2.2 VOXELIZATION ....................................................................................................................................... 8 2.3 CONE-TRACING ...................................................................................................................................... 9 2.4 CASCADING ............................................................................................................................................ 9 3 METHOD .................................................................................................................................................... 10 3.1 VOXELIZATION ..................................................................................................................................... 10 3.2 DEFERRED RENDERING ........................................................................................................................ 12 3.3 CONE-TRACING .................................................................................................................................... 12 3.4 CASCADING .......................................................................................................................................... 13 3.5 PERFORMANCE MEASUREMENT ........................................................................................................... 15 3.6 VALIDITY THREATS .............................................................................................................................. 16 4 RESULTS .................................................................................................................................................... 17 4.1 CASCADE COUNT .................................................................................................................................. 17 4.1.1 Desktop ............................................................................................................................................ 18 4.2 CASCADE SIZE ...................................................................................................................................... 19 4.2.1 Desktop ............................................................................................................................................ 20 4.3 CASCADE RESOLUTION ......................................................................................................................... 21 4.3.1 Desktop ............................................................................................................................................ 22 4.4 VERTICES IN SCENE .............................................................................................................................. 22 4.4.1 Desktop ............................................................................................................................................ 23 5 ANALYSIS AND DISCUSSION ............................................................................................................... 25 5.1 CASCADE COUNT .................................................................................................................................. 25 5.2 CASCADE SIZE ...................................................................................................................................... 25 5.3 CASCADE RESOLUTION ......................................................................................................................... 26 5.4 VERTICES IN SCENE .............................................................................................................................. 27 5.5 RELEVANCE OF CVCTS ....................................................................................................................... 28 5.6 FUTURE OF CVCTS .............................................................................................................................. 28 6 CONCLUSION AND FUTURE WORK .................................................................................................. 29 6.1 VOXELIZATION ..................................................................................................................................... 29 6.2 CONE-TRACING .................................................................................................................................... 29 6.3 VISUAL FIDELITY OF SHADOWS ............................................................................................................ 29 REFERENCES .................................................................................................................................................... 30 v 1 INTRODUCTION Shadows are a natural and necessary part of most 3D applications. Since its creation by Williams in 1978 [ 1], Shadow Mapping (SM) has become the standard way of implementing shadows in real-time 3D applications today. It’s a commonly used technique since SM is simple to implement and both cheap and fast to run performance wise. The downside is however that SM often suffers from artefacts such as shadow acne and aliasing [2]. Simply put SM works by rendering the 3D scene to
Recommended publications
  • Adoption of Sparse 3D Textures for Voxel Cone Tracing in Real Time Global Illumination
    Adoption of Sparse 3D Textures for Voxel Cone Tracing in Real Time Global Illumination Igor Aherne, Richard Davison, Gary Ushaw and Graham Morgan School of Computing, Newcastle University, Newcastle upon Tyne, U.K. [email protected] Keywords: Global Illumination, Voxels, Real-time Rendering, Lighting. Abstract: The enhancement of 3D scenes using indirect illumination brings increased realism. As indirect illumination is computationally expensive, significant research effort has been made in lowering resource requirements while maintaining fidelity. State-of-the-art approaches, such as voxel cone tracing, exploit the parallel nature of the GPU to achieve real-time solutions. However, such approaches require bespoke GPU code which is not tightly aligned to the graphics pipeline in hardware. This results in a reduced ability to leverage the latest dedicated GPU hardware graphics techniques. In this paper we present a solution that utilises GPU supported sparse 3D texture maps. In doing so we provide an engineered solution that is more integrated with the latest GPU hardware than existing approaches to indirect illumination. We demonstrate that our approach not only provides a more optimal solution, but will benefit from the planned future enhancements of sparse 3D texture support expected in GPU development. 1 INTRODUCTION bounces with minimal reliance on the specifics of the original 3D mesh in the calculations (thus achieving The realism of a rendered scene is greatly enhanced desirable frame-rates almost independent of the com- by indirect illumination - i.e. the reflection of light plexity of the scene). The approach entails represent- from one surface in the scene to another.
    [Show full text]
  • Temporal Voxel Cone Tracing with Interleaved Sample Patterns by Sanghyeok Hong
    c 2015, SangHyeok Hong. All Rights Reserved. The material presented within this document does not necessarily reflect the opinion of the Committee, the Graduate Study Program, or DigiPen Institute of Technology. TEMPORAL VOXEL CONE TRACING WITH INTERLEAVED SAMPLE PATTERNS BY SangHyeok Hong THESIS Submitted in partial fulfillment of the requirements for the degree of Master of Science in Computer Science awarded by DigiPen Institute of Technology Redmond, Washington United States of America March 2015 Thesis Advisor: Gary Herron DIGIPEN INSTITUTE OF TECHNOLOGY GRADUATE STUDIES PROGRAM DEFENSE OF THESIS THE UNDERSIGNED VERIFY THAT THE FINAL ORAL DEFENSE OF THE MASTER OF SCIENCE THESIS TITLED Temporal Voxel Cone Tracing with Interleaved Sample Patterns BY SangHyeok Hong HAS BEEN SUCCESSFULLY COMPLETED ON March 12th, 2015. MAJOR FIELD OF STUDY: COMPUTER SCIENCE. APPROVED: Dmitri Volper date Xin Li date Graduate Program Director Dean of Faculty Dmitri Volper date Claude Comair date Department Chair, Computer Science President DIGIPEN INSTITUTE OF TECHNOLOGY GRADUATE STUDIES PROGRAM THESIS APPROVAL DATE: March 12th, 2015 BASED ON THE CANDIDATE'S SUCCESSFUL ORAL DEFENSE, IT IS RECOMMENDED THAT THE THESIS PREPARED BY SangHyeok Hong ENTITLED Temporal Voxel Cone Tracing with Interleaved Sample Patterns BE ACCEPTED IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE DEGREE OF MASTER OF SCIENCE IN COMPUTER SCIENCE AT DIGIPEN INSTITUTE OF TECHNOLOGY. Gary Herron date Xin Li date Thesis Committee Chair Thesis Committee Member Pushpak Karnick date Matt
    [Show full text]
  • Real-Time Global Illumination Using Precomputed Illuminance Composition with Chrominance Compression
    Journal of Computer Graphics Techniques Vol. 5, No. 4, 2016 http://jcgt.org Real-Time Global Illumination Using Precomputed Illuminance Composition with Chrominance Compression Johannes Jendersie1 David Kuri2 Thorsten Grosch1 1TU Clausthal 2Volkswagen AG Figure 1. The Crytek Sponza1 (5.7ms, 245k triangles, 10k caches, 4 band SHs) with a visu- alization of the caches (left) and a Volkswagen test data set using an environment map from Persson2 (10.5ms, 1.35M triangles, 10k caches, 6 band SHs) with multiple bounce indirect illumination and slightly glossy surfaces (right). Abstract In this paper we present a new real-time approach for indirect global illumination under dy- namic lighting conditions. We use surfels to gather a sampling of the local illumination and propagate the light through the scene using a hierarchy and a set of precomputed light trans- port paths. The light is then aggregated into caches for lighting static and dynamic geometry. By using a spherical harmonics representation, caches preserve incident light directions to allow both diffuse and slightly glossy BRDFs for indirect lighting. We provide experimental results for up to eight bands of spherical harmonics to stress the limits of specular reflections. In addition, we apply a chrominance downsampling to reduce the memory overhead of the caches. The sparse sampling of illumination in surfels also enables indirect lighting from many light sources and an efficient progressive multi-bounce implementation. Furthermore, any existing pipeline can be used for surfel lighting, facilitating the use of all kinds of light sources, including sky lights, without a large implementation effort. In addition to the general initial 1Meinl, F.
    [Show full text]
  • Minor Thesis Point Cloud Based Interactive Global Illumination
    TECHNISCHE UNIVERSITÄT DRESDEN FACULTY OF COMPUTER SCIENCE INSTITUTE OF SOFTWARE AND MULTIMEDIA TECHNOLOGY CHAIR OF COMPUTER GRAPHICS AND VISUALIZATION PROF.DR.STEFAN GUMHOLD Minor Thesis Point Cloud Based Interactive Global Illumination Mirko Salm (Mat.-No.: 3753374) Tutor: Nico Schertler, M.Sc. Dipl.-Medieninf. Joachim Staib Dresden, 09.03.2015 Aufgabenstellung Globale Beleuchtungseffekte wie indirekte Beleuchtung und Verschattung sind ein signifikanter Faktor für die Realitätsnähe von gerenderten Bildern. Außerdem tragen sie zum besseren Verständnis der Szene bei, indem bspw. die Relationen von Objekten zueinander durch Schatten deutlich werden. Obwohl eine physikalisch korrekte Berechnung der indirekten Beleuchtung möglich ist, sind solche Verfahren sehr rechenintensiv und damit nicht für interaktive Darstellungen geeignet. Ansätze, die Teile der Lichtaus- breitung vorberechnen, können zur Beschleunigung beitragen, jedoch sind diese oft auf statische oder teil-statische Szenen beschränkt. Stattdessen sollen in dieser Arbeit Verfahren untersucht werden, die optisch ansprechende Ergebnisse erzielen. Dabei soll der Fokus auf Effekte der indirekten Beleuch- tung gelegt werden. Nachdem ein fundierter Überblick über solche Verfahren gegeben wurde, soll ein Programm für die Visualisierung von Punktwolken mittels Voxel Cone Tracing implementiert werden. Dabei ist darauf zu achten, dass die Implementierung mit dynamischen Szenen umgehen kann und eine genügend kurze Berechnungszeit aufweist, sodass eine interaktive Visualisierung möglich ist. Die Im- plementierung soll in dem Umfang, den die gewählten Algorithmen erlauben, auf der Grafikkarte laufen. Abschließend ist diese bezüglich Performanz und Qualität zu evaluieren. Teilaufgaben: • Literaturrecherche zu globalen Beleuchtungsmodellen und deren effiziente Implementierung (Light Propagation Volumes, Voxel Cone Tracing, Virtual Point Lights, Instant Radiosity). • Überblick über wesentliche Verfahren zur indirekten Beleuchtung. • Erstellen oder Sammeln von geeigneten Test-Szenen unterschiedlicher Komplexität.
    [Show full text]
  • RTXGI: SCALABLE RAY TRACED GLOBAL ILLUMINATION in REAL TIME Adam Marrs, 3/23/2020 Real-Time Ray Tracing Applications
    RTXGI: SCALABLE RAY TRACED GLOBAL ILLUMINATION IN REAL TIME Adam Marrs, 3/23/2020 Real-Time Ray Tracing Applications DirectX® Raytracing API NVIDIA RTX GPUs 2 REINVENTING REAL-TIME Battlefield V Control 3 GLOBAL ILLUMINATION, IN REAL TIME Light maps [Quake97, Mitchell06] Virtual point lights [Keller97, Kaplanyan10, Ding14, Xu16, Luksch19] Reflective shadow maps [Kaplanyan10, Billeter12, Ding14, Malmros17, Xu16] Light propagation volumes [Kaplanyan09, Kaplanyan10, Boeckmann19] Sparse voxel cone tracing [Crassin11, McLaren16] Denoised ray tracing [Mara17, Schied17, Metro19, Archard19] Irradiance probes/voxels [Greger98, Ramamoorthi01, Tatarchuk05, Gilabert12, McGuire17, Majercik19] 4 https://www.gdcvault.com/play/1026182/ 5 Real-Time Ray Tracing Applications NVIDIA RTXGI SDK DirectX® Raytracing API NVIDIA RTX GPUs 6 RTX GLOBAL ILLUMINATION (RTXGI) SDK High Level Goals Flexibility Customizable, so you can tailor it to your specific needs Scalability Effective solutions for a wide range of target hardware Convenience Implement and optimize global lighting algorithms, so you don’t have to 7 RTX GLOBAL ILLUMINATION (RTXGI) SDK Scalable Ray Traced Global Illumination in Real Time Full C++ and HLSL source code Sample application with full C++ and HLSL source Runs on all DXR enabled GPUs: NVIDIA Turing, NVIDIA Pascal, other vendors Scalable quality for GTX 1060 6GB through RTX 2080 Ti Available now, for free (on GitHub) http://developer.nvidia.com/rtxgi 8 RTX GLOBAL ILLUMINATION (RTXGI) SDK Dynamic Diffuse Global Illumination (DDGI) Based on irradiance probes A common solution already used in many game engines today Fixes light and shadow leaking issues caused by lack of visibility information Unreal Engine Dunia (Far Cry engine) Unity Image Credits: Epic Games, Ubisoft, and Unity.
    [Show full text]
  • Cloud Baked Indirect Illumination Nathan Andrew Zabriskie Brigham Young University
    Brigham Young University BYU ScholarsArchive All Theses and Dissertations 2018-11-01 NetLight: Cloud Baked Indirect Illumination Nathan Andrew Zabriskie Brigham Young University Follow this and additional works at: https://scholarsarchive.byu.edu/etd Part of the Computer Sciences Commons BYU ScholarsArchive Citation Zabriskie, Nathan Andrew, "NetLight: Cloud Baked Indirect Illumination" (2018). All Theses and Dissertations. 7031. https://scholarsarchive.byu.edu/etd/7031 This Thesis is brought to you for free and open access by BYU ScholarsArchive. It has been accepted for inclusion in All Theses and Dissertations by an authorized administrator of BYU ScholarsArchive. For more information, please contact [email protected], [email protected]. NetLight: Cloud Baked Indirect Illumination Nathan Andrew Zabriskie A thesis submitted to the faculty of Brigham Young University in partial fulfillment of the requirements for the degree of Master of Science Parris Egbert, Chair Seth Holladay Dennis Ng Department of Computer Science Brigham Young University Copyright © 2018 Nathan Andrew Zabriskie All Rights Reserved ABSTRACT NetLight: Cloud Baked Indirect Illumination Nathan Andrew Zabriskie Department of Computer Science, BYU Master of Science Indirect lighting drastically increases the realism of rendered scenes but it has tra- ditionally been very expensive to calculate. This has long precluded its use in real-time rendering applications such as video games which have mere milliseconds to respond to user input and produce a final image. As hardware power continues to increase, however, some recently developed algorithms have started to bring real-time indirect lighting closer to reality. Of specific interest to this paper, cloud-based rendering systems add indirect lighting to real-time scenes by splitting the rendering pipeline between a server and one or more connected clients.
    [Show full text]
  • Advance Program
    1 42nd International Conference and Exhibition Los Angeles Convention Center on Computer Graphics and Interactive Techniques Los Angeles, California USA Advance Program Conference 9-13 August Exhibition 11-13 August Table of Contents s2015.siggraph.org Table of Contents 2 3 Conference at a Glance 28 Production Sessions 4 Reasons to Attend 33 Real-Time Live! 5 Conference Overview 34 Studio 8 Conference Schedule 37 Talks 12 Art Gallery: Hybrid Craft 42 Technical Papers 13 Art Papers 54 VR Village 14 Computer Animation Festival 55 Exhibitor List (as of 1 June) 17 Courses (See Studio for more Courses.) 56 Job Fair Participants (as of 29 May) 21 Dailies 57 General Information 22 Educator Symposium 59 Registration Fee Information 23 Emerging Technologies 60 Conference Committee 25 Making @ SIGGRAPH 2015 61 ACM SIGGRAPH Organization Events 26 Panels 63 Co-Located Events FIRST-TIMER MOBILE ANIMATION & VFX GAMES AR/VR ARTS INVITED Some SIGGRAPH 2015 events and sessions are invited by program chairs and EDUCATION PRODUCTION MODELING RESEARCH PHYSICAL 3D not selected through the normal channels of a comprehensive jury. This is to ensure the conference can address significant topics in computer graphics and Many SIGGRAPH 2015 programs and events are assigned to focused areas of interactive techniques. interest in computer graphics and interactive techniques, and some are especially appropriate for first-time attendees. Table of Contents s2015.siggraph.org Conference at a Glance 3 Conference Registration Categories Schedule subject to change. FP Full Conference Platinum F Full Conference Access S Select Conference Access E+ Exhibits Plus Ex Exhibitors Saturday, 8 August 9 August 10 August 11 August 12 August 13 August registration hours: 4-6 pm.
    [Show full text]
  • Voxel Based Hybrid Path Tracing with Spatial Denoising
    Voxel Based Hybrid Path Tracing with Spatial Denoising Baktash Abdollah-shamshir-saz TooMuchVoltage Software Inc. [email protected] Figure 1: (left) a sample scene with emissive surfaces (center) a sample scene with most irradiance from the sky (right) The Sponza atrium with some emissive surfaces at the bottom ABSTRACT 1 INTRODUCTION We present a novel rendering technique which allows real-time Real-time global illumination for dynamic scenes has been an elu- to interactive rendering of global illumination for small to large sive goal ever since the publication of [Kajiya 1986]. With advance- dynamic scenes on commodity hardware. This technique operates ments in computer graphics and graphics hardware, many tech- entirely within graphics processors, simulates many optical phe- niques have been implemented to tackle this challenge in real- nomena, can be adjusted via grid coarseness to trade off frame rate time. [Kaplanyan and Dachsbacher 2010] was the first technique for reflection quality and is able to include GPU accelerated special to demonstrate feasibility of real-time global illumination on lim- effects such as tessellation. We achieve real-time and interactive ited hardware (gaming consoles) with a small memory footprint. performance on small and large scenes on a GeForce 970M GTX [Crassin et al. 2011] was proposed as an alternative much closer video card. to path-tracing. However, it also appeared to have a huge memory price tag (1024MB for the Sponza atrium). The technique proposed in [McLaren and Yang 2015] reduced this memory consumption CCS CONCEPTS by using viewer-centered cascades of size 32x32x32 (cached at dis- • Computing methodologies → Rendering; Ray tracing; tant cascades) and was explained in detail in [McLaren 2015].
    [Show full text]
  • Low-Resolution
    Journal of Computer Graphics Techniques Vol. 5, No. 4, 2016 http://jcgt.org Real-Time Global Illumination Using Precomputed Illuminance Composition with Chrominance Compression Johannes Jendersie1 David Kuri2 Thorsten Grosch1 1TU Clausthal 2Volkswagen AG 1 Figure 1. The Crytek Sponza (5.7ms, 245k triangles, 10k caches, 4 band SHs) with a visu- alization of the caches (left) and a Volkswagen test data set using an environment map from Persson2 (10.5ms, 1.35M triangles, 10k caches, 6 band SHs) with multiple bounce indirect illumination and slightly glossy surfaces (right). Abstract In this paper we present a new real-time approach for indirect global illumination under dy- namic lighting conditions. We use surfels to gather a sampling of the local illumination and propagate the light through the scene using a hierarchy and a set of precomputed light trans- port paths. The light is then aggregated into caches for lighting static and dynamic geometry. By using a spherical harmonics representation, caches preserve incident light directions to allow both diffuse and slightly glossy BRDFs for indirect lighting. We provide experimental results for up to eight bands of spherical harmonics to stress the limits of specular reflections. In addition, we apply a chrominance downsampling to reduce the memory overhead of the caches. The sparse sampling of illumination in surfels also enables indirect lighting from many light sources and an efficient progressive multi-bounce implementation. Furthermore, any existing pipeline can be used for surfel lighting, facilitating the use of all kinds of light sources, including sky lights, without a large implementation effort. In addition to the general initial 1Meinl, F.
    [Show full text]