A Call For Dx12 - Engine.ini Optimizations For Ue V4.26

Discussion in 'TSW General Discussion' started by geloxo, Dec 29, 2021.

  1. geloxo

    geloxo Well-Known Member

    Joined:
    Nov 21, 2018
    Messages:
    956
    Likes Received:
    1,695
    It should affect game globally as I have not noticed that the variable changes when using any route. It looks they kept it as a way to save performance or they just forgot about it when setting the game engine, who knows. I have edited the previous post if you read it again, cause using low resolution light together with the indirect light cache seems to be the problem of the hitching. Disabling the cache and using standard resolution light solves the problem but still creates some stuttering. I´m testing it to see if we can do anything about it but lights appear to be one of the reasons for the tile loading hitching and the stuttering overally.

    Cheers
     
    Last edited: Jan 9, 2022
    • Like Like x 2
  2. Teflon490

    Teflon490 Active Member

    Joined:
    Mar 29, 2020
    Messages:
    159
    Likes Received:
    127
    Excellent work your doing here, thank you for that.

    One question, does this relate to RAM usage, or is it VRAM? If I have 32GB of RAM, can I bump the value higher to use more of RAM, like this?

    gc.TimeBetweenPurgingPendingKillObjects=180
     
  3. geloxo

    geloxo Well-Known Member

    Joined:
    Nov 21, 2018
    Messages:
    956
    Likes Received:
    1,695
    Thanks a lot. That variable relates to how much RAM game uses. You can use much higher values, sure, but it will only turn into more RAM used by garbage which is not adding any positive effect and can even create out of memory situations for your system. On the other hand too low values like 10 seconds will clean a lot but disturb the running threads more. In the previous engine version I was using 900 there indeed but just because garbage collector created much more problems everytime it was triggered, so at that time it was better to use a high cleaning interval. But with current version cleaning has been optimized a lot as far as I have seen and by using the subtasks, parallel GC and multithreaded workers this is much more efficient now without disturbing it too much, even if it´s still a complete pain that requires a lot of tunning. I still prefer to give priority to create/register components rather than to destroy/unregister them, both in the timers and in the granularities. The important thing is to keep always the creation/destruction ratio as much balanced as you can with a reasonable memory usage.

    You can easily monitor how fast your RAM grows by using a very high setting like 10000 there and open windows task manager to see the executable. This value basically disables the cleaning as it will not happen during a regular gameplay. You will see how in a matter of minutes you are easily above 10Gb with high settings, while you should normally be around 4Gb-6Gb. I just updated the first post to add some tweaks to the timers and garbage collector after my own tests. You can try them as well.

    Cheers
     
    Last edited: Jan 9, 2022
    • Helpful Helpful x 1
  4. Speedster

    Speedster Active Member

    Joined:
    Apr 4, 2021
    Messages:
    95
    Likes Received:
    152
    Thanks for this work geloxo ! Driving on Hamburg-Lübeck is very smooth now! I also tested an ICE service on HMA in the Munich direction (with a stop at Pasing) and was getting about 60fps steady at Munich - this is with a 5950X/RTX 3080, 4K resolution, all details set to Ultra, screen percentage 100% and view distance of 2.
     
    • Like Like x 2
  5. geloxo

    geloxo Well-Known Member

    Joined:
    Nov 21, 2018
    Messages:
    956
    Likes Received:
    1,695
    Are you missing any updates? I have one for you :D

    When using texture streaming we can use r.Streaming.Boost=2 to increase the overall texture quality. Default value is 1. Values above 1 will increase the desired mip maps (increase the quality) while values below 1 will decrease them. This enhances a lot the foreground and also prevents blurry or low resolution textures on some assets like trackside boards placed at medium distance. This gives us a similar quality to the one when texture streaming is disabled but still keeping the performance advantages of streaming. I had discarded that variable initially because I didn´t notice the diference, but there´s a difference. You can see an example in the gantry pictures below. Left is default value while right is the enhanced quality.

    Tex1.png

    This setting is anyway optional as it can have an impact of performance. In order to prevent performance drops values higher that 2 should not be used, but could be possible if you find any noticeable quality improvement.

    Cheers
     
    Last edited: Jan 10, 2022
    • Like Like x 5
    • Helpful Helpful x 2
  6. PeteW

    PeteW Active Member

    Joined:
    Jan 3, 2020
    Messages:
    109
    Likes Received:
    86
    Thanks geloxo for the in-depth analysis and suggestions in order to improve performance/quality. Here are my observations.
    I decided after (I think) the UE4.26 change to not buy any more DLC as the stuttering was just too much and really immersion breaking. So I gave your suggestions a whirl on my system (3080, 32GB RAM, NVME SSD). Leaving Munich on HMA without any changes I was getting approx 67 FPS. This is with an UW monitor, 150% screen percentage, Ultra Settings DX12). I see a reduction of approx 10 FPS with the changes and much more with DX11. In all cases the stuttering is still evident. I think there is a minor improvement over the stock. I was using the Ultra settings and 150% screen as it made no odds what I set to whether the stuttering occurred. Even using my 1080p monitor, it still stuttered without the high graphics settings. So thought might as well stick with the best possible eye candy.
    With the changes on DX12, I see the GPU memory just under 7GB and the TSW2 RAM usage sits around 4GB.
    Happy to hear your thoughts. I would take a reduction is visual quality to reduce the stuttering.
     
    • Like Like x 1
  7. geloxo

    geloxo Well-Known Member

    Joined:
    Nov 21, 2018
    Messages:
    956
    Likes Received:
    1,695
    First thing to remember is that stuttering happens cause you can´t maintain a stable fps. To avoid it there are two options:

    1) Use a g-sync monitor --> best solution, as monitor will match its working frequency to the fps value everytime, no matter if it changes. So this completely removes the sttutering caused by the rendering itself in any game.

    2) Use a fixed fps target in game --> still valid, and to be used with regular monitors but requires that your system can reach that fps target. Again, this can remove the rendering stuttering as well as in the previous case.

    But then we also have stuttering (indeed microfreazes or hitching) caused by threads synchronization or bottlenecks when the new levels (map tiles) loading, which is a different story. This is caused because game or system can´t do anymore to handle the scene, in plain words. Something is basically blocking your resources until the whole tile content is resolved by the engine. Currently we have to live with this limitation as it happens even with lowest settings and in both small and big tiles. It´s not a problem caused by using crazy settings but a matter of design of the tiles themselves and the way the engine works as of today. With heavy tiles containing yards and trains inside this is basically a granted freeze.

    With a 3080 you should be able to stay above 50fps or even 60fps most of the time, so I would start with a 50fps target first. Set it in the game advanced options menu. Don´t get obsessed with high fps as what matters here is a stable value which can be maintained over the time. You can also use a 200% scaling instead of a 150%, as usually it performs better is most cards and gives you also better antialias results because it´s scaling both vertical and horizontal ranges with the same factor of 2.

    My settings will help you to reach stable fps most of the time as they remove many of the artificial lags and stuttering created by the game threads, and maybe give you a boost in fps as well, but the stuttering will always exist in game, and in any game, whenever you can´t maintain a fixed fps value. That´s why setting an affordable fps target for your system is very important in that case. If you see that you can reach 67fps then set a value below that and you will be fine. The problem is that each route behaves different and maybe you need to go as low as 50fps to be sure that in most of the routes you can reach at least 50fps most of the time. That´s why Vsync method is always a pain.

    Anyway I have tweaked the settings a bit today. I increased the frame timers to allow higher creation rates. This should help a bit more to stay on stable fps during regular rendering and gives some room for the new texture streaming quality I added today. Forget about miracles on loading big tiles as this is currently the weak point of the engine until we discover what´s causing it or they fix it. You may want to try the new values anyway. If you struggle to reach an acceptable fps target then reduce quality a bit (viewdistances, LODs, etc) as this can help too. Every setting is explained in the first post :)

    Cheers
     
    Last edited: Jan 11, 2022
    • Helpful Helpful x 1
  8. PeteW

    PeteW Active Member

    Joined:
    Jan 3, 2020
    Messages:
    109
    Likes Received:
    86
    Thanks once again for a detailed response. Much appreciated. My BENQ monitor supports Freesync. So I don't think G-sync is an option. To my untrained brain, I actually didn't think that would come into it as I thought that it was the screen tearing was ut's mean feature. Interestingly, I do have my frame rate capped but at 100 - which is the HZ of the BENQ monitor (EX3501R) - reasoning was in general I see the FPS hit that on most routes and saw little benefit of more FPS than the monittor could refresh . I picked HMA as a test route as I know that is one of the worst FPS offenders.
    I will first try the new settings and then play with a lower FPS cap as you suggest and also see what V-Sync (current;y ON) option to use.
    Also check out 150% vs 200%.. Finally have a re-read of the first post and fathom out which settings to tweak to increase FPS (if necessary) - I'm assuming the green graphic enhancements ones are the ones to focus on i.e. reduce/remove some to increase FPS.
    Thanks once again.

    [Edit]
    I just noticed in my Nvida Control Settings that I have Monitor Technology as G-Sync Compatible.
    Ummmm.
     
    Last edited: Jan 11, 2022
  9. geloxo

    geloxo Well-Known Member

    Joined:
    Nov 21, 2018
    Messages:
    956
    Likes Received:
    1,695
    If you have a freesync monitor that can be G-Sync compatible too. That´s the reason why that option appears in Nvidia control panel. Check this link:

    https://www.nvidia.com/en-us/geforce/products/g-sync-monitors/specs/

    If your monitor is there then take a look at the variable refresh rate column (4th from the right). That would be the frequency range where G-sync will work. Some monitors which are not fully G-Sync compliant but just compatible work above 48 or 60Hz only, for instance. This means that, to simplify the whole thing a bit, if your FPS are above 48 or 60 in game then the monitor will adapt to the fps changes. If your fps are below it won´t and then it will behave as a regular monitor. In that case you may want to tune game settings to try to reach such min fps targets and take advantage of the G-Sync feature.

    Yes, the green portion is the one dealing with graphical quality and reducing those settings will help you to reach higher fps. Check which are the default values (normally they are 1 or 0) and start from there.

    Cheers
     
  10. cavok

    cavok New Member

    Joined:
    Jan 5, 2022
    Messages:
    18
    Likes Received:
    5
    AMD Freesync is the AMD equivalent for nVidia G-Sync BUT only works on AMD GFX cards. Some monitors supports both technologies though..
     
  11. geloxo

    geloxo Well-Known Member

    Joined:
    Nov 21, 2018
    Messages:
    956
    Likes Received:
    1,695
    Exactly. They are similar things at the end: they work at variable refresh rates. Also be sure to set the refresh rate at max available in Nvidia panel just to prevent that game set´s it at 60Hz (default when Vsync is enabled in game). This will allow you to go over the 48-60Hz threshold for some of the compatible monitors. I will update post to make this note.

    Gsync.jpg

    Cheers
     
    Last edited: Jan 11, 2022
  12. PeteW

    PeteW Active Member

    Joined:
    Jan 3, 2020
    Messages:
    109
    Likes Received:
    86
    So I thjink I'm at a loss to what is the issue I see. Neither fixing the FPS of using the G-Sync (which it appears my monitor does not support in full) have any effect on the stutters. So I went back to a minimal setup of Fixed FPS (50), Screen Percent 50%, Graphics all low, removed all of the Green Quality enhancements - looks bloomin awful but no perceptible difference to the amount or length of stutters. It performs similarly at hish graphics settings as low. When the stutters occur, the 50 FPS drops - approx 40 FPS noted for a "long" stutter and a couple 2-5 FPS drop for a smaller stutter. Removing the in-game FPS cap I see 140FPS which jumps around a fair bit. If it drops alot, then a stutter occurs.
    So evenb a plan of going back to a minimum and keep adding more graphic quality till it breaks doesan't work because the minimum setup is not great. I would blame a PC issue. But the same rig runs MS Flight SIm at pretty high settings both on flat screen and in VR with a Reverb G2 headset which is higher res than my monitor!
     
  13. geloxo

    geloxo Well-Known Member

    Joined:
    Nov 21, 2018
    Messages:
    956
    Likes Received:
    1,695
    The quality settings don´t affect the stuttering as far as I have seen. They just give you higher or lower fps, nothing else. I even did tests using the same scenario with x4 viewdistance and all maxed using the green config and I had basically the same stuttering and same fps at the same places as when using default graphical settings. Even more bizarre: with lower quality settings I got worse performance results and the tile loading freezes where much stronger. So, the higher the settings the better as you have less LOD changes, less texture resizing and more amount of data can be handled in one batch in shorter time. That is what gives the best performance results indeed.

    As I said many times the problem of the engine is not the graphical stuttering caused by vertical syncronization on the card, because that can be solved if you stay stable in fps or use G-sync. It´s caused by the short freezes that happen when game loads new levels (map tiles). This can be many times understood as stuttering by users but they are a different thing and that´s what you are facing with the drops below 50fps you explained. It´s just that game threads are being blocked by something until that something finish the task and let the other threads continue with theirs. Nor the GPU nor the CPU are blocking the engine due to poor capacity, unless you run it on a 20 years old system. My system is powerful and I still suffer them, so imagine. But with average systems today you have by far more than the needed power to run this thing. The threads in the engine are the problem. They are simply not efficient enough.

    I also have MSFS and it runs much better while still being a comparable multithread based game as TSW2. There the graphical and processor load is many times higher but it performs really much better despite its own problems. Indeed TSW2 is the worse game in terms of performance I have and I run many simulators and games requiring a high demanding system. I just can´t imagine how they will handle the complex steam trains here with the current problems we have just to move a regular train in a regular map... I hope they deep dive into the core and fix it soon as it´s becoming a serious problem with the increasing amount of details after each new DLC release.

    Anyway what you can try is to increase the frame times in steps of 1 starting from my posted values. The following deal with shaders, async processing and registration and is normally the main source of freezes if they are set too low for your system or lag if set too high:
    • r.ShaderPipelineCache.BatchTime
    • s.AsyncLoadingTimeLimit
    • s.PriorityAsyncLoadingExtraTime
    • s.UnregisterComponentsTimeLimit
    • s.LevelStreamingActorsUpdateTimeLimit
    • s.PriorityLevelStreamingActorsUpdateExtraTime
    I just adjusted some values a bit in first post so that creation/destruction is more balanced and frame times are not so low. I just made a ride in Aachen route with very good results (2 o 3 more relevant freezes, but still very short, and rest of the time it was almost perfect). Same on LGV route. You can use that config as starting point if you want.

    Cheers
     
    Last edited: Jan 11, 2022
    • Helpful Helpful x 3
  14. geloxo

    geloxo Well-Known Member

    Joined:
    Nov 21, 2018
    Messages:
    956
    Likes Received:
    1,695
    Ok... The "crazy horse" settings.
    • x10 viewdistance
    • x10 foliage LOD distance
    • Max static mesh LOD distance
    • x4 skeletal meshes LOD bias + keep buffers in memory (last added variable r.FreeSkeletalMeshBuffers=0, which defaults to 1)
    • Increased streaming pool up to my VRAM limit
    • x2 shadows cache size
    • x2 passenger density
    • 5 minutes garbage cleaning interval
    Basically all those things that hurt put together with an insane memory booking that will be most likely never used. So the last thing you would like to try gave this result: much better performance and less hitching than with the lower quality settings from the first post or with the default viewdistances and LOD scales and with almost an identical memory usage (6Gb VRAM + 4Gb RAM, which is pretty average indeed). Mad world... :|

    If you want to try, here is the settings pack for the experiment. I took a ride from Ausburg to Munich and the whole thing loaded in a single shot when aproaching Munich. I don´t understand this engine... :D

    [SystemSettings]
    r.Streaming.FramesForFullUpdate=2
    r.Streaming.PoolSize=12000
    r.Streaming.MaxTempMemoryAllowed=4000
    r.Streaming.Boost=2
    r.GTSyncType=1
    r.OneFrameThreadLag=1
    r.CreateShadersOnLoad=1
    r.Shadow.WholeSceneShadowCacheMb=4000
    gc.TimeBetweenPurgingPendingKillObjects=300
    gc.NumRetriesBeforeForcingGC=5
    gc.MinDesiredObjectsPerSubTask=20
    s.ForceGCAfterLevelStreamedOut=0
    s.ContinuouslyIncrementalGCWhileLevelsPendingPurge=0
    r.ShaderPipelineCache.BatchTime=2
    r.ShaderPipelineCache.BackgroundBatchTime=0
    r.ShaderPipelineCache.PrecompileBatchTime=0
    s.AsyncLoadingTimeLimit=2
    s.PriorityAsyncLoadingExtraTime=1
    s.UnregisterComponentsTimeLimit=2
    s.LevelStreamingActorsUpdateTimeLimit=2
    s.PriorityLevelStreamingActorsUpdateExtraTime=1
    s.LevelStreamingComponentsUnregistrationGranularity=20
    s.LevelStreamingComponentsRegistrationGranularity=20
    r.Streaming.NumStaticComponentsProcessedPerFrame=40
    r.MotionBlurQuality=0
    r.ViewDistanceScale=10
    foliage.LODDistanceScale=10
    r.StaticMeshLODDistanceScale=0.25
    r.SkeletalMeshLODBias=-4
    r.Shadow.MaxResolution=4096
    r.Shadow.MaxCSMResolution=4096
    r.Shadow.DistanceScale=2
    r.Shadow.TransitionScale=2
    r.Shadow.CSM.TransitionScale=2
    r.Shadow.CSMDepthBias=8
    r.Shadow.CSMShadowDistanceFadeoutMultiplier=0.1
    r.Shadow.RadiusThreshold=0.005
    r.LightMaxDrawDistanceScale=10
    ts2.passenger.DensityScale=2
    r.FreeSkeletalMeshBuffers=0

    Conclusion: the bigger the better. Forget about memory optimizations, LODs, textures resolutions and just load the whole tile in one go as early as you can with the highest possible quality and keep everything in memory with high detail as much as possible time as well, so that when objects become visible for player all work has been already done 3km in advance from current train position. What is killing us are those never ending loops that Unreal threads execute to come to the result of textures needing to be resized by 1 pixel and memory cleaned by 1 Mb. That has no sense and wastes a lot of computing time in each frame and forces the CPU and GPU to process the scene much more times than really needed for a given quality/distance from player's camera position. Put that in the roadmap as soon as you can please as it will avoid many nightmares with future DLCs :)

    Cheers
     
    Last edited: Jan 12, 2022
    • Like Like x 8
    • Helpful Helpful x 1
  15. cavok

    cavok New Member

    Joined:
    Jan 5, 2022
    Messages:
    18
    Likes Received:
    5
    Hi geloxo.

    So I tried your crazy horse settings but increased r.Streaming.PoolSize=24000 to reflect my 3090 as well as added the nicer shadows with r.Shadow.FilterMethod=1

    I have every setting on MAX including 200% screen size and tried the Munich "approach" on both 1440p and 4K monitors and the max usage of memory was:

    1440p (2,7K) : Max 9.5GB VRAM usage - FPS in the 40-70ish
    2160p (4K): Max 10.1GB VRAM usage - FPS in the 25-40ish (pretty impressive as with 200% screensize it is actually 4320p 8K resolution being rendered and then resized to 4K) Picture quality is stunning here !! :D

    I did try the whole Augsburg to Munich route in the ICE train but couldn't really differentiate any difference in load pauses and stuttering TBH between crazy horse and your optimized settings - maybe it is because the crazy horse settings surely reduce the general FPS which could give me the wrong impression of more stutters. Actually I suspect that many of my observations could be placebo so do you know of any tool to run that can quantify the actual average frame times and min/max values? In that way we could be certain of what actually happens based on the parameters used :D

    Anyway - BIG thanks for your investigations and let me know if you want me to test any special settings on a 24GB 3090 :)

    Cheers

    C
     
  16. geloxo

    geloxo Well-Known Member

    Joined:
    Nov 21, 2018
    Messages:
    956
    Likes Received:
    1,695
    Hi. The screen resolutions are the reason for different results. I run game at 1080p with 200% scaling because my monitor has that resolution. Until there are faster 4K monitors with Gsync support I won´t move to 4K. As soon as you increase resolution fps drops and memory usage increases, specially when going 4K. In my case I can normally be around 80fps all the time, with 5 fps reductions when there are small hitches and a drop to 50fps when Munich is spawned. I could hit 100fps yesterday while running it unlocked indeed but I prefer to stay locked even with Gsync as that allows me to get always a constant value during tests and therefore it´s easier to identify the impact of any changes made to the config.

    I can try to increase scaling to 300-400% in GameUserSettings.ini with ScreenPercentage variable and see the results but they will be clearly worse. I didn´t test that yet. For the benchmarks I use this tool, which tracks the min, average and current values of my HW parameters:

    https://www.hwinfo.com/download/

    I think it has a line for FPS values as well but I´m not sure now. I don´t care too much about fps values normally as with Gsync you barely notice the changes until there is a severe drop. Those drops are what I pay attention to in order to identify the location or if trains are being spawned ahead.

    Cheers
     
    Last edited: Jan 12, 2022
    • Like Like x 2
  17. Speedster

    Speedster Active Member

    Joined:
    Apr 4, 2021
    Messages:
    95
    Likes Received:
    152
    Out of curiosity, faster than what? I have a LG 27GN950, it can do 4K @ 165Hz and has G-Sync.
     
  18. cavok

    cavok New Member

    Joined:
    Jan 5, 2022
    Messages:
    18
    Likes Received:
    5
    Yes I agree that adaptive sync monitors are vital - makes by far the best positive difference in any 3d sim games. I have researched a bit on available tools as hwinfo dont have any FPS capabilities AfAIKS and it seems the tool "FRAPS" has the capabilities to do a deeper analysis to bring up the 1% and 0.1% lows in FPS which would catch all the stutters and pauses in a separate metric - in that way we can have actual data to see what parameter helps reduce the pausing and stutters directly .

    Regarding screen scaling - anything above 200% will be of diminishing returns anyway with exponential impact on system resources and to me 200% is a nice compromise at least for me on 1440p monitor (My other 4K monitor is NOT g-sync compatible so I run all games on my 2.7k 165Hz G-Sync monitor)

    I will test out fraps and report back :)

    C
     
    • Like Like x 1
  19. geloxo

    geloxo Well-Known Member

    Joined:
    Nov 21, 2018
    Messages:
    956
    Likes Received:
    1,695
    Yes that one is fine but it´s Gsync compatible (I have Nvidia) only above 48Hz as far as I have seen, which is the critical point for simulators as normally you are near the 40-60fps band in such games. For shooters and so on that one is perfect as you can run those games at full refresh rate if you want and with high fps. I still prefer a full range one (1-144Hz at least) and those are still a bit expensive or just too big, which I don´t want either. 27" or 28" would be fine for my desktop, but not more. Most of the full range ones which exist now below 4ms normally reach 60Hz only, and that´s too slow because I also play shooters in addition to simulators. But I didn´t check the market so much recently anyway. I will try to get one by this summer most likely.

    Cheers
     
    Last edited: Jan 12, 2022
  20. geloxo

    geloxo Well-Known Member

    Joined:
    Nov 21, 2018
    Messages:
    956
    Likes Received:
    1,695
    Exactly. That´s another problem and one of the reasons why I´m a bit reluctant to go 4K as of today. I just made some tests simply enabling NVIDIA´s DSR to create a 4K resolution and performance more or less stays in the same range but adding the 150-200% scaling on top of that drops from 80fps to 40-30fps and the image starts to look laggy. That´s crazy anyway as nobody should need such a high resolution for a desktop, but it will come sooner or later the same as 4K did. There are 8K monitors already available.

    I would only switch to 4K if it allows me to keep good performance in MSFS, which is the simulator I play most.

    Cheers
     
    Last edited: Jan 12, 2022
  21. graham.haddon

    graham.haddon Well-Known Member

    Joined:
    Nov 28, 2020
    Messages:
    264
    Likes Received:
    258
    geloxo I tried your latest super duper ini settings and it seems to run quite well on my machine. Tops out at about 55fps though but drops down to about 25fps when entering Meissen. This is with 1440p boosted to 200% screen resolution. Looks pretty though.
    It also has the added benefit of my PC boosting the central heating radiator in the room. It doesn't hitch any more or less than with the optimized settings though, that I had particularly noticed.
     
    • Like Like x 1
  22. kurtosizm

    kurtosizm Well-Known Member

    Joined:
    Oct 29, 2021
    Messages:
    251
    Likes Received:
    640
    So I tried geloxo's recommended settings (first post), and so far I've had great success. It made Riesa - Dresden playable. But I'm having an issue with the new route (Dresden - Chemnitz) around Tharandt, that hilly forest part is really killing my machine, getting around 13-18 FPS only - anyone knows what could cause the framerate drop in the area? My rig is not the best though, it's an i7 with 16GB RAM and a GTX 1060 6GB. Any recommended settings? The rest of the route is fine, getting 30-50 FPS.
     
    • Like Like x 1
  23. fanta1682002

    fanta1682002 Well-Known Member

    Joined:
    Dec 22, 2019
    Messages:
    1,175
    Likes Received:
    561
    you add r.ViewDistanceScale=1
    foliage.LODDistanceScale=1 fps is very good
     
    • Like Like x 2
  24. kurtosizm

    kurtosizm Well-Known Member

    Joined:
    Oct 29, 2021
    Messages:
    251
    Likes Received:
    640
    Gonna test it shortly, many thanks!
     
  25. paul.pavlinovich

    paul.pavlinovich Well-Known Member

    Joined:
    Aug 21, 2020
    Messages:
    1,684
    Likes Received:
    1,994
    Graphic cards of that age aren't going to help you, but a good card isn't the full solution. I run a 3080TI and I still get issues. There is no miracle cure. We know from the last stream that DTG are spending more effort here so we can hope for improvements.

    geloxo that 1mb of memory saved could be the difference between running and crashing on a console. Given 70% of the game's players are on console and have no way to change their settings then I certainly understand why its there. We lucky folk playing on PC can hack our ini files to our hearts content and can knowingly give up certain things at the cost of memory, CPU or GPU to get a smoother outcome.

    Paul
     
  26. geloxo

    geloxo Well-Known Member

    Joined:
    Nov 21, 2018
    Messages:
    956
    Likes Received:
    1,695
    I´m not really sure that consoles can´t tweak the game as well as PC, as this configuration system is a global feature for UE. Console players may just need to locate the files because the files should be somewhere, maybe at a different location or with different names. There are plugins for consoles made for unreal out there, so if engine can read a plugin it can also read a config file. But I´m not really familiar with the console implementation.

    In the time being I made some tests for a wide monitor resolution and the original config is still valid. The only modification which is needed is a reduction of the scaling to 150%, as 200% is too much workload for such high resolutions. This config should also be valid for 4K users. In case you need to fine tune the config for your system I recommend to focus on the garbage collector and creation/destruction rates, as I found them to be the ones having the higher impact when they are not balanced:

    gc.MinDesiredObjectsPerSubTask
    s.LevelStreamingComponentsUnregistrationGranularity
    s.LevelStreamingComponentsRegistrationGranularity
    r.Streaming.NumStaticComponentsProcessedPerFrame

    Try increasing or decreasing them until you find the best balance for your system. I updated the first post to include the two options.

    Cheers
     
    Last edited: Jan 16, 2022
  27. paul.pavlinovich

    paul.pavlinovich Well-Known Member

    Joined:
    Aug 21, 2020
    Messages:
    1,684
    Likes Received:
    1,994
    I think that consoles would be challenged to edit the files, I'm not saying this is the case for this particular instance but I would expect consoles to be looking for changes to the files and to prevent game play when that has happened. I did some googling and could not find anything that looked like it indicated that you could edit the unreal assorted *.ini files on console. I would be happy to be corrected on this.

    Paul
     
  28. geloxo

    geloxo Well-Known Member

    Joined:
    Nov 21, 2018
    Messages:
    956
    Likes Received:
    1,695
    I found this for the FMOD plugin before. There it gives some directories that look specific to each platform:

    https://fmod.com/resources/documentation-unreal?version=2.02&page=platform-specifics.html

    If the platform has those files locally as well that could be the place to potentially add the customization. Anyway I guess consoles also store savegames, the menu settings and the player profile achievements so wherever those files are stored the engine.ini would be nearby in those folders. But this is just speculation as I don´t run unreal elsewhere than in PC

    Cheers
     
    Last edited: Jan 16, 2022
  29. perezsoria

    perezsoria New Member

    Joined:
    Mar 18, 2021
    Messages:
    3
    Likes Received:
    3
    The following command could add some performance boost?:
    r.bForceCPUAccessToGPUSkinVerts=True
     
    • Like Like x 1
  30. geloxo

    geloxo Well-Known Member

    Joined:
    Nov 21, 2018
    Messages:
    956
    Likes Received:
    1,695
    No idea. It´s not listed in the variable reference page. Do you have a description of what it does?

    Cheers
     
  31. perezsoria

    perezsoria New Member

    Joined:
    Mar 18, 2021
    Messages:
    3
    Likes Received:
    3
    From Unreal Engine doc: (bool) Whether to force CPU access to GPU skinned vertex data.

    https://docs.unrealengine.com/4.26/...ation/PerformanceAndProfiling/SystemSettings/

    Personally I've included in my engine.ini, I've read from various sources that increases CPU usage 5%-10% and gives more FPS

    Many thanks for sharing your work
     
    Last edited: Jan 16, 2022
    • Like Like x 2
  32. geloxo

    geloxo Well-Known Member

    Joined:
    Nov 21, 2018
    Messages:
    956
    Likes Received:
    1,695
    Interesting finding. I will try that as currently my CPU is not fully used and is my GPU the one driving the most workload. Thanks for the suggestion.

    Cheers
     
    • Like Like x 1
  33. geloxo

    geloxo Well-Known Member

    Joined:
    Nov 21, 2018
    Messages:
    956
    Likes Received:
    1,695
    I have tried this but I didn´t see any noticeable effect. Tested it also adding the command to [/Script/Engine.RendererSettings], just in case, but nothing either... Did you see any improvement?

    Cheers
     
  34. Cotax

    Cotax Well-Known Member

    Joined:
    Mar 25, 2021
    Messages:
    150
    Likes Received:
    329
    geloxo first thanks for your time and massive effort you put in this. I still call you UE master :D

    Today i will try your FULL HD configuration with r7 5800x, 32gb, 3060 ti 8gb, M2 NVME with gysnc monitor, locked on 60 fps on DX12.

    I am wondering about the correct process and what to set in INGAME settings - everything on ultra? Do you first set ingame settings and then tweak engine.ini or the other way? Do ingame settings override engine.ini? What do you suggest for scaling, maybe around 150-170%? 200% seems like a little overkill for 3060 ti.
     
    • Like Like x 2
  35. geloxo

    geloxo Well-Known Member

    Joined:
    Nov 21, 2018
    Messages:
    956
    Likes Received:
    1,695
    I'm just a fan of the game that wants it to run better, but thanks ;) I would first set graphical options to your own preference (using a clean ini file) in a way that you are a bit above 60fps if that's your target. Try all ultra and 200% scaling and go to 150% if you get too low fps as that's the main fps killer.

    Then add only the optimizations (red and blue color) as they should not reduce your performance and test a bit to see the effect. Then start adding the green portion one by one depending on how much room you have to increase details and still stay in the 60fps range. With gsync you don't need any fps cap (it's optional in that case).

    When you are fine with both performance and details test it to fine tune things like the granularities or the green portion values like scales and so on.

    Cheers
     
    • Helpful Helpful x 1
  36. Cotax

    Cotax Well-Known Member

    Joined:
    Mar 25, 2021
    Messages:
    150
    Likes Received:
    329
    1080p 170% scaling, everything on ultra except foliage on medium + DX12

    Code:
    r.Streaming.FramesForFullUpdate=2
    r.Streaming.PoolSize=6000
    r.Streaming.MaxTempMemoryAllowed=1500
    r.Streaming.Boost=1
    r.GTSyncType=1
    r.OneFrameThreadLag=1
    r.CreateShadersOnLoad=1
    r.ShaderPipelineCache.BatchTime=1
    r.ShaderPipelineCache.BackgroundBatchTime=1
    r.ShaderPipelineCache.PrecompileBatchTime=1
    s.AsyncLoadingTimeLimit=2
    s.PriorityAsyncLoadingExtraTime=1
    s.UnregisterComponentsTimeLimit=2
    s.LevelStreamingActorsUpdateTimeLimit=2
    s.PriorityLevelStreamingActorsUpdateExtraTime=1
    s.LevelStreamingComponentsUnregistrationGranularity=1
    s.LevelStreamingComponentsRegistrationGranularity=1
    r.Streaming.NumStaticComponentsProcessedPerFrame=10
    gc.TimeBetweenPurgingPendingKillObjects=300
    r.Shadow.WholeSceneShadowCacheMb=1500
    gc.NumRetriesBeforeForcingGC=5
    gc.MinDesiredObjectsPerSubTask=20
    s.ForceGCAfterLevelStreamedOut=0
    s.ContinuouslyIncrementalGCWhileLevelsPendingPurge=0
    r.ViewDistanceScale=2
    foliage.LODDistanceScale=2
    r.StaticMeshLODDistanceScale=0.25
    r.SkeletalMeshLODBias=-1
    r.Shadow.MaxResolution=4096
    r.Shadow.MaxCSMResolution=4096
    r.Shadow.DistanceScale=2
    r.Shadow.TransitionScale=2
    r.Shadow.CSM.TransitionScale=2
    r.Shadow.RadiusThreshold=0.005
    r.SkylightIntensityMultiplier=1.65
    Getting some mixed result. On some routes (german) it works smooth, fixed 60fps with minimal stuttering. Much better and smoother than default. But if i try London commuter and start from Victoria it gets interesing.. Drops to 10-30fps and heavy stuttering -> utilization is interesing, it actually falls down from 90-80% to 30-20%, so GPU and CPU are just waiting between stuttering. This is definitly something about the engine and original optimization of the game. Sigh.. Any tips? Maybe i should try crazy horse settings.
     
  37. 5cip

    5cip Active Member

    Joined:
    Apr 23, 2020
    Messages:
    344
    Likes Received:
    200
    anyone else getting more stutters with newest nvidia driver 511.23 ?
     
  38. perezsoria

    perezsoria New Member

    Joined:
    Mar 18, 2021
    Messages:
    3
    Likes Received:
    3
    Not really... same fps at London Victoria's station with and without it. It was worth a try.
     
  39. geloxo

    geloxo Well-Known Member

    Joined:
    Nov 21, 2018
    Messages:
    956
    Likes Received:
    1,695
    Yeap, that´s life... Unfortunatelly some routes are a real problem and this is getting worse after each release cause they increase the details in newer routes everytime. In my opinion the problem for the engine is how the tracks are distributed in the map. When train runs more or less straight along a queue of single tiles you have always only one tile ahead to load and maybe just some forests or small cities on your sides at 1 or 2 km away, and game runs pretty well. But when track runs being surrounded by 2 or even 3 tiles (one at north, one at east, and one at west) because you are on a curved portion of the line or the line runs diagonal across the map then game needs to load 2 or 3 levels at the same time with the same size of the one you are already in. If they have some average details inside that kills your system, even if you have 16 cores and a high end card like in my case. And if there are yards, stations or moving trains inside then you can forget about the whole thing directly. Basically engine can´t load so much things in so short period of time. On the other hand if you distribute the workload among multiple frames (which is the natural way to proceed from UE) that turns into a 5 seconds lag at low fps, which is even worse than the freezes.

    You can see how Aachen, which is basically a straight line route performs really well even with x4 viewdistance while still having several complex stations and yards while Riesa which is equivalent in terms of complexity runs horrible even on lower settings and even with no traffic. Most of the Riesa route is just regular countryside with some assets and medium stations indeed. Except at the chemical plant area and arrival to Dresden there´s no reason to have so bad results there. I can´t find any other reason for that because it does not even have complex terrain meshes.

    I really hope that there´s a solution for those loading issues and game can load levels continuously at least (this is the minumum I would expect for a 2022 game), so that we just need to deal with quality to tune performance. Now we need to deal with quality, with stuttering and with freezes. And even worse: results are not consistent on all routes. So this turns into a never ending tweaking history if you want at least to have some homogeneous results in a small set of the routes. Today it´s basically imposible to have a clean ride at any route so far except at Hagen which has been always the best one in terms of performance and just has very few microfreezes. Even Hagen + Hagen yard loads quite quickly indeed after the tweaks, which tells us that game can run well if it´s optimized. Either they design the routes more carefully to prevent the performance problems or they fix the engine. But the combination of the two things together is not going to work for much more time.

    Cheers
     
    Last edited: Jan 17, 2022
    • Like Like x 5
  40. PegasusLeosRailwayFanatix

    PegasusLeosRailwayFanatix Well-Known Member

    Joined:
    Jul 7, 2020
    Messages:
    1,473
    Likes Received:
    1,010
    the only route that I found not having any problem is the Brighton line, I look at my fps and it was stable, it never show red mark fps.
     
  41. Teflon490

    Teflon490 Active Member

    Joined:
    Mar 29, 2020
    Messages:
    159
    Likes Received:
    127
    Do you get that feeling too? Because I do, but I was also trying to fine-tune geloxo's settings, so I was attributing it to this. But even when I tried previous "validated" settings, I got a feeling that there is suddenly more sturrer than before. So maybe I was not imagining things, if you noticed something too.
     
  42. 5cip

    5cip Active Member

    Joined:
    Apr 23, 2020
    Messages:
    344
    Likes Received:
    200
    i found out that the new nvidia driver sets my clock core in idle to 1708MHz instead of 210 MHz that caused that my fan worked with 1000 RPM in idle and the memory temp to 68°c in idle instead of 50°c ..... the result of all was broken fps in all games and stutter
    i set the 3d settings to default and power management to adaptive (then restart) to get rid of that problem and it works now.
    tested even on my second system which had the same problems with the newest driver..
    i rolled back to 497.29 on 1 system and the second system has stilll the 511.23 driver but with normal clock core now.
     
  43. Teflon490

    Teflon490 Active Member

    Joined:
    Mar 29, 2020
    Messages:
    159
    Likes Received:
    127
    Seems like a problem on your system, maybe tied to GPU architecture, but on my 1080Ti idle clock is where it should be, as well as clocks under load, no problem here. Still I have a feeling it is stuttering more than before.
     
  44. Cotax

    Cotax Well-Known Member

    Joined:
    Mar 25, 2021
    Messages:
    150
    Likes Received:
    329
    geloxo Tried crazy horse settings - it's kinda funny, but it works the best for me on 1080p with 170% scaling.

    Stuttering is almost gone, Victoria doesn't stutter anymore, the only thing is framerate hit, when GPU cannot handle it anymore (drops from 60 to 30-40 sometimes, where then are a lot of rails and details) but thanks to G-SYNC it's not so noticable and much less annoying than sudden stuttering. So for me it runs much smoother than 1080p settings - surprisingly.
     
    • Like Like x 2
  45. geloxo

    geloxo Well-Known Member

    Joined:
    Nov 21, 2018
    Messages:
    956
    Likes Received:
    1,695
    I know it´s a bizarre result against common sense but I saw exactly the same result on my case with the crazy horse option Cotax :D

    I just set something no so extreme now. Both viewdistance and skeletal meshes set at x3 still gives good preloading results and does not kill performance so much, but the other settings I run them maxed.

    Cheers
     
    • Like Like x 1
  46. Teflon490

    Teflon490 Active Member

    Joined:
    Mar 29, 2020
    Messages:
    159
    Likes Received:
    127
    Just a question to clarify what do you actually use in your "Crazy Horse" setup - the settings that you mention in the first post are:

    r.ViewDistanceScale=10
    foliage.LODDistanceScale=10
    r.StaticMeshLODDistanceScale=0.1
    r.SkeletalMeshLODBias=-10

    So if you now set View Distance to 3 a Skeletal Mesh to -3, what are the other settings you keep maxed? Only the other remaining 2 from those 4 above, or also something from the Red or Blue options?
     
  47. geloxo

    geloxo Well-Known Member

    Joined:
    Nov 21, 2018
    Messages:
    956
    Likes Received:
    1,695
    As written in the first post all configs are based on the config 1) settings, which is the basic setup. You just modify some of those variables on configs 2) and 3). Additionally for wide monitors or 4K I reduced scaling to 150% in the config 2).

    So the crazy horse config is using all things from config 1) as well (red, blue and green portions). On the crazy horse one you just modify those four variables belonging to the green portion to set them to their max values.

    Cheers
     
  48. joerg.lange

    joerg.lange Well-Known Member

    Joined:
    Jan 13, 2020
    Messages:
    224
    Likes Received:
    556
    There's something strange going on. On the Tharandt ramp in the Tharandt area (around KM17.0) I also have extreme drops in the frame rate - down to 17!. My computer is absolutely no potato (i9 9900k and 1080TI) and consistently manages well over 40 FPS - even in the Dresden area with all the traffic and with the ini-settings cranked up.

    The area around Tharandt seems to be a kind of "Sherman Hill" problem, it only helps to take out "foliage.LODDistanceScale=5" (which is no solution for me because I find the default LOD setting of the trees extremely ugly).

    But what's also strange is that I imagine the problem is relatively new, i.e. it wasn't there (or not so extreme) when the route was released. Should the current Nvidia driver have made the problem worse? But I can't find any other indications of a problem with the Nvidia driver.
     
    Last edited: Jan 23, 2022
  49. 5cip

    5cip Active Member

    Joined:
    Apr 23, 2020
    Messages:
    344
    Likes Received:
    200
    i agree with this i thought maybe im wrong but now u write about that problem which i thought couldnt be.
    how is that possible because i also see that the new route Tharandt has now many stutters ?
    i had 3 different nvidia drivers now installed and all had the same performance ..currently im on the newest one 511.23
    im on 3080 TUF i9 11900k.............
     
    Last edited: Jan 23, 2022
  50. JBViper

    JBViper Well-Known Member

    Joined:
    Jun 3, 2020
    Messages:
    330
    Likes Received:
    799
    I had seen that the new DLDSR support (in the latest NVidia drivers) was causing performance issues on some games. You can disable this in the nividia graphics 3D settings. I don't know if this is the right way?!
     

Share This Page