Heightmap editing Edit
Go to the View menu and ensure that Layers and Tool are checked. If not, check them now. Select the Elevation layer at the bottom of the Layers window:
The Tool window should change if Elevation was not previously selected. It should look like this:
At the top is choice of all available terrain brushes. The terrain will be raised up or down in the same shape as the brush. Blue means the terrain will be raised; red means the terrain will be lowered. The other options are:
Strength: How much your brush changes at a time.
- Size: How large the brush is in world units.
- Maximum: The maximum height allowed by the brush. If you are raising the terrain, a plateau will form at the height you specify here. Using a brush on terrain with a higher elevation than Maximum will cause the terrain to be lowered to Maximum.
- Minimum: The minimum height allowed by the brush. It functions the same as Maximum, except that it acts as a lower boundary.
Before you set out to shape the map, it is very helpful to have an idea of what the final map should look like. As mentioned previously, this guide will create a map similar to Winter Duel. Go ahead and open up Winter Duel through File > Open. It can be found in the SCMP_013 directory. If the editor gives you a black screen, simply restart the program. If you encounter this problem frequently, you can start multiple instances of the map editor to switch between maps. Zoom around and pan the camera to get a feel for the landscape.
You should notice that the map is slightly bowl shaped. The terrain begins level where the players start, and gradually slopes downward into a small valley below. This is the first feature we are going to replicate. Smooth slopes such as this are set up by first creating a stairstep pattern. Select the round1k brush from the Elevation Brush window. Set the Maximum field to 65 (remember: our initial elevation is 64, so this will create a step 1 unit high). Draw a line down the center of the map, slightly off to the left. Now set the Maximum field to 66 and repeat, placing a line slightly to the left of the first step. Repeat this all the way to the left edge of the map. The result should look similar to this:
How closely together you space your steps will determine how steep the slope is. The leftmost side of this image has a height of 73; the center has a height of 64. When designing the rest of the map, we need to keep in mind that the final product will be rotationally symmetrical. Although this takes some of the feel and personality away from the map, it does guarantee an even playing field, and that is an important consideration. Additionally, it will make texture and decal placement much easier, as we will see later. Since the map will be symmetrical, we only have to work on the left side of the map. Changes on smooth terrain can be tricky, so we will keep the slope as a stair-step for now. Next we will add a cliff face protruding into the middle, similar to what Winter Duel has:
As you design cliffs, you will want to make sure you are actually creating cliffs. Go to View > Debug and click Slope. Green indicates that land is flat enough to construct buildings on. Red indicates that land is too steep for units to traverse. Colorless means that units can traverse that land, but it is too steep to build on.
What next? Maps on Winter Duel frequently break into short stalemates in the center with massive defenses on opposing cliffs. Let’s add another cliff above the first to spice things up a bit. This cliff will shadow the one we just added, such that if an opponent can gain hold of it, they will gain a tactical stronghold against the enemy’s defenses. Terrain height is an important consideration when designing cliffs. A height difference of 2 is not passable by units, but such a low cliff is difficult to work with. Cliffs should typically be at least 4 units high. After some tinkering, the result should look similar to this:
The next logical step is to do something with the lower left of the map. However, without visualizing the lower right, it’s difficult to make a good call. This is where Photoshop comes in. With the Elevation tool selected, click the property () button on the top toolbar. Next click on Export Heightmap where your brush choices used to be. Save the .raw file in your map’s directory with a distinct name. Note that the editor will not prompt you if you try to overwrite an existing file.
Editing the heightmap in photoshop Edit
Open up Photoshop (or Paint Shop Pro) and load your .raw file. Important: .raw files do not contain any sort of default header information. It is up to you to supply the image properties. In our case the dimensions are one greater than the world dimensions. If this is not Photoshop’s guess, put in 257x257 as the image size. Make sure the image is loaded as a 16-bit, single channel image. The byte order is IBM PC. The dialog box should look similar to the following:
Select the left half of the image using the marquee tool. An easy way to get exactly half is to choose Style: Fixed Size at the top toolbar. Set Height to 257 and Width to 127 or 128. With these properties set, click on the image. Click inside the selection box and drag it to the left of the image. The selection should snap to the edges. Press Ctrl + C to copy the selection, and then press Ctrl + V to paste it. Press Ctrl + A to select the entire image, and then press Ctrl + T to open up the transformation controls. At the top toolbar, set the rotation angle to 180.0° and press Enter. You should now see a rotationally symmetrical image. If the rotated image did not move over to the right, select the arrow tool and move it there manually. Go to Layer > Flatten Image, then save the image as a .raw file in your map directory. Make sure the byte order is set to IBM PC!
Back in the Supreme Commander map editor, click on Import Heightmap. Load in the heightmap you just saved from Photoshop. Be careful with this feature, because it is not undoable. You should see the following:
The next step is to complete upper cliff we started. Do so on the bottom half so that it gets mirrored to the top next time we go through the Photoshop process. To get back to the brushes, click on the brush icon () at the top toolbar or press B. After that, feel free to improvise a little. Experiment with the different brushes and settings to make something interesting, and keep in mind that your map needs to be fun to play. Focus your efforts on the left hand side of the map. When you are all finished, repeat the Photoshop mirroring procedure and load the new heightmap. Hopefully it will look something like this:
Things are shaping up nicely! Now that the basic outline of the map is established, we can smooth it out a bit. With the Elevation layer selected, click the blur icon () at the top toolbar. You’ll notice a selection of four blur brushes. Blur128 and Unsharp128 are good general purpose blurring tools, while unsharp128_hard is great at getting into close areas. Select unsharp128_hard. Go through the stair-steps on the left-hand side of the map and blur them into a single smooth slope. Next, add some ramps to your cliffs by blurring the edges. Once again, repeat the Photoshop mirroring process and load the new heightmap. This is what the map looks like now:
We’re almost there! There are two things left to fix. The first is that there is a noticeable seam down the middle of the map. This is easily fixed by with the blur tool. Whether or not you use Photoshop to make the map perfectly symmetrical again is up to you. The second problem is a trickier one. If you zoom in on one of the cliffs, you’ll notice that it doesn’t look quite right. It has a noticeably jagged edge, and triangles are either missing or protruding out into the ground below. To fix this, go to the blur tool within the Elevation layer. Select blur128 as your brush. At the bottom you’ll notice a dropdown box. Choose the Impulse option. With a size that slightly extends to either side of the cliff face, run the brush along your cliffs. You can make them look much better with a bit of massaging.
Congratulations, you’ve just completed your first heightmap! The cliffs in this case are not perfect and do show some popping. If you feel particularly ambitious, you can go through and add some small height variations to the map. Flat terrain is convenient for gameplay, but it looks rather dull and a little slope can dramatically improve the look of a map.