Quick n’ dirty FBX Camera Exporter

(For Autodesk Maya 2012+)

Problem: You need to get your camera animation from Maya into your game engine, but your engine only supports bones from the FBX format, and you don’t have time to write a parser for a custom animation format, nor the time to account for camera objects in the FBX file.

This tool will, given a camera, generate a simple one-bone rig, bake out the animation on it, and export the entire thing as an FBX as well. This way, you can parent your in-game camera under it while it’s animating, and it should be able to inherit the transforms and thus play appropriately (things like animated focal length, aperture, and other attributes that aren’t transform information will obviously not be preserved)

Originally written for work in order to give the animators more control over in-game cinematic cameras.

Installation

Simply place the script somewhere that your maya sys.path has access to, and import it as a module.

e.g.

try:reload(camRig)
except:import python.dev.rigTools.naAnimTools.generateFbxCamRig as camRig

Usage

Just select a camera in your scene, specify a location and click the big green button. The location is saved with the scene, so you can close and re-open your scene as well while preserving the saved path!

Visit my Bitbucket repository to download my entire repository of tools, which includes this among the mix as well!

Or, if you’d prefer, just download the actual script itself and have a go!