Snow simulation for large terrains which runs in real-time on the GPU. The simulation is based on the paper Geospecific rendering of alpine terrain by Premoze et al. with several additions.
There are two implementations of the simulation available. The GPU implementation which uses a Compute Shader and an implementation which runs on the CPU. The simulation writes the amount of snow into a texture which is then used by the landscape rendering Blueprint for the snow visualization.
The first step is importing a digital elevation model. An easy way to generate an artificial digital is to use a tool such as World Machine. See https://wiki.unrealengine.com/World_Machine_to_Unreal_Engine_4_-_In_Depth_Guide for a guide on how to import a digital elevation model into the Unreal Engine.
The main Actor used by the simulation is the SnowSimulationActor. In the construction script of the SnowSimulationActor the simulation type (CPU/GPU) must be set (as can be seen in the B_SnowSimulationActor Blueprint). The Simulation Actor uses the first Landscape Actor in the scene for the simulation.
Furthermore the SnowSimulationActor needs a climate data provider component. Climate data is globally available and comes in various data formats. Currently supported sources are:
-
MeteoSwiss
-
WorldClim
-
Stochastic Weather Generator
The stochastic weather generator uses a two state markov chain to simulate temperature and precipitation as described in Stochastic simulation of daily precipitation, temperature, and solar radiation by Richardson.
If additional climate data imports are needed the interface USimulationWeatherDataProviderBase can be extended.
After adding the climate data component the properties of the simulation should be set. The timestep (in hours) as well as the start and end date are the two most important. Debug information can be visualized in the debug category of the simulation actor.
- Update stochastich weather generator to work with multiple sites
- Update simulation to work with level streaming
- Tessellation level of detail for snow simulation
Some results of the simulation. For these screenshots a 2 meter resolution digital elevation model and 2.5 meter resolution orthoimage were used.