Vertex group incorrectly include vertices they should not

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

Vertex group incorrectly include vertices they should not

Postby HunanbeanCollective » Tue Nov 10, 2020 5:45 am

Hello. There seems to be an issue with vertex groups and their assignments. The easiest way to demonstrate what i am trying to say is as follows:
In edit mode, Select the vertex group finger4-3l. Looking at the palm it can be seen to include a vertex on finger3, region 3.
this seems to be just the surface of a larger issue of improper vertex group assignments. by that i mean, it seems the area i think things should be covered by a vertex group extend to far, or not far enough. I am not an expert, this is just my opinion and observation.
as a test i reassigned vertex groups around, and exported a custom skeleton to see if it changed based on the weighting file that is created during that process. it did not. So, my question is, where can i change which vertices are assigned to which groups globally so it is set to my specifications, for every import? or if this is even really possible as an end user.

I truly appreciate this project. Thank you
HunanbeanCollective
 
Posts: 22
Joined: Sat Oct 03, 2020 3:00 pm

Re: Vertex group incorrectly include vertices they should no

Postby punkduck » Tue Nov 10, 2020 6:26 pm

In edit mode, Select the vertex group finger4-3l. Looking at the palm it can be seen to include a vertex on finger3, region 3.
this seems to be just the surface of a larger issue of improper vertex group assignments. by that i mean, it seems the area i think things should be covered by a vertex group extend to far, or not far enough. I am not an expert, this is just my opinion and observation.
as a test i reassigned vertex groups around, and exported a custom skeleton to see if it changed based on the weighting file that is created during that process. it did not. So, my question is, where can i change which vertices are assigned to which groups globally so it is set to my specifications, for every import? or if this is even really possible as an end user.


The weighting of the skin depends on the skeleton used. I changed it for my own characters. Bigger Issue than fingers is crotch area and shoulder. Partly it does not work correctly without "keep volume", partly keep volume creates problems.

I am not a 100% sure how the first MH skeleton was weighted. I guess the assignment of vertex groups mostly was done by automatic weighting first and then manual changes. Then a few times smoothing maybe (which can result in the problem you mentioned) and then throwing away weights below a smallest size + normalizing (so that weights add up to one per vertex).

The weights of the skin are always the same when exported by makehuman. Sometimes also for proxies or for clothes. For the skin & standard skeleton the file
data/rigs/default_weights.mhw is used. It is a JSON file so you can read it and maybe understand how it works (at least a bit).

The skeleton itself (default.mhskel in same directory) has a last line:

Code: Select all
"weights_file": "default_weights.mhw"


These are the weights. Technically it is possible to create a weight file for proxies or even clothes.

So you can replace the weights-file or copy the skeleton to one with a new name and then change the last line to a file with better weighting and place this file in same directory.

To create a weights file I hope you exported the character with a tool keeping the original vertex order (the socket plugin does it, and mhx2 also)

Last thing is to create the weight-file itself: I used an own tool for it, maybe it helps you too. Here is the github link (I have a 2.8x and 2.7x version of this tool):

https://github.com/black-punkduck/MakeHuman-Helpers/tree/master/blender2_8/makehuman_extras

and a small manual:

https://github.com/black-punkduck/MakeHuman-Helpers/wiki/blender279weightplugin.md

Create a subdirectory in addons of Blender and place all the files in this subdirectory. Then enable the plugin, Must be something with MakeHuman in preferences ;)

Although most is about mirroring things from one side to the other (which normally does not work good on an exported Human except from standard one), there is an mhw importer and exporter included.
With that tool you can also copy weights (save it as a weight file and load it for the next character) but when you want an own weights-file it is also possible. Create a weights file when you work with clothes or proxy meshes.

Hope that helps. I use it for my proxies meanwhile ... so it should work.
User avatar
punkduck
 
Posts: 1218
Joined: Mon Oct 17, 2016 7:24 pm
Location: Nuremberg, Germany

Re: Vertex group incorrectly include vertices they should no

Postby HunanbeanCollective » Tue Nov 10, 2020 8:41 pm

That is great information and recource tool access, thank you. I should be able to work this out with those tools available.

To create a weights file I hope you exported the character with a tool keeping the original vertex order (the socket plugin does it, and mhx2 also)

I was in a rush, but i think the tool i used should have worked. it was from the makehuman-utils git, but updated for blender 2.8.
I will give it a go with your tools from that link and see what i can do.

Partly it does not work correctly without "keep volume", partly keep volume creates problems.

