Elvas Tower: Custom 3D tracks and tunnels - Elvas Tower

Jump to content

  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

Custom 3D tracks and tunnels Rate Topic: -----

#1 User is offline   Raffaele 

  • Apprentice
  • Group: Status: Switchman
  • Posts: 12
  • Joined: 31-August 18
  • Gender:Male
  • Simulator:Open Rails
  • Country:

Posted 01 September 2018 - 05:28 AM

Hi all. I'm new to this forum since I 'discovered' OR from a short time, but I had a long past experience (as a developer too) with TS since its birth.
At the time, I'm struggling to create a new set of 3D tracks for ORTS (italian styled) and, when it comes to the modeling part, no troubles.
The big part of the problem is to make the new set of tracks to match with certain OR features, above all the track tilting in curved sections.

An advantage of the procedure required by OR is that a developer is not required to model the full set of dyn (3D) curved tracks, because, once the specific trprofile.stf (or .xml) has been written and installed, ALL of the curved sections in the route (except those shorter than the 'Minimum Lenght' value set in the 'Experimetal' tab of OR start screen) will be drawn as dyn curved sections - according to the cross-reading of the data contained in the .tdb, the tsection.dat and the world files - and they will be automatically tilted.

I still haven't modeled any switch, therefore I'm not aware about their way to behave. Basing on the tests I've conducted 'til now, if I lower the 'Minimum Distance' value to 20 (the default is 50), also the curved part of a default 2D switch is displayed as 3d dyn track. Of course the final word about this will only be said once I've modeled a rough switch shape and placed it into the route, staying firm that on a 40m long switch no tilting is acceptable at all (just because this doesn't happen in the real world).

The real problem is when it comes to tunnel curved track sections. Both of the tracks (the default one and the dynamic 3D drawn by the trprofile.stf) are displayed.
I guess the default track is not replaced by the dynamic (3D) one because the default one also contains further polygons (the tunnel walls).
At this point, the solutions might be several, bot none of them effective.
- We can't draw tunnel walls in the trprofile.stf, otherwise any curved section would be 'tunneled', and - also - the tunnel walls would be tilted too;
- we can't change the textures 'called' by the trprofile.stf, otherwise the dark tunnel track textures would be applied to normal tracks too;
- we can draw tunnel walls without tracks and place them separately, but this, beyond making their placement too tricky and time expensive, wouldn't prevent the tracks drawn by the trprofile.stf to be displayed with normal bright textures. The 'TunnelShape' call in the tsection.dat seems not to affect trprofile-drawn tracks at all.

All of this, IMO, could be easily solved IF the trprofile.stf would allow some form of conditional programming, or IF would be possible to create multiple track profiles for a given route. I've found nothing about this in OR documentation, and, if I well remember, I read (perhaps just here, elsewhere in ET forum?), that all of the features above are not available in OR, at least at the moment.

And thence? Has someone got deeper into this kind of features? Has someone any hint or tip to bypass these problems?

#2 User is offline   Goku 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,785
  • Joined: 12-December 13
  • Gender:Male
  • Simulator:my own
  • Country:

Posted 01 September 2018 - 05:52 AM

With current OR code - not possible. You need to do it the old MSTS way using Dynatrax, but this solution does not work with OR superelevation.

In TSRE it is possible using procedural shapes. But this feature is in really early stage of development and I don't know when it will be finished TSRE feature and if it will be implemented in Open Rails.

I'm using experimental procedural shapes in my TSRE only Italian route to make tracks with many different profiles [1], catenary [2] and electric wires [3].

https://i.imgur.com/CBIGHEU.jpg

https://i.imgur.com/wvHqqDc.jpg

#3 User is offline   Goku 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,785
  • Joined: 12-December 13
  • Gender:Male
  • Simulator:my own
  • Country:

Posted 01 September 2018 - 06:07 AM

Quote

- we can't change the textures 'called' by the trprofile.stf, otherwise the dark tunnel track textures would be applied to normal tracks too;

This could be solved in a way that OR can read ShapeTemplate name choosen for an object in TSRE and use .stf profile based on the name. It would be easy workaround for now.

Quote

- we can draw tunnel walls without tracks and place them separately, but this, beyond making their placement too tricky and time expensive, wouldn't prevent the tracks drawn by the trprofile.stf to be displayed with normal bright textures. The 'TunnelShape' call in the tsection.dat seems not to affect trprofile-drawn tracks at all.

Placing walls may be easy using TSRE. You can make one wall shape, for example 40m and then auto place it along the tracks.

#4 User is offline   ebnertra000 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,234
  • Joined: 27-February 17
  • Gender:Male
  • Location:East-Central Minnesota
  • Simulator:OR/TSRE
  • Country:

Posted 01 September 2018 - 07:26 AM

