Tuesday, June 23, 2009

Funky -- rigging details

Thanks to everybody for their great feedback on the funkiest man alive clip. It's cool to see that it resonates with people. The great fedback has emboldened me to continue with plans to do more stuff along this line.

OK, as promised here are some details about how I created the funky animation. First up I want to explain the rigging. It will help put the animation process in context. None of this stuff is really revolutionary. It's just using various old techniques in a way that suits the particular style of design and motion I am aiming for. I doubt this exact combination of techniques would work on more "normal" CG characters or styles. The demands of those styles necessitate a different approach. Ultimately any good rigger understands that the end defines the means. For me the driving principle is shape control. The second priority is ease and speed of animation. I want to have fun while doing this, not die of torture. Both the style of animation, and the manner in which I create the animation, allow me more freedom in "breaking the rig" because I never really have to worry about showing it breaking or coming back together to the "correct" form in a literal manner. It can be broken for a frame or two, then be 'normal' again and the audience doesn't ever see the transformation. Without that nasty business exposed the audience just accepts the image for what it is.

The Body
At first I tried to rig the character using a hybrid veggietales approach. With the VeggieTales characters we used lattices with the various lattice point rows clustered together. You can see the basic idea in this image...

Properly networked with dozens of math nodes under the hood (aka: "magic") for automatic counter adjustment the basic control can be boiled down to a few controllers. For Veggies you could literally do 75% of your primary acting animation with one controller for the head...

There are no bones in a VT rig. I figured since Otto (and previous incarnations of him) had a simple gumdrop shaped body, perhaps this would be a good way to rig up the main body. The attractive part was the nice squish-able volume and simplicity of using one control to get a lot done. Well, that and I hate, hate , HATE defining skin weights for joints. So if I could do it with a lattice, all the better. Sounds great in theory. Not so much in practice. I wanted to do things with these characters that they never dreamt of doing with Veggies. The primary downfall was that it was hard to get good isolation of control over a specific region of the torso without it affecting neighboring portions too much. Say I wanted to push the belly out to the left while leaving most everything else where it was and having a good flow of the mesh as it deformed along. The deforms just didn't work right. I tried about 6 or 7 different variations (each more complicated and automatedly counter-forced than the one preceding it) before I scrapped the idea completely and just went with simple joints. The key to this was a GREAT plug-in by Kickstand Labs called Stretch Mesh. It's amazing. Stunning. Life altering. Magnanimous. Scrumptious. Punctual. I cannot use enough superlatives to describe how awesome this plug-in is. Go check it out at their website and see the examples. It made bones a simple pain free solution. They have my undying love.

OK, beside me having a serious man-crush on the Kickstand dudes, I ended up with joints for the body. There aren't many joints in the body, but each one has a control for it. The control can adjust position, rotation and scale. So the body is pretty much totally "breakable" at any point along the way- something that ended up being easier to pull off using bones instead of a lattice. All the better to get finer control over silhouettes and shapes.

The Limbs
The "hybrid" part of my original hybrid-Veggie approach were of course the limbs. I rigged those pretty much straight up. I attached them to the body using a MEL script called djRivet. It uses the hair system in Maya to stick things to a mesh. So the arms & legs are stuck on the body like they're plugged into a hair follicle in the skin. Weird, but you riggers know what that means. That part works like a charm. Always did. There were some arrangement & parenting issues so that stuff would have the proper following properties, but nothing major. A simple IK switch between chest space and world space is enough.
Speaking of IK/FK-- I have evolved to the point where all I use is IK arms and legs no matter what. I'm just comfortable that way. It's much easier & faster to adjust the arc or path of a hand in motion when all you have to worry about is one control object- the hand IK control. Adjust it to clean up the arc, done. To fix a hand arc or whatever in FK you need to find the right combination of adjustments from the hips, thru the chest, down the arm- in a rig like Otto that can be 5 or 6 controllers. So I skip the FK and stick with IK. I've worked this way for years now. Life is good.

The arms and legs follow with the body, but the shoulders & hips behave like they have their own IK and can be pulled off. This allows them to be positioned as needed to maintain the proper shapes in motion.

The bendy deforms on the arms and legs are pretty simple. I originally wanted to see if I could live without them (less controllers = faster animation), but I needed the shape control, so I added them in. As per standard practice I break the rigging into two distinct functions: Control and deformation. Control is your garden variety IK system on a joint chain- it's how you articulate the character. But this joint chain is not what deforms the mesh. Deformation is bound to a completely different set of joints. These deformer joints are then constrained to follow along with the control joints. So when I move the IK controls, the skinned joints pull the mesh along. Again, pretty standard stuff. This allows the skin to be deformed in a macro sense (with the hand or foot IK control), and on a micro level with extra controls that pull the skin joints out and away from the control ones. Not cutting edge, but it works.

