KIND Groundtexture

From TrainzOnline
(Difference between revisions)
Jump to: navigation, search
m (1 revision)
 
(28 intermediate revisions by 7 users not shown)
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.
  
==Texture==
+
This page describes [["trainz-build" number|content format v4.6]].
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===
+
[[File:groundtexture.jpg|border|middle|x400px]]
When choosing your image, make sure it is the proper scale so details don't 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===
+
=KIND Hierarchy=
The diffuse texture provides a [[diffuse map]], containing color information for the material.
+
==Parent Classes==
 +
* [[KIND TrainzBaseSpec]]
 +
==Child Classes==
 +
''none''
  
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.
+
=Supported Tags=
 +
The [[KIND Groundtexture]] [[config.txt file]] supports the following tags. Each tag is show here with its default value.
  
Sample:
+
  season-selector
  texture "demo-diffuse.tga"
+
{
   
+
  ...
  [[image:demo-diffuse.jpg]]
+
  }
 +
  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.
  
===Normal Texture===
+
== texture-variants ==
The normal texture provides a [[normal map]].
+
The [["texture-variants" container]] supplies one or more numbered texture variants, which correspond to the seasons defined by the [["season-selector" container]].
  
The alpha channel provides per-pixel control of the [[specular highlight]]. White gives a strong specular, suitable for metals and water. Black gives no specular, more suitable for dark earth. Grays are a mid-strength specular.
+
=== 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.
  
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.
+
=== 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.
  
'''NormalMapHint=normalmap'''
+
=== 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.
  
Sample:
+
=== detailtexturescale ===
normal-texture "demo-normal.tga"
+
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.
+
[[image:demo-normal.jpg]]
+
  
===Reflective Texture===
+
=Material=
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.
+
Two variations of the ground material may be used. The selection is automatic based on the provided tags in the selected texture variant:
  
 +
== PBR ==
  
==Configuration==
+
The PBR ground texture material is similar to [[m.pbrmetal]]. Only the following config tags should be supplied:
Sample [[config.txt file]] for a ground texture, with the Standard Tags excluded for brevity:
+
  
[[TagName_Kind|kind]] "groundtexture"
+
* ''diffuse-texture'' - The albedo texture.
[[TagName_Texture|texture]] "demo-diffuse.texture"
+
[[TagName_Normal-texture|normal-texture]] "demo-normal.texture"
+
  
The "texture" and "normal" tags specify [[Texture file]]s located within the asset folder.
+
'''Albedo Texture Example'''
  
 +
[[File:groundtexturealbedo.jpg]]
  
==Ground Clutter==
 
A ground texture can optionally reference a low polygon mesh (a "clutter mesh") and insert the mesh automatically as the ground is painted.
 
  
Sample [[config.txt file]] for a ground texture with a clutter mesh, with the Standard Tags excluded for brevity:
 
  
[[TagName_Kind|kind]] "groundtexture"
+
* ''normal-texture'' - The normal texture.
[[TagName_Texture|texture]] "demo-diffuse.texture"
+
[[TagName_Normal-texture|normal-texture]] "demo-normal.texture"
+
[[TagName_Clutter-Mesh|clutter-mesh]] <kuid:-3:10128>
+
[[TagName_Description|description]] "A very ugly Ground Texture with a whole bunch of Alaistair’s running around as the clutter mesh."
+
  
 +
'''Normal Texture Example with no Alpha Channel (ie. no displacement map)'''
  
==Downloads==
+
[[File:pbrnormalmap1.jpg]]
 +
 
 +
 
 +
'''Normal Texture Example with Alpha Channel (ie. displacement map)'''
 +
 
 +
[[File:pbrnormalwithalpha.jpg]]
 +
 
 +
 
 +
 
 +
* ''parameters-texture'' - The PBR parameters texture.
 +
 
 +
Note that it is frequently possible to reduce the size of this texture without compromising the visual results. It is recommended to try a 512x512 or even 256x256 resolution.
 +
 
 +
 
 +
[[File:groundtextureparametersinfo.jpg]]
 +
 
 +
 
 +
'''Parameters (Emissive - Red Channel) Texture Example'''
 +
 
 +
[[File:pbrparametersemissivemap1.jpg]]
 +
 
 +
 
 +
'''Parameters (Roughness - Green Channel) Texture Example'''
 +
 
 +
[[File:groundtextureparametersroughness.jpg]]
 +
 
 +
 
 +
'''Parameters (Ambient Occlusion - Blue Channel) Texture Example'''
 +
 
 +
