I Found A 'hidden' Night Lighting Feature?

Discussion in 'PC Discussion' started by londonmidland, Aug 11, 2021.

  1. londonmidland

    londonmidland Well-Known Member

    Joined:
    Nov 8, 2017
    Messages:
    2,248
    Likes Received:
    10,135
    So I was messing around with Unreal Engine Unlocker, and was just trying some commands out. I then realised I managed to enable moonlight shadows at night, as well as change the overall lighting.

    Not only did this enable the shadows, but it seemed to turn off the default flat night lighting, which fixes the weird blueish tint trains have at night. It also allowed buildings to reflect off the moonlight, instead of being completely dark. This is different to selecting the default clear weather too, as it doesn't enable it.

    Note: This is completely experimental - It only works on certain TSW 2 routes, between around the times of 00:00 and 03:00. Naturally it also has a performance impact in areas which produce a lot of shadows. The moonlight intensity can also be quite strong depending on the time of night.

    I used ts2.dbg.SetCloudiness 100 and then ts2.dbg.SetCloudiness -100

    Some comparisons below:

    Default:
    TSW2_Josh_1628702800_00.jpg Enabled:
    TSW2_Josh_1628702808_00.jpg Default:
    TSW2_Josh_1628703376_00.jpg Enabled:
    TSW2_Josh_1628703383_00.jpg
     
    Last edited: Aug 11, 2021
    • Like Like x 25
    • Helpful Helpful x 3
  2. londonmidland

    londonmidland Well-Known Member

    Joined:
    Nov 8, 2017
    Messages:
    2,248
    Likes Received:
    10,135
    TSW2_Josh_1628701283_00.jpg TSW2_Josh_1628701291_00.jpg TSW2_Josh_1628701317_00.jpg TSW2_Josh_1628701322_00.jpg
     
    • Like Like x 25
  3. heyitspopcorn

    heyitspopcorn Well-Known Member

    Joined:
    Oct 6, 2017
    Messages:
    250
    Likes Received:
    643
    Holy crap. What a difference that makes! I really hope this system can be introduced into routes going forward. And possibly for preserved collection routes, too?
     
    • Like Like x 10
  4. londonmidland

    londonmidland Well-Known Member

    Joined:
    Nov 8, 2017
    Messages:
    2,248
    Likes Received:
    10,135
    I believe DTG need to fix their lighting cycle, as well as some other things, for this to work properly.

    Also, this only works with the new TSW 2 skybox system.
     
    • Like Like x 5
  5. Mat_Jam_Ca

    Mat_Jam_Ca Well-Known Member

    Joined:
    Jun 4, 2020
    Messages:
    3,756
    Likes Received:
    7,321
    Wowsers. That makes a HUGE difference. Why isn’t this activated in the game?
     
    • Like Like x 6
  6. Mat_Jam_Ca

    Mat_Jam_Ca Well-Known Member

    Joined:
    Jun 4, 2020
    Messages:
    3,756
    Likes Received:
    7,321
    Maybe it’s a project in progress, or something that was started before hitting a pretty significant snag. In any event, it shows what can be achieved - given the effort.
     
  7. londonmidland

    londonmidland Well-Known Member

    Joined:
    Nov 8, 2017
    Messages:
    2,248
    Likes Received:
    10,135
    I believe this is the exact reason. It's very experimental at the moment and could be better optimised in some areas.

    Still, it shows the potential of the night lighting in TSW 2.
     
    • Like Like x 6
  8. Haverknol

    Haverknol Member

    Joined:
    Jun 4, 2018
    Messages:
    20
    Likes Received:
    48
    Wow, it looks so cool! What does it look like before 00:00 and after 03:00?
     
  9. londonmidland

    londonmidland Well-Known Member

    Joined:
    Nov 8, 2017
    Messages:
    2,248
    Likes Received:
    10,135
    Pretty much the same as normal night lighting before 00:00 after around 03:00 will make scenes look super bright. So there's still a lot of work to be done.
     
    • Like Like x 1
  10. heyitspopcorn

    heyitspopcorn Well-Known Member

    Joined:
    Oct 6, 2017
    Messages:
    250
    Likes Received:
    643
    It’s really incredible the effect that a simple (or perhaps not so simple, as it has not been implemented yet) lighting change can have, though. The shot of the rear of the ICE 3M goes from looking flat and cartoonish to looking like it really inhabits an actual world space.
     
    • Like Like x 4
  11. chieflongshin

    chieflongshin Well-Known Member

    Joined:
    Jan 4, 2019
    Messages:
    1,468
    Likes Received:
    1,787
    My god thats beautiful. I hope the whole dtg team see this and get it in.
     
    • Like Like x 1
  12. Crosstie

    Crosstie Well-Known Member

    Joined:
    Dec 8, 2016
    Messages:
    1,814
    Likes Received:
    3,320
    Thanks for the pics. This points to the fact that even a minimal improvement in the night lighting would be the difference between being able to drive at night or not for me, at least. I think UE4 can be stretched out a lot more than it has been so far.
     
    • Like Like x 1
  13. londonmidland

    londonmidland Well-Known Member

    Joined:
    Nov 8, 2017
    Messages:
    2,248
    Likes Received:
    10,135
    Absolutely. Even with minimal lighting from buildings and other things, the moonlight makes up for this and the shadows casting from it look so nice when casting on the tracks and inside your cab.
     
    • Like Like x 2
  14. anarchy99

    anarchy99 Member

    Joined:
    Feb 7, 2021
    Messages:
    37
    Likes Received:
    65
    I was excited about distant field shadows coming with the 4.26 update. This will be another level of improvement. Cool find.
     
    • Like Like x 1
  15. londonmidland

    londonmidland Well-Known Member

    Joined:
    Nov 8, 2017
    Messages:
    2,248
    Likes Received:
    10,135
    This isn’t perfect by any means, however when you do find the right time of night, it’s fantastic to drive in.
     
    • Like Like x 2
  16. Mat_Jam_Ca

    Mat_Jam_Ca Well-Known Member

    Joined:
    Jun 4, 2020
    Messages:
    3,756
    Likes Received:
    7,321
    I can’t stop looking at the pictures. The ICE3 looks absolutely stunning.
     
    • Like Like x 1
  17. rat7_mobile

    rat7_mobile Active Member

    Joined:
    Feb 1, 2020
    Messages:
    438
    Likes Received:
    150
    I find this very interessting, and pardon my question being no expert but would the two line not cancel each other in the ENGINE.INI file
    ts2.dbg.SetCloudiness 100
    ts2.dbg.SetCloudiness -100
     
  18. londonmidland

    londonmidland Well-Known Member

    Joined:
    Nov 8, 2017
    Messages:
    2,248
    Likes Received:
    10,135
    It looks fantastic. Bear in mind there are no late night ICE services (I think) so you might have to manually adjust the clock via the command.
     
    • Like Like x 2
  19. londonmidland

    londonmidland Well-Known Member

    Joined:
    Nov 8, 2017
    Messages:
    2,248
    Likes Received:
    10,135
    I think the minus value disables TSW’s night lighting and enables UE4’s dynamic lighting.

    You have to do it in that order, otherwise it won’t work. So you can’t go from clear skies to -100, for example.
     
  20. rat7_mobile

    rat7_mobile Active Member

    Joined:
    Feb 1, 2020
    Messages:
    438
    Likes Received:
    150
    Thanks for the information, it is just that when you looked at them, it look like the second line undo the first one, however since you confirmed it works, I will add them to my Engine.ini file
     
  21. londonmidland

    londonmidland Well-Known Member

    Joined:
    Nov 8, 2017
    Messages:
    2,248
    Likes Received:
    10,135
    I wouldn't advise doing so as this is very experimental and only works at certain times of the night. That's why I recommend you do it via the Unreal Engine Unlocker, as that allows you to enable and disable it in real time.
     
  22. Maik Goltz

    Maik Goltz Well-Known Member

    Joined:
    Dec 9, 2016
    Messages:
    462
    Likes Received:
    1,766
    This is not really magical. What is does is to set the could density. The real used and clamped value is 0-1. So with 100 you basically set the cloud layer to be 1 normalized (100% clouds and so the moon cant shine through). With -100 you set it to 0 what means no clouds and the moon can do its thing (it is nothingt else than the sun at daytime but with a different light colour). Nothing really new tbh.
     
    • Helpful Helpful x 5
    • Like Like x 1
  23. londonmidland

    londonmidland Well-Known Member

    Joined:
    Nov 8, 2017
    Messages:
    2,248
    Likes Received:
    10,135
    This is different to selecting clear weather and manually typing in -100 though.

    Look at the differences below. For a start, you don't get the train roof glowing.

    TSW2_Josh_1628718095_00.jpg TSW2_Josh_1628718106_00.jpg
    TSW2_Josh_1628718285_00.jpg TSW2_Josh_1628718294_00.jpg
     
    • Like Like x 4
  24. breblimator

    breblimator Well-Known Member

    Joined:
    May 1, 2019
    Messages:
    2,989
    Likes Received:
    3,394
    haha, nice \o/

     
  25. DominusEdwardius

    DominusEdwardius Active Member

    Joined:
    Dec 8, 2016
    Messages:
    172
    Likes Received:
    202
    Amusingly the Cloudiness is one of the variables which isn't actually clamped 0-1 if i recall (bizarrely wetness isn't either but really really really don't do that). I think what is happening here is fairly simple, because its not clamped its actually changing the skydome texture in a very funky way making it darker and hence also affecting the reflection capture cubemap and resulting ambient skylight. Regardless of method, whats happening is simply the skylight intensity or colour is being changed.
     
    Last edited: Aug 11, 2021
  26. Cyklisten

    Cyklisten Well-Known Member

    Joined:
    Sep 29, 2019
    Messages:
    170
    Likes Received:
    259
    Oh man, jest piękny, it's beautiful! As part-time night worker between 2009-2019 I'm in love with moonlight and night shadows!
     
    • Like Like x 1
  27. formulabee#1362

    formulabee#1362 Well-Known Member

    Joined:
    Dec 21, 2020
    Messages:
    1,245
    Likes Received:
    1,512
    Wow! What a difference! DTG really need to sort out their shambolic night lighting because it puts me off from driving services in the dark
     
    • Like Like x 1
  28. animalkosmik

    animalkosmik Well-Known Member

    Joined:
    Sep 22, 2017
    Messages:
    526
    Likes Received:
    2,039
    you probably don't play much, since this is the default lighting and shadows, if there is a moon, here's an old skybox and the time is 22:30, just set clear weather with the moon in service mode ;)
    20210812100633_1.jpg
    20210812100702_2.jpg
    20210812100809_1.jpg
    20210812100920_1.jpg
    20210812101005_1.jpg
     
    • Like Like x 5
  29. matinakbary

    matinakbary Well-Known Member

    Joined:
    Oct 4, 2020
    Messages:
    852
    Likes Received:
    2,047
    I guess this is in summer, right?
     
  30. londonmidland

    londonmidland Well-Known Member

    Joined:
    Nov 8, 2017
    Messages:
    2,248
    Likes Received:
    10,135
    It looks very similar, yes. However in the newer TSW 2 routes, when selecting clear weather at night, it makes nights look way too bright. Plus it adds a weird blue tinge to the rails, roofs and trains, as seen in the above pictures I posted.

    This could be an unintentional side effect of the new TOD 2/3 skybox they use on newer routes. Hopefully DTG can make lighting more consistent in newer routes.
     
    • Like Like x 1
  31. LastTrainToClarksville

    LastTrainToClarksville Well-Known Member

    Joined:
    Oct 12, 2017
    Messages:
    1,996
    Likes Received:
    1,743
    That's quite beautiful and I'd like to try it, but where do these commands get inserted?
     
  32. animalkosmik

    animalkosmik Well-Known Member

    Joined:
    Sep 22, 2017
    Messages:
    526
    Likes Received:
    2,039
    summer, but the season does not matter:)
     
  33. londonmidland

    londonmidland Well-Known Member

    Joined:
    Nov 8, 2017
    Messages:
    2,248
    Likes Received:
    10,135
    It gets inserted into the console whilst in game, which is provided by Unreal Engine Unlocker.
     
  34. LastTrainToClarksville

    LastTrainToClarksville Well-Known Member

    Joined:
    Oct 12, 2017
    Messages:
    1,996
    Likes Received:
    1,743
    Now I know as much as I did before, but I'm more confused.
     
  35. bluetiger#2496

    bluetiger#2496 Member

    Joined:
    Apr 27, 2021
    Messages:
    26
    Likes Received:
    25
    https://framedsc.github.io/GeneralGuides/universal_ue4_consoleunlocker.htm The instructions are on the download page. It's an external program that you run alongside TSW2 that lets you modify the engine on the fly as it's running. It's helpful to see instantly the effects of any changes, and there are variables you can edit from it that the ini won't allow. For instance, you can manually change signal aspects, which is handy for certain bugged situations. https://train-sim-world.fandom.com/wiki/Console_Commands This is a handy list of useful commands.
     
  36. LastTrainToClarksville

    LastTrainToClarksville Well-Known Member

    Joined:
    Oct 12, 2017
    Messages:
    1,996
    Likes Received:
    1,743
    I think that's above my "play grade".
     

Share This Page