Zdepth White image

Im sure this is a common problem,

i created an animation

rendered a multilayer exr and extracted it inside of after effects,

The image comes up as a pure white image.

i have since tried png etc, its always just a white image

even inside the preview of blender its a white image

however, every other pass, AO, Diffuse, shadow etc works fine both inblender and in the file itself,

whats going wrong?

thanks for any advice

Josh

Try rendering it as a png and once its rendered click on the far right icon in the render window. Is that what you are looking for? I don’t render to exr very much.

You have values greater then 1 (pure white)
You can pass the z depth through a normalise node to convert the depth map values to between 0 and 1 (black and white)

Thanks Richard. I was just wondering how to do that myself.

@brent, never render zdepth to pngs, it wont work… it will only work with exr / hdr / tiff16bit / png 16bit(maybe)… i only stick with exr.

as for the normalise node, be careful, it can freak out with animations, best way is to add in a math node and multiply it by 0.01 or something until it is in the range you are wanting. enable clamping if you dont want it going above 1.

I Got this to work in this way

1, Create a multilayered EXR with all passes except zdepth.

2, rendering out a single layered exr with only zdepth pass enabled, going through the compositor, Adding a Map value node with max value set to 1, and using size value to bring the image to below 1, then adding a colour Ramp node. this allows great control of the contrast of the zdepth image, then rendering this out as a separate layer for compositing in the program of choice (in my case after effects)

You also may want to consider your camera far clip. That is what determines what is 1.0 in the z-depth file, or white. If you have a bunch of objects real close to the camera but the far clip is say 1,000. You will get mostly black on your objects. If you match the far clip to the farthest object in the scene you will get a more greyscale value. The Normalize node helps compensate for this but you can help it out by adjusting the far clip too.

I wouldnt use the map value node or the normalize node… because sometimes the z-depth has the incorrect value for one pixel… and may be significantly higher then everything else… then when normalised it crunches everything down.

Use the math node if you want to be on the safe side & multiply it down

could you explain how the math node would work? im still relatively new to compositing.

Well the reason why it appears all white is because the values are above one… its based off the clipping distance but say its set up to match your scene… a value of 1 means that the object is 1 BU away, a value of 2 means the object is 2BU away… using the math node, you multiply it down by 0.01, so instead of having a value of 1 or 2, or 20 or 30… it would be 0.01,0.02,0.2,0.3 … which all fit in the black to white space.

ignore this post

Attachments


So, normalize can cause weird things with the animation. Not sure why I had it there.

This setting worked great for me. You may have to tweak the Size and Offset: