Table of Contents
This tutorial will walk you through all the steps required to make terrain for Torque 3D.
To make Atlas terrain you should be using L3DT version 2.8 beta 3 or later, as released in November of 2009. To check that you have the correct version of L3DT, select the 'Help→About' menu item. This will show the about box, which includes the version number.
If you do not have the required version (or a later version thereof), please see this forum thread for instructions on how to download the update.
This section will briefly describe the terrain generation process, but won't explain all of the settings or the map editing tools and options. If you'd like to know how to get the terrain to look exactly how you’d like it, please refer to the other tutorials. I recommend in particular the fjord tutorial, as this explains how to use the design map to 'design' your terrain map. The roads tutorial may also be of interest to users who want to customise their terrain. Finally, if you want to know more about any of the windows or settings encountered during this section, I recommend you consult L3DT's user guide.
Anyway, to create your terrain, open L3DT and select 'File→New project' in the menu. This will open the select project type wizard, shown below:
Select 'Designable map' and click 'next »'. This will open the heightfield size wizard, shown below:
Here you may choose the size of your heightfield. For starters I recommend you make a 512×512 terrain file.
For FPS-resolution terrain, you must also set the horizontal scale to a small value, such as 1 (units: metres). This is the horizontal spacing between terrain vertices, and basically sets the terrain geometry detail. Small horizontal scale values will give more detailed terrain, but will also mean that your map will cover a smaller area.
Your settings should now look as below:
For best performance in T3D, it is recommended that the heightfield be no larger than 2048×2048 pixels in size.
Click 'next »' to proceed to the design map size wizard, shown below:
Here you may choose the resolution of the 'design map ' that L3DT will use to generate the heightfield. For the purposes of this demonstration, I recommend you keep the default value of 64 and click 'next »' to proceed to the design map parameters wizard, shown below:
The meaning of each of the design map parameters are explained on the Design map parameters and their effects page in the official documentation. If you are not familiar with all these parameters, you may use the default settings. Click 'next »' to proceed to the calculation queue wizard, shown below:
Enable both the 'design map' and 'heightfield' options, and press 'OK'. L3DT will then generate the heightfield for you, and render it in the 2D display:
If you wish to view or edit the terrain in 3D, you may do so by pressing the '3-D' button on the toolbar. This will open the 'Sapphire' 3D renderer for L3DT, which should look something like this:
The instructions for using Sapphire are given here, including instructions for using the 3D heightfield editor tools. Once you have finished your viewing or editing your heightmap, close the Sapphire window.
The next step is to generate the other maps in the project, such as the normals, light and texture maps. To do this, select the 'calc »' toolbar button in L3DT. This will re-open the calculation queue wizard. In this wizard, enable the 'Water map' option and every option below it, like so:
Click 'next »' to proceed to the water map wizard pane. Whilst T3D does support multiple water bodies at different levels using 'water blocks', it is rather difficult to set up and get right. Thus, it is recommended that you disable the 'auto flood seas' and 'auto flood lakes' options, and instead enable the 'flood water plane' options (as shown below). This will create one water level for your map.
Click 'next »' to proceed to the water table wizard, shown below:
You don't need to change these settings, so click 'next »' to proceed to the attributes map wizard (see below).
The 'attributes map' is the mask that L3DT uses to generate textures and alpha maps. Thus, to create highly-detailed textures it is recommended that you create a high-resolution attributes map. To do this, enable the 'make high-res attributes map' option, and set the 'AM/HF' ratio to 4. Also, it is recommended when generating high-resolution maps to enable the 'split map into tiles (mosaic map)' option, as this will reduce the RAM overheads. Your settings should look as shown above.
Click 'next »' to proceed to the terrain normals wizard (see below).
The settings from the previous wizard are carried forwards, so you won't have to set the map resolutions or tile sizes. Your settings should now look as shown above.
Click 'next »' to proceed to the light mapping wizard (see below).
You don't need to change these settings, so click 'next »' to proceed to the second page of the light mapping wizard (see below).
Again, the settings are carried forwards. Your settings should now look as shown above.
Click 'next »' to proceed to the Light/water effects wizard (see below).
You don't need to change these settings, so click 'next »' to proceed to the texture settings wizard (see below).
Yet again, the settings are carried forwards, so you don't need to change them. Your settings should look as shown above.
Click 'OK' to generate your map. You will then be shown this message:
Click OK, and save your map project somewhere (it doesn't matter where). L3DT will now calculate several maps, and when done it will show the texture map in the 2D view:
To view the complete terrain in 3D, press the '3-D' button on the toolbar. This will again open the Sapphire 3D renderer, which should look something like this:
The final step in map generation is to calculate the alpha map masks for T3D. To do this, select the 'Operations→Alpha maps→Generate maps' menu option, shown below:
This will open the combine alpha layers wizard, shown below.
T3D supports up to 254 alpha layers, but you may wish to use fewer layers due to hardware limitations. This wizard allows you to reduce the number of alpha layers to a more manageable number (say, 8) by combining some of them. For a guide to combining alpha layers, please refer to the alpha map user guide.
Once you are done playing with alpha layers, click 'Next »' to proceed to the alpha map options wizard, shown below.
This wizard pane wizard pane allows you to set various parameters that affect the size and format of the alpha maps. In T3D, the alpha map must be the same size as the heightmap. This means that you must leave the make high-res alpha maps option unchecked, with the res. ratio value set to 1, as shown above.
When you click 'OK', L3DT will generate the alpha maps, and show you something like this:
The map is now complete. Please press the 'save' button to save your project.
To export your map to T3D, select the menu option at 'File→Export→Torque T3D→Export Torque TER (v7)', as shown below:
This will open the Export Torque TER window, shown below:
If this is the first time you have used the T3D exporter, you should first tell L3DT where your T3D game is located. To do this, press the browse ('…') button after the game folder text field, then browse to the 'game' folder within your T3D project directory, and press OK, like so:
To set the name of the actual terrain file to be exported, press the browse ('…') button after the TER file name text field, then browse to the 'game\art\terrains' folder in your T3D project directory, and enter a filename (e.g. 'test.ter').
The output TER file must be inside the T3D project game folder, or a subdirectory thereof. Otherwise, T3D won't be able to 'see' the files.
The other options in the Export Torque TER window, such as texture path, are not important for the purposes of this tutorial, but are explained in the plugin user guide.
After you click 'OK' in the exporter window, L3DT will open the T3D Material Manager window, shown below:
In this window you may set some of the parameters for how the materials will appear in T3D, such as the filenames of the diffuse and detail maps, and their various scale settings. Please note that you don't have to get all the settings right in this window; you can tweak them all later from within T3D. The default settings are safe to use, so you can just click 'OK'.
To avoid name collisions in your materials.cs file, you may rename materials by double-clicking on their name in the material list in the left-hand side of the window.
After you click OK in the Export Torque TER and T3D Material Manager windows, the L3DTio_TorqueTER plugin will do the following:
That's it! If you find any problems when following this tutorial, or would like to ask questions or make suggestions, please post your comment/question in this forum thread.
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Share Alike 3.0 Unported