Announcement

Collapse
No announcement yet.

Turn off Distance Field Ambient Occlusion for landscape only

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

    Turn off Distance Field Ambient Occlusion for landscape only

    I would love to have Distance Field Ambient Occlusion enabled for our game, but at the moment it causes a dark line artefact around the landscape component. Please see the snow-covered mountains at the top of the attached images.

    Is it possible to disable Distance Field Ambient Occlusion for landscape objects only? I can't find a way to set the DistanceFieldResolutionScale to 0 on the landscape's mesh.

    DFAO enabled:



    DFAO disabled:
    Attached Files

    #2
    Are there any thoughts on this or what might be causing it?

    Comment


      #3
      Hey there, idk if you found a workaround for this yet, but here's my solution. Basically a depth fade from camera distance for Ambient Occlusion on landscape materials. Actually what I'm doing is turning UP the AO in the distance. I'm not sure exactly how the math pans out but that divide node is just using the distance I want it to fade out at, "100000.0" which is written as 1e+05 on the node description

      Comment


        #4
        I posted a question about this issue on answerhub almost two years ago, got no replies. https://answers.unrealengine.com/que...4615/view.html

        Comment


          #5
          Quite positive that you can disable landscape contributing to global distance field in newer engine versions. If not, you can just remove few lines of shader code, that composite landscape distance field into global distance field.

          Comment


            #6
            Originally posted by Deathrey View Post
            Quite positive that you can disable landscape contributing to global distance field in newer engine versions. If not, you can just remove few lines of shader code, that composite landscape distance field into global distance field.
            Yeah iirc, there is a cvar for this now. I don't have the engine open in front of me right now, but if you press tilde, you can search for it.
            Lighting Artist II @ Crystal Dynamics
            Former Lighting Artist @ Obsidian Entertainment
            ArtStation

            Comment


              #7
              Originally posted by Deathrey View Post
              Quite positive that you can disable landscape contributing to global distance field in newer engine versions. If not, you can just remove few lines of shader code, that composite landscape distance field into global distance field.
              Originally posted by rosegoldslugs View Post

              Yeah iirc, there is a cvar for this now. I don't have the engine open in front of me right now, but if you press tilde, you can search for it.
              Nope, not true.

              That setting is no longer a console variable. It's actually exposed on the landscape:
              Click image for larger version

Name:	dfao.PNG
Views:	1
Size:	21.5 KB
ID:	1572176

              BUT it won't help. It will actually turn on all the good DFAO contribution from the landscape, but it will keep that ugly black line there. :/ It's literally ruined my project at this point.
              https://www.artstation.com/artist/rawalanche

              Comment


                #8
                Originally posted by iamisandisnt View Post
                Hey there, idk if you found a workaround for this yet, but here's my solution. Basically a depth fade from camera distance for Ambient Occlusion on landscape materials. Actually what I'm doing is turning UP the AO in the distance. I'm not sure exactly how the math pans out but that divide node is just using the distance I want it to fade out at, "100000.0" which is written as 1e+05 on the node description
                Your solution also does not work. Ambient Occlusion slot in the material does not affect DFAO. It has no effect. Even if you plug constant value of 0 directly in that slot, it will have no effect on that black horizon line.
                https://www.artstation.com/artist/rawalanche

                Comment


                  #9
                  Originally posted by Rawalanche View Post



                  Nope, not true.

                  That setting is no longer a console variable. It's actually exposed on the landscape:

                  BUT it won't help. It will actually turn on all the good DFAO contribution from the landscape, but it will keep that ugly black line there. :/ It's literally ruined my project at this point.
                  It's still a console variable, but you're right, it's a checkbox on the Landscape now. In 4.21, I'm not seeing a black line between rocks and the terrain. Unchecking(or setting the cvar and moving the camera to rebuild the global distance fields) shows most of the occlusion along the intersection being reduced or removed completely.
                  Lighting Artist II @ Crystal Dynamics
                  Former Lighting Artist @ Obsidian Entertainment
                  ArtStation

                  Comment

                  Working...
                  X