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. Simply "not using alpha" doesn't really work here because a large number of the objects are "cards". 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 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!
Ok, with a little help from some other forums, finally got to the answer. Here's the setup. Hey Autodesk, maybe you should mention in the documentation for "mental ray render pass utility shaders" that the write operation attribute DOESN'T WORK PROPERLY UNLESS YOU CHECK "USE TRANSPARENCY" ON THE RENDER PASS NODE!?
man that took me so frickin' long to find....
Anyway, hope that helps someone...