Bones weight changes for 2.50?

Hello,

this is to start a new discussion thread but we have started to discuss this issue within 2.50 development thread (big thank to Cessen inputs mainly http://blenderartists.org/forum/showpost.php?p=1409185&postcount=2602)

I would really like to share your experiences how Vertex Group (Weight Painting) for bones actually works in Blender.

The problem is that when you assign vertices to a bone by weight painting or by Editing buttons Vertex Groups manual assignment the value in fact does not matter. Even though you may read a Blender hint “Sets the current vertex group`s bone deformation strength” in fact it is not! It does not matter if you use weight 0,1 or 0,2 or 1. It has always 100 % influence.

See attached picture. Very simple example. Plane with one bone armature deformer. Only central vertices should have influence 100%. Should not there be nice proportional falloff?

http://img188.imageshack.us/img188/5828/98802365.png

The weight of influences starts to work only if you assign vertex to more bones. But also for this case % influence value or colours in weight mode are in fact absolutely useless. You thing that the bone has 100% influence but if there are other (1 or 3 or 7, you name it) bones you really know nothing how vertices are influenced. See nice example here (thank to SeanJM for the video):
http://www.seanjmacisaac.com/misc/blendercomplain.png http://www.seanjmacisaac.com/misc/Alien_model_09-1.ogv.flv

So to summon it simply. Weights of bone deformation strength for vertices in fact does not work as one would expect for in case of one bone influence. More over for multiple bones influence it is really mess for animator/rigger. Blender representation (visualisation in weight paint mode as well as % values in Editing panels) is absolutely misleading.

So the question is do you have also problems with actual weight painting attitude as well as visualisation for bones? (For deeper details you can follow the hereabove mentioned discussion with Cessen).

Maybe there is a chance for new attitude as this will be coded into Blender 2.50. If William, our hero designer of 2.50 from user perspective, has already any ideas in his sleeve they will be very welcomed.

Funny I have just discovered that this problem was discussed already more than 4 year ago:
http://blenderartists.org/forum/showthread.php?t=38768

thanks for your explanation! it’s the first time i understand the problem. i guess i was lucky that i didn’t run into problematic cases so far.

but i think i still prefer the blender way in most cases. if you paint weights in maya then all other influences always change at the same time (often in ways you don’t want) to result in a total of 1. i don’t use maya anymore since a few years but i remember this as being extremely annoying.

so if this changes i hope there will be an option or some clever solution to have it both ways.

I agree that both attitudes have some plus as well as minus.It would be grat to have both possibilities I guess.

I feel the same way, kakapo. Maya’s weight painting is far more problematic. I’ve had few issues with Blender’s current weight system, even though its strange.

If weight painting did have an auto-normalize implemented in Blender, I would think the best thing is to remove the ‘Sub’ and ‘Blur’ buttons, as those would turn into traps. Basically, Add would become the only option, as Additive is a more determinate
operation.

  			Originally Posted by <b>kakapo</b> 					[![http://blenderartists.org/forum/images/ba-buttons/viewpost.gif](http://blenderartists.org/forum/images/ba-buttons/viewpost.gif)](http://blenderartists.org/forum/showthread.php?p=1410833#post1410833) 				
  		<i>but i think i still prefer the blender way in most cases. if you paint weights in maya then all other influences always change at the same time (often in ways you don't want) to result in a total of 1. i don't use maya anymore since a few years but i remember this as being extremely annoying.

so if this changes i hope there will be an option or some clever solution to have it both ways.

I think it would be nice to have an additional “smooth” brush that does affect (normalize) multiple bones though. This is something i miss.

I have to admit, I have a tendency to look at any Maya feature and say “Oh - Blender shouldn’t have it - otherwise Blender will be bad in that regard too”. Which is wrong, of course.
I have a feeling the reason Maya weight painting is bad, is not because of the fact that it normalizes as you paint, but rather HOW Maya was re-distributing the weights. Maya could’ve been using the same algorithm it uses to make default weights, which sucked.
If Blender did in fact normalize as one painted, perhaps it could simply use a better method of re-distribution ( Heat-weight inspired ?)

While Blender’s methods are certainly not perfect, lets not go down the road, following Maya’s footsteps. I haven’t done THAT much rigging in Blender, I’ll be honest, but my experiences with it have been infinitely better than with Maya. Maya’s automatic weight replacement is a royal pain in the ass, and it made weight painting a nightmare that wouldn’t end, too much time spent for too little of a result.

I’m not trying to turn this into another endless Blender vs. Maya war, but lets just not use Maya’s methods as an example or a roadmap. More like… Something to avoid, for the frustration it causes.

I am by no means an expert on rigging, but I’ve done some weight painting and I’ve found it fairly logical. @JiriH’s first example: To get a smooth transition you could add a base bone with has a little weight on the whole mesh. I think it’s a good idea to have the bones fully deform the mesh even when there’s very little weight as long as there’s no otherbone “resisting” the movement.
Hopefully I’ve not completely misunderstood what you’re talking about:P

My general attitude about this is that both methods have their own unfortunate annoyances that negatively affect workflow.

So the naive solution is to support both methods (and in some ways I think this might be wise anyway, so as to have a “default” way to interact with all vertex groups). But I think it would be good to give this some more thought, and maybe experiment a bit, before going down that road.

Also, if we do go down that road, figuring out how to integrate that choice into the vertex group system might be trickier than it seems at first blush.

I believe no one has suggested to follow Maya only.

Both attitudes have pros and cons. Generally Blender one is better in most cases. Only when you have limited area affected by many bones (typically character face) you have no correct visualisation in Blender and rather posing tests and errors are the best way to go.

So my suggestions are:
First - can we invent better visualisation of weighted surfaces when more then 1 bone are affecting it? But this is not easy, as I analyses the problem it is hard to find the solution how this should work.

Second - should be add Maya attitude as well? Definitely this could be second method not to replace Blender one.

I disagree with the problem as presented in the opening post. The problem isn’t that if you have one bone, it deforms 100%… that’s actually a very good thing. That prevents the scenario of having to track down each and every vert, and make sure its owners equal atleast 100% influence (or else the vert gets left behind while the armature is posed. Sometimes even subtly so you don’t see it right away!). THAT is a bad thing and something I never liked about Maya. Trust me, not cool. Plus a huge time waster because you have to paint everything 100% first, and then paint it all again and balance it… just crazy inefficient!

The problem (speaking from my own experience) is this:
say I have a head weighted with a head bone, and a jaw bone. The head bone affects the weights of the entire head 50%, and the jawbone afffects the weights of just the jaw area 50%. Now, if I want to make the jawbone control the jaw area 100% I need to first paint the jawbone group 100%, AND THEN remove the influence of the SAME AREA from the head bone. You see? When you have a lot of bones that you need to balance… this becomes a nightmare!

For sure, Blender should not be trying to emulate Maya or anyone else. BUT it should provide a way to achieve a result if the result is desired! I’ve been thinking more about the script idea I suggested in the last thread, and it’s not very good! I’ve got a better one!

I like the way Blender automatically shares ownership between verts when the weights on it total more or less than 100%. It’s really good, please don’t change it! I think the ‘best of both worlds’ could be sufficiently added as a script! We just need a simple script that can do this:

The script goes through all the verts in the mesh, checks which BONE GROUPS are affecting it (leaving the non-bone groups untouched), and:

if 1 bone group is 100% and the rest are less ->
the 100% group becomes the sole owner of the vert
if 2 or more bone groups are 100% -> they are evenly balanced and removed from any other groups below 100% - 2 becomes 50% each, 3 becomes 33.33% each, etc…(which you could then repaint one group to be 100%, and run the script again…).
if 2 or more bone groups are affecting the vert, and none of them are 100% ->if their combined weights are more or less than 100% ->[INDENT]re-assign the weights to equal 100%, and keep the same relative proportions between the groups (e.g. 30%+70%+40% = 140% becomes 21.43%+50%+28.57% = 100%) see**

and likewise scaled up if they are less than 100% (e.g. 30%+40% = 70% becomes 42.86%+57.14% = 100%)
[/INDENT]Otherwise the auto-balancing takes effect for the smoothing between groups… I think that would be ideal!

I imagine the script could just be a big “auto-normalize weights” button that you could leave running open in the text editor… and just keep pressing the button as you go, updating the normalization of the weighting.

**yes, I figured out the math this time! It was simple, I knew I had learned it in grade 5! Just had to jumpstart the old brain cells lol :rolleyes: I was thinking all the weights needed to be balanced in one equation, but I realized they are done one at a time as a single fraction over 140 (ie. 30/140=x/100). I know I know… haven’t done proper math in years :stuck_out_tongue:

What do you guys think? Am I close? Or am I out to lunch?

I agree that this problem is annoying.

Your solution would take me some time to understand it seems to have lots of rules that change the beahaviour so may produce “bug like” behaviour (behavior that is “as designed” that the end user thinks is a bug…

To fix your example of the head weighted at 100% and then adding a jaw bone with a nice falloff… mathmatically you want to subtract the jaw weight map from the head.

I had a script to do this in lightwave and have toyed with writing one for blender…

from a workflow point of view you’ve started with the head bone controlling the entire head, you’ve added the jaw and weight painted it carefully… then you manually run a script that keeps the current bone’s weights as they are and subtracts them from any other map influencing those vertices… (maybe it;d need to clamp to prevent negative values creeping in)…

it’s not a “normalise” rather a biased normalised based on the active bone/weightmap.

because it’s manual it won’t be to everyones taste, but I think it’d be preferable to making the system more obscure…

a script that keeps the current bone’s weights as they are and subtracts them from any other map influencing those vertices…
Sounds like martinellison’s script…

Your solution would take me some time to understand it seems to have lots of rules that change the beahaviour so may produce “bug like” behaviour (behavior that is “as designed” that the end user thinks is a bug…
No no, there is no behaviour change at all! It is just a re-assigning of vert weights. I can’t imagine the idea I proposed producing a bug! It simply changes the membership of vertices. It gets their weighting… and then re-assigns their weighting based on some simple rules that I devised like this:

1.)If you have a bone that has 100% weight it is assumed that you want it to be 100% weight! So all other influences are removed from the verts, and the 100% group is the new sole owner.

2.)If you have more than one bone with 100% weighting it is assumed that you want ONE of them to have 100% influence. I suggest re-balancing the influence so the user is informed visually that there was a change! It could also be left alone… but then how would you know you had two overlapping 100% influences? I think the auto-balancing would provide good visual feedback. Besides, if this scenario occurs, you probably weren’t paying attention anyways lol…

3.)If no groups influence verts 100%, and together total more or less than 100% influence it is assumed that you would want the weights to be proportionally balanced. Remember, if you add in another group, or change the weight of a group, you could run the script again, and it will re-balance them all proportionally. This really wouldn’t change the result (I don’t think) it would just update the weights so they are represented properly in a visual sense (as was mentioned as the second problem in the first post - the visual deception).

My idea addresses both problems, is an add-on script that I can’t possibly imagine causing a bug, and results in a choice for the user to have either/or.

edit: I also want to add that this script would deal with the whole mesh at once, which would make it quick and easy to work with when you understand the rules.

I may not completly understand your problem, english is a foreign language to me. If you want to paint some vertices to particular joint in Maya, then just select them and assign value of 1.0 in Component Editor. Every other joint will be discarded from influence automatically since jaw bone will have 1.0.

Personally, I like rigging and skinning in Maya a lot. Is there going to be a C API at some point? So guys like me could work out their own solution rather than using hybrid, that will not satisfy anyone completly. And then you all can use existing solution if you like it so much)

Pressing button each time you add some weights?

P.S. Greetings, Blender community).

martinellisons script doesn’t do what i said… it just finds members…and cleans up… what about if my jaw map has values at 75%… surely the result i’d want is the head at 25%… a subtraction NOT a removal!

Your ideas sound good for visualisation so that in weight paint mode you always see the normalised actual influence… but in practice how does it work?

Given point 1 the head has 100% weight and I start painting the jaw to 100% so this functionality runs in the bacground to subtract the values I’m painting from all the other maps
so if I start painting the jaw at 75% then the head map automatically goes to 25%?
(just like maya?)

If that’s the case How does this work if i have a vertex map to control particle emmision or other “non deforming” properties? how do i stop their values from being changed?

for your point 2
What does that mean for the jaw/head example? how do I specify which one takes precedence? (that was where my proposal of a subtractive script comes in as one off… if 1 is running all the time then is 2 needed? or am i missing something?

  1. this is just a visualisation showing the final influence of all the bones?.. so say I wanted to paint a nice falloff I’d have to add another bone.weight map at 100% then start painting my another map…

Hey Mr. Zombie,

Welcome to the Blender community!

I also used to be a Maya user (I was an intern at Autodesk at one point), so I understand how weight painting is done in both Maya and Blender through experience.

Personally, I like rigging and skinning in Maya a lot.

I think you should try rigging and weight painting in Blender before you come to conclusions on which is better, because I am under the impression you haven’t tried it yet… I am atleast 2 times faster at character creation in Blender. :wink:

Pressing button each time you add some weights?

Yes :yes:

what about if my jaw map has values at 75%… surely the result i’d want is the head at 25%… a subtraction NOT a removal!
Correct. 75% is not 100%, so the weights together would be normalized to total 100% influences. And this would be calculated by the script on a per-vert basis.

In this case if your jaw and head originally both deformed a vert 50/50 and you added weight to the jaw to 75%, then that’s 75%+50%=125% becomes 60%+40%=100%

If you wanted explicitly to have a 75/25 split, then you could paint the weights manually…

Your ideas sound good for visualisation so that in weight paint mode you always see the normalised actual influence… but in practice how does it work?
It balances the weighting of all the groups evenly provided none of those groups are 100%. Otherwise it gives ownership to the group with 100% influence.

so if I start painting the jaw at 75% then the head map automatically goes to 25%?
(just like maya?)
Not necessarily… if the head map was originally 90% and the jaw was 75%, the head map would end up with greater influence, and they would even out closer to 50% each… 90%+70% = 160% becomes 56.25%+43.75% = 100%

If that’s the case How does this work if i have a vertex map to control particle emmision or other “non deforming” properties? how do i stop their values from being changed?
That is why I mentioned the only groups affected are BONE groups. I have little scripting experience, but I imagine it must be possible to determine whether a group is assigned to a bone…?

for your point 2
What does that mean for the jaw/head example? how do I specify which one takes precedence?
As you increase the weight on one, staying below 100, the weight is reduced on the other, and the two are proportionately balanced together to equal 100% every time the script is run…

from a workflow POV this doesn’t solve a thing… In that example and moset I want an explicit 75-25 split…

It balances the weighting of all the groups evenly provided none of those groups are 100%. Otherwise it gives ownership to the group with 100% influence.

What if multiple groups are at 100%?

Not necessarily… if the head map was originally 90% and the jaw was 75%, the head map would end up with greater influence, and they would even out closer to 50% each… 90%+70% = 160% becomes 56.25%+43.75% = 100%

not what you want in most cases

That is why I mentioned the only groups affected are BONE groups. I have little scripting experience, but I imagine it must be possible to determine whether a group is assigned to a bone…?

Possibly…

As you increase the weight on one, staying below 100, the weight is reduced on the other, and the two are proportionately balanced together to equal 100% every time the script is run…

this sounds like exactly the sort of behaviour that is conditional and will appear buggy to the user…

Well it would require a different workflow I would think… but in my mind it makes perfect sense. I don’t know how better to explain it, so I’ll stop now.

Cheers!