24 bit z-depth??


#1

Hello everyone.

I’m modding a PC game that uses 24 bit z-depth images. They are not the usual grayscale z-depth images that Maya renders.
This is what they look like:

It seems it uses all red, green and blue channels instead of using only one.
My question is if Maya can render z-depth images like that.


#2

Do you know specifics about this format.
One possibility is it’s a 24bit int and it may be unsigned or signed.


#3

I think it is unsigned.
And here’s an image that shows what each channel looks like.


#4

I’ve been successful with 16 and 32 bit output from mental ray, but not a filter for the kind of 24-bit output you’re looking for. My guess is, though, you could take the 24 bits from a 32-bit file and discard the 8-bit alpha? Possibly?


#5

Hmm, that won’t work. If you look at your original file post, it’s NOT a depth file. It’s a patterned depth file. There’s no actual depth information in any visible range on the red, green or blue channels. It’s banded, which means only localized depth. So perhaps your game engine is looking precisely for that missing 8-bits from a 32 bit buffer?


#6

I’ll keep investigating. I’ve seen other game engines using similar looking ‘images’ for the same purpose so maybe it’s something that only game engines can generate and/or encode.


#7

Hi MrRabbit.

One can output all sorts of wonky images/data from maya by using trickery like the samplerInfo - node but first you’d need to know the specifics of the depth data your game engine uses.
If can find somekinda specification or tech paper regarding that depth info we could help you to get it out from maya.

Does this sound reasonable?

/risto


#8

Interesting, Vray’s Z looked like this back in 2006, iirc, but I didn’t know enough about it to know how to decrypt it. The red channel looks like a normal Z, but badly banded, I’m betting that those values could be factored by the G and B to get higher resolution?


#9

I guess they’re doing something like that with that data.