Maya Camera Rig Builder Script
Posted: 2022-10-21 | Updated: 2022-11-17
So this is going to be a bit more of a code based post. Although I am not going to diving into the code perse. At the time of writing, the plan was to copy the code right here into the post, but as I write this I think maybe linking off to my gitlab account might be the best idea. That way any updates I make to it will be immediately available.
Goal with the Script
The goal here was to build a very simple camera rig, that accomplishes as much as possible. Lets call it the Minimum Viable Product. It was intended to be used for a training course teaching beginners the ins and out of being a layout artist. I wanted something that mimiced closely what I like to use professionally, but with all the bells & whistles removed. It is intended to be pipeline agnostic and thus its pretty barebones.
That said, it is fully functional.
Install / Setup
The quickest way to use the script would be to create your own shelf and create a shelf tool. That way you just need to click it when you need to create a new camera in your scene.
Its very simple to add to your shelf:
- Copy the whole script (all the text) from this Link
- Click on the gear on your shelf and choose
New Shelfand enter a shelf name.
- You will now have an empty shelf, click the gear again and choose
Shelf Contentson the right hand side, click the little plus button which will create a
User Script, which you can rename to
Create Camera Rig. Feel free to change the icon and change the tool tip as you like.
- Click the
Commandtab at the top, set it to
Pythonand then below remove any text/code that exits and paste in the code from the script.
- You can now just close this dialogue box.
Thats it! Its setup and ready to use.
Click your new shelf tool! It will prompt you for a name and traditionally this would be a
sequence number followed by a
shot number. I generally use something like
Cam_XXXX_XXX where the 'X' represents the shot number. Maya does not like asset names starting with numbers, hence the
Cam_ at the start.
Once you press Ok, you will have a new camera in your scene:It looks more complicated than you think, dont panic!
Lets run through the controls from the top of the Hierachy to the bottom
- The top level group with a namespace :camera - Best not to put any animation keys on this group. Treat it just as a group to house your new camera.
- local_ctl - this is a group with no visible controller, used for complex camera moves.
- COG_ctl - The Yellow Ring. Think of this as your Tripod. Use this to place your cameras starting position & rotation.
- dolly_trackctl - The Pale Blue Ring. This is for moving your camera forwards/backwards and sideways.
- crane_ctl - The Vertical Green Elipse. This is for moving your camera up and down.
- pan_ctl - The Inner Green Ring. Used for rotating left and right.
- tilt_ctl - The Red Half Circle. Used for rotating up and down.
- roll_ctl - The Dark Blue Ring. Used to rotate the camera onto its side. Used for a dutch tilt for example.
- renderCamera - Finally we have the camera itself. Here is where you would setup any lensing such as Focal Length, Focal Distance and the size of your Film Gate, etc.
Here is a quick intro video showing the installation & basic controls of the rig.