makehumancommunity / makehuman

This is the main repository for the MakeHuman application as such.
http://www.makehumancommunity.org
Other
1.18k stars 244 forks source link

Default Weights Map not Symmetrical #158

Closed Aranuvir closed 2 years ago

Aranuvir commented 3 years ago

Playing around and posing a model in Blender I encountered an ugly stretching on one side of the model, though the pose was symmetrical. Running some checks over the default weights map it turns out there are plenty of inconsistencies. We should redo the weighting with some priority. Maybe punkduck could take a look at it?

black-punkduck commented 3 years ago

I can recreate the weights easily with my tools. But I need an information about what really was too much stretched. My tools can also generate a result that both sides are stretched in the same ugly manner in the end :)

The result would always be a completely symmetric weighting.

This I would use (blender 2.8+ is available as well):

https://github.com/black-punkduck/MakeHuman-Helpers/wiki/blender279weightplugin.md (mirroring vertex groups)

Btw: a bone with a rotation axis a little different can create the same effect as well. Also an asymmetric character .. but I can of course fix the weights. Proxies may also follow wrong different vertices. Do you have a screenshot available?

Aranuvir commented 3 years ago

Well, I was able to fix the particular issue on my own, by simply mirroring the weight with builtin Blender tools (they do a decent job).

I checked the default_weights.mhw, that ships with MakeHuman. With the following cases, 1) number of vertex indices for bone left and right are different, 2) number of indices are equal, but for some indices the corresponding mirrored index cannot be found and 3) the weights for some indices are different for the corresponding weights of the mirrored index, I was able to determine 77 bones with (theoretical) issue. There was no threshold for precision, nor did I check the artistic impact of those issues. For the indices I used the symmetry map that once shipped with MakeHuman's old MakeTarget.

black-punkduck commented 3 years ago

well my tool works with the mirror-table which is added to new MakeTarget. I did that to get rid of the hardcoded tables. Yes 1), 2) 3) I am aware off. I tested the weight file a while ago. just for fun. I used the tool before to create the cat, horse, 2 normal proxies we added and 2 game proxies meanwhile. Of course I tested it with the normal mhw-file as well. The tool is able to load and save mhw files. When saved I have an own form not to save only blanks ...

Therefore I loaded it and save it first unchanged (to get a certain precision and predefined form of the json). Then I did the mirroring and saved it again. A "diff" showed me some differences. I guess the same you found.

But from that I can't decide which one is the better half, that's the reason I asked for a screenshot ;)

Typically I would load it with my tool, decide if left or right is better and save it afterwards. Then replace the file on github. I can also check if I have to correct the weighting somewhere if needed.

Aranuvir commented 3 years ago

The problem is foot.R. Here is a screen shot: grafik

I had hoped you could find a better solution for the artistic part of the issue... :)

black-punkduck commented 3 years ago

I created a branch called "new_weighting". Do not wonder the file is formatted in a more compact (and imo also human readable) way, so a diff command to old one is pretty useless. I used this to e.g. work with blocks in an editor and copied the finger bones etc. please test it. It looked okay in Blender (I switched to edit mode to see if vertices are different on both sides and used "display modifier in edit mode" + "adjust edit cage to modifier result")

Please do a test. If that's okay it can be merged.

Aranuvir commented 3 years ago

Thank for your work on that stuff. Currently I'm quite busy and cannot say when I will find time for further testing.

Aranuvir commented 3 years ago

Well, I've done some basic tests and it is looking quite promising. Is anybody else testing?