Export Maya camera and Objects to Nuke

Export Maya camera and Objects to Nuke

Exporting Maya Camera and Objects to Nuke is really night-mare. Using .fbx file format will fail most of the time. Scene not align perfectly, meshes not displaying properly, Camera missing the key-frames, etc. Reason for this is both the software's handling Cameras in different manner.

There are several scripts available for exchanging data's between mayaToNuke. Each one having their plus and minuses. I found a clever python script to do the data exchange successfully. I done some custom with the original script and used it several time with out any failure.


I created a new maya scene for tutorial purpose with animated camera and couple of objects.

Maya to nuke traditional export method:

Step-1: Selected all the objects and Camera.
Step-2: Go to  file---> Export Selection....



step-3: Go to Edit Presets and Change fbx format to fbx2010.


step-4: Export Selection and save it as a .fbx file.

step-5: Added ReadGeo node and import the saved .fbx file.
checked all the objects in ReadGeo node to load all the objects. When export animated geometry .fbx format failed most of the time



step-6: Added Camera node. Checked read from file. Imported the same fbx file.
My camera imported with out any key-frames inside nuke.


Maya to Nuke Using the python code:

step-1: Download the script and place it your custom DIR.

step-2: Start maya Load your scene and open script editor.

step-3: In script editor go to file---> Load script (or) hit ctrl+O and load script.



step-4: execute the script. It will back all the animation (camera, objects if animated)



step-5: Maya pops-up a window named mayaToNuke.


step-6: You can find several menu options in mayaToNuke window.

Edit:

1. Calculate Maya Data.
(This will bake the animated cam and objects)

2. Generate Nuke Script.

Select the objects you want to export.

Generates nuke script's. Exports selected objects into custom DIR as .obj files. This script creates a DIR named "mayaToNuke" into where the Maya scene file saved.

If your scene file is not saved it will prompt to save your scene. Hit enter save your script and run the script again.


It stores all the objects to the custom DIR. This script copy the nuke scene to clipboard and pop-up the success message.




Open nuke and paste. you can find Camera, objects and scan-line render node pasted into nuke.



3. Show Nuke script.
Maya pop-up a window with nuke script as text. You can copy paste the text into nuke.



4. Save nuke script As.
Maya will allow you to save the nuke script into where ever you want.

Type:
Select export type. Camera, mesh or all
This menu allow user to choose which needs to export. You can select all (all selected ) Camera only or Mesh only.

Animation:
Select animation type. Camera, mesh or all
If you check All it will export animated mesh as .obj sequence and Camera. Else it will export objects as single .obj file and camera.

check below video for more info:

https://www.youtube.com/watch?v=dXJ0_rp8OQM



Networks:

None: Only the original node
Base: Build basic 3d scenemayaToNuke
ContactSheet: Contact camera.

Maya Vray physical Camera:

This script working fine with Vray physical Camera in maya.






Tested with maya 2013 and V-Ray 2.30.01.


Thanks to pzhaojing for giving us the awesome script.


Original script:
http://www.creativecrash.com/maya/script/maya2nuke-v2


Download below script and enjoy...

Modified script:
https://drive.google.com/file/d/0BzfeLEFhrh44T3Z2REpyckF0aW8/edit?usp=sharing


Hope this will help you friends. feedbacks and bugs welcome.

Popular posts from this blog

2D Volumetric rays in nuke

Nuke workFlow optimisation TIPS