Setting up a ground texture asset for TS2009 and up

Retro00064

New member
Create a new folder for your ground texture somewhere.

Place inside it the high-resolution TGA image for your texture.

Next, create a .texture.txt file for your texture. This is a text document, which you can create by right-clicking in your texture's folder, then choosing New -> Text Document. While it is not a requirement, naming this file after the TGA image might be a good idea. For example, if your TGA image is named example.tga, name the .texture.txt file example.texture.txt.

Setting up Windows to show extensions for known file types is a good idea. To do this, in your folder's window, go Tools -> Folder Options, choose the View tab in the resulting dialog, then, under "Advanced settings", uncheck the "Hide extensions for known file types" box. Now click the Apply button, then the OK button.

The .texture.txt file needs to contain the following:

Code:
Primary=<name of your TGA image>
Alpha=<name of your TGA image>
Tile=st

For example, if the name of the TGA image is example.tga, then the .texture.txt file should contain:

Code:
Primary=example.tga
Alpha=example.tga
Tile=st

TS2009 textures need a normal map. My textures do not use normal mapping, so my textures contain a 128 x 128-pixel TGA "blank" normal map filled with the base normal map color of RGB 128, 128, 255. The normal map has a pure-black alpha channel. This normal map has its own .texture.txt file. I have attached a ZIP archive containing this "blank" normal map and its .texture.txt file for you to use.

Now we need to set up the config.txt file for the texture. Check out the below config.txt code. The red text is tutorial instructions and should NOT be included in the actual config.txt file:

Code:
[FONT=courier new]kind "groundtexture"
kuid <kuid:[I]user_ID[/I]:[I]asset_ID[/I]>   [COLOR=#ff0000]<--------- The KUID of your texture. Replace [I]user_ID[/I] with your Trainz user ID and [I]asset_ID[/I] with a suitable asset ID, e. g. [B]21000[/B] if this is your first texture.[/COLOR]
username "Example texture 01"   [COLOR=#ff0000]<-------- The name that your texture will show as in Surveyor.[/COLOR]
description "Example description."   [COLOR=#ff0000]<--- A description of your texture asset.[/COLOR]
texture "example.texture"   [COLOR=#ff0000]<------------ The name of the .texture.txt file for your texture's main TGA image, excluding the [I].txt[/I] extension but including the [I].texture[/I] portion. E. g., "example.texture" for [I]example.texture.txt[/I].[/COLOR]
normal-texture "Normal_map.texture" [FONT=Courier New][COLOR=#ff0000]<---- The name of the .texture.txt file for your texture's normal map, excluding the [I].txt[/I] extension but including the [I].texture[/I] portion. E. g., "Normal_map.texture" for [I]Normal_map.texture.txt[/I].
[/COLOR][/FONT]trainz-build 2.9   [COLOR=#ff0000]<--------------------- The version number of the oldest Trainz version your asset will work in. [I]2.9[/I] for TS2009 should be fine.[/COLOR]
category-class "GS"   [COLOR=#ff0000]<------------------ Use "GA" for "Arid", "GL" for "Lush", or "GS" for "Seasonal".[/COLOR]
category-region "US"
category-era "1800s;1900s;2000s;2010s"
thumbnails
{
    0
    {
        image "thumbnail.jpg"
        width 240
        height 180
    }
}
[/FONT]

Note the "thumbnail" stuff. This is for the thumbnail image that Content Manager (CM) will show for the asset and also the thumbnail that the asset will have if you upload it to the DLS. To create the thumbnail, open the main texture TGA in IrfanView, choose Image -> Resize/Resample and resample it to 240 x 180 pixels in size (unchecking the "Preserve aspect ratio (proportional) box in the dialog will be necessary; the "Bell" option for the Resample Filter setting should be fine), and save the result as the "thumbnail.jpg" file. Setting the JPEG quality setting while saving to something like 95% should be fine.

Information on the "category-region" and "category-era" tags can be found here and here on the TrainzDev Wiki, respectively.

With everything set up, choose the File -> Import Content option in CM and point it to your texture's folder. Once it's done, and as long as the texture asset does not show any errors in CM, check it out in Trainz.

Comments and suggestions for this tutorial are welcome. :)
 

Attachments

  • Blank normal map for TS2009 ground textures.zip
    409 bytes · Views: 626
Back
Top