KIND Groundtexture

From TrainzOnline
(Difference between revisions)
Jump to: navigation, search
m (Note re the alpha= line)
Line 1: Line 1:
 
[[KIND Groundtexture]] is an extension of [[KIND Texture]]. A ground texture is tiled in [[Surveyor]] to color and cover the base grid.
 
[[KIND Groundtexture]] is an extension of [[KIND Texture]]. A ground texture is tiled in [[Surveyor]] to color and cover the base grid.
  
==KIND Hierarchy==
+
This page describes [["Trainz-build" number|content format v4.6]].
===Parent Classes===
+
 
 +
=KIND Hierarchy=
 +
==Parent Classes==
 
* [[KIND TrainzBaseSpec]]
 
* [[KIND TrainzBaseSpec]]
===Child Classes===
+
==Child Classes==
 
''none''
 
''none''
  
==Supported Tags==
+
=Supported Tags=
 
The [[KIND Groundtexture]] [[config.txt file]] supports the following tags. Each tag is show here with its default value.
 
The [[KIND Groundtexture]] [[config.txt file]] supports the following tags. Each tag is show here with its default value.
  
texture ""
 
normal-texture ""
 
clutter-mesh <NULL>
 
 
  season-selector
 
  season-selector
 
  {
 
  {
 +
  ...
 
  }
 
  }
 
  texture-variants
 
  texture-variants
 
  {
 
  {
 +
  0
 +
  {
 +
    diffuse-texture ""
 +
    normal-texture ""
 +
    parameters-texture ""
 +
    albedo-detail-texture ""
 +
    normal-detail-texture ""
 +
    detailtexturescale 0.09
 +
  }
 +
  ...
 
  }
 
  }
  
 +
== season-selector ==
 +
The [["Season-selector" container]] allows the ground texture asset to adapt its appearance based on the current environmental conditions. This container provides selection logic to determine which seasonal variant to display.
  
=== texture ===
+
== texture-variants ==
The "texture" tag specifies a [[Texture file]] located within the asset folder. See the discussion on the ground material below for more information on how this image is utilized.
+
The [["Texture-variants" container]] supplies one or more numbered texture variants, which correspond to the seasons defined by the [["Season-selector" container]].
 +
 
 +
=== diffuse-texture ===
 +
The "diffuse-texture" tag specifies a [[Texture file]] located within the asset folder. See the discussion on the ground material below for more information on how this image is utilized.
  
 
=== normal-texture ===
 
=== normal-texture ===
 
The "normal-texture" tag specifies a [[Texture file]] located within the asset folder. See the discussion on the ground material below for more information on how this image is utilized.
 
The "normal-texture" tag specifies a [[Texture file]] located within the asset folder. See the discussion on the ground material below for more information on how this image is utilized.
  
=== clutter-mesh ===
+
=== parameters-texture ===
A ground texture can optionally reference a low polygon mesh (a "clutter mesh") and insert the mesh automatically as the ground is painted.
+
The "parameters-texture" tag specifies a [[Texture file]] located within the asset folder. See the discussion on the ground material below for more information on how this image is utilized.
  
=== season-selector ===
+
=== albedo-detail-texture ===
The [["Season-selector" container]] allows the ground texture asset to adapt its appearance based on the current environmental conditions. This container provides selection logic to determine which seasonal variant to display.
+
The "albedo-detail-texture" tag specifies a [[Texture file]] located within the asset folder. See the discussion on the ground material below for more information on how this image is utilized.
  
=== texture-variants ===
+
=== normal-detail-texture ===
The [["Texture-variants" container]] allows alternative appearances to be defined beyond the default. The container holds zero or more numbered variants, which correspond to the seasons defined by the [["Season-selector" container]]. The default variant specified through the use of the ''texture'' tag is implicitly considered variant #0.
+
The "normal-detail-texture" tag specifies a [[Texture file]] located within the asset folder. See the discussion on the ground material below for more information on how this image is utilized.
  
 +
=== detailtexturescale ===
 +
The ''detailtexturescale'' tag specifies a scaling value to use for the detail textures relative to the primary texture coordinates. 1.0 means that the detail texture uses the same mapping as the primary texture (which is basically pointless) while numbers below 1.0 mean that the detail texture is mapped over a larger area at lower [[texel]] resolution, and numbers above 1.0 mean that the detail texture is mapped over a smaller area with higher texel resolution. This tag is only relevant where detail textures are in use.
  
 +
=Material=
 +
Two variations of the ground material may be used. The selection is automatic based on the provided tags in the selected texture variant:
  
==Material==
+
== PBR ==
The ground uses a material with three texture inputs. The first two are supplied by the Ground Texture asset, the third is supplied by Trainz at runtime.
+
  
===Scale===
+
The PBR ground texture material is similar to [[m.pbrmetal]]. Only the following config tags should be supplied:
When choosing your image, make sure it is the proper scale so details does not look too large or too small in game. The smallest scale setting in surveyor corresponds to an image 10 meters across, while the largest scale setting corresponds to 24 meters across.
+
  
===Diffuse Texture===
+
* ''diffuse-texture'' - The albedo texture.
The diffuse texture provides a [[diffuse map]], containing color information for the material.
+
* ''normal-texture'' - The normal texture.
 +
* ''parameters-texture'' - The PBR parameters texture.
  
The alpha channel is not used for transparency, but instead controls the strength of the Reflective Texture on a per-pixel basis. White alpha shows diffuse only. Black alpha shows reflection only. Grays are a blend between the diffuse and the reflection. In most cases, a white or light gray value is appropriate.
+
== PBR Detail ==
  
