Z-Value to Greyscalevalue

After searching all around, and just finding a kind of complicated “trick” method with “to-camera-tracked-emptys” and “not-functioning-material-and-mapping-values” which seem to have worked with some ancient Blender-Versions and are described more or less uncompletely by different persons in different forums but are not working with the actual Blender (and even not with at least one Version before), I’m giving up and ask here:

How can I get just a simple “Z-Value to Greyscaleimage” image from a Blender-Scene? So that pixels nearer to the camera are brighter and pixels that are wider away are darker, the “world” (background) being black and the most nearest pixels are white? Like the images to use for instance for 3D-Stereograms (like “magic eye”).

Shouldn’t be that hard, but I can’t find a way for doing that, should be much easier with the node editor but when I attach a viewer node to the Z-Value Output (even after putting a “Map-To-Node” in between) there isn’t anything in it.

Could someone post a way of getting these Z-Depth-To-Greyscale-Images out of Blender?

Regards Paddy

Check out this thread… The first post shows how to do it with a simple seq plugin that I wrote and the second post shows how to get a depth map with nodes…

thank you very much @paprmh that’s finally something I was looking for. :slight_smile:

Regards Paddy