Importing Terrain Files

There are numerous file formats for storing terrain and geological data and probably just as many if not more importers for 3ds Max and other 3D programs. While making GroundWiz, we tried to find some clean way of getting different terrain data into 3ds Max.
What GroundWiz gives you is a simple terrain loader that will load only 2 simple file types : raw binary data (.bin) and Terragen terrain files (.ter). Terrain is loaded as standard Editable Mesh. Probably the best feature of this loader is that it will allow you to immediately optimize terrain mesh so that number of triangles can be kept under control.

Working with raw binary data format can be pretty easy if right external tools are used to create it. We suggest usage of freeware 3DEM tool. This program can load many file formats and is able to export raw binary data (called Terrain Matrix in 3DEM). Raw binary data files created with 3DEM program will be given extension '.bin' and in the same folder another short text file with extension '.hdr' will be created. This file contains description for raw binary data file and if found by GroundWiz importer, it will be used to make loading easier. Otherwise, user will have to specify loading information manually. Importer is also very flexible when it comes to data types in raw binary file. For detailed description, read below.

To start the importing procedure, go to 3ds Max File menu and pick 'Import...' option. If you would like to import Terragen (.ter) file, select file type 'Terragen World / Terrain', or else if raw binary file is to be imported, select file type 'Binary / 3DEM Terrain Matrix'.

Next, options window will open:


Although there are many options, you won't have to use most of them if you are importing Terragen '.ter' file or raw binary data '.bin' file created with 3DEM tool.


The following options are available to control importing process:

Grid Dimensions

Width / Height: Only needs to be set if loading raw binary data without a matching '.hdr' file. In that case, Data type also has to be properly picked. File size must match Data type, Width and Height. Otherwise loading cannot proceed.

Grid Spacing: Distance between points in the terrain data, usually needs to be adjusted only when loading raw binary data without a matching '.hdr' file. Value passed must be in current system units.

Elevation Factor: Aka height multiplier, usually needs to be adjusted only when loading raw binary data without a matching '.hdr' file. Value passed must be in current system units.

Important: Depending of your current system units setup, Grid Spacing and Elevation Factor will be automatically adjusted when importing Terragen terrain file or raw binary data file with a matching '.hdr' description file. If description file '.hdr' cannot be found, user has to set both Grid Spacing and Elevation Factor himself/herself.



Data type

Pick the type of data contained in the terrain data file. It needs to be adjusted only when loading raw binary data without a matching '.hdr' file. Otherwise typical programmers' stuff, data types supported are pretty self explanatory (float, integer, short, binary), signed and unsigned. The thing worth pointing out is that data types will be automatically scaled:

- signed values to a range -1 .. 1
- unsigned values to a range 0 .. 1
- float type has no scaling applied

Once data type is picked, Elevation Factor should be properly set to rescale values into some meaningful range.



Split into Chunks - When enabled, it is possible to split the terrain into many smaller meshes. Smaller chunks might be easier to manipulate in 3ds Max. Especially when it's a huge terrain, this option may be necessary so that your computer doesn't run out of memory. After importing the terrain into 3ds Max in chunks, you can merge them back together.

Width / Height: Decides on the maximum size of each chunk. After adjusting values, check Info section to see how many chunks will be created.



Optimize Terrain - When enabled, it will optimize terrain mesh to greatly reduce the number of faces and vertices. It is a recommended option to make 3ds Max run faster. Optimizer works the same way as standard Optimize modifier in 3ds Max.

Angle / Edge: Controls the level of optimization. Bigger Angle / Edge will allow more optimization but terrain might become too blocky. Usually adjusting only Angle is enough.

Optimize Now: Does optimization of the terrain mesh immediately. This way it is possible to test for best optimization / quality compromise. After pressing the 'Optimize Now' button, wait for the process to finish and then check Info section to see how many faces / vertices are left in the final terrain mesh.



Info - As the name suggest, it displays information on the currently imported terrain : number of meshes, vertices and faces that will be created. This becomes especially useful when trying to find best optimization values.