Argh! I noticed. :x That one threw me for a loop. I even considered downloading the modified UE4 with quaternion support, but i digress.

Kind of a different subject, but another thing i am looking into doing is adding a couple of Helper cubes so i can add a second breast bone for a physics technique i was trying in UE4. I was already successful in adding the bones, but without the additional helper geometry to define the anchor points, it was a mess. I have not really done research into replacing the base model with an added helper geometry one yet, so it is probably premature to even ask about it at this point.

Thank you again
HunanbeanCollective
 
Posts: 22
Joined: Sat Oct 03, 2020 3:00 pm

Re: Vertex group incorrectly include vertices they should no

Postby punkduck » Wed Nov 11, 2020 12:01 am

If you understand the mhskel file and you want to subdivide the breast bone into two bones (inside one is called: breast_inside-L) you can do it with an editor, here is part of the changes as a quick untested handmade concept (it is late here so no guarantee :mrgreen:) :

For the joints:
Code: Select all
"joints": {
        "breast.L____head": [
            13654,
            8451
        ],
        "breast.L____tail": [
            8451
        ],
 "breast_inside.L____head": [
            13654,
            13655,
            13656,
            13657,
            13658,
            13659,
            13660,
            13661
        ],
        "breast_inside.L____tail": [
            13654
            8451
        ],


same with right bone (Hint: 13654 + 8451 places the connections of the bones in the middle! similar the lowerarm01 and 02 are created, there is no cube, where the joint is, 8451 is a vertex on the nipple :) ). Weight will be influenced by breast.L and not by the bone inside.

for the hierarchy of the breast bones

Code: Select all
     "breast:inside.L": {
            "head": "breast_inside.L____head",
            "parent": "spine02",
            "reference": null,
            "rotation_plane": "breast_inside.L____plane",
            "tail": "breast:inside.L____tail"
        },
        "breast_inside.R": {
            "head": "breast_inside.R____head",
            "parent": "spine02",
            "reference": null,
            "rotation_plane": "breast_inside.R____plane",
            "tail": "breast_inside.R____tail"
        },
      "breast.L": {
            "head": "breast.L____head",
            "parent": "breast_inside.L",
            "reference": null,
            "rotation_plane": "breast.L____plane",
            "tail": "breast.L____tail"
        },
        "breast.R": {
            "head": "breast.R____head",
            "parent": "breast_inside.R",
            "reference": null,
            "rotation_plane": "breast.R____plane",
            "tail": "breast.R____tail"
        },


and rotatition planes are like:
Code: Select all
     
"breast_inside.L____plane": [
            "special01____tail",
            "spine01____head",
            "spine01____tail"
        ],
        "breast_inside.R____plane": [
            "special01____tail",
            "spine01____head",
            "spine01____tail"
        ],

   "breast.L____plane": [
            "special01____tail",
            "breast_inside.L____head",
            "breast_inside.L____tail"
        ],
        "breast.R____plane": [
            "special01____tail",
            "breast_inside.R____head",
            "breast_inside.R____tail"
        ],


If you really only want jiggle bones you can also de-parent the breast bones ... like this;

http://www.makehumancommunity.org/forum/download/file.php?id=6975&mode=view

and e,g, use wiggle-bones skript from blender.
https://blenderartists.org/t/wiggle-bon ... -8/1154726

If you heard about spring bones: This plugin has a problem when rendering an animation. It does not work when rendering animation at the moment and I also did not manage to bake them with new blender so I changed to wiggle bones.

Of course it is not a game engine but a good demo ... for testing a bvh where you can see the movements when the character e.g. skips ...

I did an article about a Bento skeleton and weighting long time ago ... :)
http://www.makehumancommunity.org/forum/viewtopic.php?f=7&t=16927
User avatar
punkduck
 
Posts: 1218
Joined: Mon Oct 17, 2016 7:24 pm
Location: Nuremberg, Germany

Re: Vertex group incorrectly include vertices they should no

Postby HunanbeanCollective » Wed Nov 11, 2020 7:20 am

similar the lowerarm01 and 02 are created, there is no cube, where the joint is

LoL I cannot believe i missed that! Got so focused on one technique, i blinded myself :/

It looks like I should be able to do what i need with the information you supplied. That makes my day :)

Off to work i go!

Thank you once again for taking the time and having the knowledge for such detailed and helpful replies and insights.
HunanbeanCollective
 
Posts: 22
Joined: Sat Oct 03, 2020 3:00 pm


Return to Bugs, problems and feature requests

Who is online

Users browsing this forum: No registered users and 1 guest