Monday, February 26, 2007

Utilities

On my most recent project I've finally had time to start compartmentalizing my MEL procedures into handy, recyclable utility files. I've now got a whole library of simple commands I can use to parse, build and manipulate strings, search for objects, get and set values in my user interfaces, manipulate arrays, etc.

Probably one of the biggest hurdles is how to create this library of procedures without having to worry about the command names overlapping eachother, or worse, overlapping Maya's internal command names. To solve this I've gone about simulating namespaces on my procedures and variables. I first prefix everything with my name, then a word in all-caps to indicate what library it belongs to.

Examples:
Ian_UI_GetControlType()
Ian_STRING_CountWords()
Ian_ARRAY_DeleteAt()

While it does get tedious having to type out prefixes constantly, its a safe way of guarenteeing that your code stays relativly futureproof.

Saturday, February 10, 2007

Layer List

On our latest 3D production in the studio, we've been using an extensive referencing system to bring in all characters, props and backgrounds. Each character has between 3 to 5 display layers associated with it; one for controls, one for joints, one for geometry, etc. This allows one character's controls to be hidden while working on another character so the two don't get confused.

The problem is, nearly every element has at least one layer. This means that when 6 characters are in a scene with the background and props, the layer count exceeds 200 layers. Trying to manually sort through these to hide unnecessary layers can be tedious and frustrating.

To solve this problem, I created a floating layer window which replicates a lot of the built in layer list functionality. You can hide and unhide layers, change to template or reference states, and see the layer colours. The functionality that goes beyond the default layer panel is what really makes it useful.


You can filter layers based on whether they're references or local layers, making it easy to bring user created layers in animation files into view. You can sort the layers by display order or alphabetically. You can easily select layer contents by double clicking on any layer. But most impressive is the boolean search filter. You can use simple AND, OR, NOT operators to filter the layer names. For example: "cecil NOT marge" or "cecil OR marge NOT kitchen"

Lecture Complete

My rigging lecture at Algonquin College in Ottawa is finished. I spent two full days explaining rigging techniques and addressing issues students had with their own rigs. Some of the topics we covered were joint orientation techniques, IK/FK switching, creating proxy meshes, smooth skinning and blendshapes.

Like most people new to rigging, the students were apprehensive at first, but soon they were understanding and asking lots of questions. My goal was to give them insight into what a real production rig would be like and I think I accomlished that. I'm looking forward to being invited back to lecture next year.