zooToolbox setup tips

david | animation,mel script,tutorials | Tuesday, November 28th, 2006

zooToolbox is a large collection of animation and rigging tools written by Hamish McKenzie. The rar file contains more than 200 files which can be somewhat confusing at first. Some effort is required by the user to get the most from these tools, but Hamish spent years developing them, so I'm not complaining one bit. I will not try to write a manual, just a few setup tips and suggestions. (more...)

so what’s the plan?

david | Uncategorized | Saturday, November 25th, 2006

I probably should have started out by introducing myself, but I really just wanted to get started. Its probably obvious by now that I'm an animator (reality) and a song writer (dream). For the past 20 years I have kept a daily log as a way of remembering what I did at work. I hardly ever read back through it, but I'm pretty sure the act of writing it keeps my brain organized.

This blog will be a "best of" the daily log. Maybe it will evolve into something completely different. Maybe dreams come true.

Comments and questions are welcome. To post, you will need to use your email address to register, but I will never give it to anyone else, or send you unsolicited poetry.

djLocatorScale.mel version 0.1

david | animation | Friday, November 24th, 2006

When working with a maya scene containing several spotlights, the viewport display can be a mess of spotlight cone icons. The view can be simplified by choosing to hide the lights, or by scaling the lights so that their cone icons are smaller. Today I wrote a mel script to tackle this in a slightly different way.

djLocatorScale.mel adds a right-mouse-button menu to selected lights which enables its locator scale to be changed at any time by choosing "RESET", "DOUBLE" or "HALF" from the pop-up menu. Doing this only changes the locator scale, not the scale of the actual light.

So most of the time my lights are visible as small cone icons, which allows me to see where they are, but doesn't clutter the viewport. When I need to see the coverage of a particular light I use the RMB-menu to quickly double its size a few times, depending on the size of my scene. And just as quickly I can reset the size when I'm done. Its less fuss than using the attribute editor.

djLocatorScale.mel only needs running once for each light. The RMB-menu is linked to the light and saved with the scene file.

All this is made possible by a zooToolbox modification to the maya dagMenuProc.mel Then djLocatorScale.mel creates a zooObjectMenu with the appropriate commands. More information about the zooToolbox can be found at http://www.macaronikazoo.com and I will devote a future post to a more detailed "setup guide".

not comfortable

david | music | Saturday, November 18th, 2006

Uncomfortable me
Uncomfortable you
My mind's like a tree
Your mind's like a zoo

We used to be sure
We used to have fun
Your mind's like a saw
My mind's like a gun

I'm back from the beach
You've been to the snow
I can't seem to reach
You don't seem to know

Unusually high
Unusually clear
You need to ask why
I don't want to hear

maya plugins sometimes dont load

david | animation,mel script,mentalray | Thursday, November 16th, 2006

I use a selection of plugins with maya - some come as standard issue with the maya package, while others are written by maya users who generously make them available to the general public. In maya you can use the "plug-in manager" to load plugins and you can flag them to be loaded automatically when maya starts up.

Unfortunately maya has a tendency to "forget" the auto-load status of some plugins. For example, every couple of weeks or so I have to reload the "maya to mentalray" plugin manually. I flag it to load automatically, but eventually it forgets.

I have discovered that an effective work around is to use the userSetup.mel file to load problematic plugins.

userSetup.mel is a mel script that you add your own custom startup commands to. It is often used as a way of customizing the maya interface.

The following line accomplishes the task of loading the Mayatomr plugin if it has not already been loaded...

if(!`pluginInfo -query -l -n Mayatomr`) loadPlugin "Mayatomr";

The command name of a plugin can be found in the plug-in manager by clicking the "i" button next to its name.

So, why not load all your plugins this way?

Because not everything works correctly! One example: loading the elastikSolver using the userSetup.mel method described here causes a conflict with the maya cloth plugin - yet they live happily together if they are auto-loaded by the plug-in manager. Who knows why there is a difference, or why some plugins fail to auto load anyway?

Think of it as one possible solution to a slightly annoying problem. If it works, thats great; if it doesn't then its not so bad, is it?

Pickwalk Author

david | animation | Wednesday, November 15th, 2006

I'm a huge fan of Hamish McKenzie and his zooToolBox - a huge collection of mel scripts for animators and riggers. Visit http://www.macaronikazoo.com to download the toolBox. You will not be disappointed.
Pickwalk AuthorIn this post I would like to draw your attention to the "Pickwalk Author". The "pickwalk" concept is not new to maya. By default the arrow keys allow you to step up and down the DAG hierarchy. But with the "Pickwalk Author" Hamish has made it possible to define where the arrow keys take you. For example if you have your hand_L_Control selected, the up-arrow can be set to take you to the elbow_L_PoleVectorControl, the down-arrow to the fingers_L_Control and the right-arrow could take you to the hand_R_Control. None of these objects need to be in the same hierarchy, the relationships between them and the arrow-keys are totally user-definable.

