So this is annoying. You are trying to paint weights in Maya using Post Normalization and a bunch of your vertices are collapsing to the origin! What’s going on!?

Don’t fret. There is a simple explanation and an easy fix for this. But first, let’s look at what Post skinning is doing:

“What is this Post Normalization skinning all about?”

When using Post Normalization skinning for the first time, it can be a bit tricky to figure out how things are working.

Basically Maya is taking the total of all the weights and then normalizing it to 1.0. With classic interactive skinning this is done while you paint, which means if you paint on Influence A, Maya automatically steals weights away from Influence B and Influence C. If you are subtracting weights, it automatically tries to add weights to other joints. This can be very buggy and throw weights unpredictably.

With Post Normalization, Maya is keeping all the weights you’ve painted and doing this calculation on the fly. It stores the values of your weights without changing any of the others. You can paint all the way up to 1.0 on Influence A, Influence B and Influence C. Maya averages it out and the final effect is 0.333 on all 3 influences, but the weights are still painted to 1.0.

This can be a great way to think of your weights as separate layers. It’s like a bunch of overlapping venn diagrams.

“So what is happening in that ugly image?”

What you are seeing is essentially a divide-by-zero error.

When you first encounter these collapsing vertices, you might think it is a bug and dismiss Post Normalization as garbage or confusing. But it has a simple explanation. Since Maya isn’t automatically changing any weights, if you can paint all the weights to 1, you can also paint them all to 0. Maya is trying to calculate the totals of the weights but when there are no weights to divvy up, it simply can’t make the calculation.

How To Fix It

Luckily there is an easy fix. What I do is create an extra joint called “base_influence” and place it anywhere in the middle of my character or at origin.

Next, flood the entire character geometry with 0.05 weight on “base_influence”. Now you can paint the rest of your joints freely, but this one will always hold a tiny little bit of weight to prevent collapsing.

Lastly, don’t forget to constrain this “base_influence” to your characters root joint or root controller so it follows when you move the character.

“Why use it if it is so confusing?”

It took me a while to get used to, but I use Post Normalization skinning all the time now. You get to think in layers. Smoothing and subtracting weights is bug-free. You just have to get used to the fact that if you are painting Influence A, you have to manually paint away any overlapping influence on Influence B, or you will never reach full influence.

Another Alternative

I haven’t had time to test this tool out yet. If you are interested in advanced skinning techniques and painting in layers, this sounds like a promising tool worth checking out: ngSkin Tools developed by Viktoras Makauskas.

It sounds like Viktoras is developing something which solves a lot of the common frustrations with a Maya skinning workflow. It also uses regular skinning nodes, so it can also be a solution to video game riggers if Post Normalization isn’t an option for your engine.

If you have any skinning tricks and techniques, please let me know in the comments or share your wisdom on Twitter with the #rigtip hashtag.

Here is a tutorial that will demonstrate how to use a Unit Vector to animate the pivot point of a cylinder so that the cylinder will roll on its bottom edge in any direction. I’m using this technique for the feet of my Mini Mammoth rig, but it could also be useful for robot feet, or adapted into different shapes for a variety of uses.

Here is a video of the foot rolling effect we are going to create:

Note: Be aware that my expression syntax may or may not play nicely with WordPress, depending on how you are viewing this post. I have included a Maya 2012 scene file at the bottom of this post so you can download it and follow along. The final expression is included as a text file.

Notes about this tutorial:

  • I am using locators as vectors so we can see what is going on. Once we are done prototyping this as an expression we can transform it into node connections that work directly with the attribute data rather than a daisy-chain of connected locators. This tutorial will just show the expression so you can get the idea.
  • The order of the lines in your expression matters. Specifically, the foot’s rotation attributes will have to be animated before the pivots are translated in the expression. Otherwise I’ve found that you will sometimes get strange results. If your animation seems to jump or skip, keep this in mind.
  • For simplicity, the way I build this ignores rotation in Y. Instead when I go to integrate this into a real rig, I’ll group this entire foot roll rig underneath a parent node and use that to rotate in Y in global space.
  • The next step you could take would be to project the vector onto a curve using a closestPoint constraint. Shape the curve to match your character’s foot, and now you can have a foot roll in any shape you want!

