Just to make my question clear, first I have a short explanation about my task. I would appreciate if you tell me any comment for each step of my work, since i am beginner in this stuff.
I want to render an image for display on a multilayer display, based on the z values of the picture. I found Blender as a rendering tool (it means i am completely new ) to have the z values of an image and then use those value to make two images, as a 2 layer image, in opengl.
So, for extracting z value in Blender, I opened a .blender image, clicked on "Render" menu, then wrote a short script of Python, like:
zbuf = bgl.Buffer(bgl.GL_FLOAT, [100*100])
bgl.glReadPixels(150, 140, 100, 100, bgl.GL_DEPTH_COMPONENT, bgl.GL_FLOAT, zbuf)
But I got for all z values 1.0. I know almost nothing about working with Blender. Is there something I am missing?
And, is the process that i am going to do with the whole idea correct or achievable?
Thanks in advance
Scripting in Blender with Python, and working on the API
1 post • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest