I’m still learning Fractal Terrains 3 and I’m a very long way from having a finished world. But it’s never too soon to be thinking about how I’ll export it back to Campaign Cartographer. After all, limitations on how I will be able to export the map could very well influence its creation.

The big issue here is that FT3 is primarily designed to deal with worldwide maps wrapped around a sphere while CC3 deals with flat maps. Flatting a spherical map and displaying it in 2D has always been problematic.

Spherical Maps vs. Planar Maps

FT has the ability to create planar maps (flat maps created on a plane). This would certainly make my life easier. You can change the projection and display this planar map on a sphere but the seam where the two edges meet along the back (as well as the poles) will not come together well unless you spend a great deal of work to manually patch them together. Although this is a viable option, it is not the direction I’m going to go. I want a spherical map that will look good from any angle.

Now that I’ve decided to stick with a spherical map I need to concentrate on how to export it so that it will look good in 2D.

Memory Limitations

As always, memory is a huge concern. The highest resolution image FT can export is not nearly high enough to allow you to zoom in to any usable extent. Fortunately, you don’t have to export the map as a single image. FT has an option (File | Export World | Multiple Files) to slice up the map and export separate images of each slice. With this ability, resolution is no longer an issue. This feature is so powerful that it deserves an article all its own. Therefore I won’t say any more about it for now.

Choosing a Projection

Now I need to decide what projection to use when exporting my map. FT supports a great many projections. For viewing the world as a whole I prefer the Orthographic projection. That lets you see the world as a sphere and rotate it as need be. There are two main problems using this type of projection for export. One, half the map is hidden on the back half of the sphere. Two, the map becomes increasingly distorted at the edges.

My choice for a flat map is the Equirectangular projection. It unwraps the sphere and lays the map out flat. However, the poles are stretched to the same width as the equator creating distortion as you move toward either pole.

No matter which projection I use, there will be some level of distortion. I could create a world that only contains a landmass within 45 degrees of the equator. Distortion would be greatly reduced. This option is certainly viable as well. To me, it feels too much like cheating. Beyond that, I don’t like basing a decision on what is easiest. I prefer to go by what is the best choice. This doesn’t feel like the best choice to me.

Icosahedral Projection

An Icosahedron is a regular polygon with 20 identical equilateral triangular faces. Those familiar with role-playing games know it as a 20-sided dice. An Icosahedral Projection maps a sphere onto these 20 triangles that may then be laid out flat without any distortion. This being a blog about D&D, using a d20 for the basis of my map projection seems quite appropriate.

There is an option to export an icosahedral image. Unfortunately, it would be a single image which would run into the same memory limitations discussed above. Even if it were an option for the Multiple Files export feature, it would have one other serious problem. The top third of the map consists of five triangles. The tip of each touch each other, forming the north pole, when the map is folded to form an icosahedron. When laid flat the sides of each of these triangles is at a 60 degree angle when in actuality they are longitudinal lines that should run north and south. (The bottom third of the map has the same problem in the opposite direction).

That seems to make this an unacceptable choice. As far as using the 20 triangles, I would agree.

Cosmographer Template

FT also has the ability to export the map into a Cosmographer Template (Cosmographer 3 is an add-on to CC3). This template uses an icosahedral projection as well. However, it has a hex grid overlaid on top of it. That hex grid is what I intend to use!

490 Hexes

Each of the 20 triangles contain 15 full hexes, 18 half-hexes, and 3 one-sixth hexes. That comes to a total of 490 hexes over the entire sphere. Each hex is still distorted but since each covers such a small area, this distortion isn’t noticeable.

So how do I export my spherical map onto these hexes? That’s pretty easy. In FT, click on “Map | Change Projection” and select “Orthographic”. That will give you a projection of your map onto a sphere. There are also boxes where you can type in the latitude, longitude, and scale to achieve any view you want.

There are 35 hexes around the equator of the map. Therefore, if I set the circumference of the world to 7000 miles (unrealistically small but we’ll pretend that it is somehow dense enough to still produce earth normal gravity), that means that each hex is 200 miles across (measured flat edge to flat edge).

Now I set the latitude and longitude of each hex, set a scale that displays 400 miles vertically and horizontally (enough to cover the hex and some surrounding area), and export an image for each map.


Setting up a view and exporting an image of that view is pretty simple. Doing it 490 times though would be a bit tedious. Fortunately, FT has a built-in scripting language. I have only taken a cursory look, but so far it appears that the scripting language does not have the commands necessary to do what I want. I posted a message about this on the forums and Joe (jsweeney, the author) confirmed that this is the case. I am hopeful that such commands will be added in the future though. Even if they aren’t, this can be done manually. Keep in mind that not every hex will contain a portion of the landmass. In addition, You are most likely focusing your campaign on a small portion of the landmass. It would probably be possible to export a half dozen or so hexes and adequately cover the area you are interested in. The rest could be whittled away at as needed.

What Actually Gets Exported?

