Announcement

Collapse
No announcement yet.

Any solution for the artifacts (the black stripes) using dynamic light with cascade shadows?

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

    Any solution for the artifacts (the black stripes) using dynamic light with cascade shadows?

    I know this is a recurrent theme, but I can't find a good solution for the dark stripes, like in this image:

    Click image for larger version

Name:	Test.jpg
Views:	1
Size:	393.7 KB
ID:	1200049

    With different values for the cascade, the artifacts appears more near or more far, but always appear.

    With different values for CSMSplitDepthBiasScale, the same thing.

    Using high values in shadowdepthbias the stripes are minimized, but then the shadows looks horrible.

    I have modified a lot of values related to cascade shadows, bias, nearclipplane, etc, in the ini files, with no good result.


    The only thing I can do is to try to align the meshes to not offer faces perpendicular to the light. But this is a serious limitation to create the maps.


    Somebody have found any magical solution for this?
    Provisional blog: http://cobaltudk.blogspot.com.es/
    Videos: https://www.youtube.com/user/cobaltudk
    Facebook: https://www.facebook.com/babylonprojectgame/

    #2
    there was never a fix for this AFAIK. the shadow settings/values on the ini are pretty much all you can do to minimize the issue
    anyway you have a day night cycle right? if so you'll always have an angle where this will happen (unless your buildings have a pyramid-like shape)

    you could also try the branching PCF shadows technique. I know it works for pointlights but I'm not sure if it also works for DominantDirectionalLights
    Code:
    scale set bEnableBranchingPCFShadows true
    scale set ShadowFilterRadius 5
    scale set ShadowFilterQualityBias 3
    you'll most likely have to adjust your shadow bias settings.
    the issue with the branching PCF shadows is they are quite noisy, and the shadow filter doesnt smooth it enough. but more radius means more spreading which potentially could reduce your issue (which is called "shadow acne" btw)
    Follow me on Twitter!
    Developer of Elium - Prison Escape
    Local Image-Based Lighting for UE4

    Comment


      #3
      Yes, I was testing with PCF shadows, but agravates the problem, the stripes are surrounded with noise... I was testing using low values to try more difuse shadows... but the result was horrible.

      The best option is to place the meshes oriented to the sun. There are a day/night cycle, but the sun only rotates in one axis, so a cube properly oriented will avoid the problem at the morning hours and at the afternoon. And perhaps the bias a bit higher. I use 0.02, to 0.05 still looks enough good.

      I have read in forums, and seems that others engines like Unity and Cry have the same problem with dynamic lights. In UE4 I think it's possible to avoid using raytraced shadows (or area shadows, not sure).
      Provisional blog: http://cobaltudk.blogspot.com.es/
      Videos: https://www.youtube.com/user/cobaltudk
      Facebook: https://www.facebook.com/babylonprojectgame/

      Comment


        #4
        Have you tried to up to 1000-2000 the whole scene dynamic shadows of the dominant directional light?
        A solution(time related one)might be to bake the light and shadow in a different app to the texture and make the object unlit.(that will leave the ground shadow which coud be a baked shadow too, pasted on a plane with transparency)But as I said this might be too crazy to do.

        In the UDKLightmass.ini there is a bAllowAdvancedOptions=false set it to true and now in the lightning build options in UDK you will have a extra button Advanced options.See if you can find something useful there.

        Comment


          #5
          Thanks for the tip, I can't use Lightmass. The map is 100 square kilometers with a day/nick cycle, the lights needs to be dynamic (and the shadows too).

          I have some presets for cascade shadows, with diferent ranges, cascades, exponents, and shadow map sizes. With some of them the stripes appears more near, with others more far...
          Provisional blog: http://cobaltudk.blogspot.com.es/
          Videos: https://www.youtube.com/user/cobaltudk
          Facebook: https://www.facebook.com/babylonprojectgame/

          Comment


            #6
            Would adding a Skylight make a difference ?

            Comment


              #7
              Originally posted by Yummy-Vegetables View Post
              Would adding a Skylight make a difference ?
              Skylight hasn't made much difference to mine.
              @Snipe34 Please try to stay focused. TKBS

              Comment


                #8
                Yes, I have a skylight but don't fix anything.
                Provisional blog: http://cobaltudk.blogspot.com.es/
                Videos: https://www.youtube.com/user/cobaltudk
                Facebook: https://www.facebook.com/babylonprojectgame/

                Comment


                  #9
                  The alingment with the sun light may solve partially the problem, but... with the day/night cycle, at 12:00 hours, the light are aligned with all the vertical surfaces and the problem appears again.

                  I'm thinking about modify progresivelly the shadow bias from 0.02 to 0.05, from 10 to 12 hours, and return to 0.02 until 14 hours. With the vertical light, the 0.05 bias are good. Will be a bias multiplier, so the user still can set the absolute bias value in the menus.
                  Provisional blog: http://cobaltudk.blogspot.com.es/
                  Videos: https://www.youtube.com/user/cobaltudk
                  Facebook: https://www.facebook.com/babylonprojectgame/

                  Comment


                    #10
                    Originally posted by CobaltUDK View Post
                    The alingment with the sun light may solve partially the problem, but... with the day/night cycle, at 12:00 hours, the light are aligned with all the vertical surfaces and the problem appears again.
                    that's why I said you can only get "rid of it" if your buildings have a pyramid-like shape (i.e. your walls would need to be sloped, not perfectly vertical)
                    Follow me on Twitter!
                    Developer of Elium - Prison Escape
                    Local Image-Based Lighting for UE4

                    Comment


                      #11
                      But as the sun light are rotating, faces of the pyramid semi-aligned to the light have the same problem. If the acne appears in a cube at 12:00, in a pyramid appears at 11:00 and 13:00, for example.

                      I have testing with bias and when the light is perpendicular to the floor, you can use higher values. The typical shadow offset are less noticeable with this angle. So you can "torear" this (but not solve it completly).
                      Provisional blog: http://cobaltudk.blogspot.com.es/
                      Videos: https://www.youtube.com/user/cobaltudk
                      Facebook: https://www.facebook.com/babylonprojectgame/

                      Comment


                        #12
                        uhmm yes there's always going to be an angle
                        another trick to "bullfight" it a bit more could be to make your sun not have a straight equatorial trajectory. i.e. at 12:00 it should be tilted to the side, and not facing perfectly downward.
                        Follow me on Twitter!
                        Developer of Elium - Prison Escape
                        Local Image-Based Lighting for UE4

                        Comment


                          #13
                          If you see the image, the house is not aligned with the sun exactly, has some inclination, and still there are stripes.
                          Provisional blog: http://cobaltudk.blogspot.com.es/
                          Videos: https://www.youtube.com/user/cobaltudk
                          Facebook: https://www.facebook.com/babylonprojectgame/

                          Comment


                            #14
                            yes, you would need to tilt the sun even more
                            Follow me on Twitter!
                            Developer of Elium - Prison Escape
                            Local Image-Based Lighting for UE4

                            Comment


                              #15
                              Hi Colbolt, don't know how old this thread is but thats the problem I had . . I turned of 'Cast static shadows' and that banding disappeared. It looks to be the same, it just effects the static meshes..

                              Comment

                              Working...
                              X