Elvas Tower: Tree in Track - Elvas Tower

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Tree in Track Rate Topic: -----

#1 User is offline   jonas 

  • Engineer
  • Group: Status: Contributing Member
  • Posts: 548
  • Joined: 04-April 14
  • Gender:Male
  • Simulator:MSTS & OR
  • Country:

Posted 04 July 2017 - 04:50 PM

It is about ORTSUserPreferenceForestClearDistance ( ... )

Start this extracted route with OR ...
Attached File  Trees.zip (8.63MB)
Number of downloads: 307

...and you see this
Attached Image: TreeInTrack.jpg


The last line of the trk file is "ORTSUserPreferenceForestClearDistance ( 10 )". In the "OpenRails" folder an include trk file exists too with the same line.


Attached Image: 500mtrack.jpg
The scene in MSTS Editor. Only 2 tracks are used in the route. I guess it is about the near of the scenery to the border of the tiles.


When flipping the 500m track it starts at the the same tile where the forest square is and then OR calculates the trees correct 10m out of the way.
Attached Image: TreeNotInTrack.jpg

#2 User is offline   Csantucci 

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

Posted 05 July 2017 - 12:31 AM

In fact the tree-on-track check is done for all track sections having their start point in the same tile where the forest or part of it resides. A check for further tiles where the track section resides is not done. It requires further computing time and I wonder if it is worth doing it.

#3 User is offline   eric from trainsim 

  • Waste Disposal Engineer
  • Group: Private - Open Rails Developer
  • Posts: 1,577
  • Joined: 30-October 10
  • Gender:Male
  • Simulator:ORTS
  • Country:

Posted 05 July 2017 - 05:47 AM

Hard to say... With track pieces, it's bad form to extend that far into another tile, but it does happen.

If the move to procedural track ever gains traction, then that code as-is will fail as well.

Page 1 of 1
  • 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