How to Make a Terrain For Off-road
It is fairly easy to create a terrain. It currently consists of five files: heightmap.png, texture.jpg, detail.jpg, terrain.cfg which determines basic properties for the game, and a zip file to place all the other files into.
The Heightmap
As it has already been stated, the heightmap file is to be named "heightmap.png". Now there are many websites that explain what a heightmap is (http://en.wikipedia.org/wiki/Heightmap) so I will not explain it. The image must be square and have a maximum size of 256x256 pixels (any higher and ODE has problems for some reason.)
The Terrain Texture
The texture image can be any size (and I assume square.) The texture is the image that determines what the terrain looks like (not height but the colors.)
The Detail Map
The detail map give the terrain a sense of realism. It can be any size (and again I assume square would be the best shape.)
The Configuration File
The configuration file (terrain.cfg) contains things like the water level and checkpoints. Here is an example taken from the trail terrain:
8 0.4 8
0 45 0
6.32
100
11
56 -30 70
70 -25 0
260 -8 -30
150 -7 -40
150 -5 -110
230 -5 -150
150 -6 -195
15 10 -155
25 32 -250
-100 32 -400
-127 10 -255
The first line describes how the terrain should be scaled according to the X, Y, and Z axis's. The second line tells the game where the vehicle is initially positioned according to the X, Y, and Z axis's. The third line tells the water level (this can be a negative number.) The fourth line says how many time to tile the detail map. The next line says how many checkpoints there are in this terrain (This can be zero if you do not want any checkpoints in your terrain.) The next line(s) describe the positions of the checkpoints according to the X, Y, and Z axis's (if you said you have zero checkpoints in the line above, than you do not have to fill in any checkpoint positions. This should be obvious.)
The Compressed file
This file can be named anything you want, but it must be a zip file. You must not place the any of the aforementioned files mentioned in a subfolder, it must be the root directory of the zip. All you have to do is place the files in here and throw it into in the Terrain folder and you're done. You can now drive around on your newly made terrain.
Copyright (c) Off-road 2012