I’ve been talking about exporting maps and images and using the terms interchangeably. FT has the ability to export to all sorts of image formats as well as CC3’s FCW format map files with a great deal of control over what information/features are exported into those maps. In truth, I don’t expect to export my map into FCW files. Instead, I will just create image files. The image created will be based on the viewing window. I’ll set the scale to show slightly more than 400 miles vertically, but the window isn’t square and it isn’t possible to size it to an exact amount so I will make it slightly more than 400 vertically and whatever it happens to be horizontally (so long as it is at least as big) and then crop the image to exactly 400 miles square in Photoshop (resize canvas with image centered will strip away all four sides leaving the image centered). When I’m done, I’ll create 400 mile square FCW maps and import the image files into each one to use as a background. This will give me the beautifully detailed terrain from FT and the ability to place cities, roads, text etc from CC3. I’m hoping that the image cropping in Photoshop and the importing of background images can be automated. If not, It will be tedious but doable.

Determining Longitude/Latitude of Each Hex

Initially, I didn’t spend much time thinking about this step. I knew one way or another I would get what I needed. Then it came time to think about it. Dang. My first thought was that I’d have to determine the XYZ position of each point in three dimensional space and then translate those points into lat/long coords. Doable but daunting. A quick search for icosahedrons uncovered an overview for mapping the vertices to Cartesian coords, but I was on my own for translating them to spherical coords.

I find it best at times like this to take a break to clear my head. Sure enough, that helped me see that I was making the problem far more difficult than necessary. That approach would have worked but there is a much easier way.

Be The Point

Place yourself at the center of a d20 and look out. What do you see? If one vertice is at the top and bottom, you will see three rows of triangles. The top row has five, the middle row has ten, and the bottom row has five. Each row is exactly as wide (vertically) as each other and total 180 degrees top to bottom. Therefore each row is 60 degrees wide. Now look at a d20 with one vertice in the center. You see five identical equilateral triangles (albeit you are seeing them at an angle) coming out from that vertice. Their other vertices are all equidistant from the center one and from their neighbors. Behind those are another set of vertices rotated halfway between the first set.

I probably didn’t explain that very well. Math doesn’t translate into English very well. But once I simply envisioned the problem, I had the lat/long coords of the 12 vertices. Here’s a (very poor) drawing I used to visualize it as well as a list of the coords.


Last Step

That takes care of the coords for the vertices for the 20 triangles. Now I need the coords for the individual hexes. I’ve included an image of the doodle I used for that as well but as you can see it is a very poor scan.

Edit: Ignore the 7.2 and 3.6 under the hexes. They are wrong.

Each triangle occupies 60 degrees vertically and span seven hexes. Therefore, each hex is located 60/7 or 8.571428571 degrees above and below its neighbors. The circumference of the sphere is 360 degrees so if there are 35 hexes around the equator, each hex is 360/35 or 10.28571429 degrees east or west of its neighbors. Each row of hexes is offset east/west by half a hex or 5.142857143 degrees.

However, hexes in the top and bottom thirds of the map each represent greater numbers of degrees (where each degree represent less area as you approach the poles). The Cosmographer template image above shows that in each row of hexes above the middle third of the map, one hex disappears from between each set of triangles each row. That makes it easy to calculate this last bit.

The rows in the middle third of the map contain 35 hexes. This gives us 360/35 degrees between hexes. As we move up, the first row we encounter in the top third of the map loses one hex between each set of triangles, leaving it with 30 hexes. This row then has 360/30 or 12 degrees between hexes. The next rows have 25, 20, 15, 10, and 5 hexes respectively. That gives hexes in these rows 14.4, 18, 24, 36, and 72 degrees between each other respectively.

Again, I apologize if that was unclear. If you were able to follow my ramblings, that should describe the offset for the individual hexes. These offsets are applied to each of the 20 triangles, using the adjacent vertices as a starting point.

Five-Sided Hexagons

On an icosahedron, there are 12 vertices. At each of these points, five triangles come together. If you look at the Cosmographer template image above, you will see that in the top and bottom thirds of the map where there is space between the triangles, the five triangles around each vertice make up five sides of a hexagon while the empty portion makes up the sixth side. When the flat map is folded to form an icosahedron, this empty sixth side disappears leaving a five-sided pentagon.

I haven’t quite decided how to deal with these 12 pentagons. There won’t be any visible indication on the map that there is any discrepancy so for the most part I believe they can be ignored. Compared to the huge distortions on the alternate projections, I think this is really a non-issue.

Final Words

When I’m all done, here’s what I expect to have. There will be a CC3 map with an icosahedral projection showing the entire world and a hex grid laid over it as seen in the Cosmographer template image. Each hex will be linked to the appropriate CC3 map showing a close-up of the corresponding hex and a bit of the surrounding area. Each of these maps will be 400 miles square. The area outside the hex being represented on each map will have all the detail of that surrounding area but will be converted to grayscale (assuming I can figure out how to do that), so that only the area within the hex tied to that map will be in color. Cities, ruins, temples, dungeons, etc will be represented by the corresponding icon. Each icon will be linked to the appropriate City Designer or Dungeon Designer map.

I’m really excited to think about where this project will be when it’s done. It’s hard to imagine how I’d manage my maps without these programs!

Edit: Check out tomorrow’s post “CC3 Map Mockup”.

Another Edit: Here’s more detail on Calculating the Hex Positions.