3
$\begingroup$

My issue is that I want to access the buffer data from python, pixel after pixel, for being able to use it for arbitrary computations. How can I achieve this?

(Please dont tell me about exporting to different kinds of formats like exr etc, because I want to do computations in place).

Also I'm talking about blender 2.68 or higher.

$\endgroup$
0

2 Answers 2

1
$\begingroup$

Image.pixel is not available for Render Results, nor does it contain depth-information.

You can get the depth in Node Compositor / Cycles, but I don't believe it's possible to read with python in-place.

$\endgroup$
0
$\begingroup$

Yes, this is possible. You can use this trick to get the rendered pixels: https://blender.stackexchange.com/a/23309/13212

However, instead of connecting the image output of the Render Layers to the Viewer's Image input, you can connect the Z output of the Render Layers. This will give you the depth pixels for each pixel four times (in each color channel)

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .