Z-depth output as a greyscale image?

   7142   13   1
User Avatar
Member
19 posts
Joined: July 2005
Offline
Anyone know how I can output Z-depth as an 8-bit greyscale image? Greyscale RGB would be fine too.

I tried enabling Z-depth render in the mantra options, however the result when viewed as RGBA is a little wonky to say the least.
Animate like no one's watching. Actually…. don't.
User Avatar
Member
7715 posts
Joined: July 2005
Online
In the Deep Raster tab of the output driver parameters, add Pz. Supply a filename.
User Avatar
Member
19 posts
Joined: July 2005
Offline
Maybe I'm not sure how this works, but I don't seem to be having much luck with that.

My render settings for Deep Raster are as follows:

http://www.911operator.net/stuff/ztest_.jpg [911operator.net]

The result is a single file (it doesn't seem to output the file funkyz001.pic anywhere), and the RGB, Z-depth, and alpha layers show up in iplay like this:

http://www.911operator.net/stuff/Ztest01.jpg [911operator.net]

Is there some special setting I need to change in order for this to output funkyz001.pic as my Deep Raster settings show?
Animate like no one's watching. Actually…. don't.
User Avatar
Member
4140 posts
Joined: July 2005
Offline
Well, first off - you said you wanted 8 bit - that won't be enough bit-depth resolution for what you're trying to render, but you haven't set the settings to do that anyway - it says floating point, not 8 bit. So I'm not clear exactly what you want, and for what reason. You know that if you look at a floating point image on an 8 bit monitor that you can't see “the whole thing”, right? Hit “Adapt to Full Pixel Range” in mplay and fiddle with brightness and contrast to make some sense from it. I doubt you'll get much useful in 8 bit, though.

As far as the separate file thing - I've always found that flakey…it used to be you needed to give it a path and Houdini would suss that you want a separate file and do that - in the latest 6.5 beta I can't seem to make it do that no matter what. Nonetheless, the image layer is there - you can get at it…

Cheers,

J.C.
John Coldrick
User Avatar
Member
19 posts
Joined: July 2005
Offline
What I'm trying to do with Z-depth the normal usage for compositing.
I know that 8-bit wouldn't be nearly enough to get any “useful” Z-depth values, but it will suffice for what I'm trying to do.

Floating point actually makes my life more difficult for Z-depth in this particular case.

I didn't find a setting in Mplay to adapt the Pz floating point values to 8-bit, so my scene basically looked like the alpha channel for Pz.
Animate like no one's watching. Actually…. don't.
User Avatar
Member
4140 posts
Joined: July 2005
Offline
It's not a setting - it's a button - look below the image where the brightness/Contrast/etc buttons are. The one on the far right…click that - it just makes a best guess for brightness/contrast to get a viewable range. Make sure control bar is visible.

Also, just to be clear - you've explicitly set your example to be floating point, and yet you say you want 8 bit. Change that in the ROP.

Cheers,

J.C.
John Coldrick
User Avatar
Member
19 posts
Joined: July 2005
Offline
The output selections for VEX variable Pz are:

Float Type
Vector Type
Vector4 Type

The output selections for the filename are:

8 Bit Data
16 Bit Data
Floating Point


The only possible ones that match up are Floating Point.

Maybe once this outputs to floating point, there is a way to convert this to 8-bit greyscale using COPS?
Animate like no one's watching. Actually…. don't.
User Avatar
Member
710 posts
Joined: July 2005
Online
yeah, you should be able to specify the bit-depth in COPs, right in the file COP I think.
User Avatar
Member
19 posts
Joined: July 2005
Offline
Hmm… I see the option I think you're talking about - to override the raster depth.

If I choose to override, and choose 8-bit, then do a channel swap to put Pz into Cr, it results in a crash. :?
Animate like no one's watching. Actually…. don't.
User Avatar
Member
4140 posts
Joined: July 2005
Offline
I'm not getting any crashes. No matter what I set the ROP output depth to(and that's what I was talking about, not any comp settings), the Pz layer gets rendered as floating point. I assume just cuz' it needs it, or maybe it's a bug, I don't know.

Then in the comp editor - convert everything to floating point(Convert COP), Channel Copy C <- Pz, and the colour is now a monochrome version of your Pz. Push a Convert COP after that back down to 8 bits and it reads like an alpha channel - all the detail was lost in the translation down. You'd probably have to use a LUT to remap this to hold the detail - using a CHOPnet perhaps. It's a fair bit of work so I'd balance that against whatever other grief you're getting at the other end with the floating point image…

I'm using 6.5 btw…

Cheers,

J.C.
John Coldrick
User Avatar
Member
19 posts
Joined: July 2005
Offline
Your trick seems to work if I do a channel swap Pz -> A.

For some reason, it doesn't seem to work if I try to shove Pz -> Cr, Cg, or Cb?

Any idea why?
Animate like no one's watching. Actually…. don't.
User Avatar
Member
4140 posts
Joined: July 2005
Offline
I suspect because you're trying to cram a floating point channel into an 8 bit container, effectively asking for a conversion on the fly. Better form would be to convert the RGB to float first. Shouldn't be crashing, though…

JC
John Coldrick
User Avatar
Member
7715 posts
Joined: July 2005
Online
I thought 911 was using 5.5?
User Avatar
Member
19 posts
Joined: July 2005
Offline
Yes, I am using 5.5

I found a solution (finally)… The command line tool IZG that comes with Houdini converts Z-depth into a greyscale image.

Thanks to all that helped out though.
Animate like no one's watching. Actually…. don't.
  • Quick Links