To my geologist's eyes there is a fundamental flaw in this method: the assumption of randomness.
All mountain ranges are driven up by lateral forces, so simply look on a satellite image to notice how they are made of ranges[0]. I do wonder if this propensity can be introduced to the code.
You generally start with some kind of perlin noise and then add plate tectonics e.g. with voronoi diagrams (use anything you want), then add climate, erosion etc. however many passes you like. It’s a fascinating rabbit hole.
One thing you can do is take a DEM and match the distributions, then sample those distributions for new terrain. This can (in theory) reproduce any characteristic represented in the original signal. It can even be relatively efficient compared to things like erosion models if you constrain the number of octaves in the signal.
As someone who has simply studied a bit of geology I agree with you--noise-generated mountains look wrong. Long ago I played around with attempting to generate terrain with faults (take a line across the world, raise everything on one side, lower everything on the other. Start with some big ones, then add more making the step size smaller as you go) followed by erosion (pick a pixel that's a local maximum, move a portion of the difference between it and the lowest neighbor to that lowest neighbor, that's the new cursor, repeat until everything around is equal or higher.) Very compute-intensive, though, and not suitable for on-the-fly generation (the faulting step might be possible with a noise generator, I see no way to do the erosion and without it everything's too harsh.) At the macroscopic level it looked a lot more realistic, I had neither the memory nor the CPU power to do too fine a model. I simply couldn't hold a large map, nor were 16-bit integers granular enough to make good slopes.
I can look at real terrain and do a pretty good job of judging whether it will be easy/hard/impossible, I've never seen a game map where that was true.
Certainly! The limit is your creativity. My first idea: generate very large scale 2D noise. Choose a threshold to divide it into regions. For each region, choose a direction of motion. Design a “mountain envelope” function that considers distance from the nearest border to create mountains/subversion zones based on the direction of each plate and the shape of the border.
This image from the same article is stunning. Those massive formations look like CGI to me. They're just too far removed from the sort of mountains I'm familiar with.
You can get much more realistic results at a smaller scale for e.g. waterways using iterative methods -- simulating rainfall and erosion. I imagine the same would be true at mountain ranges using some model of your lateral forces to influence the heightmap.
The main issue with this will be the computation time, naturally. Not that that should stop anyone, but it's likely the reason you don't see it in shipped games.
Diffusion limited aggregation is another interesting option for mountains assuming you're willing to employ an approach that isn't single pass. However a naive implementation is extremely expensive compared to other iterative options.
To be fair to OP though it doesn't model lateral forces. It just produces a visually plausible result (to my non-geologist eye at least).
In general, are aware of any physically-based long-term geological process models with real life fidelity as a goal, and that have a remote chance of being feasible for gamedev?
I imagine that, analogous to work done in weather forecasting, someone can shove DEM files into the pattern-matching engine of an AI, but I do wonder how feasible a completely algorithmic model will be.
I don't know what tech they're using, but it does have erosion, water flow and sediments, plus others. I see they're planning a paid version with more features this year. I've only played an alpha some time ago, but it should be possible to export the maps to use in other programs.
If this kinda thing piqued your interest and you want to play around with this idea, paste the following code into https://bauble.studio/:
(def octaves 4)
(def lacunarity 2.00)
(def persistence 0.50)
(def period 100)
(def height 40)
(plane y (fbm octaves :f lacunarity :gain persistence perlin p.xz period * height)
# try s/color/shade on the line below
| color (ss p.y -20 0 blue (ss p.y 0 20 green white))
| slow (20 / height)
| intersect (sphere 200))
(Using the terms from the article.) You can right-click and drag those numbers to see how the parameters affect the result in realtime. Also an easy way to compare perlin and simplex noise. Procedural terrain is fun!
Also while this uses 2D perlin noise -- you're just changing the height of a plane -- you can create some pretty detailed neat "rocky" terrain effects by using 3D perlin noise instead. Change "p.xz" to "p.xyz" to see what that looks like.
ProcGen is a fun rabbit hole to play with and was a hobby for a whole year while I tried building my own game.
I think the best material out there was from Red Blob Games (developer of the original Realm of the Mad God), which has some old but very complete material on procedural generation, including adding rivers, biomes, using Perlin noise and Voronoi polygons
I really wish the header image used ProcGen to create a landscape image, rather than Yet Another OpenAI Image that sours me on the article as a reader before I start to read it. It sells the wrong idea and makes me distrust the author.
The article mentions Minecraft — if you’re interested, check out “Reinventing Minecraft world generation by Henrik Kniberg”, a great talk about procedural generation by one of the developers: https://youtu.be/ob3VwY4JyzE
This reminds me of terrains Bryce (with its wonderful Kai Krause interface) would generate. I had no idea Ken Musgrave, who created the algorithms, was a student of Mandelbrot. I had always assumed Bryce used Perlin noise, but it turns out I was wrong and it was using fractals.
Any time algorithmic terrain generation comes up. I always think of Bryce. What a revolutionary product. I had an amazing time working at Meta Creations right out of school. So many smart people and great stories.
Stop using Perlin noise and use Simplex noise, or something even better, instead. We've come up with much, much better random noise generators in the last forty years, there's really no excuse to still use Perlin, especially in a setting where grid-aligned artifacts are going to end up in your geometry. It's a "learning about noise" algorithm, not a "using it for reals" algorithm.
Ultimately the goal is to make something good looking, how does a different noise algorithm matter? IOW why simplex generates better height maps than perlin?
Game developers can potentially save the world right now, we can build the Artificial Static Place Intelligence – instead of creating AI/AGI agents that are like librarians who only give you quotes from books and don’t let you enter the library itself to read the whole books. Why not expose the whole library – the entire multimodal language model – to real people, for example, in a computer game?
To make this place easier to visit and explore, we could make a digital copy of our planet Earth and somehow expose the contents of the multimodal language model to everyone in a familiar, user-friendly UI of our planet.
We should not keep it hidden behind the strict librarian (AI/AGI agent) that imposes rules on us to only read little quotes from books that it spits out while it itself has the whole output of humanity stolen.
We can explore The Library without any strict guardian in the comfort of our simulated planet Earth on our devices, in VR, and eventually through some wireless brain-computer interface (it would always remain a game that no one is forced to play, unlike the agentic AI-world that is being imposed on us more and more right now and potentially forever)
Self-similarity is a really nice property for lots of sound synthesis
too, so textures like water, fire and wind can make use of Perlin
control and basis signals.
To my geologist's eyes there is a fundamental flaw in this method: the assumption of randomness.
All mountain ranges are driven up by lateral forces, so simply look on a satellite image to notice how they are made of ranges[0]. I do wonder if this propensity can be introduced to the code.
[0] https://en.m.wikipedia.org/wiki/Zagros_Mountains#/media/File...
You generally start with some kind of perlin noise and then add plate tectonics e.g. with voronoi diagrams (use anything you want), then add climate, erosion etc. however many passes you like. It’s a fascinating rabbit hole.
One thing you can do is take a DEM and match the distributions, then sample those distributions for new terrain. This can (in theory) reproduce any characteristic represented in the original signal. It can even be relatively efficient compared to things like erosion models if you constrain the number of octaves in the signal.
What's DEM?
Digital Elevation Model (https://en.wikipedia.org/wiki/Digital_elevation_model)
As someone who has simply studied a bit of geology I agree with you--noise-generated mountains look wrong. Long ago I played around with attempting to generate terrain with faults (take a line across the world, raise everything on one side, lower everything on the other. Start with some big ones, then add more making the step size smaller as you go) followed by erosion (pick a pixel that's a local maximum, move a portion of the difference between it and the lowest neighbor to that lowest neighbor, that's the new cursor, repeat until everything around is equal or higher.) Very compute-intensive, though, and not suitable for on-the-fly generation (the faulting step might be possible with a noise generator, I see no way to do the erosion and without it everything's too harsh.) At the macroscopic level it looked a lot more realistic, I had neither the memory nor the CPU power to do too fine a model. I simply couldn't hold a large map, nor were 16-bit integers granular enough to make good slopes.
I can look at real terrain and do a pretty good job of judging whether it will be easy/hard/impossible, I've never seen a game map where that was true.
I think https://veloren.net/ has contributors who have put a lot of work into simulation geology, but I can't recall the place I read that
Certainly! The limit is your creativity. My first idea: generate very large scale 2D noise. Choose a threshold to divide it into regions. For each region, choose a direction of motion. Design a “mountain envelope” function that considers distance from the nearest border to create mountains/subversion zones based on the direction of each plate and the shape of the border.
You can also do similarly for water erosion, plotting channels where it runs downhill, carving a little on each cycle (and some terrain engines do).
This image from the same article is stunning. Those massive formations look like CGI to me. They're just too far removed from the sort of mountains I'm familiar with.
Notice the cars in the foreground for scale.
https://en.m.wikipedia.org/wiki/Zagros_Mountains#/media/File...
You can get much more realistic results at a smaller scale for e.g. waterways using iterative methods -- simulating rainfall and erosion. I imagine the same would be true at mountain ranges using some model of your lateral forces to influence the heightmap. The main issue with this will be the computation time, naturally. Not that that should stop anyone, but it's likely the reason you don't see it in shipped games.
Diffusion limited aggregation is another interesting option for mountains assuming you're willing to employ an approach that isn't single pass. However a naive implementation is extremely expensive compared to other iterative options.
To be fair to OP though it doesn't model lateral forces. It just produces a visually plausible result (to my non-geologist eye at least).
In general, are aware of any physically-based long-term geological process models with real life fidelity as a goal, and that have a remote chance of being feasible for gamedev?
I imagine that, analogous to work done in weather forecasting, someone can shove DEM files into the pattern-matching engine of an AI, but I do wonder how feasible a completely algorithmic model will be.
Not sure if this is what you're asking, but take a look at Terra Firma on Steam: https://store.steampowered.com/app/1482770/Terra_Firma/
I don't know what tech they're using, but it does have erosion, water flow and sediments, plus others. I see they're planning a paid version with more features this year. I've only played an alpha some time ago, but it should be possible to export the maps to use in other programs.
If this kinda thing piqued your interest and you want to play around with this idea, paste the following code into https://bauble.studio/:
(Using the terms from the article.) You can right-click and drag those numbers to see how the parameters affect the result in realtime. Also an easy way to compare perlin and simplex noise. Procedural terrain is fun!Also while this uses 2D perlin noise -- you're just changing the height of a plane -- you can create some pretty detailed neat "rocky" terrain effects by using 3D perlin noise instead. Change "p.xz" to "p.xyz" to see what that looks like.
ProcGen is a fun rabbit hole to play with and was a hobby for a whole year while I tried building my own game.
I think the best material out there was from Red Blob Games (developer of the original Realm of the Mad God), which has some old but very complete material on procedural generation, including adding rivers, biomes, using Perlin noise and Voronoi polygons
http://www-cs-students.stanford.edu/~amitp/game-programming/...
I really wish the header image used ProcGen to create a landscape image, rather than Yet Another OpenAI Image that sours me on the article as a reader before I start to read it. It sells the wrong idea and makes me distrust the author.
...and especially since this is a convention the author uses for all their articles. The AI images make the whole site look fake.
The article mentions Minecraft — if you’re interested, check out “Reinventing Minecraft world generation by Henrik Kniberg”, a great talk about procedural generation by one of the developers: https://youtu.be/ob3VwY4JyzE
The AI generated images littered everywhere on the website makes it look childish.
I have no idea why people do this. To me, it only serves to devalue the rest of the content.
It’s especially egregious in this case because the post is about something visual. The art is built-in! Why oh why.
It’s not a ‘topological’ map (though there is such a thing) — it’s a ‘topographical’ one. This is an error I see often.
Related: Shamus Young's article on adding rivers to a procgen world <https://www.shamusyoung.com/twentysidedtale/?p=12076>.
This reminds me of terrains Bryce (with its wonderful Kai Krause interface) would generate. I had no idea Ken Musgrave, who created the algorithms, was a student of Mandelbrot. I had always assumed Bryce used Perlin noise, but it turns out I was wrong and it was using fractals.
Any time algorithmic terrain generation comes up. I always think of Bryce. What a revolutionary product. I had an amazing time working at Meta Creations right out of school. So many smart people and great stories.
Stop using Perlin noise and use Simplex noise, or something even better, instead. We've come up with much, much better random noise generators in the last forty years, there's really no excuse to still use Perlin, especially in a setting where grid-aligned artifacts are going to end up in your geometry. It's a "learning about noise" algorithm, not a "using it for reals" algorithm.
Ultimately the goal is to make something good looking, how does a different noise algorithm matter? IOW why simplex generates better height maps than perlin?
Parent basically says it but Perlin noise tends to generate spatial correlations that don’t look uniform. Simplex noise doesn’t.
On the practical level, Simplex noise is also faster and generalizes to n-dimensional noise easier.
Game developers can potentially save the world right now, we can build the Artificial Static Place Intelligence – instead of creating AI/AGI agents that are like librarians who only give you quotes from books and don’t let you enter the library itself to read the whole books. Why not expose the whole library – the entire multimodal language model – to real people, for example, in a computer game?
To make this place easier to visit and explore, we could make a digital copy of our planet Earth and somehow expose the contents of the multimodal language model to everyone in a familiar, user-friendly UI of our planet.
We should not keep it hidden behind the strict librarian (AI/AGI agent) that imposes rules on us to only read little quotes from books that it spits out while it itself has the whole output of humanity stolen.
We can explore The Library without any strict guardian in the comfort of our simulated planet Earth on our devices, in VR, and eventually through some wireless brain-computer interface (it would always remain a game that no one is forced to play, unlike the agentic AI-world that is being imposed on us more and more right now and potentially forever)
Here’s a Claude artifact that implements this article. https://bit.ly/3FohhjG
Nice writeup.
If you are interested in this sort of thing, you might be interested in: https://jangafx.com/software/geogen
(Haven't used it myself, but I understand their EmberGen tool is well thought of in visual fx)
Looks pretty cool, p5js: https://p5js.org/reference/p5/noise/ supports Perlin noise out of the box.
I managed to write a glsl shader that generates perlin noise with octaves, and pull that data as 32bit float.
Much simpler than using opencl or cuda.
Most of the images don't seem to load for me
Self-similarity is a really nice property for lots of sound synthesis too, so textures like water, fire and wind can make use of Perlin control and basis signals.