The hands and feet have some extra bend deformers on them that let me kinda shape them more elegantly with a cleaner line than the joints system alone. They're nice simple attributes on the hand or foot control. This really comes in handy for the fingers. For simple hand stuff it's easier to adjust a few attributes on the hand IK control than the shape the fingers joint by joint.

The Face
The face bits are modular- they're not modeled into the body mesh, or even into a single head mesh. The eyes are separate, the nose is seperate and the mustahce is seperate. As are the teeth and tongue and ears. They're stuck on the body using the same rivet/hair follicle approach as the arms and legs. They're all able to be pulled off the body or re-arranged on the mesh to suit the shape needed. Again, this isn't rocket science so much as it's an attempt to make the design fit the end goal animation and visual style. I pretty much stole a page right out of Jim Henson's playbook.

As for the under the hood stuff for the face, it's really simple. The controls drive the position of clusters on a seperate copy of the body mesh. These clusters are simple because, once again, the Stretch Mesh plug in makes them blend so smooth and easy that I don't need to set up some complicated system of sub clusters that are blended between various master clusters, blah, blah, blah. Stretch Mesh. Have I told you how awesome it is? Anyhow, the result of this "off to the side" face is then applied back onto the main body via a blendShape morph. The reason to keep the clusters and face deform stuff seperate is to keep things stable. Clusters are infamous for double transforms, for having pole alignment problems when their parent or contrainers are rotated, etc. Better to leave them parked off in a hidden group where they stay nice and still while the results are piped back onto the main body.

The facial controls can either ride on the face, or with the flip of a switch be pulled off the face into a more typical face control panel. For close up shots the on-the-face method is great cuz it's like sculpting the expression. For shots further away the panel version is easier to work with.

The Triggers
OK, the last little bit of rigging fun for today was my trigger set up. Many folks are familiar with Hamish McKenzie's zooTools suit of MEL scripts. Hamish is an insanely bright guy- and a real cool one, too. He's currently performing signs and wonders for Valve. His trigger tool is really spiffy for turning objects into buttons which can perform a variety of functions quickly. So I created a series of buttons for each character that set keys, hide visibility of controls, select or reset various controller groups (body, mouth, eyes, all). I have a quick little script that hooks these to the frame mask of my own home made camera tool. This way I can quickly click on a button to perform various functions quickly and it stay out of the way, but always right where I can get it. Even if the camera moves these buttons stay stuck to it.

OK, that's it. Like I said, nothing here is ground breaking or mind blowing. I'm just using whatever technique best fits the desired end result.
More on the animation process later.


Josh Bowman said...

Thank you for sharing all this Keith, I'll have to sit down and really think through it but until then, thanks.

Crowpie said...

Extremely informative, thanks so much for taking the time to share this!

Much kudos to you sir!!

Wonkey the Monkey said...

This is the best thing I've read all day! Well, it IS only 8:15 AM, but I expect this to stay at #1 for a few hours at least.

Seriously though, I have a real question for you. A majority of my animation teachers and mentors have steadfastly insisted that, for an animator, taking time to model or rig characters is time that would be better spent animating. Therefore, the argument goes, you should partner up with a rigging expert and stick to animating.

This idea makes some sense, especially at my beginner-level state of animating, but you seem to be a good counter-example of a good animator who nonetheless likes to have his fingers in all aspects of his production.

Do you disagree with those other animators, or do you think it just depends on the individual and their circumstances?

Thom said...

Nice work, Keith. I especially like the controls around the edge of the camera frame. Very clever!

Aparna-Appie! said...

thanks for sharing! wow! :)
a hundred stars for this!! :P

Mike B said...

you are by far the coolest instructor I've ever had! thanks for sharing your insights with us.

C.Fram said...

....mmmmmmmmmm......Stretch Mesh........

(drools a little whilst eyes slowly roll back into head)

Keith Lango said...

Thanks, folks. Glad you guys are finding it informative. or interesting. Or something. :)

So much of that depends on your goals and innate talents/interests. A lot of it is timing. What do you need to do right now? What hurdles need to be jumped in your development or career? If you want a job as an animator, then focusing on animation is a good idea. But once you get that job maybe you have time to expand your horizons a bit. I started way back before Toy Story ever flickered on a silver screen. Back then you HAD to do everything. Specialization wasn't an option for a freelance CG artist. My first area of expertise was as a lighter and texturer, actually. Then I moved over into animation. In my studio career I've been everything from a screenplay writer to a render wrangler and just about everything in between. I've done management, been a producer, a director, voice actor, pipeline architect, modeler, lighter, texture artist, storyboard artist, VFX Supervisor, editing, layout, rigging, compositing, sound design... I'm hard pressed to think of something I haven't done at one time or another. In the end I feel like I have a lot more to bring to the table than a single skill guy. I do believe strongly in a broad life. I really do believe that when you learn new things you get better at the old things. You have new points of view. You have a different set of problem analysis and problem solving skills- many of which transport to different problem sets. Each discipline tends to be a world unto itself. Animators see animation problems and try to fix them as animators. Riggers see things as rigger and try to do things the way that makes sense to a rigger. Producers see things and try to fix things in a way that fits their pre-set viewpoint. CG guys see the world thru the lens of being a CG guy. Stop-mo guys thru their own lens. Each point of view, each lens has a blind spot. The more lenses you've seen the world through, the more opportunity you have to see things where others don't. So while I see some validity in the idea that "experts have laser like focus" point of view (which kinda strikes me as a modern extension of the church of Milt Kahl), I don't think that approach is as black and white as many folks make it. Exclusive expertise is a luxury afforded by complex societies. But much of the world works on a level that appreciates broader experience.

