By Caer
Please note - this is not a tutorial for making tilesets with Terragen. It is a tutorial to make an entire map in one go.
Contents
0 :: Prerequisites
1 :: Setting Up Terragen
2 :: Designing Your Map
3 :: Making It a Map
Prerequisites - What you will need
With those prerequisites in hand, let's begin.
Part One - Setting up Terragen
For this part, I'm going to assume you have Terragen installed and at least know the basics. If not, install it and go to the Terragen website to view the tutorials. Alternatively, just play around with the various settings and see what happens - most of it is self-explanatory.
The first step is to download and open the basic Terragen world file. This is important, because it sets up the camera and sun position correctly. If you don't want to download a 1.4K file, first turn off both 'Fixed height above...' options, and use the following settings:
| Position | x: 128 | y: -1265.337 | z: 5200 |
| Target | x: 128 | y: 128 | z: 0 |
Note that these are Terragen units and not meters.
Zoom: maximum (32)
Sun
heading: 225
altitude: 30 - 50 (doesn't matter too much)
Disable 'Terrain casts shadows', too. Although shadows make the map look nicer, it looks odd when units move into a 'shadow' area and don't get darker. You may as well disable the 'Clouds cast shadows' option too, although we won't be rendering the sky anyway. Another thing you should consider for later is the shadow and ambient light setting - you don't really want sunset-red shadows on a snow map, do you?
Lastly, you need to open the Atmosphere window and set the 'Density'/'Decay' sliders to minimum, otherwise it will look like your map is being viewed from 470,000 feet (which it is, actually).
Right then, now that we have that sorted, on to part 2.
This part can be a bit complicated, or not depending on how much work you want to put in to your map. This is because it involves a fundamental part of map design - terrain. You really should have an idea of what type of map you want to make by now.
Basically, there are a number of ways to design a terrain:
Personally I think Terragen generates very realistic terrain, although it can be difficult to get what you want. This is where the import/export option comes in - you can generate a terrain that kind of resembles what you want, export it as a .RAW file, tweak it in Photoshop, then import it back in to Terragen. Alternatively, you could sketch out a rough sample of what you want in Photoshop, import it into Terragen and the generate a terrain based on the existing one (look in the terrain generation dialog).
Before I go on, I had better explain the functions of the various controls in the terrain generation dialog:


One thing you must remember is when you import a terrain, its vertical (altitude) constraints will be from 0.25 to 63.75. This is too high, so adjust the range to go from 0 to 30 (using the 'Modify Terrain' button).
And that's that. Oh yeah, before I continue, I'd like to plug my Terrain View program. Sorry. Terrain View 3D is a really simple program that lets you open a ".TER" (terrain) file and preview it in 3D (surprise surprise). You can view it with lighting, or using the height map as a 'texture', or you can see a wire frame view, and you can even adjust the water level! Get it from the Delphi Programs section of my website: http://caer.cjb.net/delphi/delphi.html
The next stage in designing your map is to decide what it will actually look like: will it be a snowy wasteland, lush green fields, barren desert, or something else? This is where the surface map editor comes in.
Terragen has a very powerful surface map editor that can
create very realistic-looking ground (or not, if you so
desire). The surface map is represented by a tree control, and
the top layer is the parent surface. This parent surface can
not be removed, as it makes up the base of your terrain.
Without it, you would not see any terrain at all.
Under that you add child surfaces, which in turn can have
child surfaces. Surfaces lower down on the tree get rendered on
top of ones above, so if you have a 'grass' layer, then
a 'snow' layer lower down, the snow will be rendered on
top of the grass (as it should be).
The key part to the surface map bit is the editor. Click the Edit button and you are presented with a whole host of distribution options (you may have to click the 'Advanced Distribution' tab first). Most of these are pretty self-explanatory, although one or two may need explaining. These are:
At this point you may be asking 'how do I make a surface use custom textures?'. The answer is you need a (free) plug-in, called SoPack, by Sean O'Malley. You can get this plug-in from http://www.geocities.com/~ffrog. It allows you, among other things, to create a surface that uses a texture map of your choosing, and use a grayscale image to control the distribution of a surface. So, if you wanted to create your very own custom Core Prime map, you could make a texture from a screenshot of something, and set it to repeat over the whole terrain. Voila - instant metal! Take a look at the SoPack documentation for more details.
If you really can't be bothered making your own surfaces, Terragen comes with a selection of ready-made ones that look pretty good.
Another thing you may be asking is 'what about
water?'. Well, water can either be really simple, or not
quite as simple (and a bit more time-consuming).
The easy way to make water is using Terragen's built-in
water, and SoPack to get the transparency effect.
Unfortunately, this method results in water that doesn't
look that nice at all.
The alternative is to use a bit sleight-of-hand and use
surface maps that look like water.
To do this, add two child surfaces to the main surface. Select
the first one, and open the surface editor. Rename this surface
to something like 'Deep Water'. Now, change its color
to a nice dark blue, so it looks like deep water, and set its
bumpiness pretty low. Next, adjust the settings so they look
like this:

Note that the maximum altitude setting is scaled to the 0 - 30
range of the terrain. The range TA uses is 0 - 255, so you will
have to adjust the desired level to fit in the 0 - 30
range.
Next, select the other new surface and call it 'Shallow
Water', then adjust its settings like this:
This will create the appearance of shallow water near the
shore - you should adjust the color to look like your base
surface with water on top of it.
When you render, you should end up with something looking
like this:

If you want to be really clever, you could render two images -
one with SoPack-water and one without, then combine them in
Photoshop. You'll need a lot of patience for this though,
as working with huge images will be very slow.
Now, although the image above is a pretty good
approximation, it can be improved. This can be achieved even
without the aid of SoPack - first, save your current World
file, as we'll be making some pretty drastic changes
now.
Once that's done, make a note of the maximum height of the
water - you'll need this value later. Next, delete all
child surfaces, leaving just the main one. Click on it, and
then click the edit button. When the editor appears, set the
surface's color to pure white, bumpiness to zero, and
coverage to maximum (i.e. with no height/slope constraints -
the surface should cover the entire terrain). The next step is
to add a single child surface, and make it pure black, again
with no bumps. With this surface, set the coverage to full and
with no slope constraints, but with the maximum altitude set to
the desired water altitude, with sharpness set to maximum.
Next, you need to open the Sun control window, and set the
sun altitude to -90. In other words, the sun must be pointing
straight up, underneath the terrain, like this:

Now, click the 'Background Light' tab, and set the
shadow lightness to 100, and the shadow color to white. Make
sure the 'Single Color Shadow Lighting' option is
selected.
Now, when you render your image (at the same size as the
original), you should end up with something like this:

Save this image as 'watermask.bmp' - you'll need
it later.
That's as much as can be done at the moment regarding map design. Now all you have to do is decide how big your map should be. The map size is based on how big you render your image, but you must make sure the width and height are in a 4:3 ratio. In other words, the width must be 1.33333 × the height. If it isn't, the rendered image will have bits missing, making lining up the height map a real hassle.
Make sure the 'Detail' slider is set all the way to the right, then click 'Render Image' and wait. Depending on the size of the map and how many surface layers you have, and the speed of your computer etc. etc., this can easily take 6 hours or more. For the record, my Mallodden Plain map took 26 hours to render on my ancient P133.
Once the image has been rendered, you can save it. This is annoying, as I'd much prefer it if you could specify a filename beforehand and render directly to the file. I should warn you that for a 12x11 map, you will need approximately 400MB of free space to account for the swap file and actual image. A 6400x4800 24-bit bitmap takes up 88MB! This is where having the odd half-gigabyte of memory comes in handy (I only have 64MB).
Now that you have your enormous bitmap (or two, if
you're going to include water), you need to open it in
Photoshop.
You can skip the next two paragraphs if you aren't going
to have water in your map.
Select the 'water mask' image. Before we can do anything with the image, it should be converted to Bitmap mode (2 color), to speed up processing and save memory (24x less memory needed!). Once that's done, copy the entire image to the clipboard.
Next select the main image, add a new layer above the
background, and fill it with a color that sort of matches the
basic 'water' color. Making sure the new layer is
selected, go to the Layer menu and add a layer mask. Open the
Channels tool palette, and paste the clipboard (which contains
the water mask) in to the layer mask 'channel'.
![]()
You will then end up with a new layer that covers only the
'water', although at the moment it looks a bit nasty.
To fix this you need to adjust the overall transparency of the
layer - around 40% looks quite good. To further improve the
effect, you could try adding noise, then blurring it, or create
a wave effect using the 'Lighting Conditions' filter.
Another thing you can do is use the 'water mask' to
create a selection, then use this to apply a Gaussian blur with
a level of around 0.8 to the main image, to blur the underwater
areas a bit. You could also try blurring the mask for the water
layer slightly. Finally, you may need to adjust the color of
the water, as you may not get the results you expect. In the
end, you should have an image which looks like this:

You can now crop away the black areas. However, there is a
particular method to this, which is best explained by this
image:

Now you can reduce the color depth of the image, using the TA palette (you need to flatten the layers first though - you may want to save a backup .PSD file at this point). You must remember to use the 'dither' method, otherwise Photoshop will match each color to its nearest corresponding color in the TA palette, resulting in a hideous mess of a map. This reduction in color depth will also take quite a while (35 minutes on my P133. Yes, I enjoy moaning about my computer's speed, or lack of it). Now save the bitmap.
Next you need to export the terrain as a .RAW file in Terragen, then open it in Photoshop. You will also need to flip it vertically, because Terragen writes the file backwards. There's probably a good reason for this.
Once you have opened the height map, you need to crop it
according to how much was cut off the main image. The reference
used to crop the height map must be based on a 'low'
part of the main image (like the bottom of the sea). This
should explain it better:
![]()
![]()
Of course, on a larger main image you will be cropping off
quite a large number of pixels, but you must still crop the
same amount from the height map, i.e. just because you're
cropping a large amount from the main image, it doesn't
mean you should crop a larger amount from the height map. If
you zoom out from the main image, and crop at a low zoom level
(like 16%), it will be easier to judge.
Once this is done, you need to resize the height map so it is 1/16th the width of the main image, and (1/16th) + 8 the height of the main image. For example, if the main image was 512x512, the height map would be 32x40. Now you need to crop the image so the height is 1/16 the height of main image; in other words cut off the bottom 4 rows. The reason for doing this is that Annihilator (and maybe TAE) cut off the bottom part of the main image, so the height map doesn't have to go all the way to the bottom. That's not a very good explanation, but it's the best I can think of. Sorry. Once you're done resizing and cropping, make sure the height map is in grayscale mode, and save it as a .BMP (Windows bitmap) file, called heightmap.bmp or something.
Now comes the awkward bit - importing into Annihilator. First, obviously, you need to load Annihilator. Next, click the 'New' button, then click the 'Bitmap' tab. Enter the filenames as appropriate, or use the '...' buttons, then click OK. Again depending on the size of your map, the speed of your computer, the amount of memory in it, and the phase of the moon, this may take a while.
When Annihilator has imported your map, the first thing you
should do, if your map has no water present, is click the
'Height Editing' button (
), and
move the 'Sea level' slider all the way to the left.
Now, switch on the contour map (the button), and check the
contours match the terrain. If everything has gone right, they
will. If not, things can get sticky. If the contours appear
misaligned, it may simply be a case of re-opening the .RAW
height map (the original), and then resizing and cropping it
slightly differently. Because of a bug in Annihilator, you will
not be able to save the new version of the height map over the
old one, so you'll have to call it 'heightmap2.bmp'
or something. If things continue to not look right, you may
well end up with 4 or 5 different height map bitmaps.
If you have decided to include water in your map, you should simply adjust the Sea Level slider until the red contour line matches the shoreline on your map image.
Once you have the height map/contour bit sorted out, it's time to set the map settings. This is up to you, and beyond the scope of this tutorial. Once you've done that, you need to save your map and close it, because Annihilator won't let you place any features on your new map yet.
Next just re-open the map, and start placing features! This is not a general map design tutorial, so I'm not going to go into any detail regarding feature placement, start positions etc.; there are other tutorials for that. If you find that none of the metal patches look right on your map, I recommend you use the 'Lava' metal patches, as they go with pretty much anything. Underwater metal, on the other hand, is much more of a problem. For this, you may actually have to make your own features - there are other tutorials for this too.
If you have any questions about this tutorial or Terragen, please e-mail me.