Extended virtual pipes for the stable and real-time simulation of small-scale shallow water. (November 2018) - Dagenais, François; Vervondel, Valentin; Guzmán, Julián E.; Hay, Alexander; Delorme, Sébastien; Mould, David; Paquette, Eric
Highlights: Real-time fluid simulation on the GPU. Stable, realistic, and fast-to-compute viscosity model. Extended virtual pipes that allow fluid to flow through fully flooded passages. Dedicated view-dependent meniscus shading for improved visual realism. Surface optimization to prevent liquid vs. object surface interpenetration. Graphical abstract: Abstract: We propose an approach for real-time shallow water simulation, building upon the virtual pipes model with multi-layered heightmaps. Our approach introduces the use of extended pipes that are capable of resolving flows through fully flooded passages, which is not possible using current multi-layered techniques. We extend the virtual pipe method with a physically-based viscosity model that is both fast and stable. Our viscosity model is integrated implicitly without the expense of solving a large linear system. Despite the few simplifications necessary to achieve a real-time viscosity model, we show that our new viscosity model produces results that match the behavior of an offline fluid-implicit particle (FLIP) simulation for various viscosity values. The liquid is rendered as a triangular mesh surface built from a heightmap. We propose a novel surface optimization approach that prevents interpenetrations of the liquid surface with the underlying terrain geometry. To improve the realism of small-scale scenarios, we present a meniscus shading approach with a view-dependent adjustment of the liquid surface normals based on a distance field. Our implementation runs in real time on various scenarios of roughly 10  ×  10 cm at a resolution of 0.5 mm, with up to five layers.