Get Mesh Distance Field in Niagara

I am trying to generate Particles inside a mesh in Niagara, like this official tutorial mentioned at 41:53 https://youtu.be/31GXFW-MgQk?si=T9BZOmSiuNsTJm5j&t=2513

I know I need to query Mesh Distance Field in Niagara, but the result is just not Valid. Partciels are red which means the Query Distance Field always returns IsValid = false.



Could someone give me a hint about how to correctly sample Mesh Distance Field in Niagara? Thank you in advance. :grinning_face:

My Project Settings:

  1. Generate Mesh Distance Field is On

  2. Niagara - Allow Distance Fields is On

  3. Niagara System is running on GPU

  4. Mesh Distance Preview is like this, and soft shadowing works.

Solved with the assistance of ChatGPT and previewing MDF: Make sure Mesh Distance Field exists in GPU.

You need to use Source / Attached Parent mode for your static mesh, and set it by a blueprint. Otherwise the mesh data does not exist in GPU, so Query Mesh Distance Field returns invalid.

A side note: Mesh with Translucent material does not have mesh distance field, try using Masked.

Hi Dazi_707,
glad to see the same question as me, can you elaborate on how the blueprints are set up? I did every step as you described, but I don’t know if the blueprint part is not set up or if it’s not generating particles inside the mesh.

Hi, now there is another problem, is that if in the static mesh body generated particles, in order to see the particles inside the mesh, you need to hide the static mesh , but once the static mesh is hidden, the function is disabled, that is to say, the blue particles outside the mesh body have become red particles again.

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