Armature and weight painting issues

Tech support and suggestions forum. If you only have a basic question on how to get started, please use the "newbies" forum in the community section.

Moderator: joepal

Armature and weight painting issues

Postby blindsaypatten » Mon Apr 03, 2017 4:15 pm

The placement of some of the armature joints relative to the mesh is off. This results in problems when the joints are posed any distance from the default pose. For example, the shoulder joint is placed far too low and this results in gross deformation of the mesh between the neck and shoulder when the arms are lift up and out to the side. I haven't learned how to properly edit the placement of armature joints yet but I did manage to produce this illustration of the effect of shoulder joint placement:

ShoulderJointPlacement.png
The shoulder joint on the left side has been moved up, the right side is the current default.

Please try your best to ignore all the other problems on the shoulder on the left, they are a result of my trial and error blundering in Blender, the relative point is that by placing the shoulder joint near the surface, as it is in the human body, you eliminate the downward deformations of the shoulder surface between the shoulder and neck.

Am I right that the placement of the armature bones relative to the mesh is done by MakeHuman so the fix should be done in MakeHuman? I'm willing to work on improving the armature placement if someone familiar with the MakeHuman code will figure out how to incorporate the changes into MakeHuman. Would exporting the default on startup model and armature to Blender and fixing it there provide what's necessary to incorporate the changes in MakeHuman? I'm not sure whether to work on the default armature or the CMU armature trying to use the CMU mocap files with characters with the default armature results in the neck position being screwed up? Will armature positioning changes done on one translate over to the other easily?

Thoughts?
Last edited by blindsaypatten on Wed Apr 05, 2017 6:48 am, edited 2 times in total.
blindsaypatten
 
Posts: 586
Joined: Tue Mar 14, 2017 11:16 pm

Re: Placement of the armature in the mesh is problematic

Postby Aranuvir » Mon Apr 03, 2017 4:57 pm

1) You are using a skeleton with limited features.
2) To get your poses right you mostly have to rotate more then one bone. This is not an IK-rig! The shoulder bone needs to be rotated separately.
Depending on what you are doing you can try preserve volume (not so good idea on your example), corrective smooth modifiers and corrective shape keys. But the shoulder is problematic and has its limits.

(And just as a side note: we know the default weight map has glitches and some of the targets are not as symmetrical as expected ...)
Aranuvir
 
Posts: 1199
Joined: Sun Oct 12, 2014 2:12 pm

Re: Placement of the armature in the mesh is problematic

Postby RobBaer » Mon Apr 03, 2017 5:03 pm

blindsaypatten wrote:Am I right that the placement of the armature bones relative to the mesh is done by MakeHuman so the fix should be done in MakeHuman? I'm willing to work on improving the armature placement if someone familiar with the MakeHuman code will figure out how to incorporate the changes into MakeHuman. Would exporting the default on startup model and armature to Blender and fixing it there provide what's necessary to incorporate the changes in MakeHuman? I'm not sure whether to work on the default armature or the CMU armature trying to use the CMU mocap files with characters with the default armature results in the neck position being screwed up? Will armature positioning changes done on one translate over to the other easily?

Thoughts?


Manuel was the one who did most of the skeletal building and weight painting. Since he has left the project, the mechanism for incorporating such contribution into the program is very much up in the air. It is not something with which many of the remaining developers have extensive expertise. The team is always interested in working with the community to make the program better and would be interested in working with you. However, in a program this complex, great care must be exercised so that fixing one thing does not break another.

This is way beyond my own expertise, but MakeHuman works on a 2 skeleton system internally, so there is interdependence between the master skeleton and the other exportable skeletons. Whether the relationship between the CMU skeleton and the master skeleton or the master skeleton itself would need fixing is the first question I would pose without even studying your specific problem.

Not a helpful answer, but at the end of the day we are a community trying to solve problems for the good of us all. If you can help, we can use you!!! Just don't break anything someone else needs :mrgreen:
User avatar
RobBaer
 