I believe one can also have multiple track profiles in the same route. So it might be possible to just use a different profile for tunnel track

#5 User is offline   Raffaele 

  • Apprentice
  • Group: Status: Switchman
  • Posts: 12
  • Joined: 31-August 18
  • Gender:Male
  • Simulator:Open Rails
  • Country:

Posted 01 September 2018 - 07:44 AM

View PostGoku, on 01 September 2018 - 06:07 AM, said:

This could be solved in a way that OR can read ShapeTemplate name choosen for an object in TSRE and use .stf profile based on the name. It would be easy workaround for now.


This sounds interesting, and, to be honest, this was my first idea, but perhaps I made something wrong.
In my first attempt, I compiled a trprofile.stf featuring both flat and concave sleepers. I have that file yet, but it's not the one that's actually installed in the route.
In that file (the uninstalled one), in the 'Name' field I gave to each of the two sleepers models the same name I gave them in Gmax, but all that I got is to have both of them displayed in OR. What has to be understood, then, is what exactly you mean for ShapeTemplate. I still have some technical problem converting shape files to text, and - due to my prolonged inactivity with TS - I don' exactly remember .s file's syntax. Guess the names I give to the parts of a model in Gmax are written in the shape file the same way.....guess wrong?
But, as far as I've understood about the way .stf works, it doesn't care at all about the part names in .s files, but only about the profiles that are numerically drawn in it, whatever the given name is, so that I could call a part even "sxxt" or "fxxk" and it would be drawn anyway.
The .stf file, in other words, does only read TS files related to the placement of the object in the space (.w files and .tdb files) and to the virtual track (tsection.dat), but does ignore at all the shape infornations contained in the .s files, since the dyn track shape is drawn exclusively according to the data written in the .stf file itself.
Therefore: given that there's still some 'rust' in my mind about these specific aspects, in what a way the .stf can read the ShapeTemplate name as you say?.....

#6 User is offline   Raffaele 

  • Apprentice
  • Group: Status: Switchman
  • Posts: 12
  • Joined: 31-August 18
  • Gender:Male
  • Simulator:Open Rails
  • Country:

Posted 01 September 2018 - 07:48 AM

Quote

I believe one can also have multiple track profiles in the same route. So it might be possible to just use a different profile for tunnel track


I had the same thought, but what a naming logic should be used?
'trprofile_#.stf'?*
'ownname_trprofile.stf'?

.....or what else?....

* # = 01, 02, 03 and so on

Also, assuming would be possible to use multiple track profiles in the same route, if I create a 2nd profile for tunnel tracks and include tunnel walls in it, also the tunnel walls would be tilted. Of course, this can be solved making tunnel walls as a separate 3D object (not a track object anymore).

#7 User is offline   Goku 

  • Superintendant
  • Group: Status: Elite Member
  • Posts: 1,785
  • Joined: 12-December 13
  • Gender:Male
  • Simulator:my own
  • Country:

Posted 01 September 2018 - 09:21 AM

Quote

Therefore: given that there's still some 'rust' in my mind about these specific aspects, in what a way the .stf can read the ShapeTemplate name as you say?.....

This attribute is set in .W file using TSRE. Nothing approved by OR team yet.

#8 User is offline   Raffaele 

  • Apprentice
  • Group: Status: Switchman
  • Posts: 12
  • Joined: 31-August 18
  • Gender:Male
  • Simulator:Open Rails
  • Country:

Posted 01 September 2018 - 02:57 PM

Quote

This attribute is set in .W file using TSRE. Nothing approved by OR team yet.

Mmmmh.....I'm at an halt then. I'm still using the old Kuju RE.

#9 User is offline   Csantucci 

  • Member, Board of Directors
  • Group: Status: Elite Member
  • Posts: 6,986
  • Joined: 31-December 11
  • Gender:Male
  • Country:

Posted 01 September 2018 - 10:52 PM

Impressive pictures, Goku.

View PostGoku, on 01 September 2018 - 09:21 AM, said:

This attribute is set in .W file using TSRE. Nothing approved by OR team yet.

You could make a proposal.

#10 User is offline   Raffaele 

  • Apprentice
  • Group: Status: Switchman
  • Posts: 12
  • Joined: 31-August 18
  • Gender:Male
  • Simulator:Open Rails
  • Country:

Posted 02 September 2018 - 12:33 AM

View PostGoku, on 01 September 2018 - 09:21 AM, said:

This attribute is set in .W file using TSRE. Nothing approved by OR team yet.

Ok, I got the TSRE(5), v0.692.
1) is this the latest version (I guess not);
2) how the ShapeTemplate attribute is set in the .w file using this editor.

Sorry for the noob questions but I've never used this editor before.

BTW, in the version I d'loaded the SPACE key doesn't work (should be: 'camera move up')

  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users