Elvas Tower: Close surfaces are rendered differently (z-clipping?) - Elvas Tower

Jump to content

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

Close surfaces are rendered differently (z-clipping?)

#1 User is offline   jonas 

  • Fireman
  • Group: Active Member
  • Posts: 230
  • Joined: 04-April 14
  • Gender:Male
  • Simulator:MSTS & OR
  • Country:

Posted 03 December 2018 - 12:58 PM

Maybe this is already known here and discussed in a thread. In any case, it seems like a bug or at least as not intended in OR.

With different cameras, the same scenes are rendered differently when it comes to close arranged surfaces (terrain):

Attached Image: Schotter.jpg
As a result, it is often difficult for me as route builder to precisely raise the terrain for OR and some signal signs (right buffer) are not displayed properly or only at close proximity.


Attached Image: Gully.jpg
Even tracks are often shown as interrupted (red highlighted gaps) and here the drain is not displayed at all.

Is it possible to adjust the different cameras uniformly?
The Key 8 camera should be the reference like corresponds to the view in MSTS where the bug does not occur.

#2 User is online   James Ross 

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

Posted 11 December 2018 - 01:10 PM

View Postjonas, on 03 December 2018 - 12:58 PM, said:

Maybe this is already known here and discussed in a thread. In any case, it seems like a bug or at least as not intended in OR.

With different cameras, the same scenes are rendered differently when it comes to close arranged surfaces (terrain):

The reason that this occurs at all is because different cameras have different "near plane" distances (the closest distance from the camera for things to render before being cut-off) and, unfortunately, the near plane does affect the quality of the z-buffer (depth buffer used for clipping and figuring out what is on top of what).

The current values are:

  • Passenger/3D cab camera: 0.1 m
  • Brakeman/head out: 0.25 m
  • Everything else: 1.0 m

The problem with just changing the near plane to 0.1 m (the closest value) for all cameras is that, although it lets you render things up to 10cm from the camera and close-by surfaces might have less z-fighting (where things get layered incorrectly, sometimes flickering), it makes the further-away surfaces worse.

You might even be seeing this in your first screenshot, where the close terrain looks better in the head out camera (because of the lower near plane value) but one of the buffers has lost its icon/sign, likely for the same reason (lower near plane).

This means that it is unfortunately a trade-off, and even if you find the "perfect" value the quality of the z-buffer actually varies by depth. Further away has less precision - this is intentional, by the way - but how quickly it gets worse is affected by the near plane.

As a content creator, I'm afraid you'll have to work to the "worst" of these at all times; camera 8 will give you the worst up-close experience but the best in-the-distance experience, while the passenger/3D cab camera will be the opposite.

#3 User is offline   jonas 

  • Fireman
  • Group: Active Member
  • Posts: 230
  • Joined: 04-April 14
  • Gender:Male
  • Simulator:MSTS & OR
  • Country:

Posted Today, 01:19 AM

Thanks James for the detailed insight on how the cameras near plane and z-buffer are related. I have come up with even more questions.

The camera 8 seems to give me the best result in almost every situation. Especially in my first screenshot it is just to see on the left that the terrain is displayed over the track ballast, what actually corresponds to the scene. The terrain is slightly higher than the base plate of the track and only the rails should be visible. The right one with the headout camera (key "End") sees through the terrain to gravel of the track shape, whats not correspont to the scene. Also, the signal sign on the buffer pile is displayed correctly with the camera 8.

What do you mean by „it makes the further-away surfaces worse.“ A loss of visual quality of distant objects? In my second screenshot I can hardly see any differences of objects in the distance. Only in the foreground, the gully is not displayed and the rails are seen as interrupted, if you do not use the camera 8.

What near plane adjustment does MSTS have for its yard cam? In MSTS, I always have a WYSIWYG impression when I adjust objects. What I build and adjust with the MSTS RE is shown in the (MSTS) game as well. But unfortunately not in OR. There I regularly get a lost buffer signal signs :-) and the track gravel often breakes through the terrain.
Attached Image: NearPlane.jpg


Do you mean it is possible to make the near plane pro camera user-adjustable? Maybe under Experimental or with the middle mouse button + another button.
I would find it easier to work, if at least the camera 8 in OR corresponds more to the yard cam of MSTS.

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