Skinning Notes

Skinning Notes

Overview

Just read Kiel Figgin's writeup here


Modelling for Rigging

Find Brian Tindall's 'The Art of Moving Points' pdf.


Tips and Tricks

-To easily see how your skin will deform in certain situation, scale up a sphere and put it at joint location.

(Brad Clark)

A Walkthrough of the Smooth Binding Process (Jeremy Parrish) (via Lester Banks)

Dropoff Rate

This option lets you specify how rapidly the influence of each joint on skin points decreases with the distance from the joint (and the joint’s bone). The greater the Dropoff Rate, the more rapid the decrease in influence. The lower theDropoff Rate, the further the influence of each joint. (maya help)

Importing/Exporting skin weights

An Alternate Solution for Saving Weights (Ryan Porter)

Part II

Mirroring Skin Weights

Q. My weights aren't mirroring properly

A. You have to select the half of the mesh (verteces in component mode) with the DQ weights you want to mirror over and then run the Mirror Skin Weights tool. I've found the best options set is to have the Surface Association set to Closest point on surface with the Influence Associations both set to One to one, but I guess it depends on what you are skinning. (jesse caldwell)

When you mirror weights and it's skipping an influence transform, it means that Maya wasn't able to find the equivalent mirror joint to transfer the weights to. This can be because the equivalent of the joint being indicated in the error is either not in the exact equivalent mirror position on your rig (translate can be off even a bit and cause this error), or there is no equivalent joint for skin weights to mirror to, or, you have two skinned joint on your rig on top of each other and maya doesn't know which one to transfer to.

The basic things to note for making your rig mirror weight friendly are:

1. Keep your rig symmetrical. There has to be the same number of skin joints on the left side of your hierarchy as the right, and those joints have to be in the exact same position as their equivalents. Mirror weights will still work even without following this, but it won't work in a predictable manner.

2. Do not put two skin joints on top of each other. Maya will have a field day trying to decide which joint to mirror to. If two joints absolutely have to be on top of each other for rigging purposes, I solve this problem by not skinning these joints and having a child joint of each overlapping joint (the child joint is offset a bit so that it isn't overlapping with any other joint) be skinned instead.

(isoparmB)

Copy Skin Weights

'Closest Point on Surface' and 'One to One' seem to yield best results.

BUT- if you are just copying from one vertex to another vertex- use 'Closest Component'.

Copy (all) deformer weights (Suchan Bajracharya)

What would cause your mesh to lose its weighting on some vertices?

PROBLEM: when ref'ing a skinned rig, some of the verts lose their weight and snap back to the origin

solution (maybe?): make sure all your weights are Normalized in the reference file.

make sure the skin clusters are attached to the main shape node (ie., it's locked and connected)

OPTIMIZE the scene and get rid of any unused skin influences!

Also, this just in: How to Stop Collapsing Vertices on Maya Post Normalization (C. Lesage)

My geometry cache won't import properly. What am I doing wrong?

Select the shape node.

Is Historically Interesting

Does anyone know what the .ihi attr does exactly? I know that if you set it

to 0 a node will no longer display it's inputs in the channelbox. And if you

set it to 1 it will. Does anyone know where I could find documentation on

it? I ask because if you set it to 1, you get tons more inputs showing up

than you would normally expect to see with say a skinned mesh.

The reason I've

been asking about it is that I inherited some assets from a studio nearby

and came across the occasional curious behaviour where I'd pick on a known

skinclustered mesh and the channelbox input area would be gone. This irked

me.. So I found a script kicking around that one of their TDs had given us

and low and behold the .ihi attr (aka isHistoricallyInteresting).. So I used

the tool to set everything back to being "interesting" again, but then the

channel box filled with TOO much interesting stuff (groupId parts etc-

messy). Here's what I think will work to fix the problem. Anyone feel free

to suggest a better way please :)

*string $nodes[] = `ls`;

for($node in $nodes) setAttr ($node+".isHistoricallyInteresting") 2;

string $nodes[]= `ls "*tweakSet*" "*groupId*" "*groupParts*" "*GroupId*"

"*GroupParts*" "*lightLinker*"`;

for($node in $nodes) setAttr ($node+".isHistoricallyInteresting") 0;

(Y. Paxton-Harding)

  • *

Cleanly swapping UVs on a Bound Rig

Zeth Willie made a nice video

'Go To Bind Pose' Error

Well, you don't necessarily have to unbind your skin in order to reset your bindpose.

If you move a joint after binding and want to make that new position part of the bind pose, you can do the following:

1) select the joints to go into your bind pose. If all joints, then you can just select by type|Joints

