How to Make a Map Fit a Globe

Without pinching or weird discontinuities

The globe before we fixed the map.

The globe after we fixed the map

Today we shall look at the use of Adobe Photoshop with the Flaming Pear Flexify2 filter to fix up global maps so that they will properly fit to a globe. Although I recommend the use of 3d spherical noise such as that produced by the planetGenesis Java app, for the purposes of demonstration I will use the non-spherical noise produced by Photoshop’s Clouds filter as a base. Although this isn’t a very time-consuming process, it is really not worth the time to rectify problems with bad noise. It is best applied to manually created maps to reduce polar pinching effects while retaining as much of your detail as possible. For very simple imagery such as land/sea masks the process can be simpified considerably as we will demonstrate in a later post.

This is the map before we work our magic.

Above, you see the map we want to fit onto a globe.  At the top of the page you can compare the way we want this to fit onto a globe with the way it actually fails to fit the globe. So how can you fix this problem?

In order to fix the mismatch between the east and west edges of the map, we will start by rotating the map by 180º in longitude. Flexify2 can do this quite handily, but it does use a fairly complicated mathematical transform which can be time-consuming on a high resolution image. Instead, since I am only rotating in longitude and I am working in Equirectangular projection, I will use the built-in Offset filter(Filter>Other>Offset…). It does the job perfectly and is much quicker. Offset works with pixel measurements rather than angular units, so I have to know the width of my image to make this work. The image is 1200 pixels wide in this case and since 180º is half of 360º, I shall offset by 600 pixels right in horizontal and 0 in vertical. The result is in the image Offset 180.

Here is our offset 180º image. The problem is clear.

Now, for demonstration purposes, I will create a new noise layer by using the Clouds filter. Here is the resulting EW Fill layer.

This is the material we will use to fill in the bad parts at the east-west edge of the map.

That hid everything. Now add a layer mask to our new layer. If you look at the little buttons at the bottom of the Layers tab, Add layer mask is the third button from the left. Select the mask by clicking on it. Make sure the mask is all black to start with by filling with black. Now you will see the image below with the big discontinuity through the middle. Set the foreground color to white and the tool to paintbrush, start painting white into the layer mask over that middle line. It’s best at this point to use a fairly large, soft brush. You’ll start by painting across the discontinuity with a fairly high opacity. Next we will lower the opacity a bit, and paint a little further out to break up and soften the edges. If at any point you feel like you have obliterated too much of your original detail, reduce the opacity quite a bit and use a black color to paint out areas you want more of the original map to show through. At the end of all this, apply a bit of Gaussian blur to the layer mask to hide your fingerprints. Here is my resulting EW Fill Mask. Pretty ain’t she ;) .

Click to see image. WordPress screwed the thumbnail

Next we select all Copy Merged and Paste. Our result is here in EW Rectified.

Here is the map with the edge cleaned up.

If you mess about with this in Flexify we will see that the discontinuity between the east and west edges is pretty well dealt with, but the pinching at the north and south pole is still pretty bad. That’s because we haven’t done anything about the pinching yet. That’s the next stage.

Now we need to use Flexify! Making sure we have our EW Rectified layer(or a duplicate of it)selected, we go to the Filter menu, Filter>Flaming Pear>Flexify 2… .

The arrow shows how you should set Flexify.

Here we will set the Spin value to 90º and Longitude and Latitude values to 0º as shown in the Flexify screen image. We could center one pole in the screen by setting Spin and Longitude to 0º and Latitude to 90º or -90º, but with Spin at 90º we can fix both poles in one step! Spin 90 is an image showing what we have after Flexify renders.

See how those poles are pinching?

Once, again we create a new layer and fill it with Clouds. The NS Fill image shows what I got when I did this.

More Clouds? Wooot! ...

This layer will be used to fix the north and south poles. As with our previous east-west step, we will create a layer mask and fill it with black. Now we will paint over the pinched areas just as we painted over the discontinuity before, making sure that the noise fits together fairly well along the edges. After that we use Gaussian Blur to fade out those pesky tool marks. NS Fill Mask demonstrates how I painted out the pinching, your mileage, of course, may vary.

Once again. WordPress ate the thumbnail. Oh wonderful!

NS Rectified, shows the resulting effect, which we shall select, make a merged copy of, and paste for future manipulation.

Almost done. Everything's fixed. Just need to put the furniture back where it belongs.

Now what we have here is a perfectly good image if we don’t care about the geography of our globe. Since I’m just demonstrating with a throwaway bit of random noise, I really don’t. But, for the purposes of this tutorial lets get things back where they belong.

First, making sure that our NSRectified layer is selected, we open the Flexify 2 filter. Set the Spin to -90º and make sure that Longitude and Latitude are still set to 0º. Press, Okay. The image Spin -90 shows what I wound up with.

Now the poles are up where they belong!

For safety, I duplicated the layer and worked on the new layer, you don’t really need to although it’s good to be able to go back and fix things layer by layer if you aren’t happy with your final result. Sometimes, if you’re working with a huge image, it pays to discard layers or work on a new file, though. Before I got the new computer, I frequently had trouble with lots of layers in 8192×4096 resolution. That seems big to some people, but that means a pixel still represents five kilometers at the equator of an Earth-sized planet if this is a global map. That’s almost a 6,000 acre pixel!

The last step to get everything back to where it started is to offset that layer by -180º in longitude. Or, in this case, Offset by -600 pixels right in the horizontal direction. And the result is shown in the image Offset -180, which could also be called Map After. But it wasn’t.

Now everything's in place. Wheew!

Here’s a quick attempt at a pretty picture for demonstration.

An Easter Egg for those who read to the end :)

About these ads
This entry was posted in Mapping, Planetary Stuff, World Building and tagged , , , , , , , , , . Bookmark the permalink.

2 Responses to How to Make a Map Fit a Globe

  1. Pingback: 2010 in review | Astrographer

  2. Pingback: Happy Birthday! | Astrographer

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s