Rendering a depth channel in Maya

I am trying to figure out which image format to use to render a depth channel texture in Maya. I know only some formats will allow this; can anyone here help me do this? I want to use the depth channel in Photoshop. Thanks in advance.

Antenna tree once commented that the native IFF files can support the depth map channel. Once you have an IFF a bit of fidling with Fcheck may make it user friendly too.

Out of curiousity, how will you use it?
AC

My plan is to render some grass to a texture for billboarding on a plane constrained to the camera. Then an ambient occlusion pass of the same grass, as well as a depth map. They will be overlaid onto the beauty pass of the grass to provide occlusion details and give the grass more depth so the individual blades appear to have some depth to them. I think what I need to do is create a render layer that is just the depth channel to get an image of just that channel; the issue is that no image format I have tried will place the depth channel in a layer even though I have depth channel rendering turned on in the render globals.
I have a whole set of New Riders Learning Maya books, and have both rendering and shading and lighting books; however, I am on the road and they are in my office :stuck_out_tongue:

Here are the passes I am using now:

and the final output:

And I am fairly happy with it, but if I could figure out this depth channel…it would, obviously, add more depth to the grass :lol:

A Mental Ray render of a terrain with particles spawned on the surface for grass.

Render out the grass to an IFF with “Depth channel” turned on… You have to do a Batch Render of that one frame (I’m sure there’s another way, but this is the only method I know for how to extract the Depth Channel). Open up in Fcheck, click on the Z channel and save out that channel to whatever format. Then from there you have an 8-bit depth channel to manipulate however you see fit.

HTH

[Edit] Don’t forget to set the near and far clip planes of the render camera to the desired depth effect (set the far clip just far enough to render the last blade of grass). This is pretty important for getting the right gradation. To be honest though I don’t think any depth info is really going to help make your grass look any better, but we’ll see :wink:

Post some screens once you have it all sussed out.

Thanks, I’ll test it out tonight.

As it turns out, the difference is minimal…the addition of occlusion makes far more of a visual impact. Thank you for your help though.

An a semi related note, is there a way to calculate depth in Unity and use it as an input value for things like depth of field (using the greyscale value to change the blur value over distance)?

Here is a nice HR version of the final grass with occlusion shadows. I think, negating spec/normal maps, its about as good as it can get.