Custom Depth Mask doesn't work correctly with the Groom asset

Hi, I created a custom depth mask in the unreal engine’s material editor.
It works fine with most objects except grooms assets.
Please let me know if there is any solution for that.

1 Like

This topic has been moved from Community Section to Programming & Scripting: Blueprint.

When posting, please review the categories to ensure your topic is posted in the most relevant space. Hopefully, this new section will get you the answers you seek! :slight_smile:

1 Like

thanks. but it is not related to the blueprint. it related to the material.

I’ll go ahead and move it to the asset creation category as that is probably a better choice. So sorry about that :slight_smile:

did it work? I’m curious too.

yes, use custom stensil to mask and then use custom depth to mask the custom stencil data

1 Like

Sorry I don’t understand correctly. I tried adding a custom stencil, but the missing Groom disappeared. Thanks, but the area around the Groom started to appear gray.
Did something like this happen?

you didn’t mask your custom stencil mask with a custom depth mask.
Custom stencil alone isn’t going to make any difference

I’m still a bit confused. When I select the hair mesh, the outline extends around it as shown below. In this case, would I still be able to use custom depth and custom stencil?

yes

1 Like

Could you show the node graph on how you masked custom stencil with custom depth?

can’t at the moment.
but you can use lerp the stensil mask and use custom depth mask as alpha.

Lerp (0, Stencil Mask, Custom Depth Mask)

Please, @Ibtesam_Sadiq can you share de node configuration, im also having this problem and i already tried everthing

you just need to increase the equals threshold try setting it to 10