Designing Maps

How to make beautiful and compelling maps for your games

Randomly Generating Land Mass

Wherein I describe a technique that generates random coastlines and land masses.

In this post you’re going to learn a technique to randomly generate landmass objects and coastlines. Since coastlines are fractal in nature, having a lot of randomness is good.

This post is about a specific technique to randomly generate landmass. Other techniques (like using brushes or shapes) are discussed in Designing Fantasy Outdoors Maps.

This method is great for drawing natural looking coastlines using Photoshop’s own randomization mathematics. It’s great for when you don’t already have an idea for the landmass’ shape in mind or want to add a bunch of randomness to an existing shape. This method requires some patience but it is rewarding.

Generating Randomness

What you do here is generate a layer full of random coastlines. You will then selectively pick the shapes and edges you like from the randomness and paste them into your master layer.

Generate some randomness some using the Clouds filter and apply some Posterization to it.

How to Generate Random Clouds
  1. Create a new, empty layer above Water in your file and call it “Coastline Sources”.
  2. Set your colors to white (#ffffff) and black (#000000).
  3. With Coastline Sources selected, go Filter -> Render -> Clouds. The layer should be filled with black-and-white clouds. Not super-useful yet.
  4. Go to Image -> Adjustments -> Posterize. Set the “Levels” value to 2. Click “Okay”.
Fill the Layer with Clouds
Fill the Layer with Clouds
Clouds After Posterization

This creates a layer filled with random, fractal looking shapes. You’re going to transfer sections and stitch them together in another layer but first you should decide which shapes look cooler: the black or the white. Your mind will naturally see the black pixels as “water”, but feel free to think inversely. Delete the color you don’t want.

How to Delete the Color You Don’t Want
  1. With the Coastline Sources layer selected, go Select -> Color Range to open the dialog.
  2. Set your “Fuzziness” to 0.
  3. Click anywhere in the canvas on the color you want to delete.
  4. Click “Okay”. The dialog will dismiss and all the selected color areas will be selected.
  5. Hit the <delete> key.

Using Coastline Sources

It is time to choose bits or even whole cloth sections fo inclusion in the landmass. This will involve a lot of cutting, pasting, and layer merging, so create a new layer group called “Landmass Working”.

For my example, I’ve picked out an area in the Coastline Sources that I want to use as my primary island shape. I’m going to use that as the “base” shape and resize it to fill the area.

How to Select and Initial Coastline Source
  1. Make sure that Coastline Sources is your selected layer.
  2. Select that area (use the Marquee Selection tool or the Polygonal Lasso Tool to do this).
  3. Hit <command>c to copy it wholesale.
  4. Hit <command>d deselect everything.
  5. Turn off visibility of Coastline Sources (so it doesn’t muddy what you’re doing).
  6. Create a new layer inside of the Landmass Working group and name it “Base”. Select that layer.
  7. Hit <command>v to paste the selected pixels into the layer.
How to Resize Your Coastline
  1. You may want to zoom out to see the entire canvas.
  2. Hit <command>t activate the transformation tool on the layer.
  3. Drag the corners while holding down the <shift> key to maintain aspect ratio until it is the size you want it to be (you’re going to fill the entire area).
  4. You can also drag the pixels around or rotate them if you so desire.
  5. Hit <return>t when done.

If you zoom in, you’ll notice that the edges are blurry. Don’t worry about that right now.

Main Area Source Selection
Main Area Source Selection
Pasted Selection into Working Landmass Folder
Pasted Selection into Working Landmass Folder
Resized Initial Paste with Cruft
Resized Initial Paste with Cruft

Spot-Welding Coastlines

At this point there’s a lot of cruft. You’re making an island, not a peninsula. Clean that up by deleting what you don’t want. Use the Marquee Selection tool or the Polygonal Lasso Tool to select large areas for deletion, and one of the various Eraser tools for finer detail. The Block eraser tool is good for this, as is the Pencil. Avoid using brush erasers at this point because they can be… fuzzy.

You’ll notice that there are now some stark edges. It’s a good thing you didn’t throw away your Coastline Sources layer! Fill in those edges with patches from the sources layer.

How to Spot-Weld Coastlines
Study your missing edges. Get an idea for the kind of shape you’ll want them to become.
  1. Turn off visibility of the Landmass Working group.
  2. Turn on visibility of Coastline Sources and select that layer.
  3. Find the sources for your “patches”.
  4. For each:
    1. Select that area.
    2. Hit <command>c to copy it wholesale.
    3. Hit <command>d deselect everything.
    4. Turn off visibility of Coastline Sources (so it doesn’t muddy what you’re doing).
    5. Create a new layer inside of the Landmass Working group and name it “Patch” (or something similar. Select that layer.
    6. Hit <command>v to paste the selected pixels into the layer.

Now that the patch layers are in with the base landmass, move,rotate, and scale them into place like you did earlier using the Transform tool (<command>t). Once you’ve got them in the right positions, select all the layers inside of the Landmass Working folder and Merge Layers. Delete any cruft that you don’t want.

At this point you should have a respectable looking island. Its edges are going to be blurry in places but you’ll be manually fixing that with brushes later.

I will often use this method to create the coastlines for islands or areas that I have already designed at a larger scale. Just cut and paste sections from your cloud layer, move them into position, re-size and merge.

Landmass After Removing Unwanted Cruft
Landmass After Removing Unwanted Cruft
Hard Edges on Working Landmass
Hard Edges on Working Landmass
Source Choices for Patches
Source Choices for Patches
Final Working Landmass
Final Working Landmass

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.