Monday, 29 September 2014

Semi Auto Skinning R&D

If you have not already seen Hans Godard's vimeo page then you should go there now. That man does some great work and is a huge inspiration.
His latest video demos a workflow for automatizing smooth skinning. I tried to do something similar but couldn't crack the math for SSD. So I did it my own way. The most important thing is that it works and gives good results.

My version is based on Splice and Python. Python slows things down a lot but I am getting into C++ so the next version will be full Maya C++ API.
Even with Python I didn't have to wait too long. With a 12k vert mesh and 85 skinned joints the procedure was done in a bit more than 5 minutes 3m30s (did some optimizing). That still beats doing it by hand and painting the weights until the wrists start to hurt.

A big thank you to Jonas Törnqvist for giving me the model for testing. Great modeler and a great guy.

No more talking, here is the video:

semiAutoSkinningRD from Armin Halac on Vimeo.


  1. So you weight it with max influences set to 1, then perform the delta mush and convert the next version into a weighted version (with something along the lines of SSD). Correct? :)

    I'm really curious about how your version differs from regular SSD in that case. As usual great stuff!

    1. That is correct.
      The difference from the regular SSD is that I did a more brute force approach. Transform a joint and see how much it affected each vert. Also I have to iterate only once for every joint. I didn't need multiple poses. I tested it with multiple poses and it didn't give me a noticeable difference. It just took longer to finish. This method probably wouldn't work on regular SSD because it relies on a reference mesh and me controling the joints. The regular SSD has to figure out the joints and here I already have everything I need.

      And thanks Roy! :)

    2. So you basically move each joint (also excluding movement of its children joints) to calculate how much this affects a vertex. You do that for each joint and vertex combination and apply the weighted normalized value over all joints?
      - joint1 moves vert1 by 2 units
      - joint2 moves vert1 by 1 unit
      Total movement is 3 units
      - joint1 weight is 2/3
      - joint2 weight is 1/3

      Or are you doing something different? ;)

    3. This is great - I'm trying to write my own version of this.

      Bearing in mind what Roy said above, is it simply true that if this vert has moved at this joint movement, then its certain that we need to use this joint as an influence? I'm getting some odd results and I'm just wondering if I'm either doing something wrong or there is some other factor i need to add in.

      Are you for example storing the positions of your verts in a rest pose RELATIVE to each bone then querying them again in the same joint space for the currently moved joint, or are you simply querying the vert positions in world space?

    4. I didn't use every vertex that was moved by the joint. I added a minimum delta value and the verts that get a really low influence are thrown out. Before that I got joints affecting some random verts across the body.

      I query the vert positions in a rest pose and when I move a joint and all of that in world space. There was no need to go into joint space.

      Hope this helps.

  2. Very cool stuff. Any plans on making it available?

    1. Thanks. I have some plans but they are still far in the future. I will post all new updates on the blog so keep following.

  3. Amazing work.
    Will you be releasing this sometime soon Armin? Even in it current state perhaps? It already does a way better job than I could do in a week. Yep, I'm that bad. :) I'm an environment artist by trade but am having to do some characters lately and I'm getting very disheartened with the state of their skinning.
    Perhaps a beta release or something? I'd be eternally grateful.

    1. I'll think about it. :) I am currently overloaded with work and when I get some free time I will work on wrapping this up nicely.