Hello,
I’m trying to create a material, that will outline the intersection with another object. I was able to make it work with Distance Field but the result looks really choppy. On the internet it’s said that You have to increase the “Distance Field Resolution Scale” which I tried. But even though I set the value to maximum it’s not changing anything. I tried all kinds of stuff that I was able to find on the internet but nothing seems to work.
Can someone help?
Is there a way to reference the per-object distance fields in a material somehow?
DistanceToNearestSurface and “Global DistanceField View Distance”
Oh man, thank you so much! As you assumed we are using DistanceToNearestSurface for the material and by changing “Global DistanceField View Distance” (in the UI dialog) from in our case 20.000 to 5.000, the shader is now exactly doing what it’s supposed to be doing. Perfect! Thanks a lot!
I apologize for a dumb question, but @InScene , but I’m not finding the “Global distancefield view distance” setting over here. Do I need to enable something somewhere? I’ve already enabled the distance fields in the editor settings. I’ve got the “DistanceToNearestSurface” node working (it looks like it does in your original screenshot.)
I just can’t find the view distance setting you show in your latest post.
Is this perhaps because I’m still on 4.9 ? What Version are you on?

Hi Gmi,
we’re using version 4.11 and 4.12. I’m quite new to unreal engine development, so I can’t tell if the option only exists in the newer versions.
I’ve also activated the option “Generate Mesh Distance Fields” which you can find in “Project Settings -> Rendering -> Lighting”. But even if it is disabled, the “Global DistanceField View Distance” parameter is visible at “Windows -> World Settings”.
So maybe you should try to update to a newer version. Maybe @DanielW knows more about this as he seems to be an unreal developer.
Ah, I see. Thank you guys! I guess I’ll have to move my project to a newer version 