Engine.ini Settings

Discussion in 'TSW General Discussion' started by hightower, Nov 19, 2020.

  1. JetWash

    JetWash Well-Known Member

    Joined:
    Mar 6, 2021
    Messages:
    2,389
    Likes Received:
    8,861
    It does, not by much but it does. My experience is around 2-3fps which isn't a big deal to most but if you're struggling anyway that could be an issue.

    I find those settings really dark on my system. FWIW this is what I use these days, which has been settled for a good while now.

    [SystemSettings]
    r.ViewDistanceScale=3
    r.StaticMeshLODDistanceScale=0.5
    r.TextureStreaming=0
    r.Shadow.FilterMethod=1
    r.Streaming.HLODStrategy=2
    r.BloomQuality=3
    r.TemporalAACurrentFrameWeight=0
    r.LandscapeLOD0DistributionScale=3
    foliage.LODDistanceScale=5
    ts2.passenger.DensityScale=5

    I get zero pop-in, virtually no stutter (except the usual candidates) and the lighting is as good as it's going to be until DTG address the issues.
     
    Last edited: Mar 25, 2021
    • Like Like x 1
  2. paul.pavlinovich

    paul.pavlinovich Well-Known Member

    Joined:
    Aug 21, 2020
    Messages:
    1,684
    Likes Received:
    1,998
    That's really interesting. I took a break from Arosa (since it doesn't support Raildriver) and checked this out. Running the same service the graffiti that's on the approach to the bridge stays put and is nice and vibrant for me. The graffiti on GWE also stays put and does not flicker for me.

    Paul
     
  3. mariussoare_84

    mariussoare_84 Well-Known Member

    Joined:
    Aug 23, 2020
    Messages:
    357
    Likes Received:
    812
    I've seen you also tried the config posted by geloxo here

    So far, for me, his last config works best. I had to increase
    s.LevelStreamingActorsUpdateTimeLimit
    s.PriorityLevelStreamingActorsUpdateExtraTime
    s.LevelStreamingComponentsRegistrationGranularity
    from 5 to 10 on each in order to eliminate the stuttering and hitching.

    I am planning to reinstall the video driver too though I have a fresh Windows installed last Sunday and fresh driver. I am on 461.92 already.
     
    • Like Like x 1
  4. paul.pavlinovich

    paul.pavlinovich Well-Known Member

    Joined:
    Aug 21, 2020
    Messages:
    1,684
    Likes Received:
    1,998
    I had some issues with his settings and don't have time to play more but I will on the weekend.

    For others who are looking at settings what CPU and GPU?

    Paul
     
  5. mariussoare_84

    mariussoare_84 Well-Known Member

    Joined:
    Aug 23, 2020
    Messages:
    357
    Likes Received:
    812
    CPU Ryzen 5 3600, GPU RTX 3070 OC
    I mentioned them in one of my past posts too for reference.

    What I intend to do now that the hitching is gone is to add some more graphical changes as he uses only a few to see how they fare. Before I do that, I will test other routes and seasons first.
     
    • Like Like x 2
  6. paul.pavlinovich

    paul.pavlinovich Well-Known Member

    Joined:
    Aug 21, 2020
    Messages:
    1,684
    Likes Received:
    1,998
    Looking forward to your results.

    I have just gotten home from my early morning shift on the real railway and now intend to experiment with the less than real railway :)
     
  7. mariussoare_84

    mariussoare_84 Well-Known Member

    Joined:
    Aug 23, 2020
    Messages:
    357
    Likes Received:
    812
    So far I tied RRO under summer, winter, clear sky, snow, day and night. I love how the snow looks, it gives me the winter feeling more. You can see the ice crystals shine in a very story-like way. And also it seems that it reflects some of the light back as it happens IRL which helps with realism.

    Except for the beginning of each service when I still get freezes, which is something that I think it can't be avoided as geloxo said, I get a smooth ride all the way to the end of the service. I think they are related to trains spawning, though I'm not sure.

    I'm planning to try on some UK diesel routes today and will report back again.
     
    • Like Like x 1
  8. geloxo

    geloxo Well-Known Member

    Joined:
    Nov 21, 2018
    Messages:
    956
    Likes Received:
    1,698
    Guys be careful with the shadows settings. They are massive resource hogs when not balanced properly when increasing the objects details as basically we could be drawing each single tree leaf shadow at hundreds of meters away from us which is not even noticeable during gameplay but it will kill our performance. The following parameters are the key ones in engine.ini:

    1) r.ViewDistanceScale
    2) r.StaticMeshLODDistanceScale
    3) foliage.LODDistanceScale
    4) r.Shadow.MaxResolution
    5) r.Shadow.MaxCSMResolution
    6) r.Shadow.CSM.MaxCascades
    7) r.Shadow.RadiusThreshold

    Some comments:

    1) This is the first and main killer. You can loose 10, 15 or 20 fps in a tile including a station and a town just by using 2, 3 or 4 value on that variable. The reason is that it controls the distance at which scenery is rendered and also the track detail, like sleepers or third rail. But this is not the real problem. The shadows that come with those extra details are hurting like crazy. Additionally in can not just display things further away but also increase the density of some areas inside towns and forests. This means more objects and again their shadows will be rendered. I always fight against it as it´s the main parameter for a nice scenery, but it hurts a lot.

    2) This controls the LOD for buildings, structures and also track curvature details. It mainly improves the textures pop-in effect in structures and the objects details and does not hurt too much except when you are in a yard with tons of switches and tracks. Then it becomes relevant if reduced too much as the curvature from tracks will be very detailed.

    3) This is one of the main problems, as it corrects trees pop-in effect. But as it increases the trees details it also means that the shadows casted by trees will be also more detailed at further distances. And what do we usually have next to the tracks? Trees, trees everywhere and their shadows casted on the grass, which is also a basic 3D object, but both including moving animations and therefore moving shadows.

    4) and 5) Those start to be the core for performance on heavy tiles. They define the starting resolution for main shadows and for cascaded shadows. Distant shadows will have lower details according to the amount of cascades we set, until they disappear. So the higher the resolutions the more detailed shadows at closer and distant objects we will have. If not balanced this could be another killer, specially the cascaded one. People tend to increase the shadow detail with the hope to increase the overall shadow drawdistance but the created side effect is terrible on heavy tiles, specially if we used very high shadow resolutions. And as the shadow viewdistance can´t be increased currently in game it has no sense to hurt performance with extra shadows.

    6) This value defines how much the shadows will degrade with distance so to say, as it controls if the distant shadows will be still rendered with a value closer to the max cascaded shadow resolution or with lower detail. It´s like a LOD for shadows therefore. The higher the value the more detailed distant shadows, but this means that each single (and probably very distant) object will produce very detailed shadows as well, that we don´t really need. If that happens to 100 objects in a city with buildings and trees next to the tracks then we may have problems. This parameter is also the one responsible to have that ugly moving shadow effect casted by rails on the track, which is generated ahead of train.

    7) This defines the min size of objects required to produce shadows. This one is important to balance shadow details as you can use very detailed shadows resolution but prevent that small objects like distant bushes generate detailed shadows. If you increase it you can still have nice shadows on closer objects while you remove the small shadows produced by distant ones, which will help the overall performance but may also produce that even the last coaches of your train don´t produce any shadows as well.

    So increasing a lot viewdistance and foliage/static mesh LODs will kill performance unless you reduce the shadow details of those distant objects in accordance. Normally the rendering of the objects themselves is not creating problems even if they are too many, as they are basically repetitions of each other in most cases, but their shadows yes as they need to interact also with the surrounding objects and this depends on the relative position to the sun the object has, which is not exactly the same for all. What you can do is to use a high main shadow resolution but a lower cascaded shadow resolution. This ensures the closer shadows (and therefore the most relevant) will be detailed enough but without killing performance due to distant shadows. Even reducing number of cascades may be required. To test it and see the effects use some values and go with external camera on top of train and observe the forests or houses at few meters away from track. If their shadows are very detailed your HW will suffer on a big city or forest but you will most likely not see them at all from a regular drive inside the cab.

    For the simulation (or for our brains) it´s better to have a lot of objects to create the effect of very detailed tile. As shadows are normally casted on the ground you will not notice their details very much because player is not flying but staying close to the tracks level. What you need are big main shadows that create the effect of a forest blocking the sun for instance (and those don´t need to be very detailed) but not the shadows of each single leaf (at least not the distant trees ones).

    Cheers
     
    Last edited: Apr 1, 2021
    • Helpful Helpful x 5
    • Like Like x 2
  9. paul.pavlinovich

    paul.pavlinovich Well-Known Member

    Joined:
    Aug 21, 2020
    Messages:
    1,684
    Likes Received:
    1,998
    Helpful @gelexo - I've got r.Shadow.DistanceScale=2.0 in mine which I picked up from someplace. Does that come into play in your thinking above?
     
  10. geloxo

    geloxo Well-Known Member

    Joined:
    Nov 21, 2018
    Messages:
    956
    Likes Received:
    1,698
    I use that one as well and it does not really hurt as the overall shadow drawdistance is quite small. Indeed this setting is not increasing them a lot more. What I have seen is that the resolutions and number of cascades are what really matters. So basically how detailed they are is what hurts. When you go with a resolution of 1024 the game runs much better but sure the quality is worse. It´s hard to handle shadows currently as you don´t have too much detail but it affects the performance a lot anyway because most of the shadows (if not all) are dynamic, so they move with sun position and the overall scene is very detailed at few meters away but sparse afterwards. Dynamic shadows require a lot of computing, even if they are worthy due to their nice looking result, but they trigger many other problems like sudden framerates drops in the middle of nowhere if you just have a town with trees next to tracks. They also slow down the tile loading as well if it contains too many objects casting shadows. So basically now they are a problem hahaha :D

    Cheers
     
    Last edited: Apr 1, 2021
    • Like Like x 2
    • Helpful Helpful x 1
  11. w2sjw

    w2sjw Active Member

    Joined:
    Jul 6, 2020
    Messages:
    152
    Likes Received:
    195
    Guys,

    I wanted to get back into this discussion with you, as I've finally gotten all the parts at my house for my new PC build. The specs are as follows:
    Ryzen 5600X
    Asus ROG Strix B550-E
    Asus RTX 3070 OC edition
    16GB Corsair DDR4-3200
    Samsung 980 Pro NVMe

    Here is my current engine.ini settings - I want to know what to adjust in these (or what I might be missing) to accommodate this new PC build. I'm going to be downloading the sim over again from scratch, just to make sure everything is fresh...

    [System Settings]
    r.TextureStreaming=0
    r.Streaming.FullyLoadUsedTextures=1
    r.Streaming.HLODStrategy=2
    r.Streaming.PoolSize=1494
    r.MaterialQualityLevel=1
    r.DisableDistortion=1
    r.DepthOfFieldQuality=0
    r.DefaultFeature.LensFlare=0
    r.DefaultFeature.MotionBlur=0
    r.BloomQuality=1
    r.SceneColorFringe.Max=0
    r.SceneColorFringeQuality=0
    r.EyeAdaptationQuality=0
    r.Color.Max=0.7
    r.Color.Mid=0.4
    r.Color.Min=-0.3
    r.TonemapperGamma=0.5
    r.Tonemapper.Quality=0
    r.Tonemapper.GrainQuantization=0
    r.LightShaftQuality=1
    r.LightShafts=3
    r.MaxAnisotropy=16
    r.TemporalAASharpness=0.0
    r.TemporalAASamples=64
    r.TemporalAAFilterSize=1.0
    r.TemporalAACurrentFrameWeight=0.05
    r.TemporalAAPauseCorrect=1
    r.PostProcessAAQuality=6
    r.Shadow.CSM.MaxCascades=10
    r.Shadow.DistanceScale=5
    r.ShadowQuality=5
    r.Shadow.FadeResolution=8
    r.Shadow.MinResolution=64
    r.Shadow.RadiusThreshold=0.01
    r.Shadow.TexelsPerPixel=1.6
    r.ViewDistanceScale=5
    r.LandscapeLODBias=-2
    r.LandscapeLODDistributionScale=3
    r.LandscapeLOD0DistributionScale=3
    r.StaticMeshLODDistanceScale=0.0
    r.SkeletalMeshLODBias=-5
    r.MipMapLODBias=-3
    r.HighQualityLightMaps=1
    r.SSRQuality=3
    r.AmbientOcclusionLevels=4
    r.AmbientOcclusionFadeRadiusScale=50
    foliage.LODDistanceScale=5
    foliage.ForceLOD=0
    foliage.DitheredLOD=8
     
    • Like Like x 1
  12. geloxo

    geloxo Well-Known Member

    Joined:
    Nov 21, 2018
    Messages:
    956
    Likes Received:
    1,698
    I don´t use all of them but it would depend on how you new PC behaves. Some comments below anyway with just my opinion.

    The first block is not consistent:

    r.TextureStreaming=0
    r.Streaming.FullyLoadUsedTextures=1
    r.Streaming.HLODStrategy=2
    r.Streaming.PoolSize=1494
    You disabled the streaming with first variable so you don´t need the second and last variables. Just leave the others as the third helps to reduce latency by disabling LODs streaming.

    For those ones:

    r.Shadow.CSM.MaxCascades=10
    r.ShadowQuality=5​

    Those values are indeed the default values for game max preset, so you can remove them.

    For this one:

    r.Shadow.DistanceScale=5​

    The current max possible value in game is 2, so using 5 there will not go above 2.

    For the following:

    r.LandscapeLODBias=-2
    r.LandscapeLODDistributionScale=3
    r.LandscapeLOD0DistributionScale=3​

    I would just use the last one. The others increase dramatically the details on all terrain LODs and may hurt, but if you like details on distant mountains then leave them. The one solving the tunnel entries covered by terrain is the last one, and also enhances the closer mountains. It´s the only one I use.

    For these:

    r.StaticMeshLODDistanceScale=0.0
    r.SkeletalMeshLODBias=-5​

    I would put 0.25 in the first one just to have some LODs enabled as you don´t need to draw the chimeneys and small details for the houses at 2km away. It will also make track curvature extremely detailed even at far distances, which may be problematic at big yards. The second one is dangerous as it makes trains much more detailed and may have a severe impact on performance.

    And for those ones:

    foliage.LODDistanceScale=5
    foliage.ForceLOD=0​

    I would just leave the first one. Take into account that forcing LOD0 on all foliage, even distant one, may have a high impact on performance. Also at medium distance the foliage casts dynamic shadows, so if it´s very detailed the FPS may suffer.

    Cheers
     
    Last edited: Apr 2, 2021
    • Helpful Helpful x 3
    • Like Like x 1
  13. w2sjw

    w2sjw Active Member

    Joined:
    Jul 6, 2020
    Messages:
    152
    Likes Received:
    195
    I'd like a respectful idea of what 'bare minimum' should be & where to go from there (minimum number of tweaks to make a meaningful difference). I made your changes & loaded up SEHS, and things were running very smooth at a pinned 60FPS (some minor tree pop-ins).

    I then ran a 09:45 GWE service to test ItsYa165's latest Class 166 sound mod, and was immediately noticing the darker textures of the ties under the ballast popping-in constantly at about 20-30ft in front of the train. As I said before, I'm going to re-do the sim install from scratch, so I'm not carrying over any inconsistent config data into the new install.

    Thanks a million for taking the time out to help!
     
    • Like Like x 1
  14. geloxo

    geloxo Well-Known Member

    Joined:
    Nov 21, 2018
    Messages:
    956
    Likes Received:
    1,698
    If you hate the trees pop-in you could raise foliage.LODDistanceScale to 6, but I think 5 is good for most routes. About the tracks on GWE this is a known issue with that line only. The only way to solve it is going with r.ViewDistanceScale above 10 or 15 but this may have impact on other routes. The sleepers are rendered at very short distances maybe as an optimization due to the existance of multiple tracks alone the route and because it was one of the oldest DLCs.

    Cheers
     
    • Like Like x 3
  15. solicitr

    solicitr Well-Known Member

    Joined:
    Jun 20, 2020
    Messages:
    11,899
    Likes Received:
    18,257
    A very effective tool for reducing the impact of tree pop-in, at low performance cost, is foliage.DitheredLOD=<X>, X being a time in seconds; default is 0. What this does is have trees and other assets governed by "foliage" commands fade in gradually over X seconds at each stage of quality upgrade, rather than just appearing Hey Presto! It doesn't increase the draw distance any, but draws the eye far less than the Bang! pop-in of the default state. I'm finding 5 seconds is a good number.
     
    • Like Like x 4
    • Helpful Helpful x 3
  16. JustWentSouth

    JustWentSouth Well-Known Member

    Joined:
    Nov 27, 2019
    Messages:
    1,111
    Likes Received:
    2,136
    Thanks for the suggestion! I look forward to trying this when I get home.
     
  17. solicitr

    solicitr Well-Known Member

    Joined:
    Jun 20, 2020
    Messages:
    11,899
    Likes Received:
    18,257
    Unfortunately, foliage.DitheredLOD does absolutely nothing about the bloody shadows, which still pop in like a brick to the head.
     
    • Like Like x 1
  18. paul.pavlinovich

    paul.pavlinovich Well-Known Member

    Joined:
    Aug 21, 2020
    Messages:
    1,684
    Likes Received:
    1,998
    I have to say geloxo your knowledge of the engine settings is excellent and your willingness to help others is amazing. Well done to you.
     
    • Like Like x 5
  19. breblimator

    breblimator Guest

    Any tips to get rid of this? :)
    link
     

Share This Page