Shopping Cart (0)

CameraSnap for Maya Script

About the Script

CameraSnap.mel script works with Autodesk Maya. The MEL script uses the selected cameras in your scene as an input and creates a new camera with an animation path that moves through the position of each of the original input cameras. The script was created to convert the dozens of still cameras imported from a photogrammetry program like Autodesk 123D Catch into a single camera animation path.

This script could also be used for converting a Matrix or kung fu movie style frozen time / bullet-time camera rig into a single camera with a path based animation that can be played back in the viewport and controlled using Maya’s normal time controls.

Download the CameraSnap Script

You can download the CameraSnap MEL script here: CameraSnap_Tools.zip (4 MB )

Script Usage

Select a group of cameras in the outliner or a viewport.

This is the starting camera snap example scene. There is a ring of cameras that are positioned radially around the origin in the scene.

This is the starting camera snap example scene. There is a ring of cameras that are positioned radially around the origin in the scene.

Click the Camera Snap icon in the shelf to create a new animated camera that will move through the position of each of the input cameras in the original camera ‘array’. (Note: The original selection order will determine the order of the cameras in the new camera animation path.)

This is the Maya shelf for the CameraSnap tools.

This is the Maya shelf for the CameraSnap tools.

The output duration of the new camera rig animation is based upon the total number of cameras in the original selection. By default the new camera animation path is set to use linear tangents.

This is the result of running the CameraSnap tool. A new camera has been created that is animated through the position of the input array of cameras. The original cameras have been hidden in the outliner.

This is the result of running the CameraSnap tool. A new camera has been created that is animated through the position of the input array of cameras. The original cameras have been hidden in the outliner.

If you adjust the near clipping distance the for new camera, the motion trail handle control knots might become visible in the masterCamera1 camera view. In this case you can manually hide the motion trail before you play the camera animation back.

This is another example scene that shows how to use the CameraSnap tool.

This is group of cameras positioned in an arc shape.

This is group of cameras positioned in an arc shape.

This is the new arc shaped camera path created by the camera snap tool.

This is the new arc shaped camera path created by the camera snap tool.

The CameraSnap tools were designed to be able to handle photogrammetry scenes created by software like Autodesk 123D Catch. The FBX file exported by 123D Catch contains the reconstructed polygon mesh, texture maps, and virtual copies of the cameras used to take the original photos.

This is a scene of a 3D boulder created using a series of photos in Autodesk 123D Catch.

This is a scene of a 3D boulder created using a series of photos in Autodesk 123D Catch.

This is a view in Maya of an Autodesk 123D Catch generated FBX model. The cameras were created automatically by 123D Catch and were positioned in the spot around the boulder where the original photos were taken.

This is a view in Maya of an Autodesk 123D Catch generated FBX model. The cameras were created automatically by 123D Catch and were positioned in the spot around the boulder where the original photos were taken.

This is the output from the CameraSnap script where a new animation path was created from the input cameras. This allows Autodesk 123D Catch to be used in a similar fashion to a matchmoving package.

This is the output from the CameraSnap script where a new animation path was created from the input cameras. This allows Autodesk 123D Catch to be used in a similar fashion to a matchmoving package.

If you use Autodesk 123D Catch along with Maya and the CameraSnap script you can create interesting scene integration results. I recommend naming your Autodesk 123D input images with the name.###.extension format like boulder.001.jpg as this will make it easier to load your photos into Maya as an image plane with an animated image sequence texture.

The geometry created by Autodesk 123D Catch can be used as a realtime mask to help integrate an object in the scene or as shadow catcher with the help of Maya’s useBackground shader.

Shelf Tools

This is a view of the Camera Tools shelf in Maya.

This is a view of the Camera Tools shelf in Maya.

The first version of the CameraTools shelf has the following features:

CameraSnap – Create a new animated camera path from a series of stationary cameras in your scene

Show – Show a hidden camera in the viewport. This displays a hidden object selected in a view like the outliner or the hypershade cameras tab.

Hide – Hide the currently selected camera.

Look – View the scene through the currently selected camera.

Persp – Switch back to the perspective viewport.

Script Installation

Windows MEL Script Install

To load the CameraSnap.mel script in Maya copy the MEL script file to your user account’s Maya scripts folder.

On Windows the script folder is located in the folder:

My Documents\maya\<maya version number>\prefs\scripts\

In this case <maya version number> is a placeholder for your actual Maya release number like “2013-x64”.

Copy the shelf tool to the Maya Shelves folder:

My Documents\maya\<maya version number>\prefs\shelves\

Copy the icons to the Maya Shelves folder:

My Documents\maya\<maya version number>\prefs\icons\

Mac OS X MEL Script Install

To load the CameraSnap.mel script in Maya copy the MEL script file to your user account’s Maya scripts folder.

On Mac OS X the folder is located in your preferences folder.

~/Library/Preferences/Autodesk/maya/<maya version number>/prefs/scripts/

In this case <maya version number> is a placeholder for your actual Maya release number like “2013-x64”.

You can open the hidden Library folder on Mac OS X by using the Finder > Go to Folder menu item. Paste the value:

~/Library/Preferences/Autodesk/maya/

in the Go to Folder window and hit the go button.

Copy the shelf tool to the Maya Shelves folder:

~/Library/Preferences/Autodesk/maya/<maya version number>/prefs/shelves/

Copy the icons to the Maya Shelves folder:

~/Library/Preferences/Autodesk/maya/<maya version number>/prefs/icons/

2 comments

Comments are closed.