Elvas Tower: OR fps taking a dive - Elvas Tower

Jump to content

  • 7 Pages +
  • 1
  • 2
  • 3
  • 4
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

OR fps taking a dive Oh no, not again... Rate Topic: -----

#16 User is offline   James Ross 

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

Posted 01 May 2013 - 05:31 AM

Ah, I see. Thanks, useful to know the skipped ones are the same as the previous one.

#17 User is offline   disc 

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

Posted 01 May 2013 - 07:07 AM

Do the developers though about converting some performance critical part of OR to native? (as i heard .net have a feature for this, called "native images". Maybe it would speed up the game.
But still, i think the best solution for performance problems would be the draw call batching/ or new 3d engine. It's clearly vistible from the examples above, that always the render thread limits the overall performance of the game.

#18 User is offline   James Ross 

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

Posted 01 May 2013 - 07:39 AM

View Postdisc, on 01 May 2013 - 07:07 AM, said:

Do the developers though about converting some performance critical part of OR to native? (as i heard .net have a feature for this, called "native images". Maybe it would speed up the game.


Yes, it is one of many options. However, a large portion of Open Rails's rendering time (which you correctly note below is often the limiting factor) is spent in native calls already. Almost all native execution time is spent in the draw calls and related calls in to XNA (which then calls DirectX directly). It's not completely clear how much of the time is spent in interop (the work needed for .NET to call native) and how much is in DirectX and the graphics drivers, but I believe it is actually weighted towards the latter.

It is because of this that I don't believe replacing any part of the rendering pipeline with native versions will, in itself, make a worthwhile difference in performance. However, if anyone has actual data regarding this, I'd certainly be interested in seeing it.

We have, though, been looking at newer versions of XNA (i.e. 4.0) and alternatives (e.g. ANX) as well as non-XNA-like solutions (e.g. SharpDX) to see if the performance of the calls is a factor of the CLR (.NET) version, XNA version, XNA vs. alternatives or intrinsic to DirectX.

View Postdisc, on 01 May 2013 - 07:07 AM, said:

But still, i think the best solution for performance problems would be the draw call batching/ or new 3d engine. It's clearly vistible from the examples above, that always the render thread limits the overall performance of the game.


Some of the ways the engine appears to work is due to MSTS's poorly thought-out content, i.e. shapes will regularly use a whole swathe of different textures that could have - if anyone had been bothered - been turned in to a single texture atlas (or maybe two, for alpha blended and opaque). Unless we, in OR, dynamically do texture atlasing (which isn't going to be much fun) the way these MSTS shapes are drawn in so many bits is mostly fixed.

Regarding "draw call batching", there's some confusion of what this phrase means, it seems. One definition is just about the order draw calls are done: Open Rails already puts all the draw calls for the same material (texture + state) together and only initialises the shader once, so it satisfies this definition already. On the other hand, if you mean something more like "display lists" (as I think OpenGL calls them) or "command buffers" (as DirectX calls them), where by the application makes only 1 call, that's another story. I am very interested in any ability to do display lists/command buffers. I have not seen anything intrinsic to XNA for doing them, though, but there are things that might be interesting to try, like Parallel Rendering with DirectX Command Buffers.

#19 User is offline   markus_GE 

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

Posted 01 May 2013 - 10:34 AM

Wow, I never thought this thread would turn out that "abstract" :)

Here are my further findings during experimenting (mostly registry stuff for "unofficial" settings): ShadowAllShapes enabled (I forgot to mention above, that I always have it enabled) I get at First Street Yard, LA, on the Surfliner2...
  • ~19 fps, if: ShadowMapBlur 1, ShadowMapCount 4, ShadowMapResolution 1024 (all the default settings)
  • ~28 fps, if: ShadowMapBlur 0, ShadowMapCount 2, ShadowMapResolution 1024 (however, this turns out to look "like the southern end of a northbound husky", as Genma Saotome once called an ugly steam engine :) )
  • ~ 26fps, if: ShadowMapBlur 0, ShadowMapCount 2, ShadowMapResolution 2048 (looks a bit better)
  • ~ 25 fps, if: ShadowMapBlur 0, ShadowMapCount 3, ShadowMapResolution 1024 (about same as above)
  • ~ 24 fps, if: ShadowMapBlur 0, ShadowMapCount 3, ShadowMapResolution 2048 (looks again a bit better, is the compromise I now found)
For all of these I used ShadowAllShapes 1, Viewing distance 3000m, DM 50km, SE 3, min length 50m, wire on (although none to show), show trainlights & precipitation. The latter ones, including all from SE on, were always the same during all test I mentioned within this thread.

#20 User is offline   disc 

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

Posted 01 May 2013 - 11:33 AM

View PostJames Ross, on 01 May 2013 - 07:39 AM, said:

Some of the ways the engine appears to work is due to MSTS's poorly thought-out content, i.e. shapes will regularly use a whole swathe of different textures that could have - if anyone had been bothered - been turned in to a single texture atlas (or maybe two, for alpha blended and opaque). Unless we, in OR, dynamically do texture atlasing (which isn't going to be much fun) the way these MSTS shapes are drawn in so many bits is mostly fixed.


Of course a lot is depending on the content, but if there are 1000 identical trees in the view for example, and if those could be drawn by a single draw call, that would make a big difference.


