Skip to content

Creating Convincing Blobs

June 5, 2016

I’ve been thinking about a scaleable map generation algorithm since this blog post. The older tactic for map generation was to pick random spots near where I wanted the center of the continent to be. Each spot would pick a diamond of coordinates to add to the newly created continent. This algorithm will be used for generating not only starting continents but the tectonic plates beneath.

Screen Shot 2016-06-04 at 7.52.22 PM.png

The original blob algorithm

One can easily see how these continents were put together from diamonds.

The new model, adapted from the responses to this stack overflow question, has given a better solution. In this model, nodes are selected across the globe, and each province uses its total proximity to all these nodes to determine whether or not it should be a part of a “metaball”. These metaballs have the appearance of magnetic goos: the closer two metaballs get to one another the better chance of their goo joining.

While not entirely departed from the “I can tell how it’s made” feeling, this new model is a great scaleable algorithm for generating continents and plates.

The example given for metaballs assumed that the plane did not wrap, however in Cosmopolitos both axis wrap. For each metaball then, I had to calculate whether you could get to the metaball on the right by wrapping over the map to the left.

 

Advertisements
Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: