Mesh library

From TrainzOnline
Jump to: navigation, search

KIND mesh library defines one or more meshes as an asset that can be referenced from another asset or via scripting.

The mesh library asset allows the content creator to include a number of mesh files in a single asset for the purposes of material sharing, mesh sharing, texture sharing, or simply for clarity of organisation. The meshes are then referenced from other assets as required.

Contents

KIND Hierarchy

Parent Classes

Child Classes

  • none.

Supported Tags

  • KIND mesh library does not support any tags other than those used with any KIND Mesh asset.

Example Config.txt

The typical configuration of a mesh library within Trainz is as follows:

  • A KIND Mesh asset is used as the mesh library asset.
  • The asset is configured with a mesh-table that contains a number of items, each with a mesh file and its associated settings, such as effects.
  • The "auto-create" tag is typically configured as "0" although it might be convenient to include one mesh-table item with an "auto-create" tag of "1" in order to avoid a validation warning about no visible mesh in the asset.
mesh-table
{
 summer_boulder_01m
 {
  mesh                                "summer\boulder_granite_01m.im"
  auto-create                         1
 }
 summer_boulder_02m
 {
  mesh                                "summer\boulder_granite_02m.im"
  auto-create                         0
 }
 summer_boulder_03m
 {
  mesh                                "summer\boulder_granite_03m.im"
  auto-create                         0
 }
}
  • Placeable assets are then configured with mesh-table entries that use the "mesh-asset" tag in addition to the usual "mesh" tag. The "mesh-asset" tag value is the KUID of the mesh library asset. The "mesh" tag is included as normal, and is the name of the mesh file in the library (Note: NOT the mesh table item ID).
  • The textures, effects, animations etc associated with the mesh are accessed from the library and are not included with the placeable asset.
mesh-table
{
  default
  {
    mesh-asset <KUID-OF-MESH-LIBRARY-ASSET>
    mesh "summer\boulder_granite_02m.im"
    auto-create 1
  }
}

Mesh library assets do not appear in in-game asset lists.

Categories

Personal tools