CCG/Modelling: Chunky Mesh Track

From TrainzOnline
< CCG(Difference between revisions)
Jump to: navigation, search
(New page: ==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 ballas...)
 
Line 6: Line 6:
 
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, <font color="red">refer to XXXXX.</font>
 
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, <font color="red">refer to XXXXX.</font>
  
chunky_info
+
====chunky_info====
 
These values (in metres) define the shape of the mesh created for the track. See drawing below:
 
These values (in metres) define the shape of the mesh created for the track. See drawing below:
  
Line 12: Line 12:
  
  
chunky_info texture file
+
====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.
 
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.
  
 
[[Image:CCG_chunky_track_texture.jpg]]
 
[[Image:CCG_chunky_track_texture.jpg]]
<table><tr><td>Fraction</td><td>0.01</td><td>0.225</td><td>0.525</td><td>0.74</td>
+
<table cellpadding="5"><tr><td>Fraction</td><td>0.01</td><td>0.225</td><td>0.525</td><td>0.74</td>
 
<td>0.75</td><td>0.83</td><td>0.91</td><td>0.99</td></tr>
 
<td>0.75</td><td>0.83</td><td>0.91</td><td>0.99</td></tr>
 
<tr><td>Pixels</td><td>1</td><td>29</td><td>67</td><td>95</td><td>96</td><td>106</td><td>117</td><td>127</td></tr></table>
 
<tr><td>Pixels</td><td>1</td><td>29</td><td>67</td><td>95</td><td>96</td><td>106</td><td>117</td><td>127</td></tr></table>
  
  
SPLINES
+
===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.)
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:
 
For example, the effect of the following tags are explained in the diagrams:
  
upright 0
+
====upright====
This effects how vertical the objects in the spline, for example a row of poles:
+
<table cellpadding="10"><tr><td valign="top">
 +
[[Image:CCG_upright.jpg]]
 +
<table><tr><td width="10"></td><td width="200">upright 1</td><td>upright 0</td></tr></table>
 +
</td><td valign="top">
 +
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.
 +
</td></tr></table>
  
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====
 +
<table cellpadding="10"><tr><td width="340" valign="top" align="center">
 +
[[Image:CCG_bendy.jpg]]
 +
<table><tr><td width="10"></td><td width="200">bendy 1</td><td>bendy 0</td></tr></table>
 +
</td><td valign="top">
 +
bendy    1
 +
Switches how track is bent on corners, set as 1 allows the mesh to be deformed as the spline is bent around corners.
 +
</td></tr></table>
  
bendy
+
'''Notes:''' bendy and upright have a visible effect for Kind Track splines, as above. 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.
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 .
 
  
 +
====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.
  
                      Bendy 1                    Bendy 0
 
  
 +
====initiator====
 +
Name of model to use at the end of the bridge, placed in a sub folder with same name.
  
  
                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
+
====terminator====
Name of model to use at the end of the bridge, placed in
+
Name of model to use at the end of the bridge, placed in a sub folder with same name.
a sub folder with same name.
+
  
  
 +
====length====
 +
Length of the main spline track segment in metres.
  
terminator
 
Name of model to use at the end of the bridge, placed in
 
a sub folder with same name.
 
  
length
+
====endlength====
Length of the main spline track segment in meters.
+
Length in metres of the initiator and terminator models.
  
endlength
 
Length in meters of the initiator and terminator models.
 
  
The initiator or terminator is a fixed length and the main
+
The initiator or terminator is a fixed length and the main spline model repeats as in the diagram above.
spline model repeats as in the diagram above.
+
  
  

Revision as of 08:39, 16 June 2011

Contents

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

CCG upright.jpg

upright 1upright 0
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

CCG bendy.jpg

bendy 1bendy 0
bendy    1

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, as above. 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.


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


endlength

Length in metres 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