Background: We are building an automated pipeline to extract motion (i.e. vector pass output) from animated blends by running scripts using blender's python API. We are able to programmatically set up nodes and run rendering. We need access to full precision x,y motion components, and the only way we found of accessing that was via
bpy.data.images['Viewer Node'].pixels. This gives correct output when running with GUI.
Problem: We need to run blender in background mode on many examples, and in background mode
bpy.data.images['Viewer Node'].pixels has a) wrong resolution (does not respect
scene.render.resolution_x), b) wrong info (everything is zero).
Existing solutions: We know that it is possible to modify blender source code to fix this, but we want to open source our pipeline, and creating a custom blender build to run it might be too much of an impediment for people. We'd like to make this work with a standard blender version.
- Is it possible to access vector pass data in some other way, without using the Viewer Node, so that rendering can be done in the background?
- Or, is there a way to force Viewer Node to output correct data in background mode?