PC Definitive Stutter Fix Via Engine.ini Settings

Discussion in 'TSW General Discussion' started by dbrunner#4864, Jun 1, 2023.

  1. Teflon490

    Teflon490 Active Member

    Joined:
    Mar 29, 2020
    Messages:
    200
    Likes Received:
    151
    Clearly you're not new here, so you should already know how DTG operates in regards to fixing stuff :)
     
    • Like Like x 1
  2. Teflon490

    Teflon490 Active Member

    Joined:
    Mar 29, 2020
    Messages:
    200
    Likes Received:
    151
    RTSS (Riva Tuner), either separately or ideally with MSI Afterburner (included in its install package)(if you have nVidia card) is the best for this, it gives you an OSD in games that you can customize to your liking and it will show you (among other things) also the current interface in use (DX9/11/12, OpenGL, Vulcan...)
     
  3. Scorpion71

    Scorpion71 Well-Known Member

    Joined:
    Oct 24, 2017
    Messages:
    1,106
    Likes Received:
    2,449
    Because this is not a one fix, fixes all. As an example, these (and many similar settings in the past) make stuttering worse on my machine (which is no slouch!), infact it doesn't like DX12 either on TSW3
     
    • Like Like x 2
    • Helpful Helpful x 1
  4. Quentin

    Quentin Well-Known Member

    Joined:
    Dec 8, 2016
    Messages:
    531
    Likes Received:
    536
    Scorpion is right. Even simply enabling DX12 can have adverse effects, depending on the 'power balance' between CPU and GPU.
     
    • Helpful Helpful x 2
  5. Paskoc

    Paskoc New Member

    Joined:
    May 27, 2018
    Messages:
    22
    Likes Received:
    11
    Thank you very much!
    I'm already using afterburn.
    So i'm looking for the right point, to enable the right line to show the DirectX Version in OSD.
     
  6. Teflon490

    Teflon490 Active Member

    Joined:
    Mar 29, 2020
    Messages:
    200
    Likes Received:
    151
    Look for tutorials on YT on how to enable the OSD menu in Afternurner using RTSS, and the DirectX version will be included in the line showing FPS.
     

    Attached Files:

  7. solicitr

    solicitr Well-Known Member

    Joined:
    Jun 20, 2020
    Messages:
    13,055
    Likes Received:
    19,905
    To begin with, its performance demands are substantial and it will crush an older/weaker PC.
     
  8. Paskoc

    Paskoc New Member

    Joined:
    May 27, 2018
    Messages:
    22
    Likes Received:
    11
    I already found it yesterday evening.
    You are great and helpfull community!

    Thanks a lot.

    Paskoc
     
  9. dbrunner#4864

    dbrunner#4864 Well-Known Member

    Joined:
    Mar 25, 2021
    Messages:
    489
    Likes Received:
    692
    Well i guess its to hard for developers to reliable implements these settings or they might not consider them usefully or a priority. In order to get rid of the stutter you need to implement optimizations for the tile loading and the shader compilation, just as in the engine.ini settings. Actually some modern games with Unreal engine or even others do perform a shader optimization/compilation run when you start the game. For TSW since it has multiple routes and all behave like a game it would probably take hours if this would be the case. A one time shader compilation run before starting a certain route would be much better. Also the game needs to jump to DX12 since there are serious gains when run under this, but i suppose again they don't want to risk it by going DX12 official yet.

    Many thanks, late to the reply here. The easiest way to find what DirectX support a game has is to search info about the graphic engine on google / wikipedia. Overclocking programs like MSI Afterburner might also display what graphic engine is currently running via Overlay but i don't think its worth it just for this.
     
    • Helpful Helpful x 1
  10. Teflon490

    Teflon490 Active Member

    Joined:
    Mar 29, 2020
    Messages:
    200
    Likes Received:
    151
    Include it in the options then, lots of other games have DX12 as an experimental feature and work just fine, who would have problems can simply switch back to DX11.
    Same goes for other "fixes and tweaks", that are proven to work for majority of users that tried it. Nobody said it has to be hardcoded without possibility to turn it off. But that would actually require to generate some additional effort in DTG, and this would cut into profits, so it is low-to-no priority.
     
    • Like Like x 1
  11. CryPosthuman

    CryPosthuman Member

    Joined:
    May 24, 2020
    Messages:
    54
    Likes Received:
    40
    I don't know if you know that or if I got that right:
    UE4.26 (TSW3) is not compatible with UE5.x. At the same time as UE5 was released, there was a special last release of UE4, the 4.27 which gave a more compatible version to migrate to UE5. That was mainly for smaller projects to shortly go to UE5.
    Migrating from UE4.26 to UE5 is not possible (in a "simple" migrating way).
    The main issue with UE5 is, that a lot of core code, belonging to old tech and engine features, was removed or massively changed. If you have content on UE4 with that code (I bet for TSW that's the case), migrating will not work without a technical rework.
    (that, is what I understand from the engine programmers in my dev team)
     
    Last edited: Jun 13, 2023
    • Like Like x 3
  12. So if TSW4 goes to UE5 then we would have to accept the TSW3 content stays on UE4. I am happy with that.
    Right now development seems to quickening its pace on content-routes!
    It is so hard to start TSC now. It looks very cartoonish. TSW3 is so real.
     
    • Like Like x 1
  13. oporopolist#1682

    oporopolist#1682 Member

    Joined:
    Jan 9, 2022
    Messages:
    56
    Likes Received:
    87
    TSW3 installed from the M$ store does appear to be running DX12 "officially" by default, while Epic and Steam platforms remain DX11 unless adding the "-DX12" command line option.

    ISTR reading somewhere that it is using DX12 on XBOX platforms too. Maybe someone from DTG can confirm that?
     
    • Like Like x 2
  14. Paskoc

    Paskoc New Member

    Joined:
    May 27, 2018
    Messages:
    22
    Likes Received:
    11
    I'm already using afterburner for several years, so it is no problem for me to use the OSD feature from this program.
     
    • Like Like x 1
  15. solicitr

    solicitr Well-Known Member

    Joined:
    Jun 20, 2020
    Messages:
    13,055
    Likes Received:
    19,905
    XBox One and X|S only run under 12; they can't handle 11.
     
    • Like Like x 1
  16. dbrunner#4864

    dbrunner#4864 Well-Known Member

    Joined:
    Mar 25, 2021
    Messages:
    489
    Likes Received:
    692
    Well for those wondering the ini tweaks posted on front page also work on DX11. The thing is that these are best with DX12 since they complement each other superbly. DX11 tends to give lower performance since its not using more modern CPU/GPU to they're full extent. DX12 on the other hand give some good performance boost (10 fps or more in worse scenarios) since it can exploit hardware much better and video card drivers are far more optimized for DX12, but also introduces more stuttering. So with the mentioned engine.ini tweaks you can have more FPS and less stutter when used in combination with DX12, practically a win win situation.
    I think these tweaks work or any system as long as some base pool values are adjusted properly for the amount of VRAM the system has. Also with these it doesn't matter if you are on HDD or SSD it will work each time since neither storage or system performance is the root of the problem, is just how the engine is optimized to work.
     
    • Like Like x 1
  17. Paskoc

    Paskoc New Member

    Joined:
    May 27, 2018
    Messages:
    22
    Likes Received:
    11
    I have already don this in the past. Thank you
     
    Last edited: Jun 16, 2023
  18. Mavadelo

    Mavadelo New Member

    Joined:
    Mar 25, 2023
    Messages:
    10
    Likes Received:
    4
    Will this do anything for us poor people that still run things like (in my case) a GTX1050 ?
     
    • Like Like x 1
  19. dbrunner#4864

    dbrunner#4864 Well-Known Member

    Joined:
    Mar 25, 2021
    Messages:
    489
    Likes Received:
    692
    Hello. does that GTX 1050 have 4 GB of VRAM? I dont think the tweaks where tested on such a card but they might work

    You should try these settings. I modified the Poolsize and MaxTempmemAllowed to suit more you VRAM. Also set you ingame Texture settings to something lilke MEDIUM since you dont have to much VRAM overall.

    [SystemSettings]
    r.CreateShadersOnLoad=1
    r.Streaming.LimitPoolSizeToVRAM=0
    r.Streaming.PoolSize=2000
    r.Streaming.MaxTempMemoryAllowed=1200
    r.RenderTargetPoolMin=1200
    r.Streaming.FramesForFullUpdate=2
    r.Streaming.Boost=2
    r.GTSyncType=1
    r.OneFrameThreadLag=1
    s.ForceGCAfterLevelStreamedOut=0
    s.ContinuouslyIncrementalGCWhileLevelsPendingPurge=0
    s.LevelStreamingComponentsUnregistrationGranularity=10
    s.LevelStreamingComponentsRegistrationGranularity=30
    r.Streaming.NumStaticComponentsProcessedPerFrame=200
    gc.TimeBetweenPurgingPendingKillObjects=200

    Good luck , let me know if it makes a difference :)
     
    • Helpful Helpful x 2
  20. CryPosthuman

    CryPosthuman Member

    Joined:
    May 24, 2020
    Messages:
    54
    Likes Received:
    40
    I now looked deeper into the topic and even asked my engine programmer colleague about that:
    So, the migration from UE4.26 to UE5 itself, the project data and maps, isn't the problem. That works or should work. However, you would have to go to all static assets in all DLCs and maps to get the advantage of things like Nanite. It's a simple "checkbox", but it has to be made on all assets.
    The more severe issue is, that you can't migrate the game code! Or at least that has to be adjusted manually basically regarding everything. I am not 100% sure how this is for blueprints and similar systems like DTGs Simugraph. I don't think that Simugraph is easy to migrate into UE5. After all, UE4 is not a future prove platform and I am not sure that TSW, as it is now, has a future in UE5.
     
    • Like Like x 1
  21. When running DX12 I lose my mouse pointer in the UI, not during driving.

    Is there a fix?

    If I try DX11 will my shaders get wiped?
     
  22. atledreier

    atledreier Member

    Joined:
    Aug 23, 2022
    Messages:
    88
    Likes Received:
    35
    I still get the very rare stutter, but generally it's very smooth now. Not sure if it's those settings or something else, but at least I don't really think about stutters any more. :)
     
  23. dbrunner#4864

    dbrunner#4864 Well-Known Member

    Joined:
    Mar 25, 2021
    Messages:
    489
    Likes Received:
    692
    That is strange, i did not hear about this issue before. Try switching between borderless/fullscreen window to fullscreen see if that helps. If not maybe ALT+TAB and going back to the game
    Since the shaders where created for DX12 going to DX11 will result in creating a new batch of compiled shaders for this render.

    That is desired effect. Stutter should be gone, the only thing that remains are some rare random hitching while the game might be loading some incoming train or maybe some heavy tile. But there are very rare and completely acceptable :)
     
    • Like Like x 1
  24. Thanks!
     
  25. dbrunner#4864

    dbrunner#4864 Well-Known Member

    Joined:
    Mar 25, 2021
    Messages:
    489
    Likes Received:
    692
    No problem. Hope you resolve the cursor issue :)
     
  26. I'm just happy to get rid of the stuttering. :)

    It's a great fix!
     
    • Like Like x 2
  27. Isaak

    Isaak Well-Known Member

    Joined:
    Aug 5, 2019
    Messages:
    382
    Likes Received:
    449
    I can confirm that these settings improve stuttering behaviour a lot. Let's hope we can keep using them when TSW receives new updates (or DTG makes them default over time). Thanks for the hint!
     
    • Like Like x 1
  28. dbrunner#4864

    dbrunner#4864 Well-Known Member

    Joined:
    Mar 25, 2021
    Messages:
    489
    Likes Received:
    692
    Glad it also works for you. The settings should remain stable at least until TSW4 will come out, and than maybe cause random instability and crash on newer routes (just like it happened when TSW3 came out after TSW2) resulting in another lengthy and tedious adventure to remove / add ini lines individually until the problematic ones are found. Hopefully this will not be to soon :)
     
    • Like Like x 1
  29. ethcr#4723

    ethcr#4723 Member

    Joined:
    Sep 5, 2022
    Messages:
    56
    Likes Received:
    9
    Do you have to run each route you want to optimize to improve the frame drops?
     
  30. CryPosthuman

    CryPosthuman Member

    Joined:
    May 24, 2020
    Messages:
    54
    Likes Received:
    40
    Yes, the shader compiling is for each route separately - in the first run they get complied and on all further runs they get loaded from the start.
     
  31. ethcr#4723

    ethcr#4723 Member

    Joined:
    Sep 5, 2022
    Messages:
    56
    Likes Received:
    9
    Even if you do a 2 minute run it will compile them? Like into a depot service. Or do you have to drive the whole route?
     
  32. dbrunner#4864

    dbrunner#4864 Well-Known Member

    Joined:
    Mar 25, 2021
    Messages:
    489
    Likes Received:
    692
    No, it will compile the shaders as they are loaded for each part of the route so it will only cover the section you already covered
    As example, if you do a 10 miles min run along a long route, quit and than do the same run again, you will notice that stutter is gone for about the same 10 miles of the route but once you get out on new territory stutter starts as shader was not compiled and saved for that area.
    Now there are some cases where during initial run you might see that stutters starts going less and less as you progress halfway off the route during initial run as shader cache is build up and then just reused but where are still talking about going at least half of the route

    That is strange, I think everyone trying these settings reported they work as intended and stutter is almost completely reduced. Are you sure you are doing 1 run in order for the shader cache to get saved, and than a second run on same route in order to actually see the difference?
     
  33. ethcr#4723

    ethcr#4723 Member

    Joined:
    Sep 5, 2022
    Messages:
    56
    Likes Received:
    9
    Hasn't worked for me :[
     
  34. dbrunner#4864

    dbrunner#4864 Well-Known Member

    Joined:
    Mar 25, 2021
    Messages:
    489
    Likes Received:
    692
    That is unfortunate, i wonder what could be the cause for that.
     
  35. ethcr#4723

    ethcr#4723 Member

    Joined:
    Sep 5, 2022
    Messages:
    56
    Likes Received:
    9
    The thing is. It has only started happening recently. I have never had this issue before.
     
  36. i have noted that when coming back to the pc the next day after it starts to shutter also today i had the game crash to desktop on the harlem line just as i was entering to tunnel doing a 1 hour trip from grand central this used to be a major issue know with that route on TSW2 But fort it was fixed sounds like dovetail didnt fix it i have to say shutters will nevr be fully fix until we get to unreal 5 and a better memory bay for the game
     
  37. Hello, I'm currently using your settings and I have used Afterburner to confirm the game is running in DX12. The stuttering has been reduced but I still get texture pop-in even on the second run of a route or tutorial. My GPU is RX 7900 XTX (24GB), this is the only game that is giving me this issue and I've even optimized my setup so I don't get cpu or gpu bottlenecking, it's a pretty balanced build. I was wondering if you could help me with some custom settings if you have the time. Thank you very much for your help.
     
  38. 5cip

    5cip Active Member

    Joined:
    Apr 23, 2020
    Messages:
    387
    Likes Received:
    226
    Thats the best ini till now thx 4 this thread !
     
  39. dudders

    dudders Well-Known Member

    Joined:
    Nov 25, 2021
    Messages:
    342
    Likes Received:
    420
    Omg amazing. First run on great western same old stutter hear and there got to the end then replayed the route it was smooth as silk it's like magic has been sprinkled over it. I can't thank you enough what a difference everyone should be using this
     
    • Like Like x 1
  40. dudders

    dudders Well-Known Member

    Joined:
    Nov 25, 2021
    Messages:
    342
    Likes Received:
    420
    So update. After shutting down pc then coming back to it later the same route has the stuttering again until I drive it then rerun it and its smooth. Does this mean it doesn't remember the last game play and I have to do this every time can someone help me here please. Thank you
     
  41. Scorpion71

    Scorpion71 Well-Known Member

    Joined:
    Oct 24, 2017
    Messages:
    1,106
    Likes Received:
    2,449
    Would love to physically be at the PC at those who are saying stutters are gone and runs smoothly
     
    • Like Like x 4
  42. CrAzZyKiLLa

    CrAzZyKiLLa Well-Known Member

    Joined:
    Mar 17, 2018
    Messages:
    399
    Likes Received:
    875
    Since TSW2 days I have used the following Engine.ini tweaks and have almost completely eliminated stutters for a long time now with only these (obviously this will greatly depend on your pc specs, RAM and drive speeds):

    r.Streaming.FullyLoadUsedTextures=1
    r.Streaming.HLODStrategy=2
    r.Streaming.Boost=2
     
    • Helpful Helpful x 1
  43. 5cip

    5cip Active Member

    Joined:
    Apr 23, 2020
    Messages:
    387
    Likes Received:
    226
    normally it should run smooth
    how are ur settings of shader cache ? mine is 10GB
    preloaded textures = 3
    vsync on
    fps cap = 61
     
  44. I found this for adjusting the shader cache size on AMD cards.

    https://www.reddit.com/r/Amd/comments/uh3dbz/about_shader_cache_size_on_gpu_settings/
     
  45. Teflon490

    Teflon490 Active Member

    Joined:
    Mar 29, 2020
    Messages:
    200
    Likes Received:
    151
    I think that some have lower end HW that stutters a lot no matter what and they did not have these ini lines to retain the shaders, so this made it bearable for them when stutter is reduced to say once per 30 seconds. But for me the immersion is taken away even when it stutters once per 60 seconds, and I think I start to understand what the people were seeing before this fix... the first time I run any route after aGPU driver update, where DX cache folder is deleted, I get pretty heavy stutters lasting for up to 5 seconds. Then, once the shaders are created, I get no more of this long stuttering, but I still get occasional stutters once per 20-60 seconds (depending on the route), but only for a fraction of a second, it is never again those long lasting ones or even ones where your game stops for a second or 2 completely.

    So I understand if people were getting these "shader-compilation" stutters every time they fired up the game, it might be a big difference to jump to those occasional-every-30-seconds stutters, which are bearable, but still distracting, at least for me. And I bet ALL get them, even the ones that claim it is silk-smooth for them, after the fix.
     
  46. dudders

    dudders Well-Known Member

    Joined:
    Nov 25, 2021
    Messages:
    342
    Likes Received:
    420
    Where do I find the shader cache
     
    • Like Like x 1
  47. dudders

    dudders Well-Known Member

    Joined:
    Nov 25, 2021
    Messages:
    342
    Likes Received:
    420
    Found it under nvidia settings was on auto I think have changed it to 10 gig
     
    • Like Like x 1

Share This Page