Announcement

Collapse
No announcement yet.

Distance Field Mesh Lighting Issue

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

    Distance Field Mesh Lighting Issue

    Take a look at these cubes after I enable Distance Fields (8 bit DF option enabled too but it happens even without it, I checked).

    Click image for larger version

Name:	distance-field-texture-problem.jpg
Views:	495
Size:	202.1 KB
ID:	1716329

    If I disable 'Affect Distance Field Lighting it then looks fine. What is the problem though?

    PS. From what I see the performance cost of DF is significant to extreme (even though I have an RTX 2060 Super and i7 CPU & 16GB Ram). It is the first time I'm using them. Are there any optimizations you can suggest I do?

    Thank you.

    #2
    Originally posted by KeyC0de View Post
    Take a look at these cubes after I enable Distance Fields (8 bit DF option enabled too but it happens even without it, I checked).

    Click image for larger version

Name:	distance-field-texture-problem.jpg
Views:	495
Size:	202.1 KB
ID:	1716329

    If I disable 'Affect Distance Field Lighting it then looks fine. What is the problem though?

    PS. From what I see the performance cost of DF is significant to extreme (even though I have an RTX 2060 Super and i7 CPU & 16GB Ram). It is the first time I'm using them. Are there any optimizations you can suggest I do?

    Thank you.
    I have this EXACT problem. In the end I turn MDF off. It was happening all over the place to certain extents. If you find an answer. please copy me in!

    Comment


      #3
      From
      Originally posted by ClockworkOcean View Post

      I have this EXACT problem. In the end I turn MDF off. It was happening all over the place to certain extents. If you find an answer. please copy me in!
      The fortunate thing is that from what I can see only the meshes that come with starter content seem to be affected with these mesh glitches. My own meshes display fine. I haven't done extensive tests though and there still might be something wrong going on. I need to make sure what is the problem first before I'm reassured that I'm good.

      Apparently MDF can prove useful for a lot of things in UE4 and now I definitely wouldn't want to disable them. I mitigated performance issues as well and I'm generally good now (It was something else unrelated to MDF that gave me performance problems). MDF don't seem to affect my ms too noticeably, yet there is an effect. But I can live with that.
      Last edited by KeyC0de; 02-03-2020, 04:26 PM.

      Comment


        #4
        Ok I figured it out. This is caused by Distance Field Ambient Occlusion (DFAO), which is enabled by setting your SkyLight to Movable. Now this depends on whether you want DFAO on though. I like the effect of DFAO but it's not sth I can't live without. Therefore to disable this lighting issue on the meshes set your SkyLight to Stationary instead; no more DFAO then. Also DFAO has a relatively high realtime cost.
        Last edited by KeyC0de; 02-03-2020, 05:54 PM.

        Comment


          #5
          Meshes that are scaled non-uniformly break their SDFs. Those cubes look pretty uniformly scaled, but worth checking.

          Comment


            #6
            Originally posted by KeyC0de View Post
            Ok I figured it out. This is caused by Distance Field Ambient Occlusion (DFAO), which is enabled by setting your SkyLight to Movable. Now this depends on whether you want DFAO on though. I like the effect of DFAO but it's not sth I can't live without. Therefore to disable this lighting issue on the meshes set your SkyLight to Stationary instead; no more DFAO then. Also DFAO has a relatively high realtime cost.
            Hi, yes, I realised dynamic skylight wasn't helping, but I do need that in a number of cases.

            Also, it is very obvious on those starter cubes, but once you start looking, you'll notice it creeping in everywhere... :-/

            Comment


              #7
              Has anyone ever found a solution to this because I have the same issue as well..?. I got new nvidia drivers, but it didn't help my 980 ti, and i've seen the problem in different versions of unreal too... the latest i tried was 4.25 preview 5.

              Comment


                #8
                I finally found out what's going on. For whatever reason, a cube won't cast proper distance field AO by default. You have to open it's item properties and set it's "distance field resolution scale" to 1.1 and save it.

                for whatever reason, 1 is too low in resolution in this specific mesh and it corrupts it.

                Comment

                Working...
                X