About the tests: I thought that ShadowMapCount is controls shadow map "LODs", so if 4 is set and 2048*2048 shadowmapResolution is set, then there will be a 2048x2048 map for the closest objects, 1024x1024 for more distant, 512 even more distant, and 256x256 for the most distant objects. So lowering this would cause performance impact, but the opposite happens. So what is is that ShadowMapCount?

#21 User is offline   markus_GE 

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

Posted 01 May 2013 - 12:10 PM

View Postdisc, on 01 May 2013 - 11:33 AM, said:

About the tests: I thought that ShadowMapCount is controls shadow map "LODs", so if 4 is set and 2048*2048 shadowmapResolution is set, then there will be a 2048x2048 map for the closest objects, 1024x1024 for more distant, 512 even more distant, and 256x256 for the most distant objects. So lowering this would cause performance impact, but the opposite happens. So what is is that ShadowMapCount?



I also thought so at first, but then, why not try, and look what it did :) And yes, I would also like to know that (obviously forgot to add it in the post above...)

#22 User is offline   James Ross 

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

Posted 02 May 2013 - 11:38 AM

View Postdisc, on 01 May 2013 - 11:33 AM, said:

About the tests: I thought that ShadowMapCount is controls shadow map "LODs", so if 4 is set and 2048*2048 shadowmapResolution is set, then there will be a 2048x2048 map for the closest objects, 1024x1024 for more distant, 512 even more distant, and 256x256 for the most distant objects. So lowering this would cause performance impact, but the opposite happens. So what is is that ShadowMapCount?


That's not quite how it works; it generates each shadow map at the same resolution (e.g. 1024x1024) but each subsequent one covers a much larger area from the camera. Reducing the number of shadow maps should increase performance, as should lowering their resolution.

#23 User is offline   markus_GE 

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

Posted 02 May 2013 - 12:06 PM

Yeah, that´s also what I experienced - however, it´s just suitable for finetuning performance VS graphics, like I did. It doesn´t really affect framerates, far less that the ShadowMapBlur option. What for is that actually inplemented? I personally think, with it turned of the shadows look much more realistic..

#24 User is offline   James Ross 

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

Posted 02 May 2013 - 01:05 PM

View Postmarkus1996, on 02 May 2013 - 12:06 PM, said:

Yeah, that´s also what I experienced - however, it´s just suitable for finetuning performance VS graphics, like I did. It doesn´t really affect framerates, far less that the ShadowMapBlur option. What for is that actually inplemented? I personally think, with it turned of the shadows look much more realistic..


The blurring is, I believe (it was a while ago that I implemented this) to soften the edges of the shadows to avoid sharp jaggy edges. I'm not really sure what the difference looks like in the game today though...

#25 User is offline   disc 

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

Posted 03 May 2013 - 02:18 AM

View PostJames Ross, on 02 May 2013 - 01:05 PM, said:

The blurring is, I believe (it was a while ago that I implemented this) to soften the edges of the shadows to avoid sharp jaggy edges. I'm not really sure what the difference looks like in the game today though...


it's still needed for that reason, however it blurs too much. 1024 or above the shadowmaps aren't so jaggy. so blur intensity could be reduced.

#26 User is offline   markus_GE 

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

Posted 03 May 2013 - 04:41 AM

At the 2048 resolution I´m using now (3 shadow maps), it´s alsoo acceptable without blur - if you don´t zoom in zo half a metre :sweatingbullets:

#27 User is offline   Metro4001 

  • Fireman
  • Group: Posts: Active Member
  • Posts: 201
  • Joined: 22-December 12
  • Gender:Male
  • Simulator:Open Rails
  • Country:

Posted 15 May 2013 - 07:26 PM

I hate to bump an old thread but whooooo, OR framerates have definitely taken a dive. I don't understand the rhyme or reason for it. I'm running an activity on the Scenic Sub 2.0 and the framerates range from 1-70, but average about 40. OR doesn't seem to like vegetation near the tracks at all. I can go through certain areas and the framerates are fairly good and go through seemingly identical areas and the framerates drop to the teens, or worse. AI trains don't have any bearing on this. I look at the memory usage on my graphics card and it's about 900 out of 2500mb. It's a GTX570. Any tips?

#28 User is offline   spud 

  • Conductor
  • Group: Status: Inactive
  • Posts: 365
  • Joined: 05-May 10
  • Gender:Male
  • Location:Pensacola
  • Country:

Posted 26 May 2013 - 06:47 AM

Just for comparison I ran the same scenerio with v1251 and v1605 with nothing different or changed and there is a 50% drop in FPS between the two versions.
:furiousPC:

#29 User is offline   copperpen 

  • Executive Vice President
  • Group: Posts: Elite Member
  • Posts: 3,192
  • Joined: 08-August 05
  • Gender:Male
  • Simulator:MSTS & OR
  • Country:

Posted 27 May 2013 - 09:17 AM

I too have just run a comparison on one activity using 1265 and X1614 using the same standard starting view. In both cases the FPS steadied on 150, so no FPS drop here.

#30 User is offline   markus_GE 

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

Posted 27 May 2013 - 09:38 AM

As I somewhere above was requested to do so, would you mind telling what your render and updater process values are like like? (in F5 hud press shift + F5 as many times, until you see the values)

Cheers, Markus

  • 7 Pages +
  • 1
  • 2
  • 3
  • 4
  • Last »
  • 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