Why No Ambient Occlusion In The Passenger Interiors?

Discussion in 'TSW General Discussion' started by londonmidland, Oct 3, 2021.

  1. londonmidland

    londonmidland Well-Known Member

    Joined:
    Nov 8, 2017
    Messages:
    3,423
    Likes Received:
    18,141
    As the title states, I've always noticed a lack of AO in the passenger interiors. This makes the interior look very flat, and in most cases look far too bright.

    For those of you that don't know what this is, its something which adds shadows and dark spots the areas where the light source doesn't reach, such as under tables and seats, for example.

    I understand that it may cause some sort of performance issues, but surely there could be some AO included?

    Below is a screenshots of it both enabled and disabled. Notice the vast differences.

    TS1 on:
    upload_2021-10-3_21-56-48.png

    TSW off:
    upload_2021-10-3_21-56-10.png
     
    • Like Like x 30
  2. tallboy7648

    tallboy7648 Well-Known Member

    Joined:
    Apr 9, 2020
    Messages:
    6,567
    Likes Received:
    10,793
    That is a big difference. Hopefully dtg can add some sort of AO in the future. Alot of the trains in this game has passenger interiors that look too bright. The M3, Class 395, 375, 377 are some examples. Would it be a big performance hit though?
     
    Last edited: Oct 3, 2021
    • Like Like x 3
  3. ASRGT

    ASRGT Well-Known Member

    Joined:
    Dec 19, 2017
    Messages:
    254
    Likes Received:
    613
    Agreed always bugged me as well.
    Seems Rivet may have addressed this in there preview vid.
     
    • Like Like x 9
  4. CK95

    CK95 Well-Known Member

    Joined:
    Apr 13, 2019
    Messages:
    3,177
    Likes Received:
    9,162
    Would be nice to have the trains feel like trains and not hospital corridors, but I don’t see this change happening any time soon.
     
    • Like Like x 4
  5. londonmidland

    londonmidland Well-Known Member

    Joined:
    Nov 8, 2017
    Messages:
    3,423
    Likes Received:
    18,141
    I noticed Rivet had managed to add it as soon as I watched the video. Everything looks a lot more realistic like. The performance looks great too.

    DTG should really think about adding it in, or at least provide some sort of option to enable/disable it.
     
    • Like Like x 9
  6. tallboy7648

    tallboy7648 Well-Known Member

    Joined:
    Apr 9, 2020
    Messages:
    6,567
    Likes Received:
    10,793
    Would it be as simple to have an option to enable or disable ambient occlusion though for all trains in tsw2? I can already hear someone at dtg saying "for technical reasons, this isn't possible or "This would be a massive undertaking"
     
    • Like Like x 3
  7. CK95

    CK95 Well-Known Member

    Joined:
    Apr 13, 2019
    Messages:
    3,177
    Likes Received:
    9,162
    “Baking” to maybe go onto the bingo cards anyone?

    That’s getting to be quite the buzzword for DTG lately.

    Theoretically it should be quite simple, depending on how Unreal Engine handles the implementation of AO, although DTG clearly take the complicated route with some of their development practices, for one reason or another, which sooner or later proves to be a rod for their back.
     
    Last edited: Oct 3, 2021
    • Like Like x 3
  8. Callum B.

    Callum B. Well-Known Member

    Joined:
    Aug 9, 2018
    Messages:
    1,638
    Likes Received:
    2,844
    Baking AO is by far the best option, because it takes 0 performance hit at all (it's just a part of the texture). Using real-time AO through post-processing would eat up GPU resources unnecessarily.

    I have always wondered why DTG do not bake in AO for the passenger interiors, despite doing it for the cab. I suppose the simple answer is that it requires vehicle artist time which they seem to be short on.

    Cheers
     
    • Like Like x 2
  9. Maik Goltz

    Maik Goltz Well-Known Member

    Joined:
    Dec 9, 2016
    Messages:
    952
    Likes Received:
    4,345
    AO in TSW is always baked into a separate Texture-Map. It is not baked onto the BC. That would be a bad idea. In TS1 it is often baked into the BC and therefor does not react to any light sources. In TSW the AO is reacting to lights. And that is the reason for the 'absence" of it visually often. The light sources in UE4 are 'burning' away the AO. We have experienced this with the G6 while making the texturing. As son as you have a brighter light switched on, like cab lights or the flashlight, the AO disappears magically. Have found no way around yet.
     
    • Like Like x 11
    • Helpful Helpful x 6
  10. tallboy7648

    tallboy7648 Well-Known Member

    Joined:
    Apr 9, 2020
    Messages:
    6,567
    Likes Received:
    10,793
    Ohh i see. Thanks for the answer. Hopefully a solution can be found but it doesn't look like it's an easy task. It's weird entering some trains in the game that have lighting that is way too bright.

    (P.S. I'm looking forward to the DB BR 420 :))
     
    • Like Like x 1
  11. londonmidland

    londonmidland Well-Known Member

    Joined:
    Nov 8, 2017
    Messages:
    3,423
    Likes Received:
    18,141
    Maik Goltz I’m not at all technical minded enough to know how everything works, but how did Rivet get their interior to look so good?

    688D945C-2CA3-4481-B0D9-EE24EA3642AD.jpeg
     
    • Like Like x 4
  12. Maik Goltz

    Maik Goltz Well-Known Member

    Joined:
    Dec 9, 2016
    Messages:
    952
    Likes Received:
    4,345
    They may have used a stronger AO at all. We did that too, it was horrible when you have no lights on. It is then black as hell. OR they baked it into the BC, i don't know. It is easy to get the idea when it is out. Get into the thingy, lights off, if its black like "you know where", and you can burn it away with the flashlight switched on, then it is strong AO in a separate map. If it is not burning away with the flashlight, its baked into the base colour map. You can do that, but this can have side effects with the overall lightning then. Could be generally too dark then in every light situation.
     
    • Like Like x 5
  13. londonmidland

    londonmidland Well-Known Member

    Joined:
    Nov 8, 2017
    Messages:
    3,423
    Likes Received:
    18,141
    Personally, I’d rather it be too dark than too bright. Most of the time train interiors are just way too bright and clinical looking.

    The cabs are better, but I still think it needs more AO/needs to be darker in places. There’s an SSGI ini command I sometimes use which helps with this.
     
    • Like Like x 5
  14. Maik Goltz

    Maik Goltz Well-Known Member

    Joined:
    Dec 9, 2016
    Messages:
    952
    Likes Received:
    4,345
    SSGI does nothing for AO at least. SSGI is additional indirect light to the scene that lightens up the scene where already baked light is applied with the Lightmass baker. It does nothing so far for the trains in TSW other than maybe make them even brighter.
     
    • Like Like x 1
  15. londonmidland

    londonmidland Well-Known Member

    Joined:
    Nov 8, 2017
    Messages:
    3,423
    Likes Received:
    18,141
    I found it makes shadows/lack of shadows appear under bridges/makes them deeper looking, as well as it makes areas of the cab darker/adds additional shadows.

    For example it’ll make the area around the throttle and fan darker whereas normally it’d all be the same lightness.
     
    • Like Like x 1
  16. Maik Goltz

    Maik Goltz Well-Known Member

    Joined:
    Dec 9, 2016
    Messages:
    952
    Likes Received:
    4,345
    But then you dial it down instead of up, right? It may be to much with the default settings and when you then dial it down, it reduces the overall additional indirect lighting, what then causes AO to be more present. But honestly, that is not what it is supposed to be. "Someone" needs to learn how to use it :D
     
    • Like Like x 3
  17. HeyYoPaulie!

    HeyYoPaulie! Well-Known Member

    Joined:
    Jan 23, 2021
    Messages:
    165
    Likes Received:
    381
    How does one dial SSGI up / down independently? Based on the UE4 commands I've seen, SSGI is either enabled or disabled.

    Or did you mean dial the overall lighting up / down, which then influences how SSGI is rendered?

    I agree londonmidland - enabling SSGI has made shadows / overall lighting far better than vanilla, especially in the cab
     
    Last edited: Oct 4, 2021
    • Like Like x 3
  18. londonmidland

    londonmidland Well-Known Member

    Joined:
    Nov 8, 2017
    Messages:
    3,423
    Likes Received:
    18,141
    The only commands there are is to either enable or disable it, as well as set the quality of it. You can’t actually set the intensity of it via commands as far as I’m aware.
     
  19. londonmidland

    londonmidland Well-Known Member

    Joined:
    Nov 8, 2017
    Messages:
    3,423
    Likes Received:
    18,141
    Notice the differences under the bridges. By default there’s no shadows or darkening where there should be.

    Default SSGI disabled:
    D0B3358B-30A7-4878-AA56-8CAB06B1D2AF.jpeg

    SSGI enabled:
    C2B4CB9B-7DE9-45D3-84FC-7C34F0439B99.jpeg
     
    • Like Like x 6
  20. Maik Goltz

    Maik Goltz Well-Known Member

    Joined:
    Dec 9, 2016
    Messages:
    952
    Likes Received:
    4,345
    That is weird. This is not the effect it should have. Read the docs from Epic about that feature and what it is supposed to do. Seems more it is not quite compatible with TSW lighting solution at all.
     
  21. londonmidland

    londonmidland Well-Known Member

    Joined:
    Nov 8, 2017
    Messages:
    3,423
    Likes Received:
    18,141
    Try it yourself if you want a bit of fun inside TSW. You’ll notice once enabled, it’ll make areas go darker/add shadows to it. Most noticeable is inside cabs, it’ll reduce that weird blue tinge TSW gives off.

    I think we can all agree TSW’s TOD system isn’t exactly the best ;)
     
    • Like Like x 1
  22. Maik Goltz

    Maik Goltz Well-Known Member

    Joined:
    Dec 9, 2016
    Messages:
    952
    Likes Received:
    4,345
    Ah, then i know what it really does for TSW, it switches off the sky light. That is quite bright in TSW and has this blue tint when you have no clouds on the sky. I think the effect you see with enabling SSGI is not having GI enabled, but having skylight disabled the same time. There is a command to disable the sky light or dial the intensity down. It should have the same effect then if i'm right
     
    • Like Like x 2
    • Helpful Helpful x 1
  23. londonmidland

    londonmidland Well-Known Member

    Joined:
    Nov 8, 2017
    Messages:
    3,423
    Likes Received:
    18,141
    I believe it’s skylight intensity or something like that? That’ll make areas out of indirect sunlight/light sources darker. I have mine set at 0.5.

    You can also change the Ambient Occlusion Method. The default is SSAO but you can set it to GTAO, which reduces light source intensity. This makes everything look too dark out of direct sunlight, however.
     
    • Like Like x 1
  24. HeyYoPaulie!

    HeyYoPaulie! Well-Known Member

    Joined:
    Jan 23, 2021
    Messages:
    165
    Likes Received:
    381
    r.SkylightIntensityMultiplier

    Lowering this value from 1 affects all lighting. Effecively making the daylight darker, but not in a natural way - like wearing sunglasses. Tried it at 0.5 but it looks way too dark, though appreciate this will be subjective.
     
  25. londonmidland

    londonmidland Well-Known Member

    Joined:
    Nov 8, 2017
    Messages:
    3,423
    Likes Received:
    18,141
    Unfortunately there doesn’t seem to be any other effective way of increasing the depth of shadows, without making everything else too dark. I find by default everything is way too ‘flat’ looking, as TSW’s skylight causes some weird side effects with the lighting.
     
    • Like Like x 2
  26. Dinosbacsi

    Dinosbacsi Well-Known Member

    Joined:
    Sep 20, 2017
    Messages:
    3,312
    Likes Received:
    8,665
    That looks like a pretty good result. Which line is this SSGI exactly? I'm thinking about trying it out myself.
     
  27. londonmidland

    londonmidland Well-Known Member

    Joined:
    Nov 8, 2017
    Messages:
    3,423
    Likes Received:
    18,141
    I use it via Unreal Engine Unlocker, but I think you add it to your engine.ini file to enable it permanently.

    I recommend using:
    r.SSGI.Enable=1
    r.SSGI.HalfRes=1
    r.SSGI.Quality=3
     
    • Helpful Helpful x 1
  28. DTG Matt

    DTG Matt Executive Producer Staff Member

    Joined:
    Nov 17, 2016
    Messages:
    2,679
    Likes Received:
    13,794
    One of the reasons for the lack of shadows under seats is that they dont exist in the model of the train at all in the first place. We model them empty, seats and other furniture are then modelled individually so that if there are 50 of the same seat, then it only exists in ram once, then we use Hierarchical Instance Static Mesh to instance the seating and other furniture in the trains. This also then takes care of eliminating it from the model once it gets any distance away, and also eliminates it from the model if you are looking away from it. UE4 only has HISMs in the scene within the view cone in front of you - so if you stop it updating the scene and turn around, you'll find everything behind you is gone.

    What we need to do is find a way to get both the AO *and* the HISM seating working somehow - I suspect that Rivet have simply not applied HISM's for the seating and simply done it in the model, which is probably fine for a 2 car unit, but won't scale well.

    Matt.
     
    • Like Like x 10
    • Helpful Helpful x 5
  29. Dinosbacsi

    Dinosbacsi Well-Known Member

    Joined:
    Sep 20, 2017
    Messages:
    3,312
    Likes Received:
    8,665
    Could an invisible rectangular mesh (kind of like a collision box) placed in the seats' position work as a "placeholder" for the AO?

    I mean I'm kind of thinking like in many old games, where they had the actual 3D model for display, but had a different low-poly model used just for rendering shadows on the ground. Just a thought, don't know if it even makes sense in this regard.

    Thank you, I will try it out next time I play.
     
    • Like Like x 1
  30. Maik Goltz

    Maik Goltz Well-Known Member

    Joined:
    Dec 9, 2016
    Messages:
    952
    Likes Received:
    4,345
    Not even needed i would say. You need to render a AO map with the seats in place and thats it. But again, AO gets burned away from light sources. So this is a different problem on top.

    To show what i mean with "buring away", a actual example from my loco where we rendered the AO accidentally underneath a switch. The flashlight burns it away completely. And so do other brighter light sources.
    20211004212454_1.jpg 20211004212502_1.jpg 20211004212506_1.jpg
     
    Last edited: Oct 4, 2021
    • Like Like x 2
    • Helpful Helpful x 1
  31. orb

    orb Well-Known Member

    Joined:
    Aug 22, 2021
    Messages:
    442
    Likes Received:
    487
    Just increase r.Color.Mid and r.Color.Max at the same time when decreasing r.SkylightIntensityMultiplier.
     
    Last edited: Oct 4, 2021
  32. HeyYoPaulie!

    HeyYoPaulie! Well-Known Member

    Joined:
    Jan 23, 2021
    Messages:
    165
    Likes Received:
    381
    Try this (keeping you SSGI settings enabled):

    r.Color.Max=1.0
    r.Color.Mid=0.5
    r.Color.Min=-0.01 (note the minus. This is <0)

    Maintains the brightness / vibrancy of the sun, but deepens all shadows. You can go even deeper by reducing color.min in small increments below 0, or higher if the shadows are took dark. E.g. r.Color.Min=-0.007
     
    Last edited: Oct 6, 2021
    • Like Like x 1
  33. londonmidland

    londonmidland Well-Known Member

    Joined:
    Nov 8, 2017
    Messages:
    3,423
    Likes Received:
    18,141
    Thanks, I’ll give it a try later.
     
  34. trainside

    trainside New Member

    Joined:
    Apr 15, 2021
    Messages:
    18
    Likes Received:
    16
    I use GTAO (Ground Truth Ambient Occlusion), I think it produces a better result than SSAO and it doesn't use more resources unless you go wild with the values, also you get ambient occlusion in passenger interiors and darker shadows.

    I use these values in my Engine.ini

    r.AmbientOcclusion.Method=1
    r.GTAO.FalloffEnd=35
    r.GTAO.SpatialFilter=0
    r.GTAO.NumAngles=2
    r.GTAO.UseNormals=1
    r.GTAO.ThicknessBlend=0
     
    • Helpful Helpful x 4
    • Like Like x 1
  35. londonmidland

    londonmidland Well-Known Member

    Joined:
    Nov 8, 2017
    Messages:
    3,423
    Likes Received:
    18,141
    I’ll give this a try later. Would you mind posting some in game pictures of it, please?
     
  36. trainside

    trainside New Member

    Joined:
    Apr 15, 2021
    Messages:
    18
    Likes Received:
    16
    GTAO (Ground Truth Ambient Occlusion)
    Exterior On
    [​IMG]
    Exterior Off
    [​IMG]
    Interior On
    [​IMG]
    Interior Off
    [​IMG]
     
    Last edited: Oct 6, 2021
    • Helpful Helpful x 2
    • Like Like x 1
  37. solicitr

    solicitr Well-Known Member

    Joined:
    Jun 20, 2020
    Messages:
    11,736
    Likes Received:
    17,949
    So, which works better?
    a) SSGI
    b) GTAO
    c) Both of the above
     
  38. Dinosbacsi

    Dinosbacsi Well-Known Member

    Joined:
    Sep 20, 2017
    Messages:
    3,312
    Likes Received:
    8,665
    I've tried them out and I have to say, it's a pretty good result. It's subtle, but definitely gives more detail to darker areas and gives everything that nice little touch. I especially liked the results in the underground sections of LIRR.
    [​IMG][​IMG]

    But sadly, my GTX 1050Ti didn't really like it, I had quite a significantly lower framerate with these settings. So I think I'll have to go on without them.
     
    • Like Like x 2
  39. HeyYoPaulie!

    HeyYoPaulie! Well-Known Member

    Joined:
    Jan 23, 2021
    Messages:
    165
    Likes Received:
    381
    Having tested the three variants above, I recommend GTAO. SSGI can look great, but it's not worth the additional performance hit.

    You don't need both.

    I currently have GTAO set at 300, but well worth experimenting with different values.

    My settings:

    [SystemSettings]
    r.TextureStreaming=0
    r.Streaming.HLODStrategy=2
    r.Color.Max=1.0
    r.Color.Mid=0.5
    r.Color.Min=-0.002
    r.ViewDistanceScale=4
    foliage.LODDistanceScale=3
    r.Shadow.FilterMethod=1
    r.Shadow.DistanceScale=2
    r.LandscapeLODDistributionScale=3
    r.EyeAdaptationQuality=2
    r.MaxAnisotropy=16
    r.BloomQuality=5
    ts2.CameraMotionSway.EnableUprightCompensation=0
    ts2.CameraMotionSway.KSitting.Y=200.0
    ts2.CameraMotionSway.KSitting.Z=200.0
    ts2.CameraMotionSway.LSitting.Y=40
    ts2.CameraMotionSway.LSitting.Z=5.0
    ts2.CameraMotionSway.SittingPivotOffset=-200
    ts2.CameraMotionSway.LSitting.X=50
    r.DefaultFeature.LensFlare=True
    r.LensFlareQuality=2
    ts2.passenger.DensityScale=2
    ts2.platform.MaxPlatformPassengerSpawnDistance=300000
    ts2.platform.MaxStationPassengerSpawnDistance=400000
    ts2.platform.MaxSpawnInterval=5
    ts2.platform.MinSpawnInterval=150
    r.SkylightIntensityMultiplier=1
    r.LightMaxDrawDistanceScale=150
    ts2.dbg.Camera.MaxVerticalHeight=5000
    ts2.dbg.RelinquishPromptWaitTime=60
    r.AmbientOcclusion.Method=1
    r.GTAO.FalloffEnd=300
    r.GTAO.SpatialFilter=0
    r.GTAO.NumAngles=2
    r.GTAO.UseNormals=1
    r.GTAO.ThicknessBlend=0
    r.GTAO.Upsample=1
    r.GTAO.TemporalFilter=1
    r.PostProcessAAQuality=6
    r.TemporalAASamples=4
    r.TemporalAASSharpness=2
    t.MaxFPS=60

    [/Script/Engine.UserInterfaceSettings]
    ApplicationScale=0.650

    [Audio]
    UnfocusedVolumeMultiplier=1.000000
     
  40. Dinosbacsi

    Dinosbacsi Well-Known Member

    Joined:
    Sep 20, 2017
    Messages:
    3,312
    Likes Received:
    8,665
    Which video card do you use these settings with?
     
  41. solicitr

    solicitr Well-Known Member

    Joined:
    Jun 20, 2020
    Messages:
    11,736
    Likes Received:
    17,949
    OK. With my current settings the shadows are inky pitch-black, even with r.color.min set to 0. Going to have to play some more. To lighten GTAO, does one go up or down from 300?
     
  42. HeyYoPaulie!

    HeyYoPaulie! Well-Known Member

    Joined:
    Jan 23, 2021
    Messages:
    165
    Likes Received:
    381
    An RTX 3080
     
  43. HeyYoPaulie!

    HeyYoPaulie! Well-Known Member

    Joined:
    Jan 23, 2021
    Messages:
    165
    Likes Received:
    381
    What are your color & sky multiplier settings?

    To lighten, go lower. To darken, go higher
     
  44. solicitr

    solicitr Well-Known Member

    Joined:
    Jun 20, 2020
    Messages:
    11,736
    Likes Received:
    17,949
    r.Color.Max=0.8
    r.Color.Mid=0.5
    r.Color.Min=-0.0
    r.TonemapperGamma=2
    r.SkylightIntensityMultiplier=0.5

    By lower, do you mean 290, or 200? Or 20? Often meaningful increments in these settings are hard to make sense of (with r.color.min it's 1/100ths!)
     
  45. Dinosbacsi

    Dinosbacsi Well-Known Member

    Joined:
    Sep 20, 2017
    Messages:
    3,312
    Likes Received:
    8,665
    Damn. My 1050Ti is not going to love them then, lol.
     
  46. HeyYoPaulie!

    HeyYoPaulie! Well-Known Member

    Joined:
    Jan 23, 2021
    Messages:
    165
    Likes Received:
    381
    Before changing your GTAO settings, I encourage you to:
    1. Revert your color settings to 1, 0.5 and 0
    2. Revert your sky intensity multiplier to 1.
    Then use your current GTAO settings and see what you think.

    The settings you have are massively decreasing the intensity of light in each and every scene. It's literally like walking around with dark sunglasses on.

    However, this is all subjective, and you may prefer your current settings.

    GTAO: Drop it by 100 at a time, then fine tune from there. E.g. Try it at 200,100 and 50, and tweak up / down from there.

    *Deeper shadows can be further enhanced by lowering color.min below zero. For example, mine is set at -0.002 (note the minus).

    Curious to hear your thoughts!
     
    Last edited: Oct 13, 2021
  47. HeyYoPaulie!

    HeyYoPaulie! Well-Known Member

    Joined:
    Jan 23, 2021
    Messages:
    165
    Likes Received:
    381
    The commands with most impact tend to be distance scale, so those can be tuned down. Try them and see. I reckon you'll be good to go!
     
  48. solicitr

    solicitr Well-Known Member

    Joined:
    Jun 20, 2020
    Messages:
    11,736
    Likes Received:
    17,949
    Yes. I put them in to correct the default overbright, washed-out look.

    I did have r.color.min set to -.008, which worked well before the GTAO tweak. Moving it back to zero was an attempt to compensate, but the shadows are still way too dark.
     
  49. HeyYoPaulie!

    HeyYoPaulie! Well-Known Member

    Joined:
    Jan 23, 2021
    Messages:
    165
    Likes Received:
    381
    All good. Keep lowering the GTAO value until you find your preference.
     
  50. SaMa1

    SaMa1 Active Member

    Joined:
    Dec 8, 2016
    Messages:
    74
    Likes Received:
    126
    I think the problem lies partially in UE4 where you can't pre-bake Global Illumination to imported models without overly complicated material shader models. Good news is that UE5 is going to fix this pretty much. I tested the UE5 and the results with unbaked model are very similar to prebaked textures with the addition that the illumination actually changes dynamically(cabin shadowing and wall reflections look very different based on time of day and surrounding environment)
     

Share This Page