# Post Process Effect between 2 actors with Custom Depth

**URL:** <https://forums.unrealengine.com/t/post-process-effect-between-2-actors-with-custom-depth/477538>\
**Category:** Rendering\
**Tags:** occlusion, Post-Processing, custom-depth, unreal-engine, question\
**Created:** [January 21, 2021, 9:55pm UTC](https://forums.unrealengine.com/t/post-process-effect-between-2-actors-with-custom-depth/477538 "2021-01-21T21:55:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Djushima](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Djushima](https://forums.unrealengine.com/u/Djushima)\
**Post date:** [January 21, 2021, 9:55pm UTC](https://forums.unrealengine.com/t/post-process-effect-between-2-actors-with-custom-depth/477538/1 "2021-01-21T21:55:10Z")

</div>

Hi, I’m currently working on a 3D student projet and something is not working like i would like. Post Process is new to me ahah.

I have an arena made of Hexagone tiles and my player character.

First, there is a Post Process effect which show character when he is occluded by a tile, i use custom depth here.  
I wanted to add another Effect (with another material) to make an outline of my tiles, for the visibility.  
So i checked custom depth in my tiles too, this new effect is working correctly but when my character is occluded by tiles, i can’t see him anymore.

I suppose the fact both player and tile have Custom Depth make my effect not working, but i don’t know why, and i don’t know how to repair this.

Here’s some screenshot:  
Effect 1

 ![327695-ppeffect1.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/b/1/6b190889b8afd6b72bf5b077b1bb33fa628a96e3.jpeg)

Effect 2:

 ![327696-ppeffect2.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/7/0/6701ab49f4281e8cd5955d4708078053e4a70e80.png)

Both wanted:

 ![327697-ppeffect3bis.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/2/5/725fa05d6a91ff3fd950c2122bd67e82d880e136.png)

I use a subtract between Custom Depth and Scene Depth to make a alpha for my Lerp.  
I think because my tiles have a custom depth, my alpha =0, but i can’t understand why.

Based on this: [Custom Depth and Custom Depth Stencil in UE4 - Superyateam Gamedev](https://superyateam.com/2019/06/17/custom-depth-and-custom-depth-stencil-in-ue4/)  
If my tile is in front of my character, and my tile have custom depth, The sceneDepth of my character is still the same, isn’t it?

Thank you very much ! (and sorry if i didn’t write something correctly, baguette here !)

---

<div class="post-metadata">

**Author:** ![Djushima](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Djushima](https://forums.unrealengine.com/u/Djushima)\
**Post date:** [January 22, 2021, 1:47pm UTC](https://forums.unrealengine.com/t/post-process-effect-between-2-actors-with-custom-depth/477538/2 "2021-01-22T13:47:06Z")

</div>

Somebody send me this article, which is the solution to what i wanted to do !

> **[Overlapping Custom Depth Stencils](https://medium.com/unreal-engine-material-guides/overlapping-custom-depth-stencils-a084aa763f10)**
>
> In this post I’ll assume that you are already familiar with UE4 editor basics, material basics, scene depth and post process materials. If…

Is this can help someone else.
