Dynamic Shadow performance adjustments

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • twpol
    Senior Member
    • Oct 2009
    • 434
    • United Kingdom

    #1

    Dynamic Shadow performance adjustments

    A number of people have reported that they get unexpectedly large drops in FPS with dynamic shadows enabled; since these are a large, complex and expensive feature an FPS drop is expected, and is expected to be more than in v360. However, there are a number of hidden options that may alleviate some of the loss at the cost of visual quality.

    To set any of the hidden options, you need to open "regedit" and navigate to the key "HKEY_CURRENT_USER\Software\OpenRails\ORTS" in the left-hand side of the window. Chances are, there will be some settings on the right.

    The following settings need to be created, either through the menu Edit > New > DWORD (32-bit) Value or by right-clicking the right-hand side of the window and selecting the same option.

    You can edit values by double-clicking the name. When editing the values, please select the "Decimal" option on the right.

    ShadowMapBlur

    1 (default) enables the blur effect applied to the shadow map to produce smoother, softer shadows.
    0 disabled the blur effect.

    ShadowMapResolution

    1024 (default) uses 1024x1024 textures for the shadow maps - this is already 1/4 the width and height of v360's shadow maps.
    512 uses smaller shadow maps with corresponding loss in accuracy.
    256 uses even smaller shadow maps.
    128 is about the smallest you should go.

    My advice is to try turning off the blur first and only if that does not satisfactorily help, then turn down the resolution.

    I'd like everyone to report back with only their stable FPS values without dynamic shadows, with dynamic shadows, and with any combinations of the above hidden options. I am not interested in the process percentages or wait times at this point - only the stable FPS - and would like to keep this thread strictly on topic.

    Thanks.
    James Ross
    Open Rails Management Team
    sigpic
  • GoGoran
    Senior Member
    • Jun 2010
    • 880

    #2
    Thanks for making these settings publicly available. So here it goes:

    ORTS v0.645
    Framerates with different DynamicShadow settings

    - all framerates are average (stable) values -
    -- always on the same route/time/place/consist, ca. 2km of route driven each time to find out average framerate --


    ------------ ---------- ------------ ---------- ------------ ---------- ------------ ---------- ----------
    Preliminary Notice: Framerate WITHOUT Dynamic Shadows: 35 fps stable !
    ------------ ---------- ------------ ---------- ------------ ---------- ------------ ---------- ----------




    Now the Framerates WITH DynamicShadows:

    1st setting: default Blur ON, 1024: 12 fps <-- unacceptable performance !

    1.5th setting: Blur ON, 768: 16 fps

    1.6th setting: Blur ON, 640: 19 fps

    1.7th setting: Blur ON, 576: 20 fps

    2nd setting Blur ON, 512: 21 fps <-- satisfying visual impression, best performance !

    2.5th setting Blur ON, 384: 20 fps

    3rd setting Blur ON, 256: 19 fps

    ------------ ---------- ------------ ---------- ------------ ---------- ------------ ---------- ----------

    4th setting: Blur OFF, 2048: 12 fps

    5th setting: Blur OFF, 1536: 15 fps

    6th setting: Blur OFF, 1024: 23 fps

    7th setting: Blur OFF, 512: 20 fps

    Comment: Blur off always results in sharp, boxy shadow edges, which looks unrealistic, even with a 2048 pixel shadow map size

    ------------ ---------- ------------ ---------- ------------ ---------- ------------ ---------- ----------



    Conclusion: Setting Blur ON, 512 pixels shadow map size is the best compromise between visual impression and performance. But as always, the best thing to do might be to give the user the choice.
    Last edited by GoGoran; 03-11-2011, 13:27.
    sigpic

    Comment

    • longiron
      1000 Post Veteran and Moderator

      • Jan 2007
      • 1453
      • Just south of NYC

      #3
      Thanks for the testing and information, it's really helpful to the team.
      Chris
      "True rail fans have two favorite railroads. The B&O and one other."

      Comment

      • twpol
        Senior Member
        • Oct 2009
        • 434
        • United Kingdom

        #4
        Originally posted by GoGoran
        Conclusion: Setting Blur ON, 512 pixels shadow map size is the best compromise between visual impression and performance. But as always, the best thing to do might be to give the user the choice.
        Thanks for the valuble data; it looks like turning blur off was just as much an improvement for my GeForce 8400 GS so I'll probably concentrate on improving the performance of that and perhaps give the user a resolution control, depending on what others find.
        James Ross
        Open Rails Management Team
        sigpic

        Comment

        • kox
          Senior Member
          • May 2010
          • 329

          #5
          Watching orts shadows they are looking good (and i can get 60 fps with them even at the most populated places while in TS2012 i get 10 fps at lowest shadows settings with one loco on an empty plain...), but sometimes it's edges are flickering as i see there where the blur comes to effect.
          And another observation about blur. I think it's too much, perhaps it could be a nice feature if we can change the magnitude of the effect, and not just enable or disable it.

          And i saw few things connected to graphics at the console when openrails loading a route:
          -ShadowMapCount what is that? I can be changed from registry like shadowmap resolution? it is 4 by default
          -Shadowdistance (or something) which is 0 by default
          -shadermodel which is 0 (i know what shader model is but what is that zero? BTW my gpu knows shadermodels up to 4.1)
          Last edited by kox; 11-05-2011, 19:19.
          sigpic

          Comment

          • twpol
            Senior Member
            • Oct 2009
            • 434
            • United Kingdom

            #6
            Originally posted by kox
            -ShadowMapCount what is that? I can be changed from registry like shadowmap resolution? it is 4 by default
            Open Rails uses cascading shadow maps, which means that we have multiple shadow maps - each for a different distance away from the camera (a bit like mipmaps).
            You can adjust this value, but only in the 1-4 range. Also, for shader model 2 users, we can only support a single shadow map.

            Originally posted by kox
            -Shadowdistance (or something) which is 0 by default
            This is like the view distance for shadows; however many shadow maps you have (see above) will be spread across this distance in front of the camera. 0 (the default) means "use half the view distance" (view distance is 2000 by default, so this defaults to 1000 effectively).

            Originally posted by kox
            -shadermodel which is 0 (i know what shader model is but what is that zero? BTW my gpu knows shadermodels up to 4.1)
            Open Rails supports shader models 2 and 3, which you can manually select with this setting. The default 0 means "use the best one my graphics card supports". Forcing shader model 2 will limit the graphical features supported.
            James Ross
            Open Rails Management Team
            sigpic

            Comment

            • kox
              Senior Member
              • May 2010
              • 329

              #7
              Thanks for the useful infos. For shadowdistance if 0 means half, then what means 1/4 or and others? -0.5? Or it can't be lowered than half?
              sigpic

              Comment

              • twpol
                Senior Member
                • Oct 2009
                • 434
                • United Kingdom

                #8
                You simply set the distance you want, e.g. 500 (meters).
                James Ross
                Open Rails Management Team
                sigpic

                Comment

                Working...