How to make a invisible mesh still generate distanced field

I made a Interactive grass material with the DistanceToTheNearestSuface node.And trying to make it work with the ThirdPersonCharacterBP,But the skeleton mesh dont generate distanced field so i used a cylinder mesh instead.Unfortunately the interactive effect disappear when i set the mesh invisible,i also tried to check the Only Owner See in rendering setting,but the shadow still there. if if i unchecked the cast shadow,the effect disappeared.Any help would be appreciated.

That’s funny because during this morning I was looking for the opposite effect. I had an invisible mesh in my character that was generating DFAO and I didn’t want that :stuck_out_tongue:
Try to deactivate** Render in Main Pass **under Rendering in the actor’s Details tab. But leave **Visible **option activated.

What a coincidence,however the method doesn’t work.the mesh disappeared but shadow still there:(

Create a masked material with opacity 0, and assign it to your cylinder.

I never realized it’s that easy.I’m sooooooooooo stupid!thank u very much.