# Using writeToDepthBuffer node

**URL:** https://forum.highend3d.com/t/using-writetodepthbuffer-node/45090
**Category:** Maya
**Tags:** mental-ray
**Created:** [October 30, 2013, 5:58pm UTC](https://forum.highend3d.com/t/using-writetodepthbuffer-node/45090 "2013-10-30T17:58:08Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![dddfff](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/d/d6d6ee/32.png) [@dddfff](https://forum.highend3d.com/u/dddfff)
#### Post date: [October 30, 2013, 5:58pm UTC](https://forum.highend3d.com/t/using-writetodepthbuffer-node/45090/1 "2013-10-30T17:58:08Z")

</div>

Hey guys!

So, I'm having some issues with the writeToDepthBuffer nodes. I'm using them to store a custom float value in my images (rendering to EXR on mental ray for maya 2013, comping in Nuke 6.something).

Basically, it works great, apart from objects with textured alpha transparency. With standard depth passes you have various options for dealing with transparency:  
1) setting the camera's depth type to 'closest visible depth', enabling 'transparency based depth' and setting a threshold  
2) setting the shading engine's 'transparency threshold' and ticking 'use shading engine threshold' on the renderPass  
3) setting the 'transparency threshold' directly on the render pass

These all work great on regular depth passes...but none of those seem to have an effect on custom&nbsp;depth passes! 1 doesn't seem to do anything, and 2 & 3 aren't even available as options for Custom Depth, Label or Vector renderPasses. Surely there's a way of doing this?

Here's an demo of the difference:

Any help would be appreciated!

![](https://forum.highend3d.com/system/screenshots/312880/original/writeToDepthBufferProblems.jpg?1383155888)

---

<div class="post-metadata">

### Author: ![dddfff](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/d/d6d6ee/32.png) [@dddfff](https://forum.highend3d.com/u/dddfff)
#### Post date: [November 5, 2013, 7:09am UTC](https://forum.highend3d.com/t/using-writetodepthbuffer-node/45090/2 "2013-11-05T07:09:55Z")

</div>

Anyone....?

---

<div class="post-metadata">

### Author: ![dddfff](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/d/d6d6ee/32.png) [@dddfff](https://forum.highend3d.com/u/dddfff)
#### Post date: [July 9, 2014, 4:47am UTC](https://forum.highend3d.com/t/using-writetodepthbuffer-node/45090/3 "2014-07-09T04:47:01Z")

</div>

Sigh... ☹