So let’s get started

1. Create a cylinder with a radius of 5 and move it up so that it rests at the ground plane.
2. Create a joint at the bottom of the cylinder. Group the joint and call the group “foot_pivot”. The group will be controlled by the expression. Skin the cylinder to the joint.
3. Create a “foot_roll” controller. This can be a locator or a curve icon or whatever. This is the controller that will rotate the foot.

4. Create two locators. Name the first one “vector1″ and the second one “normalized_vector1″.

5. Select the “foot_pivot” group. Go into Edit -> Channel Control and in the Nonkeyable Hidden column make the following visible and keyable:
Rotate Pivot X
Rotate Pivot Y
Rotate Pivot Z
Rotate Pivot Translate X
Rotate Pivot Translate Y
Rotate Pivot Translate Z

6. The first step is to turn the rotation of the “foot_roll” control into XZ translation which we will feed into the pivot point of “foot_pivot”.

vector1.translateX = -foot_pivot.rotateZ;
vector1.translateZ = foot_pivot.rotateX;
// (note the negative value. This may change for you depending on your controllers orientation.)

When you rotate the “foot_roll” now “vector1″ will travel along the ground plane pointing in the direction of the rotation. But the distance from the foot is wrong and it is not in a circular shape. So…

7. We arrive at the meat of this entire tutorial. To get a useful pivot we need to create a Unit Vector or a normalized vector which will always have the same length of 1 no matter which direction it is pointing. If you aren’t familiar with vectors, this would be the same as having a 1-bone IK chain. As you move the effector around, the chain points in the correct direction, but stays the same length. However, if you aren’t familiar with vectors, I highly suggest learning about them. They will open up a new world of ideas for you as a rigger or TD. http://www.rtrowbridge.com/blog/2012/03/442/

We’ll use the built-in unit() vector function in the Expression Editor. Later if you want to rebuild it with nodes, you can get the same functionality with the vectorProduct node and turning “Normalize output” to ON.


vector $norm = unit(<<vector1.translateX,vector1.translateY,vector1.translateZ>>);

8. Now we have a vector, so let’s drive the “normalized_vector” locator so we can see what it is doing. (We don’t need to use the Y-component.)

normalized_vector1.translateX = $norm.x
normalized_vector1.translateZ = $norm.z

9. Ok, but now the problem is that our foot radius is 5 units and the Unit Vector is only 1 unit long. So let’s create a variable to multiply the unit vector which will be easy to edit if we need to use it on different sized cylinders. We add the following to the expression:

float $radius = 5.0;

normalized_vector1.translateX = $norm.x * $radius;
normalized_vector1.translateZ = $norm.z * $radius;

Now the “normalized_vector1″ should be travelling in a circle around our foot as we rotate “foot_roll”.

10. Now this normalized vector is just for visualization or debugging purposes. Let’s connect that straight into the rotatePivotX and rotatePivotZ attributes of the “foot_pivot”. (the group that parents the foot joint.)

foot_pivot.rotatePivotX = $norm.x * $radius;
foot_pivot.rotatePivotZ = $norm.z * $radius;

11. And finally, rotate the “foot_pivot”. (Note that this will go at the top of the expression. Putting it at the bottom caused erratic behaviour for me.)

foot_pivot.rotateX = foot_roll.rotateX;
foot_pivot.rotateY = 0;
foot_pivot.rotateZ = foot_roll.rotateZ;

Bring it all together and this is our final expression:


