# How to render custom depth pass with flipbooks?

**URL:** <https://forums.unrealengine.com/t/how-to-render-custom-depth-pass-with-flipbooks/485385>\
**Category:** Asset Creation\
**Tags:** flipbook, custom-depth, unreal-engine, Rendering, Shaders, question\
**Created:** [June 26, 2021, 1:11am UTC](https://forums.unrealengine.com/t/how-to-render-custom-depth-pass-with-flipbooks/485385 "2021-06-26T01:11:06Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![REX\_THE\_F00L](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@REX\_THE\_F00L](https://forums.unrealengine.com/u/REX_THE_F00L)\
**Post date:** [June 26, 2021, 1:11am UTC](https://forums.unrealengine.com/t/how-to-render-custom-depth-pass-with-flipbooks/485385/1 "2021-06-26T01:11:06Z")

</div>

Hey guys,  
I was trying to render characters behind walls, I followed this tutorial: [UE4 - Tutorial - Render through Walls! - YouTube](https://www.youtube.com/watch?v=timuvlu2ukc). My only problem is that the characters in my game are 2D sprites using flipbooks. So how can I achieve that same effect but on a flipbook?

---

<div class="post-metadata">

**Author:** ![sayooj\_js](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/sayooj_js/32/88714_2.png) [@sayooj\_js](https://forums.unrealengine.com/u/sayooj_js)\
**Post date:** [June 26, 2021, 6:51am UTC](https://forums.unrealengine.com/t/how-to-render-custom-depth-pass-with-flipbooks/485385/2 "2021-06-26T06:51:43Z")

</div>

How do you place your charters in the scene? On a mesh?

---

<div class="post-metadata">

**Author:** ![REX\_THE\_F00L](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@REX\_THE\_F00L](https://forums.unrealengine.com/u/REX_THE_F00L)\
**Post date:** [June 26, 2021, 5:46pm UTC](https://forums.unrealengine.com/t/how-to-render-custom-depth-pass-with-flipbooks/485385/3 "2021-06-26T17:46:58Z")

</div>

The flibook itself is set to be a child of the mesh component, however we don’t assign anything to the mesh component itself. Each character is it’s own blueprint that derives from a C++ class. That what it looks like in the editor:

![342500-screenshot-2021-06-26-114635.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/4/b/44b0b8d22f22ded5e380d5ec45a75a676aafe44d.jpeg)

---

<div class="post-metadata">

**Author:** ![mono8321](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mono8321](https://forums.unrealengine.com/u/mono8321)\
**Post date:** [March 2, 2025, 9:34pm UTC](https://forums.unrealengine.com/t/how-to-render-custom-depth-pass-with-flipbooks/485385/4 "2025-03-02T21:34:15Z")

</div>

did you ever find the solution?

---

<div class="post-metadata">

**Author:** ![Sietske](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Sietske](https://forums.unrealengine.com/u/Sietske)\
**Post date:** [March 19, 2025, 3:04am UTC](https://forums.unrealengine.com/t/how-to-render-custom-depth-pass-with-flipbooks/485385/5 "2025-03-19T03:04:19Z")

</div>

@mono8321  
I just happened to stumble on the same issue.  
Not sure what the implications are turning on this setting but by going in the Sprite Material and  
set the [Allow Custom Depth Writes] I was able to render , or in my case exclude, PFB sprites from the scene.

 ![AllowCustomDepth](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/4/4/144430ca4c8e89382b583bc8d1897a5060e7d827.png)

I hope it works for you as you want too