Ajit Singh Yadav said...

The Face rig for Otto is 100% interesting.....and thanks for the tip about djRivet use.

Brian Horgan said...

Very interesting information on the rig. Many thanks for posting it. I work in Cinema4D and there aren't many good free rigs for it so I had no choice but to learn how to rig, even though I really just wanted to animate. But it worked out OK as I found I have an aptitude for rigging and now I get some freelance work from time to time which can help pay bills while I learn how to animate.

The best thing is that one can inform the other - at the moment I'm working on a test animation and improving a character rig as I go along as I learn new techniques and put greater demands on the rig as an animator.

Also quite reassuring to hear that you animate arms in IK all the time.. there are plenty of people out there who swear that FK is the only way.. in Cinema FK is a dog to work with so I've gotten used to working in IK all the time. Glad to hear that some of the pros do this too!

Thanks again,

sunny kharbanda said...

Oooh.. this is brilliant. Of course, the stretch mesh thing was a revelation (as soon as I finished watching their video I emailed them for an eval version). Painting skin weights just might be history.

What I really got a kick out of was seeing your modular approach to the rig, and how simple and intuitive you kept it.


-When you talk about the IK switch between chest and world space, is that for the shoulder or the wrist? Could you elaborate on that a bit?

-How do you keep your bendy deforms looking smooth? On Moom's rig, for example, using the bendy controls often shows a kink at the knee or elbow. How do you avoid that.. is it because your mesh is cleaner and simpler than Moom's?

-About the clusters driving the hidden mesh: How are you piping this through a blendShape? I can imagine some kind of wrap or collision-based deformer doing this, but I'm curious how you're achieving this with a simple blendshape. Are there separate target shapes for each face control, like Jason Osipa's setup?

I love the design of your trigger buttons. SO right-brained and obvious; not to mention easy on the eyes. My big quibble with most of Maya's icons is that it's not immediately obvious what the icon does, unless you've been using it for long. I think you should add "UI designer" to your already extensive set of skills.

James C Ditmer said...

So interesting and some great ideas to rig this type of character. Thank you for showing us your thought process about what you wanted from the character and explaining how that effects how you decide to rig him. Stretch Mesh and djRivet are great tools too, thanks for the heads up. Its great to see so much thought put into the design and creation of such a fun little guy!

r3D said...

Thanks for the information and your efforts sharing it with us :)

anim_ziggy said...


great stuff as usual. I m so glad that you think like that about the approach of not doing only one thing in CG. I really feel like that too and I find it exactly that when you expand your skills you learn and approach other things in a better way than before :+)

Graham Ross said...

Thanks for posting the info Keith. I had to do similar things for my rig for my film and it was pretty tough. Nice to see a different, simpler approach ;)

Suchan Raj Bajracharya said...

I really loved the animation you have done for this character. The rigging you have done is simple and effective. I always loved the idea of simpler and as little controller as possible in a rig with maximum flexibility. Thanks for the share...Lovely !!!

Jeff said...

Great tips (as usual) here from Keith .. especially the djRivet script. I used it to put a mustache on one of my characters!
(you can see him on my blog if you want)

krizzik said...

Well, I hate to be "that guy" when it comes to great information like this, but I guess I'll have to. This type of solution/apporach for cartoon rigging is brilliant so long as any other animators that need/want to use a "Stretchmesh" based rig have a Stretchmesh license from Kickstand; it's not a completely packaged/distributable solution like Anzovin'z TSM based rigs (only the rigger needs a license).

Why the guys at Kickstand don't say this much without looking through their forums is beyond me (the FAQ doesn't cover this little wrinkle). So, that being said, I'd have to say the stretch mesh approach is almost perfect - assuming sharing a rig you make with it is part of the plan. In any event, I'm glad this rigging approach helped you realize the animation you wanted, Keith!

Gold For RS said...

I dislike to be "that guy" when it comes to excellent details like this, but I think I'll have to. This kind of solution/apporach for animated rigging is amazing provided that any other computer animators that need/want to use a "Stretchmesh" dependent rig have a Stretchmesh certificate from Kickstand;WOW Gold
cheap runescape gold
Billig Diablo 3 Gold Kaufen

Leif Sanchez said...

Can you do some Veggietales tutorials?

Leif Sanchez said...

Can you do some Veggietales tutorials?

Leif Sanchez said...

Can you do some Veggietales tutorials?