TGA map editing

1. Height map

The top area in map_mapname.tga is a greyscale 'heightmap'.


  • Dark areas represent low ground.
  • Light areas show high ground.
  • The darkest (black) areas will be underwater.
  • The lightest (white) areas will be maximum height.
  • (Sea level is ... ?)

    Have a look at the heightmap in the file:

    Sid Meier's Railroads!\Assets\XML\_SCENARIOS_\Multiplayer_02\map_MP_02.tga

    (open it in your image editor)

    - its apparent from this that the designers of the 'Mesa Madness' map probably used a technique similar to the one I describe here.

    ... makes ...

    Instead of using the 'Railroads!' Terrain Editor, you can manually edit the heightmap with image manipulation software such as Photoshop or Paint Shop Pro.

    For more realism, you might try exporting heightmap information from dedicated terrain editors, like:

    (You might want to research 'Digital Elevation Model' on Wikipedia, but that's another story).

  1. Open Paint Shop Pro (or your image editor of choice)

  2. Create a new 601 x 601 pixel image (assuming you're using the default 100 sq. units map size *), and flood fill with a dark grey hue like this:

         Red=48 Green=48 Blue=48
    Hue=0 Saturation=0 Value=48
    HTML Color: #303030

    (* For other map sizes, refer to the table here)

  3. Set your paint (foreground) colour to a light grey hue like this:

         R=192 G=192 B=192
    H=0 S=0 V=192
    HTML Color: #C0C0C0

  4. Set your erase (background) colour to black like this:

         R=0 G=0 B=0
    H=0 S=0 V=0
    HTML Color: #000000

  5. Set a round brush shape, choosing a brush style with feathered edges if possible. (This will provide a more gentle transition between areas of differing height.)

    The brush should have fairly low opacity (20-33%), Density 100%, Brush Step around 25%.

    You may need to select the 'Build up' brush option, if you have one.

    Adjust the size as necessary, to suit the terrain areas you are working on.

    (These examples show brush settings in Paint Shop Pro v5.0 and v7.0 - Your Image editor may differ)

  6. Now you can use LMB to 'paint' hills and RMB to 'erase' valleys (and lakes), as seen here...

  7. Once you have a reasonable heightmap image, copy and paste it into the top area of your map's map_mapname.tga file (make a backup copy of the original .tga file first), and save that file into its current location.

  8. After editing the heightmap manually, you'll want to load the map into the Terrain Editor and save it, to update the thumbnail file,

    Thereafter, you will see the correct representation of your map in the game's scenario preview, rather than a featureless flat plain.

  9. Here's the land generated by my example heightmap, seen in the game's overview map.