Rivers generation

Rivers generation

Return to topic list

Sun Feb 2 16:41:40 2014   by   silent hunter
Do you plan to develop generation rivers?
Mon Feb 3 17:34:00 2014   by   Torben
I would love to add rivers, but I can see no way to add rivers without changing the basic premise that you can generate zoomable local maps: You would not be able to know where rivers would enter the local map from the outside.  It would be easy enough if rivers should not follow the laws of nature (water flowing downwards etc.), but making them fit the landscape needs detailed non-local information.
Tue Aug 18 21:44:59 2015   by   Ron Vantreese
Hi Torben, for your inspiration...


Perhaps a fractal formula can help you stabilize a river pattern.
Wed Aug 19 11:54:27 2015   by   Torben
I can easily enough generate a river network on its own.  It is making it follow the contours of the landscape that's challenging.  I don't want rivers to flow uphill.
Wed Aug 19 18:29:09 2015   by   Ron Vantreese
Then how about 2 layers....

First layer decides if you "wish" to put river data on a pixel...

2ns layer determines if it can have a river at that pixel....

And therefore it flows with the fractal landscape.

*just thinking...*
Thu Aug 20 09:14:53 2015   by   Torben
It is not quite that simple.  The planet generation is not pixel-based but based on 3D coordinates on a continuous sphere surface.
Fri Mar 11 16:52:11 2016   by   Mark
Re rivers not flowing up hill...

There's no reason that they *have* to flow upwards, they could have easily just cut out a cavern, gully that simply *appears* to flow up hill when in fact it just cuts through.

Would it be possible to see some kind of alpha-build with river pattern on? With a possible custom colour setting? (Rivers of lava :D).

I don't necessarily mind if this is layered actually onto the world or is actually a separate layer based on the same seed (would actually be preferred).
Fri Mar 11 17:11:37 2016   by   Torben
Rivers don't "cut through" hills.  They make cut canyons, but that is through a flat surface, where the rivers initially flow in shallow beds and then gradually cut deeper.  Placing a river network on top of an unrelated map will just look strange.

I have made some experiments with forcing the landscape to follow a river, i.e., by mandating that a river should flow from one edge to the other and force the map generation to make this possible. That didn't go very well, but the general idea is probably the way to go, so I hope I can find a better way to achieve this.
Sun Mar 27 19:18:39 2016   by   Mark
Assuming of course that they're flowing over the surface... they might be flowing through underground water ways. That is how I would interpret such a map.

Perhaps, take the previous known lowest height then if the next iteration is higher then change the colour or pattern of the line? I have no idea how fractals work... and honestly, I'm just supremely grateful this works as well as it does.
Tue Mar 29 09:29:18 2016   by   Torben
You can see a short description of how the planet-generation method works at http://www.diku.dk/~torbenm/Planet/PSIslides.pdf

Sun Jul 16 16:05:22 2017   by   River lover
Please check it out.
Tue Feb 26 14:46:47 2019   by   Martin

Just checking two years later. Is this project still being developed? If yes, how does it look with river generation at the moment?
Wed Feb 27 10:07:00 2019   by   Torben
I have a student working on rivers generation, initially for 2D maps, but possibly later extended to planet maps.  He has just started, so there are no results yet.
Sun Jul 25 16:51:40 2021   by   Avarus Lux

Just checking two years later. Is this project still being developed? If yes, how does it look with river generation at the moment?

shameless copy of above message but seeing it is now 2021 it's valid on the river aspect.
i suppose the student moved on since then, still curious if river generation is being worked on in some way or if it has been deemed unfeasible with the current state of the program.
Mon Aug 9 12:50:20 2021   by   Torben
Rivers on zoomable 2D maps worked out fine, but extension to 3D (planets) did not work out.  A completely different method is apparently needed, and I have no idea how to do this.
Mon Sep 6 22:40:23 2021   by   Avarus Lux
bummer to hear that, perhaps a fun extra to add mentioned 2d river iteration as a additional option for the square map Mercator or alike map projections even if just as experimental feature for funky results.

that said, if things didn't work out for the generator at all and as such it's not useable then so be it, hand drawn rivers and lakes work out fine too. maybe in the distant future you find a novel way to incorporate such a thing.

thank you (and contributors) for trying and attempting to make it happen either way, you can say at least that much! :D
Tue Sep 7 10:37:22 2021   by   Torben
The 2D river generation requires a very different map generator algorithm that only works in 2D (a variant of the diamond-square algorithm), so it won't just work on square projections etc.
Sun Sep 12 01:27:16 2021   by   Avarus Lux
yeah, kind of expected an answer like that. thank you for trying though.
Tue Nov 16 21:58:45 2021   by   Catahoula
Thank you for the insight. Right now I'm working on my own modifications to your program to add river and lake generation (and porting it to C++, but that is another story). I thought of one possible river generation algorithm that might work with your program. Right now,  stl just thinking it up, so I have no idea if it will work or not. I was thinking of implementing that right after all the vertices are generated via your algorithm, but before they are adjusted for each projection.
Am I understanding the code correctly?
Wed Nov 17 00:09:51 2021   by   Mizuki
This is probably not possible because there's no way you haven't thought about this, but is there a reason why you couldn't pick one random point of fairly high elevation, and snake down lower and lower elevation, not going to pixels with higher elevation than the one right before it, till you reach the sea"?
Wed Nov 17 10:57:32 2021   by   Torben
Adding rivers after the map is generated can work, but you need the entire map as you would not otherwise know where rivers enter a zoomed-in portion of the map.  Since zooming is an essential feature of the planet generator, I hesitate doing that.

The 2D method generates rivers during subdivision, so it is fully zoomable, but the method does not carry over to 3D (I have tried).

Return to topic list

New message:
Posted by:

Type the values of the dice shown below:

Return to topic list