All Projects β†’ weigert β†’ SimpleErosion

weigert / SimpleErosion

Licence: other
Simple C++ implementatoin of particle-based hydraulic erosion on a square grid

Programming Languages

C++
36643 projects - #6 most used programming language
c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to SimpleErosion

Thalatta
An open source terrain generation suite.
Stars: ✭ 37 (-42.19%)
Mutual labels:  procedural-generation, terrain, terrain-generation
DungeonTemplateLibraryUnity
🌏: Dungeon free resources (terrain & roguelike generation)
Stars: ✭ 51 (-20.31%)
Mutual labels:  procedural-generation, terrain, terrain-generation
Weltenschaft
Open-Source terrain generator πŸ—ΊοΈ
Stars: ✭ 41 (-35.94%)
Mutual labels:  procedural-generation, terrain, terrain-generation
Procedural-Terrain-Generation
3D computer graphics program in C++ OpenFrameworks of a procedural terrain generator based on simplex noise with camera movement and real-time adjustable parameters from the GUI
Stars: ✭ 18 (-71.87%)
Mutual labels:  procedural-generation, terrain, terrain-generation
AsLib
🎨: RPG map maker (paint tool)
Stars: ✭ 82 (+28.13%)
Mutual labels:  procedural-generation, terrain, terrain-generation
Dungeontemplatelibrary
🌏: Dungeon free resources (terrain & roguelike generation)
Stars: ✭ 595 (+829.69%)
Mutual labels:  procedural-generation, terrain
Veloren
[Mirror] An open world, open source voxel RPG inspired by Dwarf Fortress and Cube World
Stars: ✭ 868 (+1256.25%)
Mutual labels:  procedural-generation, terrain
Unity3d Ai And Procedural Generation Framework
Unity3D AI and Procedural Generation Framework.
Stars: ✭ 58 (-9.37%)
Mutual labels:  procedural-generation, terrain
Terrain Builder
πŸ” Procedural terrain using Three.js and perlin noise, Now Accelerated by your GPU!
Stars: ✭ 228 (+256.25%)
Mutual labels:  procedural-generation, terrain
snap-to-tin
Snap vector features to the faces of a triangulated irregular network (TIN)
Stars: ✭ 18 (-71.87%)
Mutual labels:  terrain, terrain-rendering
Erics Magicavoxel Shaders
Shaders for MagicaVoxel including Terrain Generator, Life Game, Waterflow Emulator, Advanced Flood System etc.
Stars: ✭ 99 (+54.69%)
Mutual labels:  procedural-generation, terrain
VoronoiIsland
🏝: Voronoi Island
Stars: ✭ 15 (-76.56%)
Mutual labels:  terrain, terrain-generation
Three.terrain
A procedural terrain generation engine for use with the Three.js 3D graphics library for the web.
Stars: ✭ 353 (+451.56%)
Mutual labels:  procedural-generation, terrain
Procedural-Terrain-Generator-OpenGL
Procedural terrain generator with tessellation | C++ OpenGL 4.1
Stars: ✭ 98 (+53.13%)
Mutual labels:  procedural-generation, terrain
VoxelTerrain
This project's main goal is to generate and visualize terrain built using voxels. It was achieved using different approaches and computing technologies just for the sake of performance and implementation comparison.
Stars: ✭ 37 (-42.19%)
Mutual labels:  terrain, terrain-generation
Spheres
Methods to create a sphere mesh
Stars: ✭ 168 (+162.5%)
Mutual labels:  procedural-generation, terrain
TinyErode
A portable C++ library for simulating hydraulic erosion.
Stars: ✭ 39 (-39.06%)
Mutual labels:  terrain-generation, erosion
terrain-tool-godot4
GODOT 4 3D Terrain Editor (C# Plugin)
Stars: ✭ 22 (-65.62%)
Mutual labels:  terrain, terrain-generation
Blendpeaks
A free and open source addon for Blender. It creates mountain peaks.
Stars: ✭ 78 (+21.88%)
Mutual labels:  terrain, terrain-generation
voxigen
Voxel handling library for game development, threaded generation/io/meshing with openGL rendering.
Stars: ✭ 47 (-26.56%)
Mutual labels:  procedural-generation, terrain-generation

SimpleErosion

Simple C++ implementatoin of particle-based hydraulic erosion on a square grid.

Rendered using homebrew engine, written in C++ using OpenGL3 with control using DearImGUI.

Banner Image

Link to Blog!

Compiling

Use the makefile to compile the binary:

make all

Dependencies

Erosion System:
- gcc (compilation)
- glm (vectors)
- libnoise (noise initialization)

Renderer:
- SDL2 (core, image, ttf)
- OpenGL3
- GLEW
- Boost (System, Filesystem)
- ImGUI (included as binaries in the project, no install required)

Usage

Launch the simulation using the binary:

./erosion

Controls

Mouse and Keyboard Inputs:

- Toggle Control Panel: ESC
- Toggle Pause: P **NOTE: PAUSED BY DEFAULT**
- Change Camera Vertical Angle: Up / Down
- Change Camera Zoom and Rotation: Scroll
- Move Camera Vertically: Space / C

Panel

Control Panel

A control panel is included with DearImGUI. There are three tabs: Map, Erosion and Renderer

Map:
  - Reinitialize the Heightmap using a random seed (i.e. perlin noise)
  - Change the map-scaling and remesh! This affects the PHYSICAL height of the map and therefore erosion characteristics!
  
Erosion (Note: Default settings produced the graphics in the blog post and in this repo):
  - Erosion Cycles: Number of cycles remaining to do
  - Stepsize: Number of cycles to do in a batch before updating the image
  - Run / Stop Erosion: Run or pause the cycles! (Note: After clicking run, unpause simulation)
  - Parameters: Erosion physical parameters.
    - Timestep: Integration timestep. Higher = More erosion, but the relative parameter scales stay the same
    - Minimum Volume: Volume below which a droplet is killed
    - Density: Density of droplet, to give their inertia
    - Deposition Rate: Rate of approach to equilibrium sediment capacity
    - Evaporation Rate: Volume loss factor every timestep
    - Friction: Speed loss factor every timestep
    
Renderer:
  - Steepness: Angle at which you transition from flat to steep color
  - Flat / Steep Color: Shader colors
  - Light Strength: ...
  - Auto-Rotate / Rate: If you want the map to turn (made this for cinematics)

Screenshots

Erosion Process

Example erosion process.

Results Gif

Sample of 10 results, only the results shown here.

Before / After Comparison Gif

A before after comparison of 10 OTHER samples.

Source

If you are interested in the erosion simulation, read the world.h and world.cpp files. This is where all the erosion code takes place. To see how this integrates into the actual project, read erosion.cpp. Everything else is just to make the results renderable in OpenGL3.

The renderer / engine is taken from another project of mine, but I stripped it down to the bare necessities for this project. If you are interested in rendering your own heightmap using OpenGL3, you should study the view.h and view.cpp files. These are the engine master files.

Otherwise some of the details are explained on my blog!

License

MIT License

See my website for a more detailed copyright notice.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].