Reference Manual‎ > ‎Art Guidelines‎ > ‎

How To Create Track

Introduction

This section describes a step-by-step guide to producing a piece of track and associated assets from scratch.

It is assumed that the 3D modelling package used is Autodesk® 3ds Max® and the package used for authoring textures is Adobe® Photoshop.

The modelling package Autodesk® 3ds Max® was used to create Train Simulator, so this product appears in the examples provided. You can, of course, use other packages such as Blender™ or amabilis 3D Crafter. The package used here for authoring textures is Adobe® Photoshop. Again, you may use one of the many other packages available.

Regardless of the packages you use, the documents below should be used as a general guide to the processes to follow to build assets for Train Simulator.

Important Note: For your chosen package, you may need additional plug-ins to export the assets into Train Simulator. Please check the availability of a suitable plug-in before you begin creating assets.

Basic Track

This section will run through the process of creating a basic track asset. This is the absolute minimum required to generate a piece of driveable track.

Creating a TRACK Cross-Section File

  1. In the FRONT viewport, create a line (using corner vertices) which represents your track cross-section (e.g. rails and ballast), using as few vertices as possible. Ensure that the tops of the rails are at ground level (zero).
  2. In the TOP viewport, select your cross-section and extrude the cross-section up the screen by 4m (remember in 3ds Max this is the Y-axis). This will create a track object which is 4m long.
  3. Convert the object into an editable mesh or poly. Ensure that the face normals are pointing in the correct direction (facing outwards). Flip the faces if required.


  4. Create a new material using the LoftTexDiff.fx shader and assign this to your track object. Give the material a meaningful name.
  5. In the material roll-out, click on the ‘Slot Texture’ and point to your texture. Leave all other parameters in the material roll-out as default for now. Remember, you can use multi-sub object materials if more than one texture is required.
  6. Apply mapping to your object, so that the textures can tile along the length of the track (along Y-axis in 3ds Max).
  7. Name the object “1_1000_Track
  8. Ensure the pivot of the object is at 0,0,0
  9. Select your track object and open the ‘Hierarchy' tab. In the ‘Adjust Transform' section, reset both the ‘Transform’ and the ‘Scale’.
  10. Save your max file in the ‘RailNetwork\Track’ folder.
  11. Export the track object to an IGS file in the same folder as the source Max file. In the export tab, ensure that the ‘Export with Namespaces’ is checked ON when exporting.
  12. Open the Blueprint Editor. Now browse to find the ‘RailNetwork\Track’ folder (this folder should contain your track IGS file).
  13. Right-click on the ‘Track’ folder and click on ‘Create New Blueprint’, and choose ‘Track Section Blueprint’ from the blueprint list.
  14. Rename your new blueprint and give it a meaningful name (rather than the default ‘Track Section Blueprint000’)
  15. Reference the track IGS file in the ‘Cross section ID’ field.
  16. Give your asset a sensible name in the ‘Display name’ field. This is the name that will appear in your browser book.
  17. Set the ‘Editor Ground Offset’ to a value (generally 0.36m); this will raise the track up above ground level. If this is not specified, the rail tops will remain at ground level and the rest of the track and ballast will remain unseen below ground.
This track cross-section file will be used in-game to create a track loft.

The track will appear as a placeable loft asset in the browser book using the Display name specified above.

Advanced Track

The track system in Train Simulator supports track LODs, TRANSPARENCY in textures, and other more complex assets such as dynamic junctions, buffers, catenary and procedural geometry.

This section will run through the process of using these more complex features and creating the more complex track assets.

LODs

The track assets conform to the same LOD naming convention for the other general game assets. Multiple LODs for all nodes are supported (e.g. 1_0300_nodename, 2_0600_nodename, 1_0200_object, 2_0500_object etc).

TRANSPARENCY

If transparency is required in any texture used on a track loft, then a different shader must be used called ‘LoftTexDiffTrans.fx’. In order for this shader to function correctly, the shader must have the TRANS flag set, and the texture must have a 1-bit alpha channel.

Junctions

If junctions are required in your track layout, then ‘track cap’ files are required. The ‘track cap’ file contains the geometry to help with the generation of the procedural rails, ballast and the guard rails for the procedural junctions. The sleepers are generated procedurally from values held in the track blueprint.

