Quote
Back to the 'procedural track' theme, I struggled a bit with that and here're my thoughts (as far as I've understood):
1) trprofile.stf
This topic is for TSRE procedural shapes and it works in a totally different way than OR trprofile.stf.
1. In TSRE each shape can use DEFAULT template of custom template name can specified.
If DEFAULT is used for Tracks or Roads, TSRE will look in "globaldefinitions.dat" file for Hints what template to use. The goal is to completely get rid of GLOBAL directory and make software 100% independent from MSTS stuff.
For now the file looks like this:
ShapeDefinitions (
Definition (
Hint ( Default )
Template ( DefaultTrack )
)
)
So, this feature is basically not ready at all. In the future it will define hints for all kind of tracks and roads from tsection.dat file.
Template can be also set to DISABLED and the TSRE will use static shape file even if procedural tracks are enabled.
2. Templates are defined in "shapetemplates.dat" file.
There is no data structure specification yet, and everything was made only in a way that I could use it in my TSRE route. Some attributes are not in use at all.
Here is fragment of the file:
Templates (
Version ( 0.1 )
Template ( DefaultTrack
Type ( TRACK )
Ballast ( name1 DEFAULT 0-1500 1 ballast1.obj ballastv1.png 0.08 )
Rail ( name2 DEFAULT 0-700 1 uic60s.obj rails1.png 0.325 0.72 )
Rail ( name3 DEFAULT 0-700 1 uic60s.obj rails1.png 0.325 -0.72)
Tie ( name6 DEFAULT 0-700 1 inbk3.obj rails1.png 0.05 )
)
Template ( NoBallast
Type ( TRACK )
Rail ( name2 DEFAULT 0-700 1 uic60s.obj rails1.png 0.325 0.72 )
Rail ( name3 DEFAULT 0-700 1 uic60s.obj rails1.png 0.325 -0.72)
Tie ( name6 DEFAULT 0-700 1 inbk3.obj rails1.png 0.05 )
)
Template ( Siec0
Type ( RULER )
Stretch ( name2 DEFAULT 0-3000 2 siecp1.obj siecp2.obj siec.png 0.00 )
)
Template ( Electric30mh
Type ( RULER )
Stretch ( name2 DEFAULT 0-3000 1 ewire_30m.obj siec.png 0.00 )
Point ( name3 NONE 0-3000 1 etower_30m.obj siec.png 0.00 )
)
Template ( Electric50mh
Type ( RULER )
Stretch ( name2 DEFAULT 0-3000 1 ewire_50m.obj siec.png 0.00 )
Point ( name3 NONE 0-3000 1 etower_50m.obj siec.png 0.00 )
)
3D shape for a template is made from obj file. The obj file can be processed in many ways.
At the moment these types are working:
Ballast, Stretch, Rail, Tie, Point.
Here are results:
https://i.imgur.com/CBIGHEU.jpg
https://i.imgur.com/wvHqqDc.jpg