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

**URL:** <https://forums.unrealengine.com/t/post-processing-material-see-through-wall-doesnt-overlap-other-materials-with-same-property/783329>\
**Category:** Rendering\
**Tags:** Post-Processing, stencil, depth, unreal-engine, Rendering, question\
**Created:** [March 4, 2023, 12:21am UTC](https://forums.unrealengine.com/t/post-processing-material-see-through-wall-doesnt-overlap-other-materials-with-same-property/783329 "2023-03-04T00:21:59Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Suundumused](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/suundumused/32/599389_2.png) [@Suundumused](https://forums.unrealengine.com/u/Suundumused)\
**Post date:** [March 4, 2023, 12:21am UTC](https://forums.unrealengine.com/t/post-processing-material-see-through-wall-doesnt-overlap-other-materials-with-same-property/783329/1 "2023-03-04T00:21:59Z")

</div>

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.

 ![stencil](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/9/e/89e9c0e2e86e0634234c0ae23c702eb8feae9d26.png)

---

<div class="post-metadata">

**Author:** ![BananableOffense](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BananableOffense](https://forums.unrealengine.com/u/BananableOffense)\
**Post date:** [March 4, 2023, 3:00pm UTC](https://forums.unrealengine.com/t/post-processing-material-see-through-wall-doesnt-overlap-other-materials-with-same-property/783329/2 "2023-03-04T15:00:33Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Suundumused](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/suundumused/32/599389_2.png) [@Suundumused](https://forums.unrealengine.com/u/Suundumused)\
**Post date:** [March 4, 2023, 4:39pm UTC](https://forums.unrealengine.com/t/post-processing-material-see-through-wall-doesnt-overlap-other-materials-with-same-property/783329/3 "2023-03-04T16:39:43Z")

</div>

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 ☹ .

---

<div class="post-metadata">

**Author:** ![BananableOffense](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BananableOffense](https://forums.unrealengine.com/u/BananableOffense)\
**Post date:** [March 4, 2023, 5:23pm UTC](https://forums.unrealengine.com/t/post-processing-material-see-through-wall-doesnt-overlap-other-materials-with-same-property/783329/4 "2023-03-04T17:23:03Z")

</div>

You can control the sorting at least.

> [@Custom Depth Stencil Sorting](https://forums.unrealengine.com/t/custom-depth-stencil-sorting/443633):
>
> If i understand correctly this setup should give ability to control sorting of stencil masks by stencil value. [image] But doesn’t seem like it works. Sorting happening based on last object i changed stencil value on. Am i missing something?

---

<div class="post-metadata">

**Author:** ![Suundumused](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/suundumused/32/599389_2.png) [@Suundumused](https://forums.unrealengine.com/u/Suundumused)\
**Post date:** [March 4, 2023, 5:32pm UTC](https://forums.unrealengine.com/t/post-processing-material-see-through-wall-doesnt-overlap-other-materials-with-same-property/783329/5 "2023-03-04T17:32:50Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![shue\_it](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@shue\_it](https://forums.unrealengine.com/u/shue_it)\
**Post date:** [October 10, 2023, 10:23am UTC](https://forums.unrealengine.com/t/post-processing-material-see-through-wall-doesnt-overlap-other-materials-with-same-property/783329/6 "2023-10-10T10:23:25Z")

</div>

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 😕

* * *

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](https://forums.unrealengine.com/t/post-processing-material-see-through-wall-doesnt-overlap-other-materials-with-same-property/783329/4))

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.
