KIND Track

From TrainzOnline
(Difference between revisions)
Jump to: navigation, search
m
Line 29: Line 29:
 
  {
 
  {
 
  }
 
  }
  carrate ?
+
  carrate 0
  isroad ?
+
  isroad 0
  isfreeway ?
+
  isfreeway 0
  is_silent ?
+
  is_silent 0
  numlanes ?
+
  numlanes 0
  istrack ?
+
  istrack 0
  istunnel ?
+
  istunnel 0
  surveyor-only ?
+
  surveyor-only 0
  visible-on-minimap ?
+
  visible-on-minimap (opposite of surveyor-only)
  track-sound ?
+
  track-sound
  traffic-speed ?
+
{
  tunnel-roof-height ?
+
}
 +
  traffic-speed 10.0
 +
  tunnel-roof-height 0.0
  
  
Line 61: Line 63:
 
==Season-selector==
 
==Season-selector==
 
The [["Season-selector" container]] allows for the selection of a season index, which may be used by the [["track-lod-tree" container]].
 
The [["Season-selector" container]] allows for the selection of a season index, which may be used by the [["track-lod-tree" container]].
 +
 +
 +
==carrate==
 +
TBD.
 +
 +
==isroad==
 +
TBD.
 +
 +
==isfreeway==
 +
TBD.
 +
 +
==is_silent==
 +
TBD.
 +
 +
==numlanes==
 +
TBD.
 +
 +
==istrack==
 +
TBD.
 +
 +
==istunnel==
 +
TBD.
 +
 +
==surveyor-only==
 +
TBD.
 +
 +
==visible-on-minimap==
 +
TBD.
 +
 +
==track-sound==
 +
TBD.
 +
 +
==traffic-speed==
 +
TBD.
 +
 +
==tunnel-roof-height==
 +
Used by tunnels to determine the roof height in meters allowed by the terrain hole.
 +
  
  

Revision as of 17:05, 24 September 2012

KIND Track provides the sole asset kind for spline-based assets. Contrary to the name, assets of this kind include simple track, multitrack, bridges, tunnels, hedges, roads, walls, embankments, local power lines, high-voltage power lines, and so on. Assets of this kind use a rendering technique previously known as "stitched track". Now that all other spline rendering is obsolete, it is simply known as "track".

Contents

KIND Hierarchy

Parent Classes

Child Classes

  • none


Supported Tags

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

mesh-table
{
}
track
{
}
endcap-prev
{
}
endcap-next
{
}
attached-splines
{
}
season-selector
{
}
carrate 0
isroad 0
isfreeway 0
is_silent 0
numlanes 0
istrack 0
istunnel 0
surveyor-only 0
visible-on-minimap (opposite of surveyor-only)
track-sound
{
}
traffic-speed 10.0
tunnel-roof-height 0.0


mesh-table

The "mesh-table" Container provides details about the track and end-cap meshes which comprise this asset. Most advanced mesh-table options are not available for use at the current time. The important thing is to specify the meshes.


track

The "track" tag is compulsory and determines how the spline geometry is formed from meshes. It is specified as a Track Part Container.


attached-splines

The "attached-splines" container provides a mechanism for having child splines attached which follow the shape of this parent spline at a slightly offset. Attached splines are used where a spline with one set of rendering or functional behaviour needs to be coupled with a spline with a different set of rendering or functional behaviours. For example, a bridge (scenery) with attached track (functional), or a set of pylons (no stretching or shearing) with some wires strung between them (shearing and stretching to fit.) The attached splines may be render-only splines which effectively don't exist beyond of their rendering behaviour, or they may be fully functional splines whose only specialty is that they move and delete with their parent.


endcap-prev & endcap-next

The "endcap-prev" and "endcap-next" tags are specified in the same way, but are not compulsory. If present, these end caps are inserted past the ends of the spline in each direction unless the spline flows onto another spline of the same type. This allows the content creator to "seal" the spline geometry without having to introduce inefficient sealing polygons at each subdivision. The endcaps obey the normal fit-to-spline behavior except that they continue straight in the instantaneous direction of the end of the spline. The endcaps inherit their default settings from the asset's "track" tag but any individual values may be overridden as desired.


Season-selector

The "Season-selector" container allows for the selection of a season index, which may be used by the "track-lod-tree" container.


carrate

TBD.

isroad

TBD.

isfreeway

TBD.

is_silent

TBD.

numlanes

TBD.

istrack

TBD.

istunnel

TBD.

surveyor-only

TBD.

visible-on-minimap

TBD.

track-sound

TBD.

traffic-speed

TBD.

tunnel-roof-height

Used by tunnels to determine the roof height in meters allowed by the terrain hole.



Base mesh

One of each base mesh is required. Several variants of each may be present, in which case they are selected in a position-dependant pseudo-random fashion. A single material (ie. single texture) must be used for all base meshes (not one for each.)

Base meshes may use either alpha masking (1-bit alpha) or alpha blending, however any alpha blends will not be sorted (not against other polygons in the track itself, nor against other alpha-blended polygons in the scene.) For this reason, alpha blending should only be used low to the ground such that a line from the camera to the mesh will pass through no other alpha-blended object before reaching the ground. Normal z-buffer behavior will apply to both alpha-blended and alpha-masked base meshes.

Base meshes make use of a normal map and a single high resolution diffuse texture.

The base mesh pieces are modelled in such that any type may fit to any other without an obvious seam. Pieces are not required to be symmetrical, as they will never be rotated with respect to the previous piece.

  • Extreme detail mesh - used for close-ups. 1000 polys per 2m segment.
  • High detail mesh - used at close range. 200 polys per 2m segment.
  • Mid detail mesh - used at mid range. 100 polys per 10m segment.
  • Low detail mesh - used at far range. 6 polys per 10m segment. Tracks are textured onto the ballast, rather than polygon-modelled.
  • Initial end-cap - used at the start of the spline. 100 polys.
  • Final end-cap - used at the end of the spline. 100 polys.

The end-caps provide any polygons necessary to "close" the spline so that it does not appear hollow when seen from end-on. The other meshes do not include any such polygons. The end-caps are used wherever a transition is made from one track type to another, or where the track begins or ends abruptly.

The length of each mesh is specified independantly. It is recommended that each is made as long as reasonably possible within the alloted polygon budget.

The top of the rail mesh can be no higher than 300mm. Any higher and the wheel rail head interface will not display properly


Spline Placement

Base meshes may be specified to follow their placement spline as closely as possible (previously: bendy) or to stay straight but shear to prevent seams.

Vertices on the mesh may fall into one of two height categories:

  • Grounded - The vertex positioning is based on the ground height.
  • Spline - The vertex positioning is based on the placement spline.

The height category of a vertex is determined from it's relative height within the mesh - if it is less than or equal to the per-mesh-specified grounding height, it is considered grounded.


Performance

Actual performance will vary based on the following factors:

  • Distance at which the High-detail LODs drop out. Generally this should be extremely close.
  • Number of polygons in the lower LODs. Generally this should be very low.
  • Number of materials used. Ideally, a single material is used for all meshes, rather than one or more per mesh.
  • Length of each mesh (longer is better).
  • Efficiency of the "track-lod-tree" container.
  • User-customisable detail settings.
  • etc.


Downloads

  • Media:TS2009-track.zip - The MAX source for the Auran TS2009 example track. Distributed from the TrainzDev site for education purposes only. No license for the reproduction or redistribution of the included model or textures is granted.


Related Links


Categories

Personal tools