[[File:groundtextureparametersao.jpg]]
 +
 
 +
 
 +
'''Parameters (Metallic - Alpha Channel) Texture Example'''
 +
 
 +
[[File:groundtextureparametersmetallic.jpg]]
 +
 
 +
 
 +
To read more detail about the functionality for each of the textures and their channels click here: [[m.pbrmetal]]
 +
 
 +
== 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.
 +
Example, see above.
 +
 
 +
'''TBD: Clarify the use of alpha here.'''
 +
 
 +
 
 +
* ''normal-texture'' - The normal texture.
 +
 
 +
'''Albedo Detail Texture'''
 +
 
 +
[[File:pbralbedodetail.jpg]]
 +
 
 +
'''TBD: Clarify the use of alpha here.'''
 +
 
 +
 
 +
* ''parameters-texture'' - The PBR parameters texture.
 +
Example, see above.
 +
 
 +
 
 +
* ''albedo-detail-texture'' - The detail albedo texture.
 +
 
 +
Note that it is frequently possible to reduce the size of this texture without compromising the visual results. It is recommended to try a 512x512 or even 256x256 resolution.
 +
 
 +
'''Detail Texture'''
 +
 
 +
[[File:pbrdetail.jpg]]
 +
 
 +
 
 +
* ''normal-detail-texture'' - The detail normal texture.
 +
 
 +
 
 +
* ''detailtexturescale'' - The detail texture scaling factor.
 +
(As described above.)
 +
 
 +
=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.
 +
 
 +
 
 +
=Videos=
 +
 
 +
[https://youtu.be/hDKXWd4zOV4 HERE] is a how to on converting your previous Trainz ground textures to take advantage of the new PBR / Parallax ground texture format.
 +
 
 +
 
 +
=Downloads=
  
 
''Attach sample files here?''
 
''Attach sample files here?''
  
==Categories==
+
 
[[Category:Asset KIND]]
+
=Categories=
 +
[[Category:Asset KIND|G]]
 +
[[Category:Modeling]]
 +
[[Category:Content creation]]

Latest revision as of 16:24, 20 February 2018

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.

Groundtexture.jpg

Contents

[edit] KIND Hierarchy

[edit] Parent Classes

[edit] Child Classes

none

[edit] 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
 }
 ...
}

[edit] 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.

[edit] texture-variants

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

[edit] 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.

[edit] 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.

[edit] 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.

[edit] 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.

[edit] 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.

[edit] 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.

[edit] Material

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

[edit] PBR

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

  • diffuse-texture - The albedo texture.

Albedo Texture Example

Groundtexturealbedo.jpg


  • normal-texture - The normal texture.

Normal Texture Example with no Alpha Channel (ie. no displacement map)

Pbrnormalmap1.jpg


Normal Texture Example with Alpha Channel (ie. displacement map)

Pbrnormalwithalpha.jpg


  • parameters-texture - The PBR parameters texture.

Note that it is frequently possible to reduce the size of this texture without compromising the visual results. It is recommended to try a 512x512 or even 256x256 resolution.


Groundtextureparametersinfo.jpg


Parameters (Emissive - Red Channel) Texture Example

Pbrparametersemissivemap1.jpg


Parameters (Roughness - Green Channel) Texture Example

Groundtextureparametersroughness.jpg


Parameters (Ambient Occlusion - Blue Channel) Texture Example

Groundtextureparametersao.jpg


Parameters (Metallic - Alpha Channel) Texture Example

Groundtextureparametersmetallic.jpg


To read more detail about the functionality for each of the textures and their channels click here: m.pbrmetal

[edit] 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.

Example, see above.

TBD: Clarify the use of alpha here.


  • normal-texture - The normal texture.

Albedo Detail Texture

Pbralbedodetail.jpg

TBD: Clarify the use of alpha here.


  • parameters-texture - The PBR parameters texture.

Example, see above.


  • albedo-detail-texture - The detail albedo texture.

Note that it is frequently possible to reduce the size of this texture without compromising the visual results. It is recommended to try a 512x512 or even 256x256 resolution.

Detail Texture

Pbrdetail.jpg


  • normal-detail-texture - The detail normal texture.


  • detailtexturescale - The detail texture scaling factor.

(As described above.)

[edit] 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.


[edit] Videos

HERE is a how to on converting your previous Trainz ground textures to take advantage of the new PBR / Parallax ground texture format.


[edit] Downloads

Attach sample files here?


[edit] Categories

Personal tools