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.