Posts: 1024
Joined: Sat Jul 13, 2013 3:30 pm
Location: Kirksville, MO USA

Re: Placement of the armature in the mesh is problematic

Postby blindsaypatten » Mon Apr 03, 2017 6:07 pm

RobBaer wrote:This is way beyond my own expertise, but MakeHuman works on a 2 skeleton system internally, so there is interdependence between the master skeleton and the other exportable skeletons. Whether the relationship between the CMU skeleton and the master skeleton or the master skeleton itself would need fixing is the first question I would pose without even studying your specific problem.


If it is the case that the master skeleton is what is used within MakeHuman, and the other skeletons come into play when doing an export, then there is an issue with the master skeleton because the issue can be observed within MakeHuman:
KneeJoint3.png


This is the knee from the Sit01 pose, all I did from startup was set muscle up and weight down and select the pose. The issue is there regardless of the muscle and weight but as you add bulk to the model the body parts overlap to a greater extent making the issue less obvious.

If selecting a different skeleton affects the model within MakeHuman that would complicate things, but switching rigs on the skeleton tab doesn't change the displayed character so I doubt it. The wording "Rig presets" on the Skeleton tab caught my eye. The word preset could imply the ability to manipulate the rigs? But I haven't noticed any interface for that.
blindsaypatten
 
Posts: 586
Joined: Tue Mar 14, 2017 11:16 pm

Re: Placement of the armature in the mesh is problematic

Postby blindsaypatten » Mon Apr 03, 2017 7:36 pm

So it turns out that there are little boxes floating around inside the body that control the position of joints, and that I can create targets to move those boxes around. This could be easier than expected!

Edit:
So, the joint position problem is neatly solved (way to go MakeHuman authors!), next up is a way to customize the weight painting. Anyone know how to do it in a reusable way?
Knowing about those joint position boxes is important for people creating targets that affect joint positions, such as scaling.
Attachments
ShoulderJointBox.png
blindsaypatten
 
Posts: 586
Joined: Tue Mar 14, 2017 11:16 pm

Re: Placement of the armature in the mesh is problematic

Postby blindsaypatten » Wed Apr 05, 2017 6:44 am

TwinsPlus.png


On the right you can see that the weights for the upper arm extend well over into the shoulder and even onto the trapezius, and you can see how the whole shoulder on the left has been lowered as a result, the exact opposite of what happens in reality. On the far left the painting has been modified to eliminate this issue. This seems to me to be the first most obvious fix to implement.

In the middle I added an extra bone floating above the shoulder that attenuates the creasing that would otherwise occur there. I can justify this on methodological grounds as representing the influence of the underlying muscles which is not reflected in the armature, which makes reflecting reality quite difficult. I'm guessing that people won't accept having a bunch of extra bones floating around.

I'm a little baffled that I can't find a 3D armature, think two cylinders sliding on a sphere instead of two lines intersecting at a point, but I while I can find lots of people asking about the creasing problem, the answer always seems to be to create a shape corrector and connect it with a driver.

The knees were relatively simple to fix, move the joint up a bit and fix the weight painting, of which the latter has the bigger contribution. The closer leg is the one has the weight painting mods. The current default looks even worse than the far leg.
KneeMods.png
KneeMods.png (55.58 KiB) Viewed 5175 times
blindsaypatten
 
Posts: 586
Joined: Tue Mar 14, 2017 11:16 pm

Re: Armature and weight painting issues

Postby wolgade » Wed Apr 05, 2017 10:22 am

Interesting thread. Your knees look much better than the default. I agree with you that this should be fixed. There's one big problem. The key artist of MH left the project a while ago. Some other developers also decreased activity. I don't think that there's anyone around who will implement your improvement unless you volunteer to do so. You seem to have the necessary knowledge about anatomy, rigging and weight painting.
wolgade
 
