L3DT users' wiki
Large 3D terrain generator

Exporting TER for TGE

Author Aaron
Date 4 Oct. 2009

Support for TGE terrain exports was suspended in L3DT v2.8 beta 3 due to insufficient testing. If you would like to help test and debug the TGE exporter, please e-mail aaron@bundysoft.com.

Before we start

Disclaimer

  • This plugin is still experimental, so you may experience bugs or other odd behaviour. Please report any bugs to aaron@bundysoft.com.
  • This plugin has not been tested with TGE 1.5.2 ONLY. Compatibility with other versions of TGE is not guaranteed.

Heightfield size and scale

TER files must be 256×256 pixels in size for TGE. This means that when you generate your heightfield in L3DT, you must set the heightfield width and height 256. 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.

You are also recommended to set the heightfield horizontal scale to 3 metres or thereabouts, as this seems to have a reasonable correspondence with the in-game terrain settings in Torque.

Generating alpha maps

TER files for TGE 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:

  • The number of layers is less than or equal to 8. If the layer count is greater than this, use the 'Combine alpha layers' wizard to combine alpha layers.
  • The alpha map resolution must be set to 1. This is the default setting.

Exporting the file(s)

To export the terrain as a single Torque TER file for TGE, select the 'File→Export→Torque TGE→Export Torque TER (v3)' menu option. This will open the 'Export Torque TER' window, shown below:

:plugins:fileio:l3dtio_torqueter:userguide:exporttorqueterdlg.png

The options are as follows:

TER file name

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 'Features' demo for TGE 1.5.2, the proper directory for saving TER files is:

C:\Torque\Torque Game Engine 1.5.2 Demo\demo\data\missions

Texture path

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 'demo\data\missions' folder, your textures will be stored in the 'demo\data\terrains\[project name]\' folder.

After you set the TER file name, the 'tex. path' field will be updated automatically, like so:

:plugins:fileio:l3dtio_torqueter:userguide:exporttorqueterdlg2.png

Example

For example, if I save a TER file here:

C:\Torque\Torque Game Engine 1.5.2 Demo\demo\data\missions\Features.ter

…the automatically-generated texture path will be:

..\terrains\Features\

…which means the textures will be saved in this folder:

C:\Torque\Torque Game Engine 1.5.2 Demo\demo\data\terrains\Features\

Game folder

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 'Features' demo in TGEA 1.5.2, the correct game folder is:

C:\Torque\Torque Game Engine 1.5.2 Demo\

Aside for the curious: In TGE, the game folder is required to set the correct relative path references for the material textures.

Export mission file

If you enable the 'Export mission file' checkbox, the L3DTio_TorqueTER plugin will also create a stub TGE mission file (.mis) that includes the correct settings for the terrain and water blocks.

The mission files generated by this plugin are configured to work with a default TGE 1.5.2 game configuration. If you have changed game resource paths or other settings, you may need to edit some of these mission settings manually.

Output

After you click OK, the L3DTio_TorqueTER plugin will export the TER file(s), material textures and mission file.

Results

Coming soon!

 
plugins/fileio/l3dtio_torqueter/userguide/tge.txt · Last modified: 2017/08/31 07:17 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki