Armature extraction for skin modifier

An armature generated from a mesh with the skin modifier.

As promised the skin modifier has returned. I’m overall pleased with our detour into armature-land, I think we all have a much clearer idea of what the direction of the tools should be.

Coming at this problem from the other side now, I’ve added an operator to convert the mesh structure into an armature and generate the appropriate vertex groups. You can then add an armature modifier and pose the skinned mesh.

The code is available on github in my skin-modifier branch, fresh builds welcome.

Builds:

39 thoughts on “Armature extraction for skin modifier”

  1. Build for Linux 32 bit:
    http://graphicall.org/883

    The Rig-generating solution is a fantastic idea, i really like it.

    I have tried to make a Human Mesh by using a Mirror Modifier and the Skin Modifier and there is a Problem with the Bone direction. The shoulder Bone at one side has the Rotation Point at the connection to the upper Arm Bone. The shoulder Bone on the other side at the connection to the Body. By using a Mirror modifier i would expect a symmetrical Result.

    Can you please explain what “roots” are for?

    Many thanks for your great work.

    1. Thanks for the build.

      Root nodes get a little tricky to explain, but basically they anchor the rotation calculation for each group of connected vertices/edges (i.e. the group that gets selected when you choose a single vertex and press Ctrl+L.) The root node helps to set up a coordinate system of sorts, which is then interpolated down each edge going away from the root.

      There should never be more than one root node per set of connected vertices/edges, although the current code doesn’t stop you from doing so (still to do.)

      Obviously this modifier needs some proper documentation yet :) I’ll post again when I’ve got something up on the wiki.

    1. General outline of the TODO list, not necessarily entirely in order:
      * Write documentation on the wiki
      * Stabilize: there are some pretty easy ways to crash it right now, plus some runtime warnings that need to be fixed (e.g. edges that use the same vertex twice.) Of course, user feedback will be important here, to find additional bugs :)
      * Check on having dual radii for nodes rather than a single size value
      * Check if there are any other missing features that are required for release (again, user feedback!)
      * Clean up code
      * Submit for code review, address any issues found
      * Merge to trunk, hopefully for 2.64
      * Discover 10 new nasty bugs post-merge, hastily fix

    1. That’s been discussed elsewhere here — it’s not the code from the authors of the paper, but rather another implementation by some students. I haven’t looked at the code though; although it says it’s open source, I don’t see an indication of the license.

    1. Since the code is mostly written, it wouldn’t make a good GSoC target. I personally won’t be participating as a student in any more GSoCs, seeing as how I’m not in school anymore :)

  2. Awesome stuff Nicholas! I’ve been patiently waiting and trolling every blender forum out there for news on this since it first came to light a while back. Can’t wait for a mac version. Cheers, it’s looking hot!

  3. Keeping up with this blog has very quickly become part of my regular schedule. :)

    By the way, have you seen or considered participating to the following?
    http://blenderartists.org/forum/showthread.php?249030-CONTEST-Blender-Sourcerers-Competition

    As a personal appeal, I learn and maintain knowledge easier from videos than written documents, and I believe this initiative could ease the learning curve of new and wannabe developers like myself.

    1. I have considered it, and even briefly tried doing it. I ran into some problems though. Some problems were technical issues with the various screen recorders; I’m sure these issues can be resolved.

      Slightly harder though is that I don’t think my workflow is very conducive to easy watching :) I typically use a full-screen emacs subdivided into between four and eight areas, use plenty of custom shortcuts, and don’t use the mouse much.

      So any video is immediately going to be confusing because of that, and will require good explanation as it goes. I tried using Youtube annotations to do that, but it gets quickly tedious. I guess I should buy a mic :)

      With all that said, since you’ve expressed interest I’ll definitely try and make a few coding screencasts happen.

        1. I haven’t seen any mac builds recently. You might try making a request on BlenderArtists, probably some one can help out.

          Also feel free to ask about any compilation problems you are having, might be I can point you in the right direction.

  4. Tried a build.
    Didn’t find it usable. When deleting things, the skin just dissapears with no idea how to add it back…
    But hey, this should be awesome when done :)

      1. Ah, I see. :)
        Can’t this root thing be automated?

        It’s nice to see that such things as Hands are possible to do.
        Even if it’s still really easy to make meshes with holes, detachments, weird topology, etc, still, this is extremely useful :)

        Keep up the good work.

        1. Roots can be better automated — I intend to make it automatic that only one root per set of connected vertices can exist (so adding a second root will simply clear the previous one.)

          The best choice of which vertex is a root can’t be automated though — it’s similar to making an armature, only the rigger knows which bones should be top-level parents.

  5. Nicholas I think the steps to create the skin modifier are too many, create a cube, select an edge, invert the selection and delete, apply the skin modifier to the edge, this can be summarized in one tool, something like [ skin sketch ], which when activated generate the modifier automatic what you think, like the knife tools.

    1. It sounds like there are two issues here: the time it takes to set up the initial skin modifier (add mesh, delete everything except for one vertex or edge, and add skin modifier), and separately, the time it takes to create the finished skin mesh.

      The first issue I think is unimportant; you can do it in a few seconds and then you’re ready to continue.

      On the second issue, you suggest sketching to make it faster. I’m not convinced of the usefulness of sketching here though. Can you describe what such a system would look like? Greasepencil curves converted to vertices/edges? It’s all very well to say it should do “what you think”, but in practice it’s trickier than that :)

  6. I cannot try latest version yet but it looks great!

    Well, I need to avoid cross bumping, but it difficult for now.
    Here is some my naive ideas:
    collision: support “vertex moving w/ snapping edge to face”. currently snap is affecting only selected things (eg. when moving vertex, snap can affects vertex only). also it does not affected by modifier results.
    Also adding more edit-mode temporary constraint may be good (eg. when moving vertex, make collision-cylinder from mouse-near edge and change sizes w/ [key] + mouse wheel).

    distortion: extend shrink-wrap modifier.

    merge: extend boolean modifier to support merging self-mesh w/ smooth joint.

    1. It’s not clear to me how this is much different from our edit mode; they appear to be extruding vertices and scaling, which is exactly what Blender does.

    1. If you do run into problems, feel free to post them here and I’ll help out if possible.

      A Mac build would be good to have, don’t think there are any for the skin modifier currently.

  7. Thanks for the very cool modifier!

    I use Maya interaction presets all the time. Is is possible to make the scale and rotate functionality work with the Maya presets?

Leave a Reply

Your email address will not be published. Required fields are marked *