Posts: 790
Joined: Wed Jan 30, 2013 6:50 pm

Re: Armature and weight painting issues

Postby jujube » Wed Apr 05, 2017 1:22 pm

Chiming in to say that personally I don't mind extra bones; since you've documented what it's for, that's all it needs. I hope that you'll be able to add the corrected weight painting to MH. (I agree with wolgade on the knees.)
jujube
 
Posts: 404
Joined: Fri Aug 14, 2015 10:46 pm

Re: Armature and weight painting issues

Postby blindsaypatten » Wed Apr 05, 2017 6:23 pm

wolgade wrote:Interesting thread. Your knees look much better than the default. I agree with you that this should be fixed. There's one big problem. The key artist of MH left the project a while ago. Some other developers also decreased activity. I don't think that there's anyone around who will implement your improvement unless you volunteer to do so. You seem to have the necessary knowledge about anatomy, rigging and weight painting.


The question for me is: if I were to work away in Blender and create a vastly improved weight painting, is there any way to get that back into MakeHuman? Would it require code changes or is there a file someplace that can be replaced. Probably only a MakeHuman developer can answer that, short of someone delving into the code.

I haven't tried it yet but apparently there is a way to transfer weights from one model to another in Blender, so there is a possibility of the half-solution of providing a way to set a new weight painting to a character after moving it to Blender, but there are a multitude of drawbacks to that approach.
blindsaypatten
 
Posts: 586
Joined: Tue Mar 14, 2017 11:16 pm

Re: Armature and weight painting issues

Postby jujube » Wed Apr 05, 2017 10:07 pm

blindsaypatten wrote:The question for me is: if I were to work away in Blender and create a vastly improved weight painting, is there any way to get that back into MakeHuman? Would it require code changes or is there a file someplace that can be replaced. Probably only a MakeHuman developer can answer that, short of someone delving into the code.


Searching for "weight" on the makehuman wiki gave me the 1.1.0 release page, which claimed that it added "support for custom weight and proxies".

And this page gives some details on how these custom weights would work, but no mention of how to add them:
http://www.makehumancommunity.org/wiki/ ... ex_weights
Vertex weights are defined for the default “master” skeleton or rig. They are defined in a json file with jsonw extension. They link each vertex of the basemesh including helpers to a named bone of this master rig, together with a certain weight. The weights loader automatically removes doubles and normalizes the weights (so that they sum to 1).

I guess this is where the default weights are stored?
A proxy can explicitly define its own vertex (to bone) weights. In this case it overrides the weights that would be obtained through the proxy mapping, and replaces them by its own custom definition of weights. These vertex weights are always defined to reference the bones of the master rig (default skeleton), so they need to be remapped to other skeletons using reference bone mapping. This also means that the custom weights of a proxy override any custom weights mapping that might be loaded with an alternative rig (but only for that proxy item). Custom proxy weights should be avoided if possible, but are in some cases required, eg. for properly rigging shoes which are rigidly fitted to feet, or an alternative topology which defines very accurate rigging on the face. The general advice for custom rigs is therefore to stay as close to the master rig as possible, reusing as much bones identically as possible, to achieve the best results for proxies with custom weights.

It sounds like more than just being able to add new rigs with weights of their own, you're also meant to be able to add custom weights to proxy meshes. (I have no idea how you would do this.)


edit: Found "default_weights.mhw" in [install folder]/data/rigs. It's a big list of pairs; the top number is the index and the bottom number is the weight. Proof:
we did it.PNG

I changed the weights in some random vertices in "wrist.L", no import plugins required.
(Now the question is, how do we get the weights into this file format?)
Last edited by jujube on Wed Apr 05, 2017 10:32 pm, edited 3 times in total.
jujube
 
Posts: 404
Joined: Fri Aug 14, 2015 10:46 pm

Next

Return to Bugs, problems and feature requests

Who is online

Users browsing this forum: No registered users and 2 guests