Creating a ‘TRACK CAP’ Cross-Section File

  1. In the FRONT viewport, create a line (using corner vertices) which represents your track ballast cross-section using as few vertices as possible.
  2. In the FRONT viewport, create a new line that will represent a single rail in the centre of the ballast. These should be separate objects (nodes) in your scene. Ensure that the top of the rail is at ground level (zero).
  1. In the TOP viewport, select your objects and extrude the cross-sections up the screen by 4m (remember in Max this is positive in the Y-axis). This will create objects which are 4m long.
  2. Ensure that the face normals are pointing in the correct direction (facing outwards) on all objects. Flip the faces if required. Remember that the objects are now meshes, and can be worked on as an editable mesh or poly object.
  3. Create a new Kuju material using the LoftTexDiff.fx shader (assuming no transparency is required – see above) and assign this to your track cap objects. Give the material a meaningful name.
  4. In the material roll-out, click on the ‘Slot Texture’ and point to your texture. Leave all other parameters in the material roll-out as default for now. Remember, you can use multi-sub object materials if more than one texture is required.
  5. Apply mapping to your objects, so that the textures can tile along the length of the track (along Y-axis in Max).
  6. Name the ballast object "1_1000_Ballast" (case sensitive)
  7. Name the rail object "1_1000_Rail" (case sensitive)
  8. Ensure the pivot of the objects are at 0,0,0
  9. Select all objects and open the ‘hierarchy tab’. In the ‘Adjust Transform’ section, reset both the ‘Transform’ and the ‘Scale’ for all objects.
  10. Save your max file in the ‘RailNetwork\Track’ folder (same folder as your track file)
  11. Export the track cap asset to an IGS file in the same folder as the source Max file. In the export tab, ensure that the ‘Export with Namespaces’ is checked ON when exporting.
The track cap will be referenced in the same track blueprint created earlier.
  1. Open the Blueprint Editor. Now browse to find the ‘RailNetwork\Track’ folder (this folder should contain your track blueprint).
  2. Locate your track blueprint that was created previously - see Basic Track. Add the reference to the ‘track cap’ IGS file in the ‘Cross section Cap ID’ field.
As the junctions will animate, they will need ‘track bed’ sounds associated with them. These audio properties must be set-up in the track blueprint.
  1. Add a default ‘bed rumble sound’. See below.

Creating "Super Sleepers"

As mentioned earlier, the sleepers of a junction are produced procedurally but the texturing of those sleepers is under the control of the user via the track blueprint. This allows the user to ‘point’ to an area of a texture page which contains the texture for that sleeper.


Each track type (each track blueprint) supports one type of procedural sleeper.

Each sleeper type is mapped with unique UV’s specified by the user in the track blueprint. This method allows all the textures for the procedural sleepers to exist on one texture page, and the relevant part of the texture page to be mapped onto the correct sleeper.

In the example (right), the single texture page used for the procedural sleepers has space for up to 16 sleeper types.

Of course, in your own texture, you might only need to specify, say, 4 sleeper textures. This will work just as well as the UVs are specified correctly.
  1. Modify the ‘Sleeper Texture ID’ field to point to the super-sleeper texture
  2. Modify the ‘Sleeper min max UV’ fields. These should point to the minimum and maximum UV coordinates of the portion of the sleeper texture that is required.

Adding Population Geometry

Population geometry is the name given to geometry that can be placed periodically along a loft. Three types of geometry can be specified:
  • Start geometry is placed once at the start of a loft
  • Middle geometry is placed along the loft repeated at specified intervals
  • End geometry is placed once at the end of a loft
Blueprint references for population geometry must contain references to ‘Provider’ and ‘Product’ and the blueprint ID of the population asset.

Start geometry

This feature can be used to place a buffer asset at the start of the loft.
  1. Open the track blueprint and edit the field ‘Start Geometry BPID’ to reference the buffer asset (remember to reference the Provider and Product).

End geometry

This feature can be used to place a buffer asset at the end of the loft.
  1. Open the track blueprint and edit the field ‘Start Geometry BPID’ to reference the buffer asset (remember to reference the Provider and Product).
If the finished track is now placed in the route, it should have buffers at the start and end, and it will also display the appropriate junction when two tracks intersect.