Why is my Masked Material Not Casting Shadows?

So, I just followed the tutorial on how to do location based opacity in UE4 and I noticed that none of the objects that are masked are creating shadows. The sides of brushes that do not have the material on them cast shadows, and brushes that don’t have the material on them cast shadows, but anything that I put that material on doesn’t cast a shadow, even static meshes (I used the material test objects as you can see in the upper left). Whats wrong?

Hi Knobbynobbes -

Have you double checked to make sure that the Material’s Attributes are set to Masked and not Translucent?

Thank You

Eric Ketchum

Yea, its definately set to masked.

Hi Knobbynobbes -

Can you post a screenshot of your material setup?

Thank You

Eric Ketchum

Hi Knobbynobbes -

I haven’t heard from you, so hopefully you have resolved the problem. I am going to make this question answered for tracking purposes, but if you are still having this problem or it reoccurs let us know

Thank You

Eric Ketchum

I know this is a really old post, but I am running into the same issue. Anyone have a solution to this?

Here’s someone else that was trying to figure it out:

and this one seems to have any idea what’s going on (was linked to in answer from other link):

Thanks for the reply. I saw those posts as well, but I really do not know how I should go about appyling those solutions to my materials. If I add a custom node with the text “IsShadowDepthShader()” in it then the materials just become invisible. For now I will have to get used to working with dynamic lighting and cast my shadows with that.

I’m sorry to dig out this ancient post again.
Obviously this “disfunctionality” with PixelDepth in relation with masked material is still existing.

Just want to let know (if others stumble across this post):
There is a simple workaround. Just replacing the PixelDepth node with the following setup: