Warning,,en,session_start,,en,open,,en,hosting/hb13404/data/bin-tmp//sess_a6rkgt74s82d1np0l266qejbn3,,en,O_RDWR,,pt,failed,,en,No such file or directory,,en,in,,en,var/www/hb13404/data/www/mikedatsik.com/wp-content/plugins/easy-contact/econtact.php,,en,on line,,en: session_start(): open(/hosting/hb13404/data/bin-tmp//sess_ntt2ga3tter8vnlqlca51co3m4, O_RDWR) failed: No such file or directory (2) in /var/www/hb13404/data/www/mikedatsik.com/wp-content/plugins/easy-contact/econtact.php on line 112
Change Language:
Export camera from Houdini to Nuke using EXR - Datsyk Mykhailo
View Sidebar
Export camera from Houdini to Nuke using EXR

Export camera from Houdini to Nuke using EXR

January 29, 2014 12:13 am0 comments

It has always been a big problem to move the camera from Houdini to Nuke. All attempts to use the fbx, for some reason, always lead to failure, flipping axes coordinate directions and the wrong animation.

I've seen a lot of scripts export camera from Maya, Blender etc., but I work in Houdini and decide to make a handy tool for this.

The main impetus for me was the opening of opportunities for data storage in exr files. Exr is major image format I'm working with. I thought, when rendering the picture for the composite immediately with information about the camera, and read it in Nuke. This eliminates problems with mismatched versions of the camera and render, as. each frame will be up-to-date information on, which camera was calculated from.

After reading a bit about transformation math in Houdini, and often we have difficult animation of camera, using Aim or additional nodes, I realized that to solve the problem of transferring the camera I need to use the matrix transformation. In any 3D software, which is relevant to the calculation of the 3D position and rotation in space is described as a matrix transformation(they are the world's(worldMatrix) and local). Euler coordinate system gives us a clear understanding of the visual process of working with 3D object, but when you export data from one package to another, much easier to use matrix, which enable us to to obtain the object's position and rotation(squeeze and scale(for solid objects important data but not for the camera)) not dependent on, how we've been working on it for the movement or position. We can always convert the matrix and obtain any component of the transformation(transform, rotate, scale…)

I will not dive into the mathematical aspect, if you are interested to explore more, below I have brought materials that I have used:



For, record the camera in exr we need to create expression in Mantra Node, in field “exr / comments” write the matrix position in world coordinates, Focal Length and Aperture selected camera in mantra node. It looks like this:



For ease way, I made a shelf, which, if necessary, fill in this field for me:

cam_exp_mantra_shell1 cam_exp_mantra_shell2


To create a camera in Nuke based on the recorded data we, execute script, which reads each frame, during the interval of all sequence, set animation key into camera.

In practice, it looks like this:

1. Execute script:


2. Obtain a camera with animation:


Link on Github:

Leave a reply


Warning: Unknown: open(/hosting/hb13404/data/bin-tmp//sess_ntt2ga3tter8vnlqlca51co3m4, O_RDWR) failed: No such file or directory (2) in Unknown on line 0

Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/hosting/hb13404/data/bin-tmp/) in Unknown on line 0