UE5 Material use the DistanceToNearestSurface node, which is different effect from UE4



It is completely transparent in UE5, so how to set in UE5 to achieve the same effect in UE4?

Please help me, thanks!

This appears to be a bug, I say that because the output is different if you plug it into emissive.

You should report it

I am suffering from the same problem. Hope this gets fixed soon.

Quite some time has passed, but given that this is one of the first results on google re: mesh distance fields I figured I’d clarify the issue for future readers:

The mesh that the material is applied to in the material preview generates its own distance field, and so what you’re seeing here is the material reading the distance to the surface it is applied to, which is effectively 0 (minus some leeway based on geometry not being perfectly spherical, which is what’s causing those visual artifacts).

To test a material like this properly I recommend applying it to a mesh in your scene directly, and making sure the mesh has Affect Distance Field Lighting disabled. Here, the behavior should be consistent between UE4 and UE5.