KIND Texture

From TrainzOnline
Revision as of 02:42, 21 November 2013 by Fabartus (Talk | contribs)

Jump to: navigation, search

KIND Texture is a kuid-assigned data type definition which 'exposes' a simple texture within the Trainz data base as an general kuid selectable asset, as opposed to a 'private' texture available only to the self-definition of a single asset.

These explicitly defined textures become a public and shared resource that can be referenced by KUID for use as a custom corona, for example for several or many content assets. This is a desirable practice with respect to file byte-counts—textures in a typical Trainz install have been shown by independent Trainz users to take up over half the HDD data space needed in local content.

Exposing and reusing a common texture allows many assets to share it and minimizes the HDD footprint of the asset whilst also cutting down the amount of memory the texture needs in RAM memory. This in turn can have large posative performance benefits in the case where an texture asset is used frequently on a Trainz-board region, for example as part of the definition of the streets, roads, and bridges in a town or alternatively as the bark or leaf texture in a forest of trees, in a common spline scenery object such as shrubbery, and so forth. The more instanced objects are enumerated for the graphics engine to render, the more incremental payback a common element such as this texture asset will return.

Contents

Parent Classes

Child Classes

  • Whichever assets make use of the new common texture resource.

Supported Tags

TBD.

Example Config.txt

  • Texture files are ASCII specification files (text format) instructing ContentManager (CM) how to render each single texture.
  • Texture files have a ".texture.txt" name extension within the assets' folder
  • Texture files within a config.txt file such as the below MUST NOT have the '.txt' extension, or CM will generate an error.

Tag or structure braces Data fields
kuid <kuid:56113:1267>
trainz-build 2.5
category-class "JO"
category-region "AU"
category-era "2000s;2010s"
username "testTexture"
kind "texture"
texture "eg.texture"
thumbnails
{
0
      {
      image "thumb.jpg"
      width 240
      height 180
      }
}

The above "texture" tag specifies a Texture file located within the asset folder.

Categories

Personal tools