KIND Groundtexture

From TrainzOnline
Revision as of 23:59, 3 February 2010 by Windwalkr (Talk | contribs)

Jump to: navigation, search

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

Contents

Texture

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

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 gives a strong specular, suitable for metals and water. Black gives no specular, more suitable for dark earth. Grays are a mid-strength specular.


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.


Configuration

Sample config.txt file for a ground texture, with the Standard Tags excluded for brevity:

kind "groundtexture"
texture "demo-diffuse.texture"
normal-texture "demo-normal.texture"

The "texture" and "normal" tags specify Texture files located within the asset folder.


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:

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


Downloads

Attach sample files here?

Categories

Personal tools