NovaMundi is coming to Steam Early 2021, remember to Wishlist it if you like what you see. We also have a Mailing list now, so make sure to subscribe to it as well, if you want the news to reach your email directly. Now, let’s go to the news!
This week’s update goes straight into a single topic: Rivers.
I decided adding water bodies such as rivers and lakes is something that will be needed in order to make exploration interesting, and as such should be part of the demo and put high in the list of priorities, so I jumped back into it, resuming work from past months in order to take full advantage of all that we had done.
The biggest challenge we have had with rivers is how to make their surface remain flat in an uneven terrain. In the past, (August 2019) we have already developed infrastructure to procedurally generate strips of river surface from a polyline, make it “land” into the terrain, and render an animated water texture on them (April 2020), but placing them into the world had always been an issue.
Back then, my first efforts were to try to “carve” the bed of the river into the terrain, and then having the river mesh land on it. The issue with this is it becomes very hard to ensure the height on one side of the river bed is the same as in the other side, and with very irregular terrain the mesh becomes split into pieces when landing over different heights (especially the corners, where the river changes direction).
So the first thing I tried was to force one side of the river to be the same height as the other, due to the nature and resolution of our heightmap, this only worked for straight horizontal and vertical river sections, with no turns, which greatly diminished its usefulness.
I thought I could settle with this for the demo, and just put some forest at its tips to hide their start and end, but I just wasn’t happy enough with it, plus there was another difficulty in actually placing the rivers so that they made sense within the geography; the first efforts to detect valleys by simulating rainfall failed spectacularly, as that approach doesn’t seem to work very well without additional passes to simulate erosion.
So I decided to scrap all that, along with the foundations of our terrain generator, and instead of placing the rivers on the generated terrain, I decided to place the rivers first and then create the valleys around them. This allowed me to create “flat” rivers (including 45 degree turns) and then dig the river in a more controlled height map, and grow the mountains around.
I really like how it’s turning out, although next up I’m doing some more work to allow a wider range of angles for river turns, as well as removing some visible orthogonal patterns so that the map looks more natural.