Certain settings make masked materials always invisible

Hello,

I decided to change the question and description of the problem, the original is attached further below.

After investigating some more I discovered that certain settings make masked materials always invisible, in the editor and during PIE. I’m not sure if that’s deliberate. Steps to recreate the issue:

  1. Create a new blank project.
  2. Create a new material, make it masked and set Opacity Mask value to 1.
  3. Add static mesh with this material on the level.
  4. Set “DBuffer Decals” to False (Project Settings / Rendering).
  5. Set “Mask material only in early Z-pass” to True (Project Settings / Rendering).

Static mesh will disappear after two last steps but will still cast shadow.

Original post:

Early Z-pass makes masked meshes spawned at runtime invisible

Hello,

Playing with particle effects I noticed masked material set to 0 opacity generates as much shader complexity as translucent one set to 0 opacity. So I activated “Mask material only in early Z-pass” in Project Settings and set Early Z-pass mode to “Opaque and masked meshes”, as that was the only set of options that changed this behaviour to what I would expect (which is strange by the way, shouldn’t the editor sort out such issues with “Decide automatically” mode? I mean, what’s the point of masked materials otherwise?).

After that particles work fine, but every mesh with masked material I create in Construction Script or during runtime is invisible.

Bump. Is it a bug, or am I doing something wrong? :slight_smile:

Hello,

I was unable to reproduce the issue you are experiencing. I have a couple of questions to help me narrow down the issue you are experiencing.

  1. Can you reproduce this issue in a new project?
  2. If so could you provide a detailed list of steps so that I can produce this issue on our end?
  3. Could you provide screenshots of the issue you are experiencing?

Thanks!

We have not heard back from you in a few days, so we are marking this post as Resolved for tracking purposes. If you are still experiencing the issue you reported, please respond to this message with additional information and we will follow up.

Hello , sorry for the wait. I investigated the issue some more earlier, but haven’t found the proper recreation steps until today. I changed the question and description in the first post.

Hello,

This issue appears to have been fixed internally and will be available in a future engine release.

Thanks!