# Render Custom Procedure Depth Doesn't Work

**URL:** <https://forums.unrealengine.com/t/render-custom-procedure-depth-doesnt-work/317598>\
**Category:** Rendering\
**Tags:** Render, depth, unreal-engine, procedural-mesh, custom, question\
**Created:** [May 6, 2015, 5:22am UTC](https://forums.unrealengine.com/t/render-custom-procedure-depth-doesnt-work/317598 "2015-05-06T05:22:38Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_94a535c9](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_94a535c9](https://forums.unrealengine.com/u/anonymous_user_94a535c9)\
**Post date:** [May 6, 2015, 5:22am UTC](https://forums.unrealengine.com/t/render-custom-procedure-depth-doesnt-work/317598/1 "2015-05-06T05:22:38Z")

</div>

I’m trying to use the Custom Depth layer to apply an object selection outline. It works fine for static meshes, which have a diffuse material. However it doesn’t work for procedural mesh components. I added code inside the C++ constructor itself to set the bRenderCustomDepth to true, also tried the ProceduralLatheActor from the procedural examples, still no dice.

Is this a bug? Or am I doing it wrong?

---

<div class="post-metadata">

**Author:** ![Lovecraft\_K](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Lovecraft\_K](https://forums.unrealengine.com/u/Lovecraft_K)\
**Post date:** [May 7, 2015, 8:21pm UTC](https://forums.unrealengine.com/t/render-custom-procedure-depth-doesnt-work/317598/2 "2015-05-07T20:21:55Z")

</div>

Hi Embeddetech -

I have been testing this with our internal Procedural Mesh Generation Code which is currently available for 4.8 Preview 1 and have been able to set up a Post Process Outline via Custom Depth. I would test the issue in 4.8 with out integrated Procedural Mesh Plug-In.

Thank You

Ketchum

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_5d519387](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_5d519387](https://forums.unrealengine.com/u/anonymous_user_5d519387)\
**Post date:** [June 30, 2015, 9:48am UTC](https://forums.unrealengine.com/t/render-custom-procedure-depth-doesnt-work/317598/3 "2015-06-30T09:48:30Z")

</div>

Using : 4.8.1

I tried enabling custom depth on a simple procedurally generated box mesh, it didn’t work ☹  
The same for CustomMesh.  
Is CustomMesh and ProceduralMesh the same thing ?

---

<div class="post-metadata">

**Author:** ![Lovecraft\_K](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Lovecraft\_K](https://forums.unrealengine.com/u/Lovecraft_K)\
**Post date:** [July 1, 2015, 6:50pm UTC](https://forums.unrealengine.com/t/render-custom-procedure-depth-doesnt-work/317598/4 "2015-07-01T18:50:38Z")

</div>

Hi Embeddetech -

I have done some further testing and can confirm that we are not getting those meshes rendering in Custom Depth either. I have entered a bug report, for reference UE-18059. I will keep you informed here as we investigate this issue further.

Thank you for your report -

Ketchum

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_94a535c9](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_94a535c9](https://forums.unrealengine.com/u/anonymous_user_94a535c9)\
**Post date:** [July 3, 2015, 4:12am UTC](https://forums.unrealengine.com/t/render-custom-procedure-depth-doesnt-work/317598/5 "2015-07-03T04:12:09Z")

</div>

Thanks ! I look forward to the fix, it will be great to get an outline on my custom meshes.

Thanks again!

---

<div class="post-metadata">

**Author:** ![Aylaylay](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Aylaylay](https://forums.unrealengine.com/u/Aylaylay)\
**Post date:** [August 8, 2015, 7:51pm UTC](https://forums.unrealengine.com/t/render-custom-procedure-depth-doesnt-work/317598/6 "2015-08-08T19:51:53Z")

</div>

If you’re using ProceduralMeshComponent you need to add a fix to set bRenderCustomDepth in GetViewRelevance of FProceduralMeshSceneProxy.
