CCG/Modelling: Chunky Mesh Track

From TrainzOnline
< CCG
Revision as of 08:17, 16 June 2011 by Pev (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Chunky Mesh Track

Chunky mesh track is an asset that uses a default inbuilt mesh. The creator does not have to construct a mesh in 3dsmax or gmax.

The cross sectional track and ballast shape of the mesh is pre-defined by the diagram below.

A 128 by 128 pixel tga file is used for the texture. This generally includes the ballast, ties and a larger rail section texture on the right of the graphic. Because the shape is defined by geometric proportions, the approximate equivalent dimensions measured in pixels is shown in the chunky_info texture file data shown below. This is approximate due to rounding of values to whole pixels. For additional information on using the Kind, refer to XXXXX.

chunky_info These values (in metres) define the shape of the mesh created for the track. See drawing below:

CCG chunky track section.jpg


chunky_info texture file

The texture file with the track texture on the left and a rail texture on the right is 128 x 128 uncompressed tga, and may have an alpha layer. The texture is mapped to the mesh shape above using the values in the drawing below, as fractions of the 128 pixel width.

CCG chunky track texture.jpg

Fraction0.010.2250.5250.74 0.750.830.910.99
Pixels129679596106117127


SPLINES

Splines have a number of tags that have special effects in Trainz, and also need to be constructed in a certain way in 3dsmax or gmax.

For example, the effect of the following tags are explained in the diagrams:

upright 0 This effects how vertical the objects in the spline, for example a row of poles:

0 = the poles will be placed at right angles to the slope of the ground.

1 = the poles will be truly vertical regardless of the ground slope.

bendy Switches how track is bent on corners, set as 1 allows the mesh to be deformed as the spline is bent around corners.

Notes: bendy and upright have a visible effect for Kind Track splines, see diagram below. For Kind Bridge or Tunnel, the splines show as in bendy 1, bendy 0 has no visual effect. However, bendy 1 should always be entered in the config.txt file for bridge and tunnel as the tag improves handling of the spline and Trainz performance .


                      Bendy 1                     Bendy 0


                Upright 1                            Upright 0


length and endlength A spline may be made by specifying a length value in the config.txt file. To add a different model at the start or end of the spline, Initiators and Terminators are used.

Initiator Name of model to use at the end of the bridge, placed in a sub folder with same name.


terminator Name of model to use at the end of the bridge, placed in a sub folder with same name.

length Length of the main spline track segment in meters.

endlength Length in meters of the initiator and terminator models.

The initiator or terminator is a fixed length and the main spline model repeats as in the diagram above.


In 3dsmax/gmax, the initiator, terminator and spline models must be constructed starting on the origin and extending in the negative Y axis direction. The top view in the diagram shows the correct placement and dimensions L1 or L.

          3dsmax/gmax Top view

The initiator may be rotated 180 degrees to create a terminator model, if required.

Attachment points will be automatically generated in Trainz at ground level. The model heights need to be adjusted in 3dsmax/gmax so a road or track will connect at the correct levels.

               3dsmax/gmax Front view
Personal tools