DistanceToNearestSurface not working

Hey everyone,

I’m trying to make a material that is affected by the nearest surface (I am even following along with a tutorial) but literally the first step I get an issue where the DistanceToNearestSurface node isn’t working

The material should appear as follows but clearly something isn’t working properly:

Any help would be appreciated, thanks

Make sure that distance field generation is enabled in the project settings.


This is ticked and still not working :c

Can you confirm that DistanceFields are functioning properly in the Viewport display?

If it is functioning properly, DistanceFields should be visible.


Nothing changes when I toggle that on/off at all, is there another setting somewhere I can change? I have also turned off the settings, restarted and tried again to no avail.

I also forgot to state I am in 5.2

I created a new project from a new third person template in UE5.2 and DistanceFields is enabled by default, no additional configuration was required.

If it is a mobile shader, DistanceFields is not supported.
However, the first image attached shows that it is not for mobile. (If the shaders are not supported, such as mobile, the material will be a check pattern)

I don’t know why.

I can’t guarantee that this will solve the problem,
Try creating a new project to see if the project is broken and check
If that doesn’t work, you’ll have to try reinstalling the engine.

1 Like

Thank you for your help I found it from here!
It turns out my Engine Scalability Settings being set to low turned off visibility for DistanceFields, everything was working fine except for that.

After I reset my scalability settings everything is working perfectly fine now, thanks again for your help!

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.