Saturday, January 4, 2014

Procedurally generated Earth-like planets

I am working on a new game which will maybe have randomly generated planets. These are some of the results for Earth-like planets I've generated.

I use Perlin noise to generate the map itself. The Arctic areas are then added and a cloud layer is applied on top. All the data come from one grey scale random image. he map is then projected onto a sphere, so that the maps don't look too flat, and a bit of shadow is added to the edges to make it a bit more round looking.

Step 1
Generate image with Perlin noise and set a threshold in the middle of the range of colours. This will be the land and the sea in our map.

Here is some Python code that can be used to generate Perlin noise.

Step 2 
Project the map on a sphere.


Step 3
Add some colour-gradients bases on some thresholds. A lot more could be done here.

Step 4
Add the Arctics and  lastly add an cloud layer.


 

No comments:

Post a Comment