26 comments

[ 2.8 ms ] story [ 77.9 ms ] thread
I wonder if anyone has generated planets by running a geological simulation - plates, subduction zones, vulcanism, erosion.... etc.
Dwarf Fortress does.
Does DF actually generate the geology of the whole planet, rather than just the playable area?
You select the area you'll be playing with at the embark, so yes, the whole planet's surface is generated. But I apart from the surface layer, I doubt that this simulation takes planet core into account, for example: in the game world's it would be filled with SPOILER anyway.
plate tectonics is a planned feature for worldgen in the future
This is the "Simpsons Did It" of video games.
Having used a few cheat codes to instantly see what every voxel is composed of... the generation isn't great. It's just spheres of certain materials, as well as x-shaped veins. It feels natural when you're randomly chipping it out, but when the curtain gets pulled back, it's not as impressive.
That would be interesting. I had a quick look and found this paper, they simulate tectonic plate movement for terrain generation:

http://www.cs.rpi.edu/~cutler/classes/advancedgraphics/S13/f...

and this one looks like some sort of terrain generation based on erosion:

http://arches.liris.cnrs.fr/publications/articles/SIGGRAPH20...

Actually, it just occurred to me that what would be really cool would be a geology version of the Star Walk app - you point it at the ground/hill/mountain and it shows you what its made up of.

Explaining the history of features would be even cooler :-)

And imagine if you had a game that generated terrain by erosion + tectonic plate movement, and you got to see a visualisation of that as it was generating :) 2 billion years of geological activity, simulated in a minute-scale.
This is roughly the premise of the Neal Stephenson novel Reamde. There's a virtual world named T'Rain after the terrain generation algorithm used to create it.
Very cool result! I've been wondering about applying the height-maps that you get from Perlin/Simplex directly to the vertices of a planet, for 3D terrain. I'd imagine that the cube mapping approach might not be perfect for this because of the irregular distance between vertices. The geodesic dome would probably work, but I have no idea how you would generate noise for a shape like that.
You'd actually generate noise just the same way as I used 3D Simplex noise.

I am unsure on UV mapping though as I have not experimented with it yet when using geodesics. Instead I just escaped the problem by using a collapsed cube :)

Ahh, I get it. Took me a couple reads of the code to see what was going on, but that is pretty cool. Thanks for the info!
I've used a cubemap approach to render procedurally generated asteroid geometry and it works pretty well. I start by generating the heightmap using 3D simplex noise, Then when rendering I use a domain shader to offset the vertices of an icosphere along the normal vector according the the height in the heightmap.

http://imgur.com/rpKalpk

I've got a bunch of other procedural content generation blog entries over at http://www.junkship.net, including this entry http://www.junkship.net/News/2011/11/13/building-steam-with-... which covers a lot of similar ground to the parent article.

That's an impressive result! My worry was that it would become more obvious if I were to skimp on the poly count of the shape. Doesn't seem to have been an issue for you.

Thanks for the links, I'll definitely check them out.

(comment deleted)
If you search for "fibonacci grid sphere," you'll find the grid used for research. It's less regular and a lot more work, with a few regions of five or seven sides, but it might look more natural, and it's used because it has fewer sharp corners than the icosohedron. Just another option.
Fibonacci grid spheres look really cool. But...

The surface geometry is not very important in this task. You can easily push out a million triangles or more, so you're going to get a pretty round shape in the end, no matter which primitive you take as a starting point.

The hard part is texturing and area distortions. Ideally you wouldn't have texture boundaries crossing the triangle boundaries. Since textures are rectangular, using the "cube sphere" is a very popular choice for planet rendering.

Things get more difficult if you have to use real-life imagery (satellite images and aerial photography), because then you're going to have to stitch several layers of textures on top of each other. There are texture splatting techniques and other tricks that need to be done to get proper texturing on the planet.

Shanee, I saw this and was immediately trying to figure out how I could email it to you. Then I saw the URL :) Nice work getting it on HN!
Ha! Nice to meet you here :)
How to draw the owl...
One approach that you might want to try is to generate the planet using spherical harmonics. If you draw random coefficients for those harmonics, their distribution (in particular their rate of decay) will dictate how "coarse" the terrain looks.

Edit: scratch that, you need an ungodly amount of parameters to get anything fine... works better for designing asteroids