setup hotkeysThe simplicity and elegance of this tool has to be seen to be believed. It totally integrates with maya's own pickwalk, so that the arrow keys continue to work in the default state when no Pickwalk Authoring has been defined. Reciprocal relationships can be set up automatically and there is even a "Simple Author" feature where you can select several objects in the order you want them linked and, with a single click, define the pickwalk relationships. There is a "setup hotkeys UI" where you can choose different hot keys if you dont want to use the arrows. You can also define hot keys for "additive" selection.

The Pickwalk Author greatly enhances my animation workflow. For example, I am rotating the hand_L_control, and then I want to rotate the other hand, but the rotate manipulator gets in the way and makes it hard to select hand_R_control it in the viewport. With pickwalk author I can simply hit the right-arrow key, the right hand is selected and is ready to rotate. No need to deselect or resort to the hypergraph or outliner.

buildShaderMenus.mel fixed

david | animation | Monday, November 13th, 2006

In maya 8, in the viewport you can hover over an object and click the right-mouse-button to get a context sensitive menu. If you do this on an object that consists of a surfaceShape node and a curveShape node which share the same transform (for example any of the zooCST control objects), then an error is reported in red in the Help line.

// Error: file: D:/Program Files/Alias/Maya8.0/scripts/startup/buildShaderMenus.mel line 163: Cannot convert data of type int[] to type int. //

It seems that buildShaderMenus.mel was not expecting that two shape nodes would share one transform. I have fixed the script by making it only consider the first shapeNode - any others are simply ignored. For my needs this "hack" works just fine. Even without it the menu still worked. It was the Help line errors that I found annoying, especially when rigging characters for other animators, and then having to tell them to "just ignore those errors".

My fixed buildShaderMenus.mel can be found here. Remember to make a backup of your original.


david | animation,mel script | Saturday, November 11th, 2006

I've just updated djRivet.mel to make it work with maya 7 (previously it was maya 8 only). Only a couple of minor changes were required. The main thing to note is that if you are using maya 7 then you will also need to install and load the closestPointOnMesh plugin that comes with the maya 7 bonus tools. (Maya 8 installs the plugin by default.)

djRivet.mel can be used to constrain objects to the surface of a poly mesh or a nurbs surface. The target surface can then be deformed or transformed and the objects will stick to it and move with it without themselves being deformed.

Each object is parent-constrained to a follicle which is attached to the target surface at a specified uv coordinate, which can be fine tuned or animated after the attachment is made.

The script was inspired by Michael Bazhutkin who created rivet.mel a few years back, using a more complicated system of nodes and construction history. I used rivet.mel for several years and would still recommend it to people using versions of maya that don't have access to the follicle node, which is part of maya hair.

28 Aug 2007 update


david | animation | Friday, November 10th, 2006

I have been working on preproduction for a tvc I am involved in. This involves using maya to build scale models of the shoot location and planning out the camera moves and lens angles and such.

I like working with a "Camera and Aim" type setup where a camera can be controlled by its position and an "aim" point, but I still like to be able to add (usually small amounts of) pan, tilt and roll to the camera. This is easy to do in maya by grouping the camera under a new transform node and aim-constraining the transform to a locator. Then the camera can still be rotated using its local transform.

I needed many cameras set up this way, and wanted an easy consistent way to do it so I wrote a simple mel script called djCamera.mel The script hooks up the constraint and does the grouping, but it also changes the camera rotation order to zxy and provides extra attributes on the constrained transform called pan, tilt and roll. The order of rotation change allows me to roll the camera and not have it thrown off axis by the pan or tilt.

The mel script is still in a very basic form. If I get some time in the future, I would like to make a GUI that would enable the creation options to be presented in a more interactive way - instead of them being hard coded like they are at the moment.

zooCST and Elastik

david | animation | Tuesday, November 7th, 2006

I'm animating a character in maya.

Over the past year I have begun to rely more and more on the zooToolbox as my primary rigging utility. Some have said I'm cheating, but I think I'm just standing on the shoulders of giants. Hamish has written an excellent suite of tools that enable an artist working in a small company with tight deadlines to easily create advanced industrial strength rigs. The zoo tools are modular and configurable and based on well written, well documented mel scripts.

I have rigged my character using zooCST. Normally thats all I need, but this character needs stretchy arms that can be bent like rubber hoses. zooCST does stretchy IK really well but I wanted more control over the bending, so I decided to experiment with Michael Hutchinson's Elastik plugin.

The Elastik plugin adds two stretchy ik solvers to maya. The stretchy ik requires no extra utility nodes or expressions and is fast and reliable. It was easy to hook this into the zooCST rig, effectively replacing the zoo arm bones with the elastik arm bones.

The result is a rig that is 90% zooCST, but now has 3 elastik control handles on each arm. The elastik handles allow the arm to be pulled into any shape and yet still follow the zoo controls. A bonus is that the elastik IK eliminates the popping effect usually associated with stretchy IK when the joints reach full extension and start to stretch. Elastik IK eases into the stretch as the joints approach maximum extension. It also handles hyper-extension just as effortlessly.

Here are some diagrams

Next Page »

Powered by WordPress | Based on a theme by Roy Tanck