Unreal Engine snow simulation for large terrains using Compute Shaders for GPU paralellization.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vs/config
Config
Content
Intermediate/ProjectFiles
Plugins
Shaders
Source
.gitattributes
.gitignore
README.md
SnowSimulation.uproject

README.md

Unreal Terrain Snow Simulation

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.

How to Use

Digital Elevation Model

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.

Simulation Actor

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.

Climate Data

Furthermore the SnowSimulationActor needs a climate data provider component. Climate data is globally available and comes in various data formats. Currently supported sources are:

  1. MeteoSwiss

  2. WorldClim

  3. 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.

Simulation

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.

Future Work

  • Update stochastich weather generator to work with multiple sites
  • Update simulation to work with level streaming
  • Tessellation level of detail for snow simulation

Screenshots

Some results of the simulation. For these screenshots a 2 meter resolution digital elevation model and 2.5 meter resolution orthoimage were used.

mountain without snow

mountain with snow

snow comparison

mountain without snow 2

mountain with snow 2