Z-Buffer Mapping

Hello,

I’ve been trying for days to get a decent Depth Map out of the Compositor (with Map Value + Color Ramp), but it never turns out as it should. Now I noticed that in the Image Editor, there is an option for displaying the z-buffer channel and it’s already perfectly mapped according to the camera’s clipping boundaries. So is there a way to somehow input that image into the Compositor? And if not, how can I replicate that result with nodes? There must be some simple formula to go by, instead of spending hours tinkering with all kinds of parameters…

What you want is Normalize instead of Map value. That should give you the result you need.

Could you tell me why my output depth is all white? The following is node image and .blend file.


depth_map.blend (889 KB)
What I want is output the depth map into an image.

you should use the “vector->normalize” node, the “vector->normal” node is something completely different.