Python Tools - Session 9A
Camera Rig Setup
March 3, 2020
Session Navigation
Overview
This session introduced the concept of building camera rigs in Maya using Python. The goal was to automate the creation and positioning of multiple cameras around an object for rendering purposes. This session laid the groundwork for the complete render camera rig system built in the following session (9B).
Key Concepts
- Camera creation and positioning in Maya via PyMEL - using
pm.camera()to create cameras andpm.move()to place them in the scene - Aim constraints and camera targeting - attaching aim nodes so cameras always point at the subject
- NURBS curves as motion paths - creating circular NURBS curves to define where cameras should be placed
- Bounding box calculations for centering rigs on objects - using
pm.exactWorldBoundingBox()to find the center of selected objects - Distributing cameras evenly around a circular path - calculating evenly spaced parameter values along a NURBS circle to position cameras
Code
The code for this session was developed interactively during the lecture. The completed camera rig system is available in Session 9B.