CCG/Kind: FixedTrack

From TrainzOnline
< CCG
Jump to: navigation, search

Contents

KIND: FIXEDTRACK

A fixedtrack in Trainz could be likened to a model train sectional track system. They snap into position when moved onto another track in Surveyor.

CCG Arrow on Fixed track.jpg


Technically, all a fixedtrack comprises is a mesh assetwith an attached track (or tracks) and surveyor only rendered arrows so the user knows where the fixedtrack starts and ends.

Config.txt for Kind FixedTrack:

Username                   "FT 10 Deg 700m Rad"
kind                       "fixedtrack"
kuid                       <KUID2:#####:#######:1>
trainz-build               2.7
preview-mesh-kuid          <KUID:-3:10099>
mesh-table
 {
   default
   {
     mesh 10-700.im
     auto-create 1
     effects
     {
        arrow0
        {
          kind attachment
          att a.track0a
          default-mesh <KUID:-3:10092>
          surveyor-only 1
        }
        arrow1
        {
          kind attachment
          att a.track0e
          default-mesh <KUID:-3:10092>
          surveyor-only 1
        }
     }
   }
 }
 attached-track
 {
   track0
   {
     track <KUID:-1:15>
     vertices
     {
        0 a.track0a
        1 a.track0b
        2 a.track0c
     }
   }
 }

Default fixedtrack preview mesh KUIDs:

STRAIGHT ... <KUID:-3:10154>

CURVE ....... <KUID:-3:10099>

Crossing Fixed Track

 attached-track
 {
   track0
   {
     track <KUID:-1:15>
     useadjoiningtracktype 0
     vertices
     {
       0 a.track0a
       1 a.track0b
     }
   }
   track1
   {
     track <KUID:-1:15>
     useadjoiningtracktype 0
     vertices
     {
       0 a.track1a
       1 a.track1b
     }
   }
 }


The model simply comprises of a few attachment points (using the a.name naming convention) set-up accurately in 3dsmax or gmax, and a single invisible polygon to allow exporting, and for in-game asset selection. Note that correct track end attachment orientation is essential. The Y axis must point `out' at the correct angle. The Z axis must point `up'. Mid points only need to be in the correct spline path. See diagram below.


TRS released fixedtracks comprise of only curved and straight sections. Junctions are not possible in TRS, as the lever switching functionality for trains is not implemented. Crossings may be made, just create two attached-track fields.

When a spline track is attached to a fixedtrack the fixedtrack will update to the attached track type. (unless useadjoiningtracktype 0 is used as shown left)

The arrows are inserted at each end as a kind attachment- referenced by the arrow's KUID: <KUID:-3:10092>

Each fixedtrack asset needs a preview-mesh, as splinetracks will not render in the Preview window. A preview-mesh can simply be setup as a kind mesh. This way the preview-mesh will never be selectable or seen in Surveyor.


Crossing Attachments ........... Curve Attachments

CCG fixed track attachments.jpg


Return to CCG Index

Content Creator's Guide

Personal tools