Download

Mesh Distance Field Splotches

Hey guys,
For university I am currently planning a project that I want to present with the Occulus Rift.
For the representation I use ambient occlusion by activating it through the mesh distance field in project settings.
But everytime I use mesh distance field I get these strange black splotches on my geometry.
On the other hand, these splotches disappear when I look through the Occulus.
For the final presentation I would like to use some screenshots for visualizations from the Unreal Engine.

I hope you can help me.

Thanks in advance.
(At the moment it’s unfortunately not possible to attach the screenshot)

Greetings

Going to be hard to say for sure what the splotches are without seeing them. Would it be possible to create a new level in your project and add some meshes so we get a better idea of the error you are seeing? Also, what you mean by every time I use Mesh Distance Fields (MDF)? Do you mean when you enable them verses not having them enabled? Are you letting them build? Keep in mind that MDF can not be non-uniformuly scaled, or scaleing one axis larger than the others can cause rendering issues with the MDF.

That’s the screenshot.
Hope it helps.

Thanks a lot for any reply

This is similar to what I experienced here:

https://answers.unrealengine.com/questions/569710/mesh-distance-fields-ruining-my-lightingmaterial.html

Never figured out what it was though.

link doesn’t work :frowning:

works fine sry

I believe we are having the same issue.

113c71529c01bfc8222bdbeccb6133068f5e9b0f.jpeg

Off the top of my head, two things to look into is whether, or not the mesh has any missing triangles in it or is scaled non-uniformly. It has been my experience that these two things will cause the Distance Fields (DF) to give you weird rendering errors sometimes. If that does not fix anything, open up the Static Mesh that is causing the problems in the Static Mesh Editor and in the Details panel, search for the Distance Field Resolution scale and increase it from 1.0 to 2.0. You could also try enabling the TwoSided flag to see if that fixes anything as well. If none of that works, find a Static Mesh that is working and input that Static Mesh into the Distance Field Replacement mesh. If you find that you have to do this a lot you might want to consider making some kind of proxy mesh in your DCC of choice and use that instead of the visual Static Mesh.

The distance field bias factor on the mesh can also help, it can reduce self-shading artifacts just like the bias factor on a shadow casting light.

But considering the odd shape of your shadow, maybe there is another mesh in your scene that is overlapping that corner of the house, and the distance field generator is guessing that this space is solid inside of it. Like if you have a separate roof mesh maybe parts of it are being interpreted incorrectly.

I believe that Distance Field Ambient Occlusion is disabled in VR because it is very expensive (or at least there is something weird in my settings that prevents it from running in my project in VR). So, you don’t see the blotches in the Oculus because the technique isn’t even running.

This is correct. I completely missed the part about it being for Rift :o. AFAIK DFAO does not work in VR as it is too expensive to render.

I think I got it.
Select your “damaged” mesh and take a look in details. There you have to disable “Affect Distance Field Light” under “lighting”

Thank you Sniw. I had the same problem and this solved it. Basically its several meshes close to and behind each other clashing. so by disabling some of them i fixed the black artefacts that were seeping through. i Actually started by disabling all of them. and then re-enabling one by one til i got he desired look