Skip to content

A portable C++ library for simulating hydraulic erosion.

License

Notifications You must be signed in to change notification settings

tay10r/TinyErode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TinyErode

Note: I have recently discovered that the implementation of this algorithm is not numerically stable, and will in some cases destroy the height field it is operating on. Be advised that this is currently being worked on. Hopefully it will be resolved soon. See the develop branch for the latest work.

This is a single-header, multithreaded C++ library for simulating the effect of hydraulic erosion on height maps. The algorithm is based on the the one in this paper.

The library takes an arbitrary terrain model and simulated the flow of water across it. As water flows, soil is picked up from the terrain and deposited in other areas depending on the flow of water.

For example, given the following model of a hill:

When the library simulates erosion, the soil transporation causes the model to change into this:

It can also smooth out noisy terrains, such as this one:

The result:

Getting Started

See the example to learn how to integrate the library in an application.

About

A portable C++ library for simulating hydraulic erosion.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published