KIND Groundtexture

From TrainzOnline
(Difference between revisions)
Jump to: navigation, search
m (Added sort criterion)
m (Scale, usage.)
Line 42: Line 42:
  
 
===Scale===
 
===Scale===
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.
+
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===

Revision as of 11:39, 21 May 2015

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

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.

texture ""
normal-texture ""
clutter-mesh <NULL>
season-selector
{
}
texture-variants
{
}


texture

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.

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.

clutter-mesh

A ground texture can optionally reference a low polygon mesh (a "clutter mesh") and insert the mesh automatically as the ground is painted.

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 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.


Material

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

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

The diffuse texture provides a diffuse map, containing color information for the material.

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.

Sample:

texture "demo-diffuse.tga"

Demo-diffuse.jpg


Normal Texture

The normal texture provides a normal map.

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.


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


Sample:

normal-texture "demo-normal.tga"

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?

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

Personal tools