# How to display a mesh through another mesh, like an x-ray?

**URL:** <https://forums.unrealengine.com/t/how-to-display-a-mesh-through-another-mesh-like-an-x-ray/2318508>\
**Category:** Rendering\
**Tags:** unreal-engine, Rendering, Blueprint, question\
**Created:** [February 5, 2025, 8:58am UTC](https://forums.unrealengine.com/t/how-to-display-a-mesh-through-another-mesh-like-an-x-ray/2318508 "2025-02-05T08:58:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![WDRK23](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/wdrk23/32/1002509_2.png) [@WDRK23](https://forums.unrealengine.com/u/WDRK23)\
**Post date:** [February 5, 2025, 8:58am UTC](https://forums.unrealengine.com/t/how-to-display-a-mesh-through-another-mesh-like-an-x-ray/2318508/1 "2025-02-05T08:58:29Z")

</div>

Hi! I’m trying to achieve this effect, but I don’t know exactly how.

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/c/1/ec1c2c73acd6bc65c09a18257a06b90c12e0b837.jpeg "Skate 3 Realistic Ragdoll Mod Bails You Haven't Seen!") ](https://www.youtube.com/watch?v=uLN8dG2dK_U&t=19)

I tried with a translucent material with **Disable Depth Test** enabled but it will also be visible through any mesh.

 ![v3](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/d/4/4d40807479df50a658dc6bde999e9f2c23a92bf5.png)

 ![v1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/3/8/7385a24730b7c542b7e6e65f20526145af750d05.jpeg)  
 ![d2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/2/9/329b2249731b9bcfaffc1a71119e6fc948a188bc.jpeg)

---

<div class="post-metadata">

**Author:** ![SupportiveEntity](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SupportiveEntity](https://forums.unrealengine.com/u/SupportiveEntity)\
**Post date:** [February 5, 2025, 9:10am UTC](https://forums.unrealengine.com/t/how-to-display-a-mesh-through-another-mesh-like-an-x-ray/2318508/2 "2025-02-05T09:10:17Z")

</div>

Hey there @WDRK23! You could use custom depth stencils, and the only object not occluding it being the character mesh, sort of an inverse of this thread here:

> [@How to use custom depth selectively for certain objects?](https://forums.unrealengine.com/t/how-to-use-custom-depth-selectively-for-certain-objects/842232):
>
> Hi, I want to implement occlusion hightlight using materials. When my character is occluded by some objects it can still emit some color rather than being totally invisible. Here is my material blueprint: and here is the result: where I use an infinite post process volume and set my character’s Render CustomDepth Pass to true. Now everyhing works fine. But the problem is: anything that blocks my character will make an effect on the custom depth, but I really want some con…

Would that work for your use case?

---

<div class="post-metadata">

**Author:** ![WDRK23](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/wdrk23/32/1002509_2.png) [@WDRK23](https://forums.unrealengine.com/u/WDRK23)\
**Post date:** [February 5, 2025, 9:23am UTC](https://forums.unrealengine.com/t/how-to-display-a-mesh-through-another-mesh-like-an-x-ray/2318508/3 "2025-02-05T09:23:33Z")

</div>

hmm, do I really need to make the material for the post process?  
I don t really know my way around materials that well!

---

<div class="post-metadata">

**Author:** ![SupportiveEntity](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SupportiveEntity](https://forums.unrealengine.com/u/SupportiveEntity)\
**Post date:** [February 6, 2025, 6:33am UTC](https://forums.unrealengine.com/t/how-to-display-a-mesh-through-another-mesh-like-an-x-ray/2318508/4 "2025-02-06T06:33:46Z")

</div>

The stencil is probably the best way to go about this unless you just want to make the mesh itself lose opacity where the injuries are.

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/6/e/46e9632bee3db6acec6c79e83b9e6d0092c15421.jpeg "How to Create Masks With the Custom Stencil Buffer | Tips & Tricks | Unreal Engine") ](https://www.youtube.com/watch?v=PiQ_JLJKi0M)

---

<div class="post-metadata">

**Author:** ![glitchered](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/glitchered/32/768299_2.png) [@glitchered](https://forums.unrealengine.com/u/glitchered)\
**Post date:** [February 6, 2025, 8:51am UTC](https://forums.unrealengine.com/t/how-to-display-a-mesh-through-another-mesh-like-an-x-ray/2318508/5 "2025-02-06T08:51:43Z")

</div>

if you pause the video and frame by frame some of the intersections you will see it’s using the same technique. disabled depth test. so… in your case just make sure no mesh is in front or use another technique.