2) type the following command into your command line or script editor: "dagPose -reset -name bindPose1" (you can abbreviate that to: "dagPose -rs -n bindPose1"), where bindPose1 is the name of your bind pose.

Caveat: sometimes resetting your bindPose after skinning will cause havok with your weights, but for me I find it works with little or no headache. I just had to reset my bindPose on a complex facial skeleton with pretty fine, specific weighting and had no problem. For me, it works better than having to export and import skin weights and is much faster to execute.

(Alex Fredericks)

Mesh Deformation Methods

How do I prevent 'Weight Fighting', ie., when you weight one part of the body well, the other one is not weighted as well?

Create separate skins for separate parts (ie., body, arms, face)

(Sune Kempf)

Helping volume deformation through a modified bind pose (TD Matt)

Automatic Hair/Fur Skinning (TD Matt)

Efficient elasticity for character skinning with contact and collisions (Disney)

Linear Blend Skinning

This is the 'traditional' method of skinning. While stable and easy to use, it is not the best at preserving volume and can lead to 'candy wrapper' (or if you are British, 'sweet wrapper') type deformations where the mesh completely collapses when rotated 180 deg.

Dual Quaternion Skinning

Dual quaternion skinning has some limitations:

• Changing bone length is not supported.

• Twisting a chain of deformers by more than one complete revolution can give unpredictable results. However, you can spin the entire chain as many times as you want without problems.

• The inverse of the envelope is not calculated when storing shapes in Secondary Shape Modeling mode.

Blend Shapes

Animating Blendshape Nodes with a shading/texture nodes

