Terrain Construction for Longbow 2
Constructing a new terrain for Longbow is a multipart process:
- Obtain a height-map of the area to be modelled, preferably real-world satellite data of as high a resolution as possible.
Currently the Globe project is the best source I know.
Also Steel Beasts RAW terrain maps can be imported.
- Convert the data to BMP format using H2Bmp.
- Edit the data using an image editor.
- Import the image into LB2 format MAP files using LBMap.
Globe provides 1 KM resolution, otherwise known as 30 second arc data.
360 degrees = 360*60 minutes = 360*60*2 = 43,200 '30 second' subdivisions.
The circumference of the earth is approx 40,000 KM making the data points approximately every 0.926 KM
The Longbow height-map file (TER_hm.map) is at 32 M resolution,
each in-game map is 50 KM by 50 KM, the map file is 1536 by 1536 data points i.e. 32.55 M between points.
If we use the Globe data unconverted then the map will be scaled at approximately 30 to 1,
i.e. 1500 real-world KM would be covered by the 50 KM game world.
Some scaling is ok but that much may be excessive, experimentation will reveal a good compromise.
Having selected the area of interest (try to get at least 10 degrees by 10, the data size isn't excessive) download the .BIN file and the .HDR file, saving them with the same meaningfull name.
The next step is to convert the BIN file into a usable format.
Download my two programs
- Hm2Bmp - Converts various formats to an 8-bit monochrome .BMP file
- LbMap - Converts an 8-bit monochrome .BMP file into Longbow 2 terrain map files.
Its easiest to put both programs into your Longbow2 Terrain folder, together with the BIN and HDR file you downloaded earlier.
Before proceeding make a copy of your entire Terrain folder, for when things go horribly wrong.......
-
Run Hm2Bmp and select the BIN file you downloaded, size, max-height etc should be automatically read from the .HDR file.
- Click [Convert], a .BMP file of the same name will be created and and a monochrome image of the height-map should be displayed, dark areas are low, bright areas high.
- Note that we are converting 16-bit values to 8-bit, from a maximum of 65535 to a maximum of 255. The program uses the best height factor to retain the most resolution, by noting the height factor displayed in the program you can set TerrainHeight in CA.INI to achieve correct real-world heights.
You may wish to sacrifice maximum heights to emphasise a predominantly low-level terrain - to do this overwrite the displayed Height Factor with a lower value and click [Convert] again.
Also do this if your down-loaded terrain contains an area of high-relief that you are going to remove in the next stage. It only takes seconds to experiment, and you see the results previewed immediately!
- Now you have a BMP file, open it in your favourite Paint Program (I use Paintshop Pro).
Crop and / or resize your image until you get a file exactly 1536 pixels by 1536 pixels, covering the area you wish to model. The more you expand the image the gentler the slopes will be.
Flip it vertically if neccesary to get it the right way up and save it away.
You should have something like this:
- Start LBMap and select TER_hm.map in the Terrain window.
- Click [ImportHM] and select the BMP file you created above.
The following files will be created:
- TER_hm.map, TER_ht.map and TER_hx.map - the base height maps
- TER_ul.map - a basic low-resolution texture file. See below.
- TER_t.map - the terrain type file, indicating water or solid ground.
PS this doesnt seem to have the desired effect - more research needed.
All of the above files are created by overwriting existing files, it is essential that valid files exist as the header component is preserved. If LB2 crashes loading your terrain then most likely these original files were incorrect. Recover them from your back-up and try again.
- Delete TER_h.map, TER_m.map and TER_l.map
These are the higher-resolution textures that are not yet created by LBMap.
You now have a basic set of terrain files, load LB2 and try them out in Instant Action!
If you have a satellite image of the terrain at 1 KM resolution (or can resize one to fit) then it can be converted using LBMap to replace TER_ul.map
- Run LBMap as before, selecting the generated TER_ul.map this time and clicking [ImportTerrain] instead.
Future enhancements:
-
Hm2Bmp to import many more formats
-
LbMap to create or import higher resolution texture files
- TER_h.map 4 M resolution
- TER_m.map 8 M resolution
- TER_l.map 16 M resolution
-
Suggestions please!