Right now the terrain uses noise with a hydraulic erosion simulation for the height map. additionally, some algorithms are used to trace and model river paths and lakes. The idea is to create something very stylized with a very clean aesthetic.
Some of the future goals of the project are:
Spice up the graphics, specifically the water and sky rendering.
Thanks!
The processes are pretty much separate. The general erosion happens first to smooth the terrain.Then, a pathfinding algorithm is used to find river paths which are used to add vertices to represent the river bed.
I have been doing a bit of research on the subject and came up with a similar, but poorly designed method. I start at a random elevated location, path-find to the lowest neighbor, and then raycast left and right with a vertical height above the terrain relevant to a āvolumeā variable. This getās out of hand pretty quickly and creates a wonky mesh. Iād also like to not depend on physics.
If you wouldnāt mind, could you share some tips for gathering vertex locations and controlling the sizes of the resulting meshes (polycount, dimensions, etc)?
Hmm, Iām not sure I completely follow the approach youāre talking about. The pathfinding I use is based off of the terrainās height map. Essentially a random point is chosen for the river source. And from there its 4 neighbors are added to a potential list. Each iteration the lowest elevation point in the potential list gets remove dand added to the river path. This process is repeated until a point is explored which is at ocean level. Each point also stores which adjacent point ācreated itā, in other words which point was responsible for adding that point to the potential list. At the end the path is retraced from the ocean to the source.
Itās essentially an implementation of A* where the heuristic is elevation.
Once I have a list of points that represents the river path, I run a smoothing algorithm to make a smooth ish curve. Then in regular intervals on the curve I add a ārowā of vertices to the vertex list. Because the terrain is triangulated from scratch each time it is generated, I donāt really have to do any other work. The new river points simply form the geometry of the river bed.
At the moment Iām pretty much seeing where it takes me. Iām very hesitant to jump on the āprocedural sandbox crafting gameā bandwagon, so if I can think of something else I might pursue it farther haha.
I know this thread is almost a year old, but I was wondering if you still had the code for this project as Iv been having trouble implementing rivers in my procedural terrain.
How is your terrain rendered? The main reason this works in my code is that the terrain surface mesh is created customary using Delaunay triangulations.