Abstract
1 Research Objective The main goal of the research is the development of a physically based realtime water simulation framework that does not rely on adhoc postsimulation fixes but instead uses higher order numerical techniques to avoid issues commonly encountered (such as oscillatory solution profiles and mass conservation issues).
2 Methodology In order to achieve realtime performance, we decided to use GPGPU programming using C++ and DirectX 12. These tools provide the needed lowlevel programming access  they are also prevalently used in computer games development which is one of the main target audiences of the research. A selection of GPU specific techniques used/developed are outlined below:•Texture resources common to CG developers were used to better utilize the related caching mechanisms suited for data with high spatial sampling frequency dependencies.•Low global memory bandwidth utilization  the idea was to leverage the computation capabilities of GPUs while keeping the number of global memory transactions to a minimum. This allows the developed techniques to be run in parallel with other bandwidth heavy/low computation requiring graphics operations (e.g. shadow rendering) to fully utilize the GPU hardware. As a result, single kernel solutions utilizing fast groupshared memory were developed.•Novel GPU friendly reformulation of the strict maximum principle preservation methodology developed by [1]: in practice, the developed formulation is branchless and hence does not cause any divergence among the running threads.•Novel boundary condition application methodology that utilizes the 4channel nature of common texture formats and doesn’t cause additional thread divergence inside the computation kernel.•Development of a methodology for handling heavy, often simulation instability introducing objects in a stable manner in the shallow water framework: the generation of needed proxy geometries is fast, utilizes the rasterization hardware and can be compactly packed into a single texture resource. This means that the main solver only needs to perform one additional global memory load to support flowblocking objects.•Development of an asynchronous predictorcorrector method to combine the GPU fluid simulation with a CPU driven rigid body simulation  this was pursued to help spread computation costs among available processors, i.e. such that one wouldn’t end up with the GPU doing all of the work while the CPU just idles most of the time.
3 Findings•Higher order numerical methods are viable for the realtime solution of the shallow water equations due to careful, GPU friendly mathematical formulation of our new scheme. Due to the high accuracy of the developed scheme (third order in space, second order in time), we have also explored its usage for scientific applications in our paper [2]; also see the video accompanying the given paper at: http://physgfx.net/swe_pifweno3/.•A momentumlevel coupling formulation can lead to stronger solidfluid coupling and help avoid commonly encountered mass conservation errors.•Asynchronous combination of GPU driven fluid simulation and CPU driven rigid body simulation can be achieved by using the idea of prediction and correction  we found a Taylor series expansion of a quantity of interest based on the data from queued frames to yield reasonable and fast results. The overall frame time compared to explicit synchronization was found to be up to 1.7× lower for our asynchronous method.
4 Significance The research clearly shows that due to the computational power of modern GPUs, higher order numerical techniques can (and should be) used in CG for more visually compelling results. Further, with physically grounded numerical techniques, one can avoid adhoc fixes, some of which might otherwise need be developed specifically for certain scenes. Further, our research demonstrates how splitting of computation tasks among the CPU and GPU can be achieved for high framerate applications. Once the future work related to realistic surface rendering is complete, the final stage of the research also looks to validate these developed methods in a commercial computer games engine  hence our hope is to help shape the next generation of realtime physics and graphics techniques. As our choice of a specific game engine is not concrete, we hope to discuss possible collaborations for this part of our research with the attendees of the conference.
References [1]Chao Liang and Zhengfu Xu. Parametrized Maximum Principle Preserving Flux Limiters for High Order Schemes Solving MultiDimensional Scalar Hyperbolic Conservation Laws. J Sci Comput, 58:41–60, 2014.[2]P. Parna, K. Meyer, and R. Falconer. Gpu driven finite difference weno scheme for real time solution of the shallow water equations. Computers & Fluids, 161:107 – 120, 2018.
2 Methodology In order to achieve realtime performance, we decided to use GPGPU programming using C++ and DirectX 12. These tools provide the needed lowlevel programming access  they are also prevalently used in computer games development which is one of the main target audiences of the research. A selection of GPU specific techniques used/developed are outlined below:•Texture resources common to CG developers were used to better utilize the related caching mechanisms suited for data with high spatial sampling frequency dependencies.•Low global memory bandwidth utilization  the idea was to leverage the computation capabilities of GPUs while keeping the number of global memory transactions to a minimum. This allows the developed techniques to be run in parallel with other bandwidth heavy/low computation requiring graphics operations (e.g. shadow rendering) to fully utilize the GPU hardware. As a result, single kernel solutions utilizing fast groupshared memory were developed.•Novel GPU friendly reformulation of the strict maximum principle preservation methodology developed by [1]: in practice, the developed formulation is branchless and hence does not cause any divergence among the running threads.•Novel boundary condition application methodology that utilizes the 4channel nature of common texture formats and doesn’t cause additional thread divergence inside the computation kernel.•Development of a methodology for handling heavy, often simulation instability introducing objects in a stable manner in the shallow water framework: the generation of needed proxy geometries is fast, utilizes the rasterization hardware and can be compactly packed into a single texture resource. This means that the main solver only needs to perform one additional global memory load to support flowblocking objects.•Development of an asynchronous predictorcorrector method to combine the GPU fluid simulation with a CPU driven rigid body simulation  this was pursued to help spread computation costs among available processors, i.e. such that one wouldn’t end up with the GPU doing all of the work while the CPU just idles most of the time.
3 Findings•Higher order numerical methods are viable for the realtime solution of the shallow water equations due to careful, GPU friendly mathematical formulation of our new scheme. Due to the high accuracy of the developed scheme (third order in space, second order in time), we have also explored its usage for scientific applications in our paper [2]; also see the video accompanying the given paper at: http://physgfx.net/swe_pifweno3/.•A momentumlevel coupling formulation can lead to stronger solidfluid coupling and help avoid commonly encountered mass conservation errors.•Asynchronous combination of GPU driven fluid simulation and CPU driven rigid body simulation can be achieved by using the idea of prediction and correction  we found a Taylor series expansion of a quantity of interest based on the data from queued frames to yield reasonable and fast results. The overall frame time compared to explicit synchronization was found to be up to 1.7× lower for our asynchronous method.
4 Significance The research clearly shows that due to the computational power of modern GPUs, higher order numerical techniques can (and should be) used in CG for more visually compelling results. Further, with physically grounded numerical techniques, one can avoid adhoc fixes, some of which might otherwise need be developed specifically for certain scenes. Further, our research demonstrates how splitting of computation tasks among the CPU and GPU can be achieved for high framerate applications. Once the future work related to realistic surface rendering is complete, the final stage of the research also looks to validate these developed methods in a commercial computer games engine  hence our hope is to help shape the next generation of realtime physics and graphics techniques. As our choice of a specific game engine is not concrete, we hope to discuss possible collaborations for this part of our research with the attendees of the conference.
References [1]Chao Liang and Zhengfu Xu. Parametrized Maximum Principle Preserving Flux Limiters for High Order Schemes Solving MultiDimensional Scalar Hyperbolic Conservation Laws. J Sci Comput, 58:41–60, 2014.[2]P. Parna, K. Meyer, and R. Falconer. Gpu driven finite difference weno scheme for real time solution of the shallow water equations. Computers & Fluids, 161:107 – 120, 2018.
Original language  English 

Publication status  Published  26 Mar 2018 
Event  Graphics Technology Conference 2018: GTC 2018  California, San Jose, United States Duration: 26 Mar 2018 → 29 Mar 2018 https://web.archive.org/web/20180613234245/https://www.nvidia.com/enus/gtc/ 
Conference
Conference  Graphics Technology Conference 2018 

Abbreviated title  GTC 2018 
Country/Territory  United States 
City  San Jose 
Period  26/03/18 → 29/03/18 
Internet address 
Fingerprint
Dive into the research topics of 'Shallow water equations in realtime computer graphics'. Together they form a unique fingerprint.Student theses

Shallow water equations in realtime computer graphics
Author: Parna, P., 20 Jan 2020Supervisor: Meyer, K. (Supervisor) & Falconer, R. (Supervisor)
Student thesis: Doctoral Thesis