/Interactive-Erosion

Interactive erosion in Unity

Primary LanguageC#MIT LicenseMIT

Why forked (Nashhet)

I wanted to add ice and lava layers, but got much more ideas in process!!

Video:

IMAGE ALT TEXT HERE

Heavy screenshots:

https://i.imgur.com/FGxkEwy.jpg

https://i.imgur.com/kWZczeV.jpg

https://i.imgur.com/oLm71P8.jpg

How to setup

Should work with Unity 2021 (PC builds) and probably wixt nexts. One note - value of some publiс fields are overwritten by unity inspector, you'll see it after meeting with inspector.

I build for default settings, Windows _86. Hopefully, there wouldn't be problems with shaders compilation for your platform. Also, MS Visual Studio might be helpful

Interactive-Erosion (Scrawk)

This project is based on the excellent article Interactive Terrain Modeling Using Hydraulic Erosion. The Authors were also kind enough to publish the code in ShaderX7 which is what a lot of this Unity project is based on. I have made some changes and left some things out.

The idea behind this project is to erode a height map through a series of natural processes to help create a more realistic height map. Three processes are applied to the height map each frame and can be classed as force-based erosion, dissolution-based erosion and material slippage. All of these processes are carried out on the GPU. The height map can be represented by a series of layers (4, one for each RGBA channel) and each can have different erosion settings applied to it. The lower layer represents the base rock layer and the top layer represents soft soil/sand were any sediment is deposited.

See home page for more information and unity package download.

Erosion before

Erosion after

Slippage before

Slippage after