Character Animator

Archive for March, 2012

Batch Render Fix – script by John Mather

Hello!

When I was working on finishing up the Balloon short film, my team ran into an issue where Maya’s batch render would go crazy and our character would lose parts of her body while the other parts moved through the animation. Or the clothes would be the only thing moving and nothing else would move.

My team mate, Andrew Rodriguez stumbled on a thread where this awesome guy John Mather made a script as a way to solve this exact issue. Apparently, we weren’t the only ones having batch render issues. His script takes a start and end frame number, like 0 to 200, and renders out from the current camera with whatever settings you have in your Render Settings.

In my journey to learn more on the technical side, I decided to make a window for this so I could learn how to extend the function of a script, since his didn’t have a UI. This is my version of the script that has a simple window for inputting the required data to run the script. And also, I really wanted to post this because it was an amazing find for my team since it saved our final project.

This is the link to where you can see the discussion and if there are any updates to his script.
 http://simplymaya.com/forum/showthread.php?p=318227 

And this is the script:

BatchFix.mel

Advertisements

Scripts

I’ve been learning how to script for a few months now and the hardest part has been thinking of finding a way to use what I’ve been learning. Not being a programmer or having any kind of formal training in that field, it’s been very interesting since I didn’t know where to begin, but it was still a fascinating thing to me to be able to make things that help the process, that automate things. So I just want to post two little things that I managed to make and learn from.

This first script flips/mirrors the selected objects position in world space.

I made a little thing that goes through the steps of mirroring an objects position, and then I started asking well what if I wanted a choice to duplicate it or not, and also what if I wanted to mirror across a different axis. So that’s what this script does organized in a window. It’s very simple but handy, to me at least.

jnm_flip

This next script is extremely simple, but it was really confusing to understand as I was just starting to learn this stuff. For awhile I had tried making For Loops for arrays, but kept getting errors. Then I found something someone posted stating the obvious that made sense.

My error was that I was trying to do something like this

//store selection

$sel = `ls -sl`;

//run for loop renaming objects

for ($obj in $sel){

rename ($sel + “something”);

}

When I should’ve done it like this

//store selection

$sel = `ls -sl`;

//run for loop renaming objects

//using $obj, not $sel

for ($obj in $sel){

rename $obj ($obj+ “something”);

}

This script takes your selected objects, runs a for loop through the selection that self-groups each object, and renames it appropriately. Like selecting a circle, grouping it, renaming the group “grp_circle”.

jnm_iGrp


Hand Rig – Set Driven Keys and Extra finger controls setup

I set up a file to help a friend out with their rig awhile ago. It shows a relatively simple concept of layering a rig to allow for extra overall control. I thought this was pretty nice when I first learned it, so I wanted to share this with anyone starting out who may not be aware of this technique since it’s not something that seems so simple when you’re first learning how to rig.

The file is seperated in three seperate files, showing the steps of how to setup the fingers of a hand rig with Set Driven Keys, that control custom attributes to pose the hand, and extra finger controls that allow for tweaking of the preset poses or to make completely new poses.

The way it works is like this:

You have your basic joints for your finger. Then you have your control objects, like a nurbs circle, fitted around the joints. They will be orient constrained to control the joints after the control heirarchy is set up.

The control objects are then self grouped twice, one to set the SDK on and one as the null node that doesn’t do anything.

Then the null group of the control object is parented under the next control object (not its SDK or null group).

So the idea of layering can be thought of as having one step above that which controls something, and that one thing above controls something else or is being controlled by something else, like a custom attribute in this case.

The files are pretty easy to understand, but if you have any questions please feel free to contact me for help.

You can download the files here.

jnm_handRig_fingerTutorial