// Rotate the pivot_rotator to match the controller
foot_pivot.rotateX = foot_roll.rotateX;
foot_pivot.rotateY = 0;
foot_pivot.rotateZ = foot_roll.rotateZ;
float $radius = 5.0;
// Turn the controller rotation into XZ translation
vector1.translateX = -foot_pivot.rotateZ;
vector1.translateZ = foot_pivot.rotateX;
// Normalize the vector
vector $norm = unit(<<vector1.translateX,vector1.translateY,vector1.translateZ>>);
// Use the normalized coordinates to set the position of norm_vector
normalized_vector1.translateX = $norm.x * $radius;
normalized_vector1.translateZ = $norm.z * $radius;
// Animate the pivot_rotator pivot point to match the normalized vector
foot_pivot.rotatePivotX = $norm.x * $radius;
foot_pivot.rotatePivotZ = $norm.z * $radius;

10. (This step is optional or could be done differently.) Another thing I like to do is connect the “foot_roll” translation to the “foot_pivot.rotatePivotTranslate”. Then you can translate the “foot_roll” to create sliding effects in parent space. So even though the foot roll will be rotated, moving forward in Z will slide the foot along the ground all with one control object.

Here is a scene file you can download (Maya 2012) if you’d like to see the finished expression in action. The expression is included as a text file.

Download the finished, animated scene.

Let me know in the comments if you found this helpful or if I can explain anything more clearly. Thanks for reading.

There are tons of features and hotkeys and hidden marking menus in Maya that are extremely useful but surprisingly seldom known. While everyone is talking about big new features, these underdogs can easily be forgotten.

I just started a “tip of the day” with my animators at work because I realized that there are lot of these things that they aren’t aware of, but being a major geek, I’ve read through the help docs like a crime-thriller novel. (It turns out the Zoom Tool did it.)

Today’s was such a hit that I thought I’d start posting some of the best ones here.

Tip of the day

Hold down ‘K’ and drag in the viewport. Your timeline will scrub as if you were dragging down on the time slider. Middle-mouse drag and your characters will stay in place for copying keyframes. (Again, same as the time slider.)

This also works in the graph editor and the dope sheet.

Customize the Hotkey

In the hotkey editor this feature can be found under Tools > TimeDraggerToolActivate. This means that you can map it to another key if you wish. You could also invoke the context in your own custom UI tools.

Mini Mammoth Part 3: Modelling and Topology in 3D-Coat

March 5, 2012
This entry is part 3 of 3 in the series Making of Mini Mammoth
Read the full article →

Python: String Formatting and Enumerate

February 21, 2012

As a mostly self-taught Python scripter, I try to keep on top of best-practices and constantly learn, because I realize how easily bad habits can slip in. I’ve recently learned these bad habits are known as anti-patterns. That said, I learned a couple new Python tricks this week. 1. Better String Formatting Using Format() If [...]

Read the full article →

Using Proxy Geometry For Better Skinning Results

February 10, 2012

Here is a simple skinning trick I like to use, which comes in handy for a lot of different rigging situations. In the images below, I was rigging a wolf’s tongue with spline IK that needed to be very flexible. (If you count, you’ll notice that there are 12 controllers. 4 main controllers and 8 [...]

Read the full article →

Mini Mammoth Part 2: Sketching & 3D Sculpting

January 23, 2012
This entry is part 2 of 3 in the series Making of Mini Mammoth

So now we are on to part 2 of the Making Of Mini Mammoth where I am documenting the entire process of designing a cartoony character rig. In this step, I am doing a bunch of sketching from photo references and sculpting a quick prototype 3D model to get even more ideas. We’re almost ready [...]

Read the full article →

Mini Mammoth Part 1: The Making Of A Cartoon Character Rig

January 17, 2012
This entry is part 1 of 3 in the series Making of Mini Mammoth

Hi everyone. This is the first post in a series where I take this simple doodle of a cartoon mammoth: …and turn him into a fully animated, super-flexible cartoony character rig in Maya! I’ll be documenting the entire process from design and modelling to the creation of the entire rig. It won’t be a step-by-step [...]

Read the full article →