Skonverter is quick little tool I wrote over my Thanksgiving break from work @ Volition. I needed something to keep my brain active and I’ve been meaning to at least try my hand at a skinning converter. ( Converting non skin cluster based deformation into skin cluster based deformation. ) Most of the ones I have seen online are awesome and I wanted to have my own. I figured if I ended up writing something that worked fairly well, I’d open it up to the community to learn along side me, because it’s far from done. So if you’re interested in skin conversion/looking to learn more or simply just want to use the tool, read on!
What does it need?
The tool as it stands while this article is being written is pretty simple & straight forward. It really can only handle a very limited amount of cases and doesn’t have the fancy bone generation that other tools have. However, who’s to say it won’t in the future! 🙂 But I digress.
* The main thing you’ll need to set up to test is a mesh and some bones that drive that mesh in some way.
Deformation must be in some way bone driven. Meaning: If i move bones, the vertices move. This is the information that we’ll use and calculate skinning information from.
Bones in the rig must be unconstrained and have no dependencies apart from their children. As it stands, the bones need to be pretty much a simple hierarchy. No fancy constraints etc. The script moves the bones to determine vertex weighting, so if more than one bone moves, weighting will be unpredictable.
Delta mush deformation is the only thing I’ve tested with…so I can’t promise there will not be short comings in other deformations.
How do I use it?
Note: This interface is currently undergoing a lot of revision. Thoughts at this stage/how to make the interface fit your workflow would be incredibly helpful! The tool is primarily geared towards converting delta mush deformation back into a skincluster.
The standard work flow for this is as follows:
Apply rigid weighting
Smooth weighting with a delta mush/non-linear deformer ( Maya native or custom )
Calculate the new skinning information that the delta mush deformer simulates
Reapply to the skin cluster
So if we’re going to use the tool, an understanding of the current interface is useful.
Start by running the following code once installing the skonverter into your Maya scripts directory.
Skonverter’s UI will pop up and look something like this…
Note : All buttons with “<<<” fill the text box with your current selection, or open a file dialog.
Transform : The mesh you want to query/apply weighting to. Skonverter will use this transform to infer the shape node from it and, in the case of applying weighting, get the skin cluster.
Root Bone : The root bone of the skeleton hierarchy that drives the mesh.
Tolerance : If the weighting we calculate is less than or equal to this number we’re going to skip it. The default is -1 in order to capture all subtle influences a bone may have. However, if you’re looking for something less precise and a bit faster, you can raise this. I wouldn’t recommend going too high though!
Data Path : This is the file path that will be unpacked for weighting information. This field will automatically be populated by the Calculate Weighting button when it is run.
Calculate Weighting : This is where the fun begins.
This runs the methods that determines the skin weighting information from the Transform and Root Bone information. It runs through each bone in the mesh, moves it a bit and queries vertex position changes and infers weighting from that. The tool then organizes all the information together so it’s easier to store and faster to apply to the mesh on the other end of the tool.
Apply Weighting : This is where the fun ends 🙁
This button runs the methods that apply the weighting information we calculated in the Calculate Weighting methods. Before running this, be sure that the mesh associated with the Transform field has a skin cluster applied with any and all joints you want associated with it as well.
Education is a huge part of my life. Learning, teaching myself, or even helping others learn. Through my experience as a Teaching Assistant in college, my eyes were opened to the different ways people preferred to learn. I tried a few of those methods and when I was in school, and even now, I figured out I learned best from reading code/breaking down rigs or at least looking through others demo reels and figuring out how I would approach the problems they solved. With the skinning conversion tools that have been released within the past year or so, a lot of the practical application has been pretty hidden outside of a few references to academic/white papers. I’m not a math super star, so reading those papers always boggled my brain. The knowledge was right there in front of me, but I couldn’t figure it out without the help of my roommate/friends.
Eventually, I figured out enough about the process and tried a different approach to the problem. This is where that path has lead me. It’s far from perfect, but hopefully by opening it up to the community through Github, we can get a really cool tool out of it and help those learning to understand the processes faster!
…also I promised a friend I’d do it. 😛
Please do not hesitate to reach out to me through whatever communication channel you feel most comfortable with. I’d love to talk/learn/work more on this project with who ever is interested.