KIND Texture

From TrainzOnline
(Difference between revisions)
Jump to: navigation, search
(--KIND Texture (redundant, wikimarkup rendering produces automatically))
(Rewrite.)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{ORP-top}}
+
[[KIND Texture]] defines a single texture as an asset that can be referenced from another asset or via scripting.
[[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.
+
Making a texture available as an asset may reduce resource requirements where the texture is used by a number of assets, and may assist in maintaining consistency between different variations of the same basic asset. [[KIND Texture-group]] serves a similar function where there are multiple textures associated with a group of assets.
+
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.
+
  
 
==Parent Classes==
 
==Parent Classes==
 
* [[KIND TrainzBaseSpec]]
 
* [[KIND TrainzBaseSpec]]
 
==Child Classes==
 
==Child Classes==
* Whichever assets make use of the new common texture resource.
+
* [[KIND Groundtexture]]
  
 
==Supported Tags==
 
==Supported Tags==
TBD.
+
The KIND Texture config.txt file supports the following tags. Each tag is shown here with its default value.
 +
 
 +
texture <null>
 +
subblend 0
 +
subrotation 0
 +
 
 +
====texture====
 +
:Type: [[Texture file]]
 +
:Compulsory: 3.4
 +
:Default: None
 +
:Description:  Name of texture. Note that this is a [[texture file]], not an image file.  See example below.
 +
 
 +
====subblend====
 +
:Type: Float
 +
:Compulsory: No
 +
:Default: 0.00
 +
:Description:  ''TBD''
 +
 
 +
====subrotation====
 +
:Type: Float
 +
:Compulsory: No
 +
:Default: 0.00
 +
:Description:  ''TBD''
  
 
==Example Config.txt==
 
==Example Config.txt==
*'''[[Texture file]]s''' 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
+
kuid                                    <kuid:101046:104687>
*Texture files within a config.txt file such as the below ''MUST NOT'' have the ''''.txt'''' extension, or CM will generate an error.
+
username                                "Corona Red diffuse"
<tt>
+
kind                                    "texture"
{|width="100%" text-align="center" float="center" bgcolor="#FAFAFC" <!--
+
trainz-build                           3.5
#F0F8FF" ---> padding="9px"  
+
texture                                "orange.texture"
|- border="1"
+
category-class                          "JC"
| '''Tag or structure braces''' || '''Data fields'''
+
category-era                           "1800s"
|-
+
category-region                        "AU"
| kuid ||<kuid:56113:1267>
+
description                            "A Red corona.
|-
+
subblend                                0.50
| trainz-build || 2.5
+
subrotation                            45.00
|-
+
thumbnails
| category-class || "JO"
+
{
|-
+
  0
| category-region|| "AU"
+
  {
|-
+
    image                               "$screenshot$.jpg"
| category-era || "2000s;2010s"
+
    width                               240
|-
+
    height                             180
| username || "testTexture"
+
  }
|-
+
}
| kind || "texture"
+
 
|-
+
The above "texture" tag value 'orange.texture' specifies a [[Texture file]] which contains the information about the image to be used for the texture.
| '''texture || "eg.texture"'''
+
 
|-
+
==See Also==
| thumbnails||
+
* [[KIND Texture-group]]
|-
+
* [[KIND Groundtexture]]
| { ||
+
|-
+
0||
+
|-
+
|  &nbsp; &nbsp; &nbsp; {||
+
|-
+
|  &nbsp; &nbsp; &nbsp;  image || "thumb.jpg"
+
|-
+
|  &nbsp; &nbsp; &nbsp;  width || 240
+
|-
+
|  &nbsp; &nbsp; &nbsp;  height || 180
+
|-
+
| &nbsp; &nbsp; &nbsp; }||
+
|-
+
| }||
+
|}
+
</tt>
+
The above "texture" tag specifies a [[Texture file]] located within the [[asset folder]].
+
  
 
==Categories==
 
==Categories==
 
[[Category:Asset KIND|Texture]]
 
[[Category:Asset KIND|Texture]]
 
[[Category:TBD|Texture]]
 
[[Category:TBD|Texture]]
{{ORP-bot|Texture}}
 

Latest revision as of 15:49, 28 April 2019

KIND Texture defines a single texture as an asset that can be referenced from another asset or via scripting.

Making a texture available as an asset may reduce resource requirements where the texture is used by a number of assets, and may assist in maintaining consistency between different variations of the same basic asset. KIND Texture-group serves a similar function where there are multiple textures associated with a group of assets.

Contents

[edit] Parent Classes

[edit] Child Classes

[edit] Supported Tags

The KIND Texture config.txt file supports the following tags. Each tag is shown here with its default value.

texture <null>
subblend 0
subrotation 0 

[edit] texture

Type: Texture file
Compulsory: 3.4
Default: None
Description: Name of texture. Note that this is a texture file, not an image file. See example below.

[edit] subblend

Type: Float
Compulsory: No
Default: 0.00
Description: TBD

[edit] subrotation

Type: Float
Compulsory: No
Default: 0.00
Description: TBD

[edit] Example Config.txt

kuid                                    <kuid:101046:104687>
username                                "Corona Red diffuse"
kind                                    "texture"
trainz-build                            3.5
texture                                 "orange.texture"
category-class                          "JC"
category-era                            "1800s"
category-region                         "AU"
description                             "A Red corona.
subblend                                0.50
subrotation                             45.00
thumbnails
{
  0
  {
    image                               "$screenshot$.jpg"
    width                               240
    height                              180
  }
}

The above "texture" tag value 'orange.texture' specifies a Texture file which contains the information about the image to be used for the texture.

[edit] See Also

[edit] Categories

Personal tools