Why the distance field visualizer and functionality doesn't work?

Hello. I’m trying to use distance fields to deform my mesh by this tutorial, but in some moment my distance field visualizer just stopped working. I should see black-white image with it, but for now I’m seeing this:


here’s the original scene without visualizer:

And the second problem - distance field functionality just doesn’t work for me: at the beginning I’ve got just very ugly result following that tutorial, but for now it’s just doesn’t work at all. Here’s my material (for better visualization I’ve connected result to base color) - there is just no distance fields:


P.S. I’ve tried to change RHI from DX12 to Vulkan and setting “Generate Mesh Distance Fields” is enabled.

What am I missing?

I can answer your first question: the mesh distance fields are colored as a visualization upgrade, so it’s easier to tell individual SDFs apart even when they’re intersecting. That’s not a you issue, that’s just how the new engine does things.

As for your second problem, could you post a few different screenshots of your visualization modes to help diagnose? Mesh distance fields, Global distance field, and DFAO?

1 Like

Thank you! Previous version was more clear for me…
Default lit:


Mesh Distance fields:

Global Distance field:

DFAO:

I found the main source of the problem! I forgot to uncheck “Affect Distance Field Lighting” setting in static mesh settings!

1 Like