Post Processing material (see through wall) doesn't overlap other materials with same property

I am creating Post Processing material for certain meshes to be seen through the wall, however I have another material with the same property, but it only works for OutLine, the problem is that meshes with stencil ID of OutLine material do not leave any visible mesh behind which have stencil ID’s of the view through walls material. I tried using the Stencil Test to filter, but it didn’t work.

The custom depth stencil is a single pass. It can only draw one value per pixel. One object will overwrite the other.

1 Like

Is there any alternative / glitch? Because the OutLine doesn’t touch the visible box behind the wall, it would be better if the black line overlaps the box instead of the entire mesh :frowning: .

You can control the sorting at least.

1 Like

Unfortunately it did not work, it erases the material from the first bit. I tested combinations but I didn’t have the effect.

Up
Did you (or someone) finally find a solution or a workaround ?
I’m facing quite the same problem (UE 5.2). No matter how I change the stencil parameters, the last changed one is the one which will be always “on the top”.

I even tested to put 2 different PostProcessVolume in the scene, and setting different priority for each of them, but nothing happens :confused:


EDIT : Nvm, I managed to do what I wanted after looking in detail the post link above (Post Processing material (see through wall) doesn't overlap other materials with same property - #4 by BananableOffense)

The goal was to make the material PP rendering not only on the stencil value of my object, but also on the addition of the stencils values of my object + the value of the object blocking the view.

1 Like