Pages

Thursday, December 4, 2014

Block skinning Maya tool Idea

Hi,

Today i was brainstorming an idea to block the skin weights automatically on a mesh with mostly looping behavior.

Basically currently to block skin weights i'm going over each joint, selecting edge loops in direction of child joint then flooding weight 1 to that joint.

One idea is for the Plugin to automatically block in these weights.  Please see end for plugin idea notes.  I was able to get something preliminary and usable though using Maya's native copy weight tool.  Basically i just made a copy of character and split the character at the positions of the skin joints (i wrote a python cut geo tool to help with this, see cutGeo.py).   Then i used Maya's smooth skin and bound each skin joint to a single geo piece (i used smooth skin as opposed to rigid skin so in Maya 2008 could copy weights from skin later on).   After doing this i selected the group with the split up flooded skin and selected the original single piece character and did a copy weight (one to one, closest point on surface).  Although some areas were'nt perfectly transfered i looked in component editor and weights of 1's and 0's were only set so this may be useful.

Here are some of the work in progress.





/////Plugin idea notes
For example suppose tool calculates the next closest edgeloop to the skin joint.  (suppose it knows how to figure the closest edgeloop in the direction of the child joint of the skin joint.  That is so it can select okay vertices to skin).

To speed up the calculation i was thinking of first splitting the mesh up.  This way user would select like the split off arm mesh and the up arm skin joint, and the tool blocks in the skin weights for the uparm and elbow.

Another idea is to leave the entire mesh intact and the tool "smartly" figures out vertices to skin and closest edgeloop , not by looping over all vertices but maybe looking at neighbouring vertices via a bounding volume around the skin joint.  

Another idea is to use a cube(bounding volume) that tells skin joint candidate vertices to skin.  The tool rejects some of the vertices in the cube that have a world position that doesn't fit with the direction of the skin joint to the child joint (that is suppose a vertex world translate X  is -5, but the skin joint world translate X is 10, then this vertex should be rejected -- this thought may need some tweaking for like arms, legs, spine have different world axis etc ).  How big to make this cube may be user defined.  How the cube gets oriented can be taken from the skin joints orientation.  How many cubes to make may be taken as the number of skin joints.

These are just some ideas.  Hope they are helpful.

cheers,
Nate