Table of Contents
Exporting TER for T3D
Before we startDisclaimer
Heightfield size and scaleIn T3D, the size of TER files must be square and a power of two (e.g. 256×256, 512×512, 1024×1024, etc.) This means that when you generate your heightfield in L3DT, you must set the heightfield width and height to the above sizes.
I have it on good authority that the largest practical, performant size for T3D 1.0 is a 2048×2048 pixel TER file. Larger map sizes may degrade engine performance.
You may use any horizontal scale you like with T3D. However, for quality FPS terrain, a horizontal scale of 2m or less is recommended. Generating alpha mapsIn T3D, the TER files contain a mask used to apply detail maps. The L3DTio_TorqueTER exporter generates this mask from the alpha maps generated by L3DT (see alpha maps in userguide). The following points are relevant here:
Generating the textureUnlike terrain in TGE or TGEA, the T3D terrain renderer may also use a pre-blended unique texture as the base colour map. This may be generated in L3DT as per the usual method. However, you should note the following points:
Exporting the file(s)To export the terrain as a single Torque TER file for T3D, select the 'File→Export→Torque T3D→Export Torque TER (v7)' menu option. This will open the 'Export Torque TER' window, shown below:
The options are as follows: TER file nameTo 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 'FPS Example' demo in T3D 1.0, the proper directory for saving TER files is: C:\Torque\Torque 3D 2009 SDK 1.0\Examples\FPS Example\game\art\terrains\ Texture pathThe '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\art\terrains\' folder, your textures will be stored in the 'game\art\terrains\[project name] textures\' folder. After you set the TER file name, the 'tex. path' field will be updated automatically. ExampleFor example, if I save a TER file here: C:\Torque\Torque 3D 2009 SDK 1.0\Examples\FPS Example\game\art\terrains\L3DT_test.ter …the automatically-generated texture path will be: L3DT_test textures …which means the textures will be saved in this folder: C:\Torque\Torque 3D 2009 SDK 1.0\Examples\FPS Example\game\art\terrains\L3DT_test\L3DT_test textures\ Game folderBefore 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 'FPS Example' demo in T3D 1.0, the correct game folder is: C:\Torque\Torque 3D 2009 SDK 1.0\Examples\FPS Example\game Export mission fileIf you enable the 'Export mission file' checkbox, the L3DTio_TorqueTER plugin will also create a stub T3D mission file (.mis) that includes the correct settings for the terrain. Material settingsAfter you click OK in the Export to Torque TER window, the T3D Material Manager window will appear, as shown below. In this window, you may set the various texture settings for the materials in your map.
You can also open the T3D Material Manager directly using the 'File→Export→Torque T3D→Material Manager' menu option.
OutputAfter you click OK, the L3DTio_TorqueTER plugin will export the TER file, material textures, materials.cs file, and mission file. ResultsExcept where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Share Alike 3.0 Unported
|