Saturday, October 15, 2016

Colorful continents from plate tectonics

In yesterday's post, I wrote that I'd abandoned calculations of pseudo-motion at each point on the plate boundary, and used plate-by-plate collision data along with distance from plate boundary to generate elevation from pseudo-collisions.

I went back to the pseudo-motion calculations, removed the code for finding distance to border, and sped things up by about 3-4 times.  Its still not as fast as I'd like, but I'm getting results I'm happier with.  I simply iterate through every border point and evaluate the points in a radius around the border point, the radius based upon a effect factor in the range 0..1 that is based upon the pseudo-collisions.  That effect factor is multiplied by a distance factor (falls off farther from border point), then my a peak elevation, and then the result is mixed with three octaves of fBm based upon Perlin noise.  The result is some decent mountains and island arcs of variable density along the boundaries of oceanic plates.

Elevation map with new technique
Enlarged view of elevation map, showing mountains and islands

Resolutions under 1024 x 512 typically complete in under a minute, and an 1800 x 900 map took less than two minutes.  A 3600 x 1800 map took under seven minutes.  Alas, 7200 x 3600 took well over forty minutes, mostly in dividing the ocean into plates.  That step seems to scale up poorly.

I've also incorporated the terrestrial world coloring code from the earlier planet generator into this code.  The results are a pleasant mix of colors that vary based upon elevation and latitude. 


Map with color!

There's still more I'd like to tweak, but I think its really coming along nicely now.  For example, I think some smoothing or proper erosion algorithms would enhance the look of the maps.  Perhaps some river generation techniques could be applied.  In particular, I'm thinking of using ideas from Soon Tee Teoh's paper "River and Coastal Action in Automatic Terrain Generation" for rivers and possibly for river deltas.  My planetary-scale maps are likely too coarse for the rest of the techniques in that paper, such as more-detailed mountains, or beaches and headlands.

I may also take the output from the program and load it into the digital globe program.  The source code should ultimately get incorporated into the Planets generator, as should the Star System generator.  


Enlarged view of map with colors applied.  Colors vary by latitude and elevation.


Other thoughts: A higher degree of freedom for the hinge rotate operation should be incorporated, based upon the available map space (don't let parts rotate off-map).  Investigate better resolution independence - only the basic land shapes and their splitting remain consistent for the same seed number; changing resolution alters other aspects such as the oceanic plate partitioning and their pseudo-motions (and hence topography).  Oceanic trenches?  Split off small parts of continents sometimes to create giant islands like New Zealand, Madagascar, or Greenland.


Another world, created using a seed value of 8.  The ones above used a seed of 2.


Another world, created using a seed value of 9.



No comments:

Post a Comment