Masking Deferred Decal Outputs

In our game, we often have cases where we need to layer two decals to get the desired effect.

For example, as shown in the attached image file, we have a base surface that has a checkerboard material on it. We want to use decals to make an effect such as a bullet impact, with a circular albedo and a normal that extends past that.

To do this we have to stack an decal with only albedo output, and a decal with only normal output.

Since our art pipeline involves meshes with a lot of complex decals, this workflow adds difficulty for the artists. I was wondering if there is a way to achieve this decal effect with only one material?

Steps to Reproduce

  1. Place a opaque base mesh in a scene
  2. Create a deferred decal material with only an albedo output, and another with only a normal output
  3. Place a mesh with the albedo decal material above the opaque mesh, and then another mesh with the normal decal material above that.
  4. This is the only way to create the effect of a decal with albedo output that is visible in some areas and masked in others, while having other outputs such as normal that are visible throughout the entire decal.

Hello there,

If I understand the issue at the moment, this isn’t possible with a single decal material. The opacity and opacity mask inputs both apply to the entire material, and dbuffer decals cannot read the gbuffer, so they also cannot read underlying surface information.

Potentially, the best option would be to create a BP actor that handles some of the setup in the construction script. It would still result in two decals, I’m afraid, but hopefully it would reduce the art burden slightly. That option should also result in PSO Precache picking up on the decals as normal.

Best regards,

Chris

Thanks for the response! For now we’re going to try it with a regular decal material and then an overlay material on the decal mesh. This seems to be working and is a good workflow for our artists.

Sounds good. Feel free to let me know how it goes.

Best regards,

Chris