Sample:
+
The PBR Detail ground texture material is similar to [[m.pbrmetaldetail]]. All of the following config tags should be supplied:
texture "demo-diffuse.tga"
+
+
[[image:demo-diffuse.jpg]]
+
  
 +
* ''diffuse-texture'' - The albedo texture.
 +
* ''normal-texture'' - The normal texture.
 +
* ''parameters-texture'' - The PBR parameters texture.
 +
* ''albedo-detail-texture'' - The detail albedo texture.
 +
* ''normal-detail-texture'' - The detail normal texture.
 +
* ''detailtexturescale'' - The detail texture scaling factor.
  
===Normal Texture===
+
=Scale=
The normal texture provides a [[normal map]].
+
When choosing your image, make sure it is the proper scale so details does not look too large or too small in game.  The smallest scale setting in surveyor corresponds to an image 10 meters across, while the largest scale setting corresponds to 24 meters across.
  
The alpha channel provides per-pixel control of the [[specular highlight]]. White (255) gives a strong specular, suitable for metals and water. Black (0) gives no specular, more suitable for dark earth. Grays (1 - 254) give an intermediate specular ranging from very dark to very light.
+
=Downloads=
 
+
 
+
When creating the .texture.txt file for the normal map, remember to include the following line, otherwise you will end up with odd effects such as shadowing when you rotate the texture.
+
 
+
'''NormalMapHint=normalmap'''
+
 
+
Note: The NormalMapHint setting does not force processing of the normal file alpha channel.  The normal .texture.txt file must include the alpha= tag line with a reference to the normal file in order for the alpha channel in the normal file to be processed.
+
 
+
Sample:
+
normal-texture "demo-normal.tga"
+
+
[[image:demo-normal.jpg]]
+
 
+
===Reflective Texture===
+
The reflective texture is a cubemap supplied by Trainz which provides an approximate reflection of the surrounding environment. The ground texture has no direct control over this texture, however the use of this texture can be switched on or off per ground texture and the strength of the reflection is controlled per pixel via the diffuse texture's alpha channel.
+
 
+
==Downloads==
+
  
 
''Attach sample files here?''
 
''Attach sample files here?''
 
Sample [[config.txt file]] for a ground texture with a '''clutter mesh''', with the Standard Tags excluded for brevity:
 
 
kind "groundtexture"
 
texture "demo-diffuse.texture"
 
normal-texture "demo-normal.texture"
 
clutter-mesh <kuid:-3:10128>
 
description "A very ugly Ground Texture with a whole bunch of Alaistair’s running around as the clutter mesh."
 
  
  
==Categories==
+
=Categories=
 
[[Category:Asset KIND|G]]
 
[[Category:Asset KIND|G]]

Revision as of 19:09, 15 September 2017

KIND Groundtexture is an extension of KIND Texture. A ground texture is tiled in Surveyor to color and cover the base grid.

This page describes content format v4.6.

Contents

KIND Hierarchy

Parent Classes

Child Classes

none

Supported Tags

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

season-selector
{
  ...
}
texture-variants
{
 0
 {
   diffuse-texture ""
   normal-texture ""
   parameters-texture ""
   albedo-detail-texture ""
   normal-detail-texture ""
   detailtexturescale 0.09
 }
 ...
}

season-selector

The "Season-selector" container allows the ground texture asset to adapt its appearance based on the current environmental conditions. This container provides selection logic to determine which seasonal variant to display.

texture-variants

The "Texture-variants" container supplies one or more numbered texture variants, which correspond to the seasons defined by the "Season-selector" container.

diffuse-texture

The "diffuse-texture" tag specifies a Texture file located within the asset folder. See the discussion on the ground material below for more information on how this image is utilized.

normal-texture

The "normal-texture" tag specifies a Texture file located within the asset folder. See the discussion on the ground material below for more information on how this image is utilized.

parameters-texture

The "parameters-texture" tag specifies a Texture file located within the asset folder. See the discussion on the ground material below for more information on how this image is utilized.

albedo-detail-texture

The "albedo-detail-texture" tag specifies a Texture file located within the asset folder. See the discussion on the ground material below for more information on how this image is utilized.

normal-detail-texture

The "normal-detail-texture" tag specifies a Texture file located within the asset folder. See the discussion on the ground material below for more information on how this image is utilized.

detailtexturescale

The detailtexturescale tag specifies a scaling value to use for the detail textures relative to the primary texture coordinates. 1.0 means that the detail texture uses the same mapping as the primary texture (which is basically pointless) while numbers below 1.0 mean that the detail texture is mapped over a larger area at lower texel resolution, and numbers above 1.0 mean that the detail texture is mapped over a smaller area with higher texel resolution. This tag is only relevant where detail textures are in use.

Material

Two variations of the ground material may be used. The selection is automatic based on the provided tags in the selected texture variant:

PBR

The PBR ground texture material is similar to m.pbrmetal. Only the following config tags should be supplied:

  • diffuse-texture - The albedo texture.
  • normal-texture - The normal texture.
  • parameters-texture - The PBR parameters texture.

PBR Detail

The PBR Detail ground texture material is similar to m.pbrmetaldetail. All of the following config tags should be supplied:

  • diffuse-texture - The albedo texture.
  • normal-texture - The normal texture.
  • parameters-texture - The PBR parameters texture.
  • albedo-detail-texture - The detail albedo texture.
  • normal-detail-texture - The detail normal texture.
  • detailtexturescale - The detail texture scaling factor.

Scale

When choosing your image, make sure it is the proper scale so details does not look too large or too small in game. The smallest scale setting in surveyor corresponds to an image 10 meters across, while the largest scale setting corresponds to 24 meters across.

Downloads

Attach sample files here?


Categories

Personal tools