Some suggestions for this ( i haven't tried..):

Stroika plugins

SOuP (Peter Shipkov)

fStretch (cgAddict)

Mirror Blendshapes

//After much searching, I have found the script to do so, its preaty nice for a time //saver

// MIRRORS A POLY SHAPE IN -X

// USAGE: select the shape, then the base (symetrical) shape

// run the script.

string $sel[] = `ls -sl`;

string $base = $sel[1];

string $shape = $sel[0];

string $nShape[] = `duplicate -name "newShape" $base`;

string $temp[] = `duplicate $base`;

string $blendName[] = `blendShape -name "tmpBlend" $shape $temp[0]`;

setAttr -l 0 ($temp[0] + ".scaleX");

setAttr ($temp[0] + ".scaleX") (-1);

string $grp = `group $temp[0] $nShape[0]`;

setAttr ($grp + ".s") 50 50 50;

select -r $nShape[0] $temp[0];

string $wrapName[] = `doWrapArgList "2" { "1","0","0.01" }`;

setAttr ($blendName[0] + "." + $shape) 1;

DeleteHistory;

setAttr ($grp + ".s") 1 1 1;

parent -w $nShape;

delete $grp;

//Enter this into the script editor after selecting the target blen shape and the //regular, peace

Here is the process:

As a workaround though; here is how I mirror my blend shapes.

First I sculpt my first target; say a right eye wink.

Then I dupe 2 more copies of my unmodified base mesh;

translate them over to an identical position; and scale one of them to -1 in the X axis.

I then setup a blend shape between my wink shape and the scaled mesh. Adjust the slider to 1 and it should wink the other eye.

we aren't done yet though

set the slider back to zero and use that mesh as a wrap deformer on the unmodified mesh.

set the slider back to 1; delete history on both objects (you can delete the scaled mesh now)

and biggity bam; the other eye has winked.

(Thomas Monberg Thompson)

If it IS symmetrical, you can use abSymMesh

How to Save Your Blendshapes if the Face Geo Changes

1. Take your base head ('lowGeo') and create a blendshape with all of your shapes attached to it.

2. Take your adjusted geometry ( 'highGeo'), make sure it's in the exact same location as your lowGeo. Select highGeo, then lowGeo, and go to CreateDeformers --> Wrap. Default settings should be fine.

3. Start dialing your different blendshapes on, and the highGeo geometry should move right along with the lowGeo. You can then duplicate the deformed geo, and use these as your new blend shapes.

Wraps

Wrapping is a good last resort when you have, say, a higher res geometry and you need to transfer over information from a lower res geometry. HOWEVER, Maya's out of the box wrap uses a lot of memory, and if you have a wrapped or wrapping geo that is more than 50 faces, it will take tons of time for the scene to load....

NOTE: first-selected object is wrappee, second-selected object is wrapper.

When setting a wrap with higher res geo, make sure 'max distance' is set to a low value, like 0.3 or 0.4.

HOWEVER, there are custom tools that do wrapping with less of a memory hit, here is one option (I haven't tried) using a skin deformer: http://www.creativecrash.com/maya/downloads/scripts-plugins/character/c/skin-wrap (via Lester Banks)

It is possible to write your own version, too!

More Deformers

Using Geometry to deform geometry (p.i.m.)

Skinning Specific Body Parts

Shoulder(Biped)

Wide range of motion on the shoulder makes it one of the most difficult areas to skin well. It's useful to do a rough bind test of this area before you start serious rigging..

Great tutorials for better shoulder deformation:

No-flip upper arm roll joints (TD Matt)

Minor additions

- when you point-constrain ik handle, there is no offset

- should be 'aim constraint' and not 'orientConstraint' for def driver

- does 'twistMod' joint get connected to shoulder, or added into bind rig?

Using upper arm roll_01 to help deltoid deformation (TD Matt)

-------------------------------------------------------------------------------------

hi everyone. i almost feel like i shouldnt be posting another one of these if i wanna live, but here it goes:

how, in god's name, does the human shoulder need to be done, to have good deformations?

i kno this question rises often. but i have yet to see one that offers some kind of a closure.

i've done plenty tries -

-helper joints constrained to kinda simulate muscles (pecs and latissimus mainly)

-blendshapes

-muscles

-PSD by michael comet, compiled by djx for maya 2011

corrective blendshapes... well, lets use the word 'limited'...

with psd, it feels like i would have to sculpt like 20 poses to get everything right, and besides it being tedious as hell and suited for the best results, i dont have the time now.

constraints didnt work for me, or are in some way limited

Muscles work out the best for me, last i tried. they deliver supreme deformations if properly set up but take up valueable processor power.

i'd like to use PSD since i kno it's the best, but obviously, i've got trouble understanding it right. i've never seen it with my own eyes in a rig, so i've got nothing to reverse-engineer..

if some of u can point me in the right direction (and i mean a somewhat up to date tutorial to whichever shoulder setup, screen capture or if u'd like to share a scene file with me, which would be greatest *ever*), i'd be very very glad.

thanks guys.

(nemeru)

The work flow I have been following for the past few years was to setup muscles for the shoulder region.Once these muscles are bound to the mesh and weighted properly, I would duplicate the shapes for certain preset poses in all the three axes and also in combination.This would give me an anatomically correct shapes, which I can plug in to the pose deformer. This way I could easily extract how much ever shapes for my pose deformer without extra effort.So the final rig would be skin cluster based with pose deformer working on top.

(anoopak)

As said, IK will work, as it can keep the spacer joint at exactly half the rotation of the shoulder easily... But I tend to aim and point constrain it to a locator/null which is parented to the upper arm control.

I usually make this spacer joint's length appropriate for fitting within the deltoid portion of the character mesh, which can ofc vary in size, so not every character requires it to do exactly half the rotation of the upper arm control, sometime its more, sometimes its less, so I find aiming it good for this.

And I point constrain it because, ofc, when the upper arm rotates, the relative distance between the base of this spacer joint (in the collar section) and the locator on the upper arm changes, so point constraining the tip joint lets me squash n stretch the spacer to fit the space correctly, and so as the joints going further down into the arm don't get pushed out of (relative Z) position.

I also find that this teeny lil squash n stretch effect on the deltoid mass helps with the overall shaping of the mesh there too.

But at the end of the day, the deform rig... the actual skinned joints, just need to target themselves onto the control rig, so any method of IKing, constraining, or whatever else that matches their overall "pose shape" to that of the control rig will work just fine. And yes, these spacer joints can be used all over... I tend to place them across any joint in the character that has rotational freedom beyond 90degs on at least one axis... so generally that's shoulders, hips, elbows, knees... and sometimes even wrists. You could do it at finger joints also, but that's usually overkill for most projects.

(PentamiterBeast)

Wrist/Forearm

What are some ways to keep wrist from collapsing? In addition to blendshapes..

If you look at the shoulder and the wrist the body is using its muscles to keep the bones in there sockets - and this enforcement is essentially synonymous to a quaternion.

The shoulder is more of a purer quaternion that the wrist - deformation at the upper arm to shoulder can go up, down, forward and back, the upper arm itself can twist - but crucially this twist will happen naturally. as the arm moves around.

E.g. If we have our arm stretched out to the side, and we firstly move it down - then directly forward and out to the side, we can see the hand has rotated from being palm down to palm forward. - We've cause a natural rotation/twist. This twist is a signifier that our arm cant keep cycling through that motion and will naturally resolve itself. At the junction of the upper arm shoulder is gross movement as before is just up, down, forward and back - it never spins about its direction - its more akin to a jacobs ladder were muscles are constraining the bones direction.

As to the wrist, deformation comes from two systems, the radius and ulna and the muscles at the wrists themselves - the first reference rotation can be derived from the bones to drive a secondary deformation caused by the muscles as the wrist joint.

(Charles Looker)

Hey Charles,

could you please show us how do you implement quaternions math for this kind of shoulder rig ?

Sounds really cool and i don´t have a clue about that...

http://joleanes.com/tutorials/flipp...pingless_01.php

This sums it up pretty well, I can't show math/clips of mine as im bound to an NDA. Essentially though all it is, is an AngleAxis derived by direction only. I.e you have an base [0,0,1] and a direction [1,0,0] - you get the cross product of this for the vector and the dot for the angle.

Use a duplicated wrist that is aim-constrained to elbow(?) for a more stable twist rotation (TD Matt)

Belly

The cheater’s solution, using bones, is something like

    1. For the hips, shoulders, and a mid-spine joint add locators offset forward in world space by about half of size of the belly

    2. Run a spline through the locators.

    3. Skin the spline to the locators

    4. Add a smoothCurve to the spline

    5. draw a 2 or 3 bone chain along the spline; parent it to the main body skeleton

    6. use the spline as a spline IK control to drive those bones. You might need tweak the offsets to get good positions.

    7. skin the belly to the belly chain

    8. You can add a scaling expression to make the belly scale sideways when it compresses

Most of the time I hang an extra joint of each belly bone and skin to that so I can add manual jiggles etc over the default behavior.

(Theodox)

Hips

Useful to add roll joints (similar to above) for upper legs as well.

These should all be on the bind skeleton and not the rig skel..

Knee

how I would setup a joint looking like that is through an IK, so that it always moves half of the rotation, since it's a "bone for a joint" kinda thing. It's the same as 3-joint leg (where one extra joint/bone is used to simulate the kneecap) - the IK works marvels there, keeping the kneecap always half-way.

(nemeru)

Ankle

What if you have a mesh where the ankle is modelled in the mesh? If you skin it to the leg or ankle joints, the bony pivot will look weird..

Useful Weighting Scripts

ngskinningTools (via Lester banks)

tf_smoothSkinWeights

Sheen Hara's weightingTools.mel

abWeightLifter

cometSkinWeights

si_poseDeformer

- something to select surrounding vertices either in u or v direction on surface, like the way you can walk up and down on a nurbs surface

Skinning for Games

Skin must be joint driven, no deformers can be used. Extra bones are added to simulate muscle action.

Character Rigging for Hi-Res Games (Autodesk)

Helping volume preservation through a modified bind pose (TD Matt)

Resources

Human Anatomy Study & Demo Tracking System - Igor Stefanovic (thanks Rigging Dojo)

Stefan Ehrenhaus Tips for High Quality Character Rigs

also Rigging Breasts

Busty Kelp's muscle tests!

http://www.vimeo.com/16274214