Skinning: Bind pose weirdness?

I’ve gotten the same result in both Max and Maya, and I’m not sure why…

  1. I bind a mesh to a rig at frame 60 (in max I tell it to use frame 60 as the ref. frame)
  2. I go to frame 0. The rig deforms the mesh so it looks different.
  3. I collapse the mesh, now it still looks like its deformed frame 0 version.
  4. I load the same weights back on to the mesh, all verts have the same weight values they had before, but the reference pose is frame 0 now.
  5. I go back to frame 60, and the mesh DOES NOT look like it did before I started.

Can anyone explain why this is happening, or have any suggestions as to how to fix it?


rich

To explain why this is happening, I’ll have to first brush over how the skincluster node works a bit more closely. Not in front of maya atm, but, the deformation applied by a skincluster is based on the difference between the current matrices (usually from the joints you’ve got selected when hitting “smooth bind”) and those stored in another array attribute called “preBindMatrix”, or something close to it.

You’ll notice that that array attribute has the same number of indices as the number of joints you’ve skinned your mesh with (stored in an array attribute by the name of “matrices” if i’m not mistaken) and that if you query it’s values it will give you the matrices that the joints were currently using upon binding the mesh. This is you reference frame. It is between these matrices and the current matrices of your joints that the deformation is derived and applied to the mesh.

You might wonder how these values got there in the first place and how you might control them after the fact. Well, as soon as you hit “smooth bind”, maya went ahead and copied the current matrices of your selected joints (or joint hierarchy, depending on your settings) and stored them inside that attribute. One way of editing those matrices is to simply have a duplicate of your skeleton in the reference frame, or “bindPose”, that you would like to have and plugging each joint into it’s corresponding preBindMatrix[0], preBindMatrix[1] etc. slots. Note however that the bindPose joints plugged into the preBindMatrix attribute will have to match the index numbers of those from the matrices attribute. E.g. if “L_leg_thigh_JNT” is plugged into “skincluster.matrices[10]” than “L_leg_thigh_bindPose_JNT” will have to go into “skincluster.preBindMatrix[10]” etc.

And so, the reason you are getting different results when importing the same weights from a previous bind, is that since you bound the mesh at a different frame, maya stored a different preBindMatrix than last time and thus getting a different result when differencing between the current and bindPose matrices. The weights you import are simply multipliers of the difference.

I have no clue how this works in max, but I would assume it’s something similar.

/m

Hi,
I’m not sure about the math involved, also for the examples I ran I used Maya’s smooth skin with closest distance.

I think the skin weights are dependent on joint rotations. So even with the exact same skin weights two joints bound with different starting rotations produce different looking bound meshes. Contrastly, it looked like different translations on joints and same weighting same rotations do give similar looking bound meshes.

Hope these figures I made are helpful, also I may have made some mistakes in this.
(it starts from http://flic.kr/p/c1BbWC – Affect Joint Rotation on Bound Mesh )

Regards,
Nate