Blender Pipeline PDF
Blender Pipeline PDF
com
9-11 minutes
Exporting stuff from one application, and importing to another, is one of the
mainstays of VFX and film production. This is called pipeline or I/O (which stands
for in/out). It is rarely without problems. Though there are many file standards that
should, in theory, make this a painless activity, these standards are not supported
by all applications. Neither are they all supported very consistently, with much
buginess and inconsistency in how they are implemented. .
Nuke to Blender
The Nuke to Blender camera and object pipeline is not without pain. The task is to
import into Blender from Nuke a camera track (i.e. camera motion data) and also a
guide object. These will ensure that a movie render from Blender will match
perfectly the Nuke scene. In theory, there are many formats that could do this in
one go: .fbx (which does not work well) and .abc (the import of which Blender does
not support). For this reason, the task was accompanied in tow stages: for the I/O
of the camera a .chan format was used (a file format specifically for cameras
animation and camera properties) and for the object a simple .obj format was used.
1. Go the the little folder icon in Nuke's camera properties. Press it and select
'Export chan file'. Save it somewhere rational.
Import camera into Blender
import bpy
from mathutils import Matrix
from mathutils import Euler
from mathutils import Vector
from math import radians
from math import degrees
from math import atan
from math import tan
return {'FINISHED'}
from bpy_extras.io_utils import ImportHelper
from bpy.props import StringProperty, BoolProperty,
EnumProperty
filename_ext = ".chan"
@classmethod
def poll(cls, context):
return context.active_object != None
def register():
bpy.utils.register_class(ImportChan)
bpy.types.INFO_MT_file_import.append(menu_func_import)
def unregister():
bpy.utils.unregister_class(ImportChan)
bpy.types.INFO_MT_file_import.remove(menu_func_import)
if __name__ == "__main__":
register()
bpy.ops.import_scene.import_chan('INVOKE_DEFAULT')
6. You will then be taken to the load script window. Set the 'Rotation Order' drop
down menu to 'ZXY' (this will match Nuke's camera).
7. Using the 'System Bookmarks' on the left, navigate to your .Chan file and press
'Import chan file'.
8. Using the editor menus list, navigate back to the '3D View'. If you scrub the
timeline, you will see that the camera is now animated.
9. From the 'Camera Properties' change the 'Lens / Perspective', right click on
'Focal Length' and select 'Clear Keyframes'. This will remove its animation values.
Change 'Focal Length' to match that of Nuke's camera.
Export / import object
1. Attach a WriteGeo to the Nuke scene. From the drop down 'file type' knob, select
.obj. From the 'file' knob navigate to your project folder and name the exported obj
rational.
Blender to Nuke
Render