Shallow water equations in real-time computer graphics

Peeter Parna*, Karen Meyer, Ruth Falconer

*Corresponding author for this work

Research output: Contribution to conferencePosterpeer-review


1 Research Objective The main goal of the research is the development of a physically based real-time water simulation framework that does not rely on ad-hoc post-simulation fixes but instead uses higher order nu-merical techniques to avoid issues commonly encountered (such as oscillatory solution profiles and mass conservation issues).
2 Methodology In order to achieve real-time performance, we decided to use GPGPU programming using C++ and DirectX 12. These tools provide the needed low-level 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 ca-pabilities 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 group-shared memory were devel-oped.•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 4-channel nature of com-mon 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 flow-blocking objects.•Development of an asynchronous predictor-corrector method to combine the GPU fluid simu-lation 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 real-time 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:•A momentum-level coupling formulation can lead to stronger solid-fluid coupling and help avoid commonly encountered mass conservation errors.•Asynchronous combination of GPU driven fluid simulation and CPU driven rigid body sim-ulation 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 ad-hoc 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 real-time 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 Multi-Dimensional 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 languageEnglish
Publication statusPublished - 26 Mar 2018
EventGraphics Technology Conference 2018: GTC 2018 - California, San Jose, United States
Duration: 26 Mar 201829 Mar 2018


ConferenceGraphics Technology Conference 2018
Abbreviated titleGTC 2018
Country/TerritoryUnited States
CitySan Jose
Internet address


Dive into the research topics of 'Shallow water equations in real-time computer graphics'. Together they form a unique fingerprint.

Cite this