armature from edge loops

(liero) #1

Hi guys, this is a script that tries to get an armature from your mesh, it needs an initial selection that then grows, adding a bone in each loop… the idea was to rig the meshes generated with the multiextrude script, those spikes and tubular shapes…

> If you want a single chain then select a face, the resulting rig will end there.
> With multiple faces it will make a chain for each one of them, handy for the meshes I wanted to rig.

You can tell the script to auto weight the vertices, and also add IK constraints and some empties as targets to animate later… Here is a blend with the script and some meshes, only need to press ‘Run Script’ and then play with settings from Tool Shelf. And try it on your own meshes of course.

blend here: https://www.dropbox.com/s/bdtpun986xynnal/huesitos.blend?dl=1
just the script: https://www.dropbox.com/s/b7qlmxvafby636m/bones_from_mesh_addon.py?dl=1

thread at blenderheads

0 Likes

(Moolah) #2

Awesome, Liero :slight_smile: Just tried it! Works fast! Please, can you add the option to make the root (the spherical core of that body in your .blend) fixed for Auto Weight. If possible, it will be really useful to have an ability to choose a “fix radius” for a root. And maybe it will be the *.000 group. This will be even more great!

0 Likes

(Moolah) #3

Hmm… Just trying to get - is it possible to make Empties “force field sensitive”?

0 Likes

(liero) #4

added an envelope deform mode that can be useful in some cases

to give some movement to controls you can try this script, for the forces idea that was feasible with a bullet gsoc 2010 build… now you could track some particles with a script, or maybe use vertices parenting with a softbody

0 Likes

(Atom) #5

Nice work!

Is there an easy way to enable IK so I can just grab the end and all the other bones are affected?

0 Likes

(liero) #6

thanks, there’s a checkbox to add the IK tag and create a target… press F6 or look in the toolshelf
is that what you mean…?

edit: ok Atom now I get it, you meant dragging one target and moving all the mesh!
you should parent back the mesh to the rig and then animate the rig and at least one target

I don’t know if unparenting the mesh in the script was a good idea…
will update the files now to keep default behavior there, it is just one line to comment

edit: done! now you can do some more tricks :wink:

0 Likes

(Atom) #7

@liero: Thanks, I did mean the IK check box. I just did not see it in the panel.

Now if I can ever figure out how actions work I just might be able to leverage bone based animations.

0 Likes

(vklidu) #8

this is absolutely great script !!! thank you :slight_smile:

I saw tut about spiral phone cable (in 2.49), with your script it can be done it “two” steps

  • create spiral from circle with Screw Modifier
  • generate armature with your script
    Awsome !!! :slight_smile:

Just two notes:

  • there is a limit - 100 bones, does it can be more?
    (Calculation can be time consuming, but for cabel it’s not enough.)
  • script creates new armature each time I change addon parameter, and don’t delete previews (it’s not hard to later delete them, but it is hard to see changes).

Thank you.

0 Likes

(liero) #9

hi vklidu, thanks, i’ve changed the script so you can TYPE higher values for bone count… but feel free to edit ranges and defaults in props section

the preview bones should update as you change values, but once you move a bone or focus other task you need to delete them and start over, I could add a check to find a named armature present and delete it, will give it a try later

0 Likes

(vklidu) #10

thank you, scripts are far from my knowledge :slight_smile: but I found it :slight_smile:

I found where my problem cames from :slight_smile: I set value in Edit mode instead of Object mode :slight_smile:
http://blender.howto.cz/blender-links/bones-from-edgeloop.mov

Maybe there can be some restriction for work in edit mode?

0 Likes

(liero) #11

auch, I see… :confused:
pretty sure I had this working both in edit and objet mode at some point…
did the mode restriction you suggested, but will fix asap, thanks again!

0 Likes

(vklidu) #12

one cosmetics note - I can place bones as much I want if I wrote number, but if I want to change value by dragging it stops on 100.
(I’m sure your brain waves are moving in totally different ocean :slight_smile: It’s just for new coming users that they couldn’t notice . . .

edit: I changed the “soft_max” to 1000 - it works now

spiral cabel with your armature, thanks man

0 Likes

(liero) #13

that looks nice vklidu, this was meant to extend the multiextrude script functionality, that’s why 100 bones per extrusion seemed like a big number, but you can type any higher value if needed or edit the code as you did, cool!

0 Likes

(SilverSerpent) #14

Fantastic script liero! I can see many uses for this!

0 Likes

(3pointEdit) #15

Thanks liero, and thanks vklidu for explaining its use. What a great tool, should be a built in addon.

0 Likes

(liero) #16

Hi guys, this script was partially broken, it should work ok now…

0 Likes

(ashasekayi) #17

Thanks for the update. :slight_smile:

0 Likes