I am creating a python tool set that allows bone/vertex weight assignment with envelopes
It consists of three tools right now:
1. "Armature Symmetry" - A tool that helps making perfectly symmetrical armatures.
2. "Envelope Symmetry" - A tool that helps setting up perfectly symmetrical envelope sets.
3. "Envelope Assignment" - The actual weight assignment tool.
The tool allows defining an unlimited number of envelopes for a mesh/armature rig. Envelopes can have any form as long as they have a convex shape. In fact, simply mesh objects are used as envelopes and configured via their names (with a special syntax).
Every envelope has a bone name and a weight property. Multiple envelopes with different weights can be assigned to each bone.
With executing "Envelope Assignment" vertex groups with respective bone names and vertices are created automatically. Vertices that lie inside an envelope object get assigned to the respective bone with the respective weight (if multiple envelopes apply, the one with the highest weight value gets precedence).
When the rig mesh gets changed at any time, "Envelope Assignment" will update all vertex groups with one mouse click.
I will now demonstrate the current workflow of the 3 tools with some pictures:
This is for creating a perfectly symmetrical skeleton. It will parse all bones of one side of an armature and adjust the respective opposite bones. Centered bones are aligned to the center. Opposite bones are created if they do not exist.
In picture 1.
a simple skeleton is drawn. Note that only the centered and left side bones are drawn. Also note a)
the centered bones are not aligned properly. All left side bones have the suffix "_L"
In picture 2.
"Armature Symmetry" gets executed.
is the result of "Armature Symmetry". All left side bones have been doubled, mirrored and given the suffix "_R". Note b)
the centered bones have been aligned properly.
In picture 4. c)
some bones have been modified.
executes "Armature Symmetry" again.
Picture 6. d)
shows the adjusted right side bones.
With this it's really comfortable to create and modify symmetrical armatures.
This works similar to "Armature Symmetry" but it's for envelopes. Only one side of a mirrored envelope has to be created/edited. The opposite site is created/adjusted respectively. The bone and weight assignment works via the name of the envelope objects right now. The syntax is "bone_name:weight". The two lower arm envelopes at 2. a)
(below) for example have the following names: "ArmLo_L:1.0" and "ArmLo_L:0.333" corresponding to the bone name "ArmLo_L" and the weights 1.0 and 0.333.
shows a rig with a symmetrical armature.
In picture 2.
a buch of envelopes have been created. Note that there's only the left side envelopes.
In picture 3.
"Envelope Symmetry" is executed.
shows the result: The right side envelopes have been created and named properly.
In picture 5.
b) some envelopes have been changed.
In picture 6.
"Envelope Symmetry" is executed again.
Picture 7. c)
shows the adjusted right side envelopes.
This creates the vertex groups and assigns vertices to them.
shows a model with its envelopes.
In picture 2.
"Envelope Assignment" gets executed.
shows the resulting vertex groups of the model mesh.
shows the weights created from the two envelopes for the left upper arm in Vertex Paint Mode.
And finally in picture 5.
you see the model with some rotated bones in Pose Mode.
This is the state of my implementation so far. I still have to do some cleanup, configuration stuff and documentation, then I'll release the first version of the script set!
For the future I'm thinkin about maybe adding some weight blending zones so transitions are smoother for higher polycount models.
Any comment/feedback is very much appreciated!
Last edited by jox on Wed Nov 10, 2004 2:03 pm; edited 1 time in total
This might well turn out to be very useful. I like your idea to use freely formed mesh objects as envelopes. I've used Character Studio and it's envelopes before - I do not use them anymore as they are poorly implemented. However, I do believe that in doing things better the tool can be of great help. So keep it up and keep us informed please!
Ps. What about bone naming? Shouldn't you use the normal .R .L .Right .Left instead of _L _R? Not to mix things when pose flipping.
Jox, even it seems there's no much people that uses Blender for animating (as it seems for only one reply to the post), I want you to know that it's people like you who makes Blender to shine.
P.S.: Sorry for my English
It seems a wonderful tool to assign the weights.
The "Armature" and "Envelope" symetry are very useful (and the alignment too), I'm looking forward to test it
I think you could post this topic to elysiun
P.S.: Sorry for my English
Lo mismo digo (sorry for my English, too )
When you mirror the bones, make sure to take care of the roll properly, otherwise the Paste and PasteFlipped fonction won't work correctly. The Mirror function in Blender doesn't take care of the roll and it's a bitch to reset (usually, it means making the value negative, but sometimes it's different).
Life is what happens to you when you're busy making other plans.
- John Lennon
Thanks for your replies!
|Mats78 wrote: |
|However, I do believe that in doing things better... |
Do you have anything specific in mind there?
|Mats78 wrote: |
|So keep it up and keep us informed please! |
|Mats78 wrote: |
|Ps. What about bone naming? Shouldn't you use the normal .R .L .Right .Left instead of _L _R? Not to mix things when pose flipping. |
You're right. I actually thought about making it configurable. But using .L and .R as default is probably the best choice.
|Mars_Attacks wrote: |
|Jox, even it seems there's no much people that uses Blender for animating (as it seems for only one reply to the post), I want you to know that it's people like you who makes Blender to shine.
Thanks, nice to hear that. And you're welcome
|cfolchh wrote: |
|I think you could post this topic to elysiun |
I did that now
|theeth wrote: |
|When you mirror the bones, make sure to take care of the roll properly, otherwise the Paste and PasteFlipped fonction won't work correctly. The Mirror function in Blender doesn't take care of the roll and it's a bitch to reset (usually, it means making the value negative, but sometimes it's different). |
Thank you for the hint. I'll do that!
What a great idea,
where is the script located at?
I recently posted a much simpler script for mirroring vertex groups, see the blender scripts list.
Something that it does, which your script doesn't appear to do was mirror individual weights on a per vertex basis.
Also there is a tool for blending between vertex weights for two bones at elysius, you might want to incorporate that idea as well.
dude - I LOVE U FOR THIS !!
I've been dreaming about this feature since the beginning of my Blendering!!!!
Looks very promising.
Thank you !
I think that your work will be very useful for parenting (and animating). All animators will spend time with your script, in blender.
some questions (if you want):
- Are the envelop created by ourself (by hand), or are they an "automatic" creation (created by the bones, or the armature perhap's, or in a mesh (like in the makehuman script (mesh model))?
that will be cool, if that will be an automatic or/and "by hand" creation of envelopp
- If automatic, could we edit the "envelop" mesh (if it 's a mesh) ? this could be great too, with "fat" character for example. If automatic, could we ad some part of envelop (like : 3 hand, 4 foots, 3 legs, a big arm with 4 articulations...)
Ask me if you don't understand my thinks
So, i'm waiting for this script to test it .
Thanks for that !!
--sorry for my english too--
only comment ... hurry up !
we reallly want to play with this and wring it through the stuff
This is so very great. Anything to improve animation tools is great.
I once met a guy at french animation festival. He was demonstrating his script for Maya which allowed faster humanoid rigging and such (10.000 lines, huge). And now people like that appear for Blender too
neat stuff! don't worry, there are actually quite a lot of people who use blender for animating, so your script (and some other animation related scripts) will have many fans.
what happened to this
I'm so damn busy with other work right now, but I'm working on it, it's just going a bit slow... Mainly I'm trying to write some documentation right now.
You know what? I'll just release the current version, even though the documentatin is (not even) half way done. Maybe it's not so difficult to figure it out with what's there.
There's a website growing (also half done):
There you can download the stuff. I have called the whole thing "Blender Envelope Suite" for now. You'll find also a little forum for questions or suggestions.
But be warned: the webpage is still a mess...
And thanks for all the inspiring feedback! I'm glad that some of you might find it as useful as I do.
ps. I'll answer some of the recent replies here a little later!