"Decal" container

From TrainzOnline
Revision as of 19:18, 9 March 2010 by Windwalkr (Talk | contribs)

Jump to: navigation, search

Specifies a decal to attach to the scenery object. Decals are effectively textures attached to the asset that are drawn on the ground rather than the asset itself. Decals are ideal for the creation of object shadows, or adding ground detail such as cracks, oil stains, etc.


Contents

Supported Tags

Each decal container supports the following tags. Each tag is shown here with its default value.

 texture           <KUID:0:0>
 position          0,0,0
 orthogonal-size   10,10
 field-of-view     0
 projection-depth  40
 texture-rectangle 0,0,1,1

texture

Type: Asset KUID
Desc: Specifies the asset to use as the decal texture.

position

Type: 3D Vector
Desc: Specifies the position, in meters, of the decal relative to the asset origin. Defaults to 0,0,0.

orthogonal-size

Type: Decimal Pair
Desc: Sets the size of the decal in meters (not compatible with the 'field-of-view' tag).. Defaults to 10,10.

field-of-view

Type: Decimal Pair
Desc: X and Y Field Of View for perspective projection. Specified in degrees, only one of these values will be used, the other will be calculated from it and should be zero. Eg. '60, 0' will produce a 60 degree horizontal projection, the vertical component will be calculated. '0,40' Specifies a 40 degree FOV with the horizontal FOV calculated.

projection-depth

Type: Decimal
Desc: The projection distance or the depth at which the decal will no longer be visible (in meters). This value should be kept as small as possible, but may need to be calibrated considering the distance from the projector to the terrain and the slope of the terrain. 1 to 120, defaults to 40.

texture-rectangle

Type: Decimal list
Desc: Specifies the top left and bottom right corners (percentage value, 0 to 1) of the area to use from the texture asset. Defaults to 0,0,1,1.


Categories

Personal tools