Elvas Tower: Extraneous Scenery in X1763 - Elvas Tower

Jump to content

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

Extraneous Scenery in X1763 Rate Topic: -----

#11 User is offline   Csantucci 

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

Posted 20 September 2013 - 12:29 PM

Thanks, James, my problem has - almost - gone.
May I suggest this modification to your hack?
                XNADMProjection = Matrix.CreatePerspectiveFieldOfView(fovWidthRadians, aspectRatio, Viewer.Settings.ViewingDistance / 2, Viewer.Settings.DistantMountainsViewingDistance);

This would provide a more flexible approach in function of viewing distance. I've tested it and at least in my case it provides better results, both with and without autotuning of performance.

#12 User is offline   James Ross 

  • Open Rails Developer
  • Group: Status: Elite Member
  • Posts: 5,491
  • Joined: 30-June 10
  • Gender:Not Telling
  • Simulator:Open Rails
  • Country:

Posted 20 September 2013 - 02:18 PM

 Csantucci, on 20 September 2013 - 12:29 PM, said:

Thanks, James, my problem has - almost - gone.
May I suggest this modification to your hack?
                XNADMProjection = Matrix.CreatePerspectiveFieldOfView(fovWidthRadians, aspectRatio, Viewer.Settings.ViewingDistance / 2, Viewer.Settings.DistantMountainsViewingDistance);

This would provide a more flexible approach in function of viewing distance. I've tested it and at least in my case it provides better results, both with and without autotuning of performance.


I decided against this method because both the auto-tuner and people manually adjusting settings pick viewing distances beyond the MSTS 2000m limit and, once you go much beyond this (the absolute limit is 10000m, i.e. 10km), you will get gaps because very few routes have enough high-resolution tiles enabled to cover this sort of distance anywhere except the narrow line the route goes.

#13 User is offline   Sid P. 

  • Conductor
  • Group: Status: Contributing Member
  • Posts: 463
  • Joined: 12-February 13
  • Gender:Male
  • Location:Canada
  • Simulator:Open Rails / MSTS
  • Country:

Posted 21 September 2013 - 06:32 AM

Hi James,
Surfliner 2, using X1765, now looks fine on my system. Thanks.

#14 User is offline   disc 

  • Foreman Of Engines
  • Group: Private - Open Rails Developer
  • Posts: 818
  • Joined: 07-October 12
  • Gender:Male
  • Simulator:OpenRails
  • Country:

Posted 21 September 2013 - 10:08 AM

Wouldn't be better if the exclusion zone would be the same as the limit of the normal terrain? (2000m by default).

#15 User is offline   markus_GE 

  • Executive Vice President
  • PipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 4,862
  • Joined: 07-February 13
  • Gender:Male
  • Location:Leoben, Styria, Austria, Europe
  • Simulator:ORTS / MSTS
  • Country:

Posted 21 September 2013 - 01:13 PM

As far as I understood the above, OR is Rendering DM Terrain even where it is overlayed, IE hidden by "normal" Terrain (except for the exclusion Zone). Doesn´t that mean (some) more efforts put on the CPU / GPU for no use? So, wouldn´t it be beneficial for Performance to not have the invisible DMs rendered?

Cheers, Markus

#16 User is offline   James Ross 

  • Open Rails Developer
  • Group: Status: Elite Member
  • Posts: 5,491
  • Joined: 30-June 10
  • Gender:Not Telling
  • Simulator:Open Rails
  • Country:

Posted 21 September 2013 - 02:52 PM

 markus_GE, on 21 September 2013 - 01:13 PM, said:

So, wouldn´t it be beneficial for Performance to not have the invisible DMs rendered?


In an ideal world, sure, but it's really hard to figure out what normal terrain is going to be visible when planning what DM terrain to draw. All the versions of OR with DM involve some level of over-draw to try and compensate for this lack of knowledge and to avoid any obvious gaps.

#17 User is offline   markus_GE 

  • Executive Vice President
  • PipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 4,862
  • Joined: 07-February 13
  • Gender:Male
  • Location:Leoben, Styria, Austria, Europe
  • Simulator:ORTS / MSTS
  • Country:

Posted 22 September 2013 - 02:19 AM

So is OR (except for the new exclusion area) already (partially) not drawing the DM Terrain where it´s overlaid by the normal one?

In case it´s not: You wouldn´t really Need to know which DM are invisible or not. Given, that DM Terrain is generally lowered by some 5 metres (what´s the Standard for it? I changed it at one Point and don´t recall the riginal anymore. For this example, I´ll stick with 5.) DMs should always be lower-lying than normal Terrain. Similar to a plate atop a table. (Now put a sheet of paper between plate and table). If you take torch and direct the beam of light vertically on the edge of the plate opposite to from where you´ll later on be viewing it (in-game, that would be the Center of the plate, but in the example, the opposite edge will do), the shades you see make a somewhat Close 2D Rendering of about the area aou´re Holding the torch above. now take a pencil and mark the line where shaded turns to lit surface, so you can put away the torch again. If you now look at the plate from the opposite side of where you drew the line on the paper below in some angle, the plate will hide the line on the paper below (if the angle isn´t to cle to 90° from horizontal, IE, too Close to vertical). If you now re-position the plate so, that the line also is hidden when look at from a Point directly vertically above, there´s no Chance you will see it from any other Point on the plate (or from the opposite side).

Remark: For best results in this example, you might also take photos with the camera Position in the Center of the plate.

Rewritten for OpR, this means: DM are lowered anyway, so from the cab or any other camera angle Close to the ground, there already is no Chance that the line between DM and normal Terrain can be seen as a gap, if DMs only start where our "plate" (normal Terrain) leaves off (it´ll be noticeable just as a cut in texturing, like we already know it). Now let them start let´s say 50 metres before the "plate" leaves off, and there is no Chance to see a gap any way.

Here an Image illustrating what I mean:

Attached Image: dm.jpg

Cheers, Markus

#18 User is offline   James Ross 

  • Open Rails Developer
  • Group: Status: Elite Member
  • Posts: 5,491
  • Joined: 30-June 10
  • Gender:Not Telling
  • Simulator:Open Rails
  • Country:

Posted 22 September 2013 - 03:36 AM

 markus_GE, on 22 September 2013 - 02:19 AM, said:

So is OR (except for the new exclusion area) already (partially) not drawing the DM Terrain where it´s overlaid by the normal one?


No, OR is drawing all the low-resolution terrain in the viewing distance (default of 40km) except a 500m exclusion zone. It is then drawing all the high-resolution terrain in that viewing distance (default of 2km) on top of it. I would have liked to use the GPU to help here with its depth buffer, but low-resolution terrain isn't always lower than high-resolution terrain, alas (mostly it is something like 10m down).

 markus_GE, on 22 September 2013 - 02:19 AM, said:

Rewritten for OpR, this means: DM are lowered anyway, so from the cab or any other camera angle Close to the ground, there already is no Chance that the line between DM and normal Terrain can be seen as a gap, if DMs only start where our "plate" (normal Terrain) leaves off (it´ll be noticeable just as a cut in texturing, like we already know it). Now let them start let´s say 50 metres before the "plate" leaves off, and there is no Chance to see a gap any way.


While this is a nice idea, and a good diagram to explain it, you do actually get gaps. Bug 1213712 has an examples of such gaps. While we can probably improve that specific case (I don't think we were drawing all the high-resolution terrain we should have been there), there are cases we can't fix so easily.

Firstly, as noted, low-resolution terrain isn't always below high-resolution terrain so if you are switching over (at 2km) and the low-resolution terrain isn't lower, you get a visible gap.

Secondly, and more importantly to me, is the problem of running out of high-resolution terrain before the viewing distance is reached. This happens on various routes with the default 2km viewing distance, but is much worse if people crank that setting up - as people do. For example, what do you think happens if you are on a low-detail route and set it to 10km, and look out to the left of the cab? You see - if you're lucky - 2-3km of high-resolution terrain, then a 7km gap to the low-resolution terrain. Not good.

#19 User is offline   markus_GE 

  • Executive Vice President
  • PipPipPipPipPipPipPipPipPip
  • Group: ET Admin
  • Posts: 4,862
  • Joined: 07-February 13
  • Gender:Male
  • Location:Leoben, Styria, Austria, Europe
  • Simulator:ORTS / MSTS
  • Country:

Posted 22 September 2013 - 04:58 AM

Looks like altogether then it´s no good idea to have it not rendered... Now I also know what the gaps were about, that I found myself!

Also, I guess, doing all the checking necessary to find out, if something would have to be drawn when trying to leave out as much DM Terrain as possible, the checking would more than fill out the Performance gained from leaving out the Terrain.

So, better just leave it to the ones who really know when it Comes to taking decisions :)

As for the compliment on the diagram: Actually it was no real Problem, I just took a pre-drawing of some homework we had to do for geometry and reproduced it in Paint, with slight modifications only ^^

Cheers, Markus

  • 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