"texture-variants" container

From TrainzOnline
(Difference between revisions)
Jump to: navigation, search
(Added an usage example)
 
(One intermediate revision by one user not shown)
Line 65: Line 65:
  
 
==Categories==
 
==Categories==
[[Category:Config Container]]
+
[[Category:Config Container|T]]

Latest revision as of 19:13, 15 September 2017

The "Texture-variants" container of a KIND Groundtexture asset provides alternative material configurations for the texture to display as seasonal variants.

The "Texture-variants" container is a list of variant subcontainers with no standalone tags. Each variant subcontainer uses the following format. Each variant is numbered based on the subcontainer's tag name. These numbers are used to refer to specific variants from the asset's "Season-selector" container. Variant 0 is parsed from the default configuration of the KIND Groundtexture asset and does not need to be supplied explicitly in the "Texture-variants" container.


Contents

[edit] Supported Tags

Each variant subcontainer supports the following tags. Each tag is shown here with its default value.

 diffuse-texture           ""
 normal-texture            ""
 clutter-mesh-asset        <NULL>

[edit] diffuse-texture

The "diffuse-texture" tag specifies a Texture file located within the asset folder. See the article on KIND Groundtexture for a discussion on how this image is utilized.

[edit] normal-texture

The "normal-texture" tag specifies a Texture file located within the asset folder. See the article on KIND Groundtexture for a discussion on how this image is utilized.

[edit] clutter-mesh-asset

A ground texture can optionally reference a low polygon mesh (a "clutter mesh") and insert the mesh automatically as the ground is painted. The clutter-mesh-asset tag specifies the KUID of the mesh to use for clutter display. See the article on KIND Groundtexture for a discussion on how this mesh is utilized.

[edit] Texture-variants Example

A typical texture-variants container would look like this:

texture-variants
{
 0
 {
   diffuse-texture                     "default.texture"
 }
 
 1
 {
   diffuse-texture                     "winter.texture"
 }
}

A season-selector container is also needed to make use of the texture-variants container (1 means winter, 0 the other three):

season-selector
{
  season-range                          0.25,0.75
  
  branch-true
  {
    season-range                        0.25,0.5
    
    branch-true
    {
      output-season                     0
    }
    
    branch-false
    {
      output-season                     1
    }
  }
  
  branch-false
  {
    output-season                       0
  }
}

[edit] Categories

Personal tools