Author | Aaron |
---|---|
Date | 1 Sept. 2009 |
This plugin is still experimental, so you may experience bugs or other odd behaviour. Please report any bugs to aaron@bundysoft.com.
TER files must be 256×256 pixels in size if exporting a single TER file, and 512×512 pixels if exporting MegaTerrain. This means that when you generate your heightfield in L3DT, you must set the heightfield width and height to the above sizes. L3DT was designed to generate very much larger heightfields than this, and the user interface may be a little clumsy when dealing with such small maps. In particular, if you are using a 'designable map', you are strongly recommended to use a small design map / heightfield ratio (e.g. 16) so that you have finer-grained control when designing such a tiny map.
The current TER exporter for TGEA requires a horizontal scale of 2 metres. If you intend to use a different horizontal scale, you will accordingly need to edit the 'SquareSize' setting in the terrain block object within the mission file.
TER files for TGEA do not include a pre-calculated texture map such as those generated by L3DT. Instead, the files contain alpha masks so that Torque can blend the textures at render time. To generate these alpha masks in L3DT, you should first generate the water map, and then you must generate the attributes map. You may subsequently edit the attributes maps to add roads, etc.
Once the attributes map is ready, you may generate the alpha maps using the 'Operations→Alpha maps→Generate alpha maps' menu option. In the alpha mapping wizard, you should use the following settings:
To export the terrain as a single Torque TER file, select the 'File→Export→Torque TGEA→Export Torque TER (v5)' menu option, or to export as Torque MegaTerrain files, select the 'File→Export→Torque TGEA→Export Torque MegaTerrain (v5)' menu option. Either option will open the 'Export Torque TER' window, shown below:
The options are as follows:
To select the TER filename, press the browse ('…') button. The file should be exported into your game folder, or a subdirectory thereof. For example, for the 'Stronghold' demo in TGEA 1.7.1, the proper directory for saving TER files is:
C:\Torque\TGEA_1_7_1\GameExamples\Stronghold\game\scriptsAndAssets\data\missions
The 'Tex path' field is the relative path from the terrain file to the folder in which the textures/materials for the terrain will be stored. By default, this setting is automatically generated (using the 'auto' checkbox) such that if you save the TER file in the 'game\scriptsAndAssets\data\missions' folder, your textures will be stored in the 'game\scriptsAndAssets\data\terrains\[project name]\' folder.
After you set the TER file name, the 'tex. path' field will be updated automatically, like so:
For example, if I save a TER file here:
C:\Torque\TGEA_1_7_1\GameExamples\Stronghold\game\scriptsAndAssets\data\missions\MyExample.ter
…the automatically-generated texture path will be:
..\terrains\MyExample\
…which means the textures will be saved in this folder:
C:\Torque\TGEA_1_7_1\GameExamples\Stronghold\game\scriptsAndAssets\data\terrains\MyExample\
Before L3DTio_TorqueTER can export your TER file, it must know the path to your game's root folder. Please enter this path into the 'Game folder' edit box or select the folder using the '…' browse button.
For example, for the 'Stronghold' demo in TGEA 1.7.1, the correct game folder is:
C:\Torque\TGEA_1_7_1\GameExamples\Stronghold\game
If you enable the 'Export mission file' checkbox, the L3DTio_TorqueTER plugin will also create a stub TGEA mission file (.mis) that includes the correct settings for the terrain and water blocks.
After you click OK, the L3DTio_TorqueTER plugin will export the TER file(s), material textures and mission file.