[UE5] Mesh distance field resolution problem on small objects


I’m currently working on a bottle shader with an opaque material. To render the water’s surface, I’ve been projecting a plane into the mesh, and then masking it with a signed distance field.

This solution was working great at large mesh scales, but once I returned to the original mesh’s size, the distance field stopped generating, even after increasing its resolution.

At some point, changing its resolution just makes the distance field disappear entirely.

(Mesh scaling impact on the distance field)

The problem might also come from the fact that I’m not using the correct node to access the mesh signed distance field.

Does anyone have an idea on how to fix this issue, please?

Thanks in advance :slightly_smiling_face:.

Hi. I have never done anything regarding this subject but a while back I found this Use a box relection capture volume’s cubemap with a custom reflection vector here. It might be a way to create this or helps with the issue. Best of luck.

If you are using the global distance field, I don’t think you will be able to fix this?
It will be inaccurate on smaller objects.
If you can somehow access the MeshDistanceField (rather than the global one), then you can increase the resolution in the StaticMesh settings.

Alternative soultion, if you have a translucent mateiral: DepthFade.
Or, if your bottle is always round, create your mask by using a SphereMask node.