Fast Hydraulic Erosion Simulation and Visualization on GPU



![Introduction - Erosion Simulation (Why? ) ■ Enhance realism [Chiba’ 98] ■ A useful Introduction - Erosion Simulation (Why? ) ■ Enhance realism [Chiba’ 98] ■ A useful](https://slidetodoc.com/presentation_image_h2/aaab8d9f006cf9e4ddf0d213b61148bb/image-4.jpg)
![Introduction - Existing Methods ■ Procedural [Kelly’ 88, Prusinkiewicz’ 93] Ø Ad hoc rules Introduction - Existing Methods ■ Procedural [Kelly’ 88, Prusinkiewicz’ 93] Ø Ad hoc rules](https://slidetodoc.com/presentation_image_h2/aaab8d9f006cf9e4ddf0d213b61148bb/image-5.jpg)






















- Slides: 27
Fast Hydraulic Erosion Simulation and Visualization on GPU Xing Mei 1 Philippe Decaudin 2 Bao-Gang Hu 1 1. CASIA (China) 2. INRIA (France) Pacific Graphics’ 07
Outline ■ Introduction ■ Hydraulic Erosion ■ Existing Methods ■ Hydraulic Erosion on GPU ■ Method Overview ■ Simulation Steps ■ Multi-pass Implementation on GPU ■ Results ■ Conclusion & Future Work 2
Introduction - Hydraulic Erosion ■ Process Water flow takes away (dissolves) the soil and relocates (deposits) it somewhere else ■ Effect Changes terrain appearance Creates interesting geo-morphological structures Gullies Eroded landscape on Maui Island 3
Introduction - Erosion Simulation (Why? ) ■ Enhance realism [Chiba’ 98] ■ A useful complement to fluid simulation Topographical changes affect the water flow [Beneš’ 06] 4
Introduction - Existing Methods ■ Procedural [Kelly’ 88, Prusinkiewicz’ 93] Ø Ad hoc rules with fractal terrain generation Ø Fast and efficient; No water flow involved Limited control on the erosion results ■ Physically Based Simulation [Musgrave’ 89, Chiba’ 98, Neidhold’ 05…] Ø Simulation on already-existing terrains Ø Controllable Erosion Process, but computationally expensive 4 fps on 256 x 256 grids [Neidhold’ 05] 5 fps on 300 x 300 grids [Beneš’ 07] Limited for interactive applications 5
Erosion on GPU - Motivation ■ A novel hydraulic erosion simulation method Ø Effective produces the important features in the erosion process Gullies, water catchments, deposited sediment… Ø Efficient Well mapped to GPU Interactive frame rates for large size terrains 6
Erosion on GPU - Method Overview ■ 5 steps in one cycle of the simulation (1) Water Increment (2) Water Movement (flow simulation) (3) Erosion or Deposition (4) Sediment Transportation (5) Evaporation water Rainfall & River Source Wat er M Ero sion ove men t Sed ime Terrain nt T rans port atio n Evaporation Dep o sitio n Catchment Deposited 7 Sediment
Erosion on GPU - Data Structure ■ Layers of 2 D arrays Suspended Sediment Outflow flux cell Water Height - Velocity Terrain Height Arrays ■ Each step should update the cell data in parallel No scattering operations on the data array involved cell 8
Erosion on GPU (1) Water Increment ■ Two kinds of sources River sources – fixed location, radius, intensity Raindrops – random location, radius, intensity Water increment 9
Erosion on GPU (2) Water Movement (Flow Simulation) ■ Possible Models? Ø GPU friendly Grid-based methods > Lagrangian methods Ø Efficient Shallow water model > 3 D Navier-Stokes Equation Ø Suitable for Erosion-Deposition Velocity field is necessary ■ Previous models on shallow water framework Ø Simplified Newtonian physics model [Neidhold’ 05] hard to parallelize Ø Kass&Miller’s implicit method [Beneš’ 07] many iterations over the grid, not efficient for large size terrain ■ Our choice The Virtual Pipe model [O’Brien’ 95] 10
Erosion on GPU (2) Water Movement (Flow Simulation) ■ Virtual Pipe Model ■ Water is exchanged between cells through virtual pipes ■ How much water exchanged through each pipe? Flux – accelerated by the hydrostatic pressure difference Two-Step Process 1. Update Flux 2. Update Water Height P 0 Cell P 1 P 2 A simple explicit method 11
Erosion on GPU (2) Water Movement (Flow Simulation) ■ Two “problems” about the original model 1. Staggered grid water height (d) – cell center flux (F) – cell border Cell 2. Non-negative water update A scaling back process scattering operations are involved Both are not GPU-friendly 12
Erosion on GPU (2) Water Movement (Flow Simulation) ■ Adaptation to the original model ■ the outflow flux for each cell ■ Flux (F) and outflow flux (f) Outflow flux Inflow flux Cell(x, y) ■ Water height update (d) - send away the outflow flux - collect inflow flux from neighbours 13
Erosion on GPU (2) Water Movement (Flow Simulation) ■ Non-negative water update Outflow flux Inflow flux Cell omitted, strengthened condition a scaling factor K limiting the outflow flux 14
Erosion on GPU (2) Water Movement (Flow Simulation) ■ 3 -step process Ø Update outflow flux Ø Update water height Ø Update (horizontal) velocity field From Flux (f) to Velocity (V) ■ No-Slip Boundaries Cell Boundary cell set outflow flux to 0 for boundary cells ■ Limitation for time step 15
Erosion on GPU (3) Erosion & Deposition n Sediment transport capacity Current suspended sediment Deposition n How to compute Erosion for each cell ? We adapt a classic model from soil science [Julien’ 85] 16
Erosion on GPU (4) Sediment Transportation ■ Suspended sediment (S) is advected by the velocity field (advection dominated, no diffusion considered) ■ Many GPU-friendly schemes to solve the equation Ø Stable semi-Lagrangian method [Stam’ 99] Ø Upwind differencing scheme Ø More mass-conservative methods such as BFECC [Kim’ 05, Selle’ 07] 17
Erosion on GPU - Multi-pass Implementation on GPU ■ General computation framework on GPU [Harris’ 03, Owens’ 07] To update a 2 D array in parallel: pack data draw a screeninto textures aligned quad ■ Multi-pass process update texture in pixel shader Simulation (1) Water Increment Outflow Initialization (2) Flow Simulation (3) Erosion-Deposition Water Height Velocity Visualization VS: Vertex Texture PS: Phong Lighting (4) Sediment transport (5) Evaporation 18
Results ■ Platform: Pentium IV 2. 4 GHz + 2 Gb RAM + Nvidia 8800 GTX 512 x 512 grids for video demos water suspended sediment in the flow deposited sediment Video “PG scene” in the rain 19
Results ■ Deposited sediment in a basin Video The bottom of the basin is flattened by the deposited sediment 20
Results ■ River flow in a drained channel Video Part of the original river bank get eroded 21
Results ■ Mountain scene eroded by rainfall Video 22
Results ■ Final example: the combination of the rainfall and the river source Video 23
Results ■ Performance results for the final example at different grid size 1 cycle = 1 simulation + 1 visualization Interactive frame rates for terrain up to 1024 x 1024! 24
Results ■ ST, VT, CT at different grid size ST : Simulation Time VT : Visualization Time CT : Cycle Time = ST + VT 1. ST, VT, CT scales well with grid size ~ linear with # of cells 2. VT takes more time for large size terrain 3. Further Improvements 25
Conclusion & Future Work ■ A novel simulation method for hydraulic erosion ■ Effective – proper model selection and adaptation for each step Produces dynamic erosion process and realistic results ■ Efficient - well designed for complete GPU implementation Interactive frame rates for large size terrain ■ Future work ■ Further improvements on models: Fluid solver - Limitation for time step Erosion Model - Little erosion on flat terrain ■ Extension to non-height-field scene (general 3 D objects, structures with caves) ■ More erosion process – thermal weathering, wind erosion… 26
Thanks! More info on http: //evasion. imag. fr/Publications/2007/MDH 07/ 27