View Full Version : compositing Maya+MentalRay with z-depth

03 March 2003, 09:42 AM
Has anyone out here any experience with compositing images rendered from maya-renderer (i.e. .iff or .rla), with images from mentalray (for maya)?

the files rendered in maya is not a problem.

the problem, as far as I can understand, seems to be twofold:

first: mentalray outputs a separate z-depth file. this rules out combustion as compositing tool. in shake it is possible to work with separate z-depth channels, requires some work though. Shake does not read the .iff file mentalray outputs for z-depth. A conversion is nessesary ( I belive this is because shake expects the file to have RGBchannels which this doesn't have) Also, I haven't figured out how to preserve the z-depth channel as float ( I have to convert it to 8-bit).

second: it seems to me that mentalray & maya outputs different z-depth channels.(?) However, this might be a by-product of converting between bit rates.


all suggestions and help would be most appreciated.

03 March 2003, 12:28 PM
Maya's depth channel is a pain in the ass. There are macros available for Shake which fix some of this problem. I think it's a case of using 1-z rather than z?

Anyway I was also told by someone that maya's depth-channel is a log value rather than a linear value, which seems to be true from my experience. I don't know if other software uses a logarithmic depth channel too tho...

03 March 2003, 03:38 PM
thnx for the replay, but I don't think the log/linear is really the problem here.

however, I found a workaround (not very elegant, but still...) where I simply render out a depth pass from maya and use it on the mentalray rendered images (using the copy channel function in shake). works fine.

it is kinda annoying to have to go through an extra rendering, so if anyone knows a better solution, it would be much appreciated.


03 March 2003, 04:27 PM
i just checked it out myself.. jesus what a crap..

mental ray seems to write out an image as z-channel in IFF format (always) that shake can not read.. as zylphyr already mentioned..

hmm.. i am just trying to figure out which support to contact for that one.. maya? mental images? apple ?.. hmm..

that is a real bummer..
unfortunately imgcvt from maya does not want to convert it to an IFF file at all and fcheck writes out 8 bits..
all other apps i have were not able to read the file as well..

any ideas anyone?



03 March 2005, 01:45 PM
I recently wrote a quick tutorial on this. Check it out (

03 March 2005, 02:41 PM
I recently wrote a quick tutorial on this. Check it out (

A dear thread came to live, but very interesting tutorial while I'm learning shake these days.

03 March 2005, 02:50 PM
old threads coming to life :)

Nice tut.

Some of the problems with z-depth (maya vs. maya-mr) has been resolved in newer versions of maya, so the z-depth of maya-render & maya-mr render is now the same. I use a similar method as yours in shake, but I usually use the color_x node, if I don't really need to see the z channel.

There are still som weird cases though, ie. sometimes when I work with the IBL node I can get values (in z channel) ranging from 1 to -1...


CGTalk Moderation
03 March 2005, 02:50 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.