Erosion

I was thinking about erosion, prompted by this blogpost from “Entropic Particles“ about taking a generated terrain and adding water erosion and rivers.

Erosion is frequently a good next step to improve a generated terrain: after the geologic forces, the water cycle is probably next most important force that shapes our landscapes. The catch is that calculating a river requires knowing the shape of the entire landscape: the Mississippi drainage basin encompasses a huge swath of the continent.

If your generator is section-by-section (such as Minecraft’s) and you try to generate rivers as you go along, it’s fairly easy to end up with rivers that go in loops if you’re not careful.

Still, rivers are important enough to human habitation that they’re often worth the expense. (Try a multi-level layer-based approach if you need open-world rivers on the fly.)

Erosion isn’t just about rivers, though: it adds a history to any kind of terrain. (And for smaller scale objects, weathering is equally important; automated weathering systems are useful tools for texturing assets.)

I haven’t tried the particular algorithm described in the blog post yet, but the results certainly look promising. Using a Delaunay graph of the terrain, you calculate the flow for each node. With the tree of the fluvial network giving the volume and direction for the water, the erosion can be calculated based on the slope of the terrain.

This is all much cheaper than fully simulating the erosion. And since performance is one reason why erosion isn’t used as often as it could be, that’s a big advantage.

Of course, I’m going to keep looking for other erosion algorithms too, because as I mentioned in the last post, it is often a good idea to have multiple ways to accomplish the same goal, so you can choose the best fit for the problem at hand.

http://www.entropicparticles.com/procedure-for-rivers-and-lakes/