GithubHelp home page GithubHelp logo

tay10r / tinyerode Goto Github PK

View Code? Open in Web Editor NEW
53.0 2.0 4.0 724 KB

A portable C++ library for simulating hydraulic erosion.

License: MIT License

CMake 0.34% C++ 6.89% C 92.76%
erosion terrain-generation cxx cxx-library

tinyerode's Introduction

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.

tinyerode's People

Contributors

tay10r avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

tinyerode's Issues

Screenshots

For demo before/after screenshots of the algorithm.

before
after

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.