Ue 4.26 Distance Field Shadows Feature

Discussion in 'TSW General Discussion' started by londonmidland, Jul 22, 2021.

  1. londonmidland

    londonmidland Well-Known Member

    Joined:
    Nov 8, 2017
    Messages:
    3,418
    Likes Received:
    18,011
    One thing I was pleasantly surprised about finding out in tonight's stream was that TSW will support distance field shadows, which will be applied to all TSW routes. I believe this will only work on PC and some higher end consoles?

    For those that don't know what it is, it draws out shadows a lot further than it currently does. So you'll see shadows under bridges and from assets from a lot further away. It isn't the same as live shadows, but it should still offer a significant improvement. We still, however, have the issue of shadows popping up on rails as it does not support splines at this moment. Which is what rails use.

    Some questions for DTG regarding this:
    - Is there an approximate distance that these field shadows draw out before not rendering?
    - Does the terrain and trees support this feature? So will hills and mountains be darkened by shadows as they are all currently 'bare' looking?
    - To my understanding, this feature draws out a 'simple' level of detail for distance shadows. Do these shadows get more accurate and detailed as the player moves closer to it?

    Here is a visual example of the differences below. Notice the detail around the trees, as well as the area around the rock face:

    DFS off:
    [​IMG]

    DFS on:
    [​IMG]
     
    • Like Like x 20
    • Helpful Helpful x 4
  2. SprattyHeath

    SprattyHeath Well-Known Member

    Joined:
    Jul 12, 2018
    Messages:
    356
    Likes Received:
    1,398
    My only concern about this is how far/close it will be rendered because no doubt it will be resource intensive.
     
  3. londonmidland

    londonmidland Well-Known Member

    Joined:
    Nov 8, 2017
    Messages:
    3,418
    Likes Received:
    18,011
    I assume the shadows settings will be of a bit more use now, if it is too resource intensive.
     
  4. Anthony Pecoraro

    Anthony Pecoraro Well-Known Member

    Joined:
    Dec 11, 2016
    Messages:
    3,711
    Likes Received:
    4,323
    Would you be able to try to make a side by side comparison? Do the same service as Matt, and see if you notice a difference.
     
  5. Yerolo

    Yerolo Well-Known Member

    Joined:
    Mar 16, 2018
    Messages:
    1,179
    Likes Received:
    2,359
    They said on stream it comes at no additional performance hit just due to how it precalculates the shadows (1h40m in the stream)
     
    • Like Like x 1
  6. Callum B.

    Callum B. Well-Known Member

    Joined:
    Aug 9, 2018
    Messages:
    1,638
    Likes Received:
    2,844
    This is quite an exciting feature as part of the 4.26 update that was surprisingly talked about for only a short time on the stream. Granted, there were bigger fish to fry in the Q&A. I greatly look forward to see how DFS improves the fidelity of the game during hours of less direct sunlight. Hopefully, it resolves the issue of brightly lit mountains and valleys in early morning and late evening. This is something we have been asking for for a long time now, and it is nice that it is coming to all TSW routes at launch.

    Cheers
     
    • Like Like x 8
  7. Inkar

    Inkar Well-Known Member

    Joined:
    Dec 13, 2016
    Messages:
    1,417
    Likes Received:
    2,335
    Yep, apparently it requires more memory to keep the precalculated data for the shadows but not much more processing power.
     
  8. Mattty May

    Mattty May Guest

    I would assume if the shadows are pre-baked, it means they are part of the texture lighting/colour rather than being generated live. On that basis, performance should remain relatively good. I hope distant scenery gets shadowing too. It would look stunning.
     
    • Like Like x 1
  9. ARuscoe

    ARuscoe Well-Known Member

    Joined:
    Apr 9, 2018
    Messages:
    10,832
    Likes Received:
    10,482
    What they said on stream is that the static assets are calculated ahead, but they hadn't worked out how to apply this to track. Thats why the gantry and tree shadows on the stream looked good, but the track shadows were drawing in a few yards in front of the train (very very noticably)
    One does wonder if you could have hidden or 1 pixel width assets which cast shadows that lie under the track assets themselves, so you get a "precast shadow" and then a drawn shadow as well?
     
    • Like Like x 1
  10. Maik Goltz

    Maik Goltz Well-Known Member

    Joined:
    Dec 9, 2016
    Messages:
    952
    Likes Received:
    4,345
    In my tests it was about 1200m max distance to use it. And that is a good value i guess.

    Generally yes. Basically every static mesh can use a distance field (except spline generated meshes like the tracks are).

    They blend over at a certain distance. If it is made good, you can't see it.


    No, that is not how this works. try to understand the distance filed as a sort of point-cloud around the mesh in a cubic-net arrangement. Each point gives the renderer pre comuted values for calculating the shadow on this object. This is a cheap thing for the renderer because the heavy load was done while importing the mesh. It would not work in the near distances very well, but at the DSF distances it works quite well. The same technique can be used (and i guess is used in TSW as well then) for ambient occlusion to darken the far distance treens for example.

    RDFS and RDFAO is a really nice technique to get better visual results with a cheap cost of precomputing the fields while importing the meshes (can be heavy time consuming for big projects when doing that step after all is done) and some bits of more memory usage at runtime (what excludes the non-pro consoles from using it).
     
    • Helpful Helpful x 17
    • Like Like x 2
  11. Wolfovizer

    Wolfovizer Well-Known Member

    Joined:
    Nov 17, 2020
    Messages:
    472
    Likes Received:
    524
    It looked very nice in the stream, I think this a great new feature :)
    ^Super helpful, thanks :)
     
    • Like Like x 1
  12. londonmidland

    londonmidland Well-Known Member

    Joined:
    Nov 8, 2017
    Messages:
    3,418
    Likes Received:
    18,011
    Thanks for the useful information Maik Goltz

    I’m looking forward to driving during sunrise and sunset, as this is when shadows are the most noticeable due to the positioning of the sun.
     
    • Like Like x 4
  13. londonmidland

    londonmidland Well-Known Member

    Joined:
    Nov 8, 2017
    Messages:
    3,418
    Likes Received:
    18,011
    It would be pretty hard to compare as the stream was compressed, so it didn’t give off the best example of it.
     
    • Like Like x 2
  14. zappatime

    zappatime Well-Known Member

    Joined:
    Mar 19, 2020
    Messages:
    151
    Likes Received:
    250
    Do you know if there is a workaround for distance shadows for spline generated meshes that has been achieved by someone in the Unreal community, is it solvable, because its still very noticeable in the stream last night? I'm trying to recall if Assetto Corsa Competizione (that uses the Unreal engine, not sure which version) has this problem on, say for instance, barrier rail shadows?
     
  15. fanta1682002

    fanta1682002 Well-Known Member

    Joined:
    Dec 22, 2019
    Messages:
    1,175
    Likes Received:
    561
    4.26
     
    • Like Like x 1
  16. Maik Goltz

    Maik Goltz Well-Known Member

    Joined:
    Dec 9, 2016
    Messages:
    952
    Likes Received:
    4,345
    No, i have not found any yet. There might be a solution by maybe a idividual person or even studio, but these things often don't see the community light.
     
  17. zappatime

    zappatime Well-Known Member

    Joined:
    Mar 19, 2020
    Messages:
    151
    Likes Received:
    250
    I'm surprised, this must be quite a common problem for anyone using spline meshes that there's such a noticeable break in shadowing in an engine that prides itself on recreating lifelike images. Let's hope some clever soul solves it/creates a workaround trick, unless of course Unreal 5 has resolved this ;-)
     
    • Like Like x 1
  18. stujoy

    stujoy Well-Known Member

    Joined:
    Aug 29, 2019
    Messages:
    6,451
    Likes Received:
    17,279
    This is an excellent feature and I’m looking forward to see the effects once I get my hands on a PS5 and the new version comes out. I’ve had to get used to the shadow line (even closer on PS4 than on PC) because I like to drive at times of day when the issue is most noticeable so it should increase my enjoyment of TSW greatly. It did look good in the stream.
     
    • Like Like x 3
  19. Crosstie

    Crosstie Well-Known Member

    Joined:
    Dec 8, 2016
    Messages:
    4,497
    Likes Received:
    10,072
    I know it was said that this will not create a performance hit, but, given how shadows in general are the most costly feature in terms of frame rates, I will wait and see. I presume we will have the same shadow level control we have now.
     
  20. DTG Matt

    DTG Matt Executive Producer Staff Member

    Joined:
    Nov 17, 2016
    Messages:
    2,672
    Likes Received:
    13,723
    To be honest I didn't go into it in much detail specifically because I didn't have some good comparison examples to show.

    In a later stream i'll put some slides together showing actual comparisons of with and without so you can see clearly, it is MUCH more obvious when you flip between two images rather than trying to remember how it was compared to what you're seeing.
     
    • Like Like x 20
    • Helpful Helpful x 1
  21. pinxtonpaws

    pinxtonpaws Guest

    From my understanding it's not coming to XB1/PS4 but it is coming to XSX/PS5.

    What about the X1X/PS4 pro? Are we getting any level of compromise? At the end of the day there are people out there who don't have an issue with ditching 4k in favour of 1080p with improved framerates and draw distances... Remember, the above two consoles might not be cutting edge but they are leaps and bounds more powerful than their standard equivalents and it would be a shame to see their capabilities overlooked
     
    • Like Like x 1
  22. Mattty May

    Mattty May Guest

    Having come from a PS4 Pro to a PS5, I think the PS4 Pro would struggle. As they are more or less end of life, I would expect new features like this to be limited to next gen. Tis the future after all.
     
  23. DTG Matt

    DTG Matt Executive Producer Staff Member

    Joined:
    Nov 17, 2016
    Messages:
    2,672
    Likes Received:
    13,723
    For launch, no, X1X and PS4 Pro are not getting DFS. PS4 Pro really doesn't offer much of an improvement in memory (which DFS specifically demands) - the X1X does so may be a candidate for the future if there's demand for it but it's not something we'll be doing at launch and as at this time, no plans to look in to. Plans may change of course, but, that's where we're at.
     
    • Like Like x 3
  24. fanta1682002

    fanta1682002 Well-Known Member

    Joined:
    Dec 22, 2019
    Messages:
    1,175
    Likes Received:
    561
    HAS THE WEATHER IMPROVED?
     
  25. pinxtonpaws

    pinxtonpaws Guest

    Well I saw it running on Matt's 'crappy' laptop in 1080p and honestly, I will take that over what 4k currently brings to the table. End of life? Maybe so but XB1/PS4 (and variants) users still represent the overwhelming majority of console gamers so some (myself included) may see any lack of visual/performance improvements as being a bit of a disappointment.
     
    • Like Like x 2
  26. Arpadiam

    Arpadiam Active Member

    Joined:
    Nov 4, 2020
    Messages:
    87
    Likes Received:
    142
    and that is still a current issue on Assetto competizione, i play every day since EA 0.1
    we called it The running shadow
     
    Last edited: Jul 23, 2021
  27. pinxtonpaws

    pinxtonpaws Guest

    Thanks for the info. In TrainSimWorldLand "may" is just the 5th month of the year so to avoid future disappointment I'll take that as a no :cool:
     
  28. Clumsy Pacer

    Clumsy Pacer Well-Known Member

    Joined:
    Dec 10, 2016
    Messages:
    2,956
    Likes Received:
    3,933
    They can reduce the resolution all they want it won't free up memory, which is what these new shadows need.
     
  29. matinakbary

    matinakbary Well-Known Member

    Joined:
    Oct 4, 2020
    Messages:
    1,686
    Likes Received:
    4,344
    I really would love to see, if escpecially arosa line benefits from this. The trees and mountains look very odd, but if the distance does not exceed the magical 1200m, the scenery on Arosa could look pretty decent.
     
  30. londonmidland

    londonmidland Well-Known Member

    Joined:
    Nov 8, 2017
    Messages:
    3,418
    Likes Received:
    18,011
    For those that are familiar with tweaking with ini commands, I think we may be able to manually adjust it ourselves?
     
  31. fanta1682002

    fanta1682002 Well-Known Member

    Joined:
    Dec 22, 2019
    Messages:
    1,175
    Likes Received:
    561
    是es
     
  32. conniethunder

    conniethunder Well-Known Member

    Joined:
    Feb 13, 2020
    Messages:
    342
    Likes Received:
    334
    I just re-watched some of the stream. It doesn't appear to have helped with the track and shadow draw distance though :(
     
  33. londonmidland

    londonmidland Well-Known Member

    Joined:
    Nov 8, 2017
    Messages:
    3,418
    Likes Received:
    18,011
    Its because tracks are a ‘spline’ which this technique doesn’t work for unfortunately.

    Though it’s still nice to see assets and terrain darkened by shadows appropriately instead of them being completely flat looking.
     
    • Helpful Helpful x 3
  34. Clumsy Pacer

    Clumsy Pacer Well-Known Member

    Joined:
    Dec 10, 2016
    Messages:
    2,956
    Likes Received:
    3,933
    I bumped up my shadow setting to high and played the same service as Matt, and the difference was more subtle than I expected (I normally have shadows set to low and I also turned bloom back on), but there was still a visible difference, even if I was running at least 10 minutes earlier (because I wasn't busy showing off new cameras, passengers and Track IRs). Even so, I could clearly see with DFS on the trees further out looked much better than with DFS off. Hopefully it'll provide a bigger difference to those like me who have shadows set to low.

    I did record it but the video it spewed out was about 15fps so that's gone in the bin.
     
  35. conniethunder

    conniethunder Well-Known Member

    Joined:
    Feb 13, 2020
    Messages:
    342
    Likes Received:
    334
    Assuming you've an NVIDIA GPU, I've found that 'NVIDIA GeForce Experience' can record/put out some decent MP4's.
     
  36. Arpadiam

    Arpadiam Active Member

    Joined:
    Nov 4, 2020
    Messages:
    87
    Likes Received:
    142
    i think the stream didnt have the new shadow's, was pointed out in the discord while the stream was running
     
  37. londonmidland

    londonmidland Well-Known Member

    Joined:
    Nov 8, 2017
    Messages:
    3,418
    Likes Received:
    18,011
    It did, however the quality of the stream was pretty poor, making it hard to see them.

    As Matt said above, a side-by-side comparison inside TSW of before and after will really show you the differences.
     
    • Like Like x 1
  38. DTG Matt

    DTG Matt Executive Producer Staff Member

    Joined:
    Nov 17, 2016
    Messages:
    2,672
    Likes Received:
    13,723
    Yes, it did have DFS enabled.

    Matt.
     
  39. cActUsjUiCe

    cActUsjUiCe Developer

    Joined:
    Sep 21, 2017
    Messages:
    681
    Likes Received:
    2,179
    I've been told that DFS has zero performance impact since they're baked beforehand. I don't know if this is true.
     
  40. londonmidland

    londonmidland Well-Known Member

    Joined:
    Nov 8, 2017
    Messages:
    3,418
    Likes Received:
    18,011
    I believe the only requirement is more memory (RAM) which is why older consoles can't take advantage of it as they have an insufficient amount of RAM available.
     
  41. DTG Matt

    DTG Matt Executive Producer Staff Member

    Joined:
    Nov 17, 2016
    Messages:
    2,672
    Likes Received:
    13,723
    I've certainly not noticed any performance impact from DFS so far.
     
    • Like Like x 2
    • Helpful Helpful x 2
  42. londonmidland

    londonmidland Well-Known Member

    Joined:
    Nov 8, 2017
    Messages:
    3,418
    Likes Received:
    18,011
    That's good to hear. Is it possible to manually increase it via ini values, for those that want to stretch the capabilities of their hadware, out of curiosity?
     
    • Like Like x 1
  43. Maik Goltz

    Maik Goltz Well-Known Member

    Joined:
    Dec 9, 2016
    Messages:
    952
    Likes Received:
    4,345
    No, there is a hard limit how far this works.

    And there is a tiny impact on performance as the stuff needs to get rendered. But you can't notice it if you not have the worst old PC on earth. Even PS4(Pro) and XBO(S/X) could do it easily performance wise but as said, they don't offer the memory to do it.
     
    • Helpful Helpful x 3
  44. schorni

    schorni Well-Known Member

    Joined:
    Nov 8, 2020
    Messages:
    293
    Likes Received:
    650
    Only for PC or also for the consoles?
     
  45. Inkar

    Inkar Well-Known Member

    Joined:
    Dec 13, 2016
    Messages:
    1,417
    Likes Received:
    2,335
    It is for PC and the NEW consoles (PS5 and Xbox series). Unfortunately the old consoles do not have enough memory.
     
  46. paul.pavlinovich

    paul.pavlinovich Well-Known Member

    Joined:
    Aug 21, 2020
    Messages:
    1,682
    Likes Received:
    1,950
    It isn't particularly CPU intensive but it does need memory, the shadows are baked into the textures from what I understand of it so when you load the texture you need more RAM to hold it.

    Paul
     
  47. paul.pavlinovich

    paul.pavlinovich Well-Known Member

    Joined:
    Aug 21, 2020
    Messages:
    1,682
    Likes Received:
    1,950
    Grab the 4.26 release next week on Epic for free and try it - I think they said DFS was included in the build going to Epic.

    Paul
     
  48. fanta1682002

    fanta1682002 Well-Known Member

    Joined:
    Dec 22, 2019
    Messages:
    1,175
    Likes Received:
    561
    Frps
     
  49. fanta1682002

    fanta1682002 Well-Known Member

    Joined:
    Dec 22, 2019
    Messages:
    1,175
    Likes Received:
    561
    yes me too
     
    • Like Like x 1
  50. schorni

    schorni Well-Known Member

    Joined:
    Nov 8, 2020
    Messages:
    293
    Likes Received:
    650
    It seems to me that this Epic version is taken too much as a technical demo instead of a game?
     

Share This Page