3D Track Model

Higher quality track

By moving the hard work of rendering track to another thread, we have the option of improving the quality of the track model. #106 now includes the option to use a “3D track” model instead of the previous “flat track” model.

older track model on the left, with new “3D track” on right

Note, the new 3D track models only work well with a decent, modern graphics card. Where the graphics adaptor is capable the 3D track can be used without significant impact on frame rates, older less capable graphics systems will not be able to handle the higher detail track and the older “flat track” needs to be used.

The feature is designed so that it can be turned on or off as required: thus it can be turned on or off on any layout depending on the machine in use.

At time of writing, 3D track models are available for standard gauge wooden and concrete sleeper track and wooden and steel sleeper metre guage track. Other 3D track models will be produced in due course.

Selecting the Track mode.

In the program preferences (Tools/Preferences) you can choose your default for the new 3D track model.

If 3D track model is ticked, your installation of Rail3D will use 3D track models by default (where available).

You can also set the 3D track option for individual layouts - see layout properties (File/Layout Properties).

If 3D track is ticked on the layout properties, 3D track models will be used where appropriate, if not, 3D models are not used. This overrides the preference setting.

Creating 3D Track models.

v106 includes new features to support the 3D track model. Open the standard gauge concrete track model in the stock editor to see the new model syntax.

  • Track models must use Track2 format.
  • rail and fill statements are used as usual
  • To use the new 3D format, track models should consist of two files: 1) the standard track model (non 3D) 2) a track model in the new 3D format.
  • The default file (old non-3D format) should include a <track> block:

The track block contains a “3D” statement followed by the model name for the 3D model. This statement tells the program which 3D model to use when rendering 3D track.
  • 3D track models should have the same name as the default (non 3D) model with the addition of .3D eg “Concrete” and “Concrete.3D”
  • The .3D model does not appear in the track type selection screens in Rail3D, instead only one type “Concrete” is shown and can be selected. The 3D or non 3D model is then used depending on the program and layout preferences and properties (see above).
  • The 3D model for the track is similar to the non 3D model, except that is does not include the fill statements used to form the sleepers and instead includes a sleeper definition:

	Sleeper	STDConcSleeper
	Spacing	20
compare the “Concrete” and “Concrete.3D” models to see how this works.
The sleeper statement (eg “stdconcSleeper”) references a scenery item which must exist in the scenery library (in the track/parts folder is recommended). This should be a normal scenery object.
  • Scenery models for sleepers must use the same texture skin as the parent track model.
  • Note that scenery objects will be rendered hundreds if not thousands of times and therefore need to be particularly carefully optimised or they will cause the program frame rate to suffer.