render the Z layer

Hi

i need a python script or something else to render the Z layer ( the information of deep ) from a blender file.

thanks for any information

Guten Tag Daniel,

I am not sure I understand your Question, could you explain it a little more. I hope I can be of help to you, but perhaps I can not.

“The information of deep?” as in Focal Blur?

the Z layer(channel) is like the the alpha channel an extra layer for the information of the 3 dimension. it is only an black and white image, white is near the camera black is in the background. With this information you can in combustion move objects in to the image 8)

or apply a simple blur and make it look like a depth of field :stuck_out_tongue:

The only way I know of doing this is the following:

1)Select the camera, hit F9, and turn on Show limits and show mist
2)Set all object’s Materials to shadeless white
3)Create a world with black, linear fog.
4)Adjust the fog properties so that it extends from the camera to just beyond the farthest object. You should be able to see the range of fog if you completed step 1 and your view is outside the camera.

Render and you’ll have a black and white gradient, where objects closer to the camera are a brighter white than the ones farther away.

could work in theory

Actually I think its possible with the Zblur plugin.

Just activate ‘show zfront’ and/or ‘show zback’ in the Blender Sequencer (hit ‘N’ while plugin is selected).

Z Buffer is not only a black and white (1 bit) picture. In Z buffer, every pixel is a distance from the camera. It can be 8, 16, 24 or 32 bit.
I don’t know the format of Blender’s Z Buffer, but I think, the ZBlur plugin uses it, so it is exist. :slight_smile: