Solved the problem
Apparently, one script execution doesnt work. On the second run you have depth results
Now its a matter of remapping the values from [min,1] to [0,1] or [0,255]
Search found 9 matches
- Sun Dec 09, 2012 12:19 pm
- Forum: Python
- Topic: Get a camera's view and send it through socket communication
- Replies: 14
- Views: 3513
- Fri Dec 07, 2012 10:48 am
- Forum: Python
- Topic: Get a camera's view and send it through socket communication
- Replies: 14
- Views: 3513
- Sun Dec 02, 2012 10:03 am
- Forum: Python
- Topic: Get a camera's view and send it through socket communication
- Replies: 14
- Views: 3513
Big Time. Major differences between the 2.4x series and 2.6x - both internally and in the BPy API. Oh, and the user interface, too! I guess i should try an older version then :P Note the Z-buffer is only the depth information, a single float for each pixel, like a height map or gray scale image. Ac...
- Sat Dec 01, 2012 4:07 pm
- Forum: Python
- Topic: Get a camera's view and send it through socket communication
- Replies: 14
- Views: 3513
I found this on blenderartists.org: http://blenderartists.org/forum/showthread.php?175693-Access-Z-buffer-and-save-it-as-file Alternatively you could use the z-buffer of the 3d-view. Here's some code to do that: import Blender from Blender import * from Blender.BGL import * windows = Window.GetScree...
- Sat Dec 01, 2012 2:01 pm
- Forum: Python
- Topic: Get a camera's view and send it through socket communication
- Replies: 14
- Views: 3513
you could try to expose the pixels (Image.pixels) of an image for render results, this is current available to python for images, movies and uv test textures (not generated textures). So image.pixels gives a matrix-like access to a rendered scene's pixel data? I guess I could pass this through and ...
- Sat Dec 01, 2012 1:18 pm
- Forum: Python
- Topic: Get a camera's view and send it through socket communication
- Replies: 14
- Views: 3513
how about something like bpy.ops.render.opengl() bpy.data.images['Render Result'].save_render("D:\\viewport_render.png") ? The thing is I want to avoid writing to a file because it will be extremely slow writing lets say 50 .png and then open them. Of course I could use a Ramdisk partition to gain ...
- Fri Nov 30, 2012 7:19 pm
- Forum: Python
- Topic: Get a camera's view and send it through socket communication
- Replies: 14
- Views: 3513
Could you propose any method? All I could find is bpy.data.scenes[].camera = obj bpy.data.scenes[].render.file_format = 'JPEG' bpy.data.scenes[].render.filepath = '//camera_' + str(c) which is useful for saving a rendered scene as an image by calling bpy.ops.render.render( write_still=True ) The ble...
- Thu Nov 29, 2012 9:27 pm
- Forum: Python
- Topic: Get a camera's view and send it through socket communication
- Replies: 14
- Views: 3513
- Thu Nov 29, 2012 1:01 pm
- Forum: Python
- Topic: Get a camera's view and send it through socket communication
- Replies: 14
- Views: 3513
Get a camera's view and send it through socket communication
I am working on a server-client system which will estimate a person's pose I would like to have blender function as a server, using python scripting and socket communication. It will manage a human articulated model, take as input the joints position (or movement in general) and respond with the mod...