Announcement

Collapse
No announcement yet.

Dynamic shadows artifacts

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Originally posted by Deathrey View Post
    This is more or less universal problem for shadow mapping algorithms.
    A bit more details under the spoiler.
    I might be wrong but what you describe looks like the standard-issue shadow acne, where the artifacts are caused by screen pixel - shadowmap texel mismatch as you explained.
    what we see here, the artifacts that produce faceted-looking shadows being discussed here, really look like a different problem - the problem appears based on the model's topology completely independent from the shadowmap texels

    Click image for larger version  Name:	shadowacne.jpg Views:	1 Size:	50.2 KB ID:	1407436

    I still think we're missing something here because every other engine out there (including UE3) does not have these faceted-looking shadows we're seeing here and I don't imagine all those other engines out there (old and new) have Receiver plane depth bias implemented (UE3 doesnt for sure).
    Regular shadow acne is something we've come to live with and accept, it's a known limitation and it's pretty much in every engine. but this issue here is much more perceivable and it screams bad quality all over the place
    if this is indeed the same problem as the regular shadow acne it still feels wrong that it's visible in such a large area of a sphere surface, as in every other engine (including UE3) shadow acne is only really visible at the lights' grazing angles
    Last edited by Chosker; 01-03-2018, 07:06 AM.
    Follow me on Twitter!
    Developer of Elium - Prison Escape
    Local Image-Based Lighting for UE4

    Comment


      Originally posted by Chosker View Post
      Click image for larger version Name:	shadowacne.jpg Views:	1 Size:	50.2 KB ID:	1407436
      If you look at the screen space projected shadow in renderdoc, before lighting and post processing can hide some of the artifacts, it looks like this:



      How can it be so crazy messed up?

      Comment


        Originally posted by Zeblote View Post

        How can it be so crazy messed up?
        Hey it's all crazy man! .

        Three reasons, either UE4 has a serious problem with it.

        Or UE3 games never used detailed low bias shadows and they where avoiding it that way.

        Or both.

        Comment


          Originally posted by Chosker View Post
          I might be wrong but what you describe looks like the standard-issue shadow acne, where the artifacts are caused by screen pixel - shadowmap texel mismatch as you explained.
          what we see here, the artifacts that produce faceted-looking shadows being discussed here, really look like a different problem - the problem appears based on the model's topology completely independent from the shadowmap texels
          It is still same issue. It is just that the larger the shadow filter is, the more grades of shade it will have, to a point where it is hard to see individual acne lines and a face might look uniformly shadowed to a certain degree.




          Originally posted by Chosker View Post
          I still think we're missing something here because every other engine out there (including UE3) does not have these faceted-looking shadows we're seeing here
          If you take a closer look, the acne on that pic follows the faces of the model exactly the same way, like UE4 problem, that we are discussing. If you bump down UE4 quality settings to a level of UDK defaults, you would see something like this.






          Originally posted by Chosker View Post
          and I don't imagine all those other engines out there (old and new) have Receiver plane depth bias implemented (UE3 doesnt for sure).
          Nope, indeed. Most had been getting away with a combination of bias and slope-scaled bias.


          Originally posted by Chosker View Post
          Regular shadow acne is something we've come to live with and accept, it's a known limitation and it's pretty much in every engine. but this issue here is much more perceivable and it screams bad quality all over the place
          The state of the problem in UE4 by default is pretty severe, I'd agree.




          Originally posted by Chosker View Post
          if this is indeed the same problem as the regular shadow acne it still feels wrong that it's visible in such a large area of a sphere surface, as in every other engine (including UE3) shadow acne is only really visible at the lights' grazing angles
          On a big scale, only few thing have changed since UDK, namely PCF filter size, and shadow resolution. It became larger in UE4 compared to UDK.




          Originally posted by Zeblote View Post

          Would it be a simple change to copy this over to normal shadows?
          Yep.




          Originally posted by William K View Post

          Hey thanks man for taking the time to explain this, any guesses on the pros and cons as to why Epic may not have chosen the latter two options that would result with relatively better shadowing?
          It is hard to guess. Pretty sure they had valid reasons. Simplicity, consistency of results and platform/hardware compatibility comes to mind. Usage of classic slope-scaled depth bias varies slightly between between platforms and imposes restriction on a format of render targets, that can be used for shadow rendering.Implementing it in a hello-world app is incomparably easier, than in established engine. Adaptive bias might not run on every mobile phone out there, plus it has a measurable performance hit and on top of that, it can occasionally produce visual issues far more severe than the issue we are talking about. As opposed to these, flat bias is as simple as a brick and will reliably run on any toaster. Last but not least, up to a certain point, flat bias, backed by soft depth comparison, was just sufficient. In any case, these are just wild guesses as I see it. Whatever was the initial reason, I have a firm faith that UE4 needs slope-scaled bias. It would also be preferable to be able to adjust depth bias and slope-scaled depth bias for each cascade split individually.


          Here is a short overview of what one can expect from various biasing techniques in UE4 under the spoiler:
           
          Spoiler
          Last edited by Deathrey; 01-03-2018, 03:23 PM.

          Comment


            Following previous post, IMGSLI comparison links for convenience:



            Bias VS Increased Bias
            https://imgsli.com/MTA2MA


            Bias VS Bias + SlopeScaledBias
            https://imgsli.com/MTA1OQ


            Increased Bias VS Bias + SlopeScaledBias
            https://imgsli.com/MTA2MQ


            Bias VS ReceiverPlaneBias
            https://imgsli.com/MTA2Mg


            ReceiverPlaneBias VS Bias + ReceiverPlaneBias
            https://imgsli.com/MTA2Mw


            Bias + ReceiverPlaneBias VS Bias + SlopeScaledBias
            https://imgsli.com/MTA2NA


            Bias + SlopeScaledBias VS Bias + SclopeScaledBias + ReceiverPlaneBias
            https://imgsli.com/MTA2NQ


            Bias VS Bias + SclopeScaledBias + ReceiverPlaneBias
            https://imgsli.com/MTA2Ng
            Last edited by Deathrey; 01-04-2018, 07:21 AM.

            Comment


              Can you share the code for both methods so we can use whichever works better in game as a temporary solution?

              Comment


                Originally posted by Zeblote View Post
                Can you share the code for both methods so we can use whichever works better in game as a temporary solution?
                I did post RPDB code a few pages behind in the thread. Here are the same files for 4.18.
                Cannot share proper slope-scaled depth bias code unfortunately, as there were others involved.

                Alternatively you could give a try to this material function for 4.18.1. It mimics slope scaled depth bias, with an exception that unlike the proper one, it operates per-vertex and does not come for free.


                Last edited by Deathrey; 01-04-2018, 02:20 PM.

                Comment


                  Working on a moon landscape. Not sure what to do about this.


                  Artstation
                  Join the support channel
                  Gumroad Store

                  Comment


                    Aw ****, I'm a week too late to wish this thread a happy birthday.

                    Comment


                      I encourage everyone to post works, broken due to this issue that you wouldn't be able to showcase otherwise.
                      Perhaps this will keep the thread afloat and raise the awareness.

                      Comment


                        Originally posted by Mark Zubenko View Post
                        I encourage everyone to post works, broken due to this issue that you wouldn't be able to showcase otherwise.
                        Perhaps this will keep the thread afloat and raise the awareness.
                        That is a great idea, we should do this.

                        I also encourage everyone to mention this topic everywhere publicly possible, like in other forums, the gamedev reddit or when Epic is publishing a new blog post about how awesome their engine is. This needs a lot more attention.

                        Comment


                          Originally posted by spacegojira View Post

                          That is a great idea, we should do this.

                          I also encourage everyone to mention this topic everywhere publicly possible, like in other forums, the gamedev reddit or when Epic is publishing a new blog post about how awesome their engine is. This needs a lot more attention.
                          tried it once, didn't yield any results

                          https://twitter.com/ChoskerSanz/status/909690139517050880

                          Follow me on Twitter!
                          Developer of Elium - Prison Escape
                          Local Image-Based Lighting for UE4

                          Comment


                            Originally posted by Chosker View Post

                            tried it once, didn't yield any results

                            https://twitter.com/ChoskerSanz/status/909690139517050880
                            Yes they are trying really hard to ignore us. We just have to keep mentioning it, the more public we get the sooner Epic is coming out of the crypt.

                            Comment


                              Originally posted by Maximum-Dev View Post
                              Working on a moon landscape. Not sure what to do about this.




                              Artstation
                              Join the support channel
                              Gumroad Store

                              Comment


                                Maybe someone should drive to Epic HQ in Cary, North-Carolina and tell them about this :P
                                Last edited by jonimake; 01-23-2018, 08:48 AM.

                                Comment

                                Working...
                                X