Substance Painter
In this start to finish texturing project within Substance Painter we cover all the techniques you need to texture the robot character.
# 1 12-03-2007 , 11:21 AM
Radical Edward's Avatar
Registered User
Join Date: Jan 2006
Posts: 234

render out z depth

How can I render out the z-depth, i.e. closeness to the camera, as a grayscale image? I've seen it done around the place but I'm not sure how to do it.

# 2 12-03-2007 , 11:35 AM
jsprogg's Avatar
Lifetime Member
Join Date: Feb 2004
Location: Chicago
Posts: 1,712
From the Maya docs..

To create a Depth file
Turn on Depth Channel (Z Depth) in the Render Settings window.
Open the renderable camera's Attribute Editor in which you want to create a depth file.

Select View > Camera Attribute Editor from the current view. See View > Camera Attribute Editor.
In the camera's Attribute Editor, select a Depth Type from the Output Settings section (Closest or Furthest Visible Depth).
To view depth channels
View the animation file using FCheck.

See the Overview of FCheck in the Rendering Utilities guide for information on FCheck.
Press z to see the depth channel.

FCheck does not let you view the z-depth data of an .IFF file. To view z-depth data, use a non .IFF file format and then view the z-depth data stored in the separate file.

If the output format is not IFF or RLA, Maya writes a separate depth file containing a black RGBA image with depth values.

# 3 13-03-2007 , 02:04 AM
farbtopf's Avatar
Subscriber
Join Date: Jul 2005
Location: London
Posts: 520
@jsprogg

god thank you sooo much, i've been looking for an answer to that question quite a while now.

# 4 13-03-2007 , 03:25 AM
j5ive's Avatar
Subscriber
Join Date: Feb 2005
Location: Sunny Ol' Wigan, UK
Posts: 752
What is this useful/purpose for?


If you believe in telekinesis, raise my right hand.
# 5 13-03-2007 , 03:47 AM
farbtopf's Avatar
Subscriber
Join Date: Jul 2005
Location: London
Posts: 520
it is mainly for post production. You'll need it to apply certain effects in compositors like after effects shake etc. It tells them for example how far pixels have been away from the camera, so you can do a depth of field.

# 6 13-03-2007 , 06:17 AM
Radical Edward's Avatar
Registered User
Join Date: Jan 2006
Posts: 234
ok, well I try to follow those instructions, and I get a tower.jpg and a tower_Depth.iff. The iff I can only view in maya, and it's just a useless black square :/ any ideas what's up?


Last edited by Radical Edward; 13-03-2007 at 06:19 AM.
# 7 14-03-2007 , 04:47 AM
Radical Edward's Avatar
Registered User
Join Date: Jan 2006
Posts: 234
found the problem. The depth file has a black RGB channel and contains the depth information in an additional channel. To get it out in photoshop, install the IFF reader plugin (look on google) and open the channels box, on mine it was Apha 2 (I had an alpha channel as well)

Also for reference mental ray does not appear to produce a depth map at all, at least not one that gets saved anywhere.

# 8 01-04-2007 , 05:23 AM
danotronXX's Avatar
Subscriber
Join Date: Jun 2005
Location: cleveland ohio
Posts: 313

Originally posted by farbtopf
it is mainly for post production. You'll need it to apply certain effects in compositors like after effects shake etc. It tells them for example how far pixels have been away from the camera, so you can do a depth of field.

could u also use the zdepth file to do a faded look at the objects farthest to the camera? if so how would u do it with after effects?
tks

# 9 01-04-2007 , 06:36 AM
farbtopf's Avatar
Subscriber
Join Date: Jul 2005
Location: London
Posts: 520

Originally posted by danotronXX
could u also use the zdepth file to do a faded look at the objects farthest to the camera? if so how would u do it with after effects?
tks

I think you are talking about depth of field. The thing is I never got it to work in AEF. But somehow you can. My problem was that I was never able to get Maya to include the z-depth into my files, regardless of what I did.
You might have more luck though. You ned to render your images from maya in a format that supports zdepth. .IFF does, but unfortunately after effects doesn't recognize the z in an .IFF, so don't use it. I heard that .RLA or 16bit Tiffs work. You can check if maya included a zchannel by opening the image in photoshop and looking in the channels tab. There should be something like an alpha2 channel that looks like a ghostly grayscale version of your render.
So you import you footage into after effects make a comp and go effects>3dchanne>depth of field. And it should work.
From now on you are on your own, because as I said I never got to that stage. But if you get it to work please let me know.

good luck user added image

# 10 29-10-2016 , 11:49 AM
Registered User
Join Date: Oct 2016
Posts: 2

From the Maya docs..

To create a Depth file
Turn on Depth Channel (Z Depth) in the Render Settings window.
Open the renderable camera's Attribute Editor in which you want to create a depth file.

Select View > Camera Attribute Editor from the current view. See View > Camera Attribute Editor.
In the camera's Attribute Editor, select a Depth Type from the Output Settings section (Closest or Furthest Visible Depth).
To view depth channels
View the animation file using FCheck.

See the Overview of FCheck in the Rendering Utilities guide for information on FCheck.
Press z to see the depth channel.

FCheck does not let you view the z-depth data of an .IFF file. To view z-depth data, use a non .IFF file format and then view the z-depth data stored in the separate file.

If the output format is not IFF or RLA, Maya writes a separate depth file containing a black RGBA image with depth values.

how do you get the depth values from this process ? user added image

Posting Rules Forum Rules
You may not post new threads | You may not post replies | You may not post attachments | You may not edit your posts | BB code is On | Smilies are On | [IMG] code is On | HTML code is Off

Similar Threads