Bug #1071

Body height vs knee joint

Added by rez (Forum User) about 2 years ago. Updated almost 2 years ago.

Status:NewStart date:11/03/2016
Priority:NormalDue date:
Assignee:Jonas Hauquier% Done:


Target version:MakeHuman 1.1.2


It seems that mostly the upper leg bone is shortened when body height is reduced, which results in an incorrect knee joint position.

screenshot_1_1478167205_short.png (60.6 KB) rez (Forum User), 11/03/2016 11:01 AM

knee.png (42.4 KB) rez (Forum User), 11/04/2016 10:46 AM

screenshot_1_1478254660.png (89 KB) Jonas Hauquier, 11/04/2016 11:18 AM

fixed.png (26.3 KB) rez (Forum User), 11/04/2016 09:54 PM

871.jpg (8.78 KB) rez (Forum User), 11/05/2016 02:25 PM



#1 Updated by rez (Forum User) about 2 years ago

So, if I wanted to fix this myself I would have to fix (all) *-minheight.target files or adjust the default mesh weights around the knees?

#2 Updated by Jonas Hauquier about 2 years ago

The joint positioning is not directly related to how body proportions vary. If the knee joint is not properly positioned in some body types, then the fitting of the joints needs to be improved instead.

#3 Updated by rez (Forum User) about 2 years ago

I see the code mentioning joint helpers:

Get the position of a joint from the human mesh.
This position is determined by the center of the joint helper with the
specified name.

The seem to be part of the mesh, should be affected by the targets?

#4 Updated by rez (Forum User) about 2 years ago

I've checked base.obj.

Te helper boxes for knees are:
joint-l-knee verts: 13839-13846
joint-r-knee verts: 14279-14286

I've looked into some of the targets\macrodetails\height files. They contain those joint helper verts.

Fixing the targets of the helper vertices should fix it I think.

Exporting helper geometry should export those helpers, right? Doesn't work for me (makehuman 1.1.0, win7x64). Exported meshes contain only body and eyes.

#5 Updated by Jonas Hauquier about 2 years ago

Exactly. The targets model the position of these joints.
Exporting, for example to obj, and enabling helper geometry should get you those helper cubes.

The hard part is that changes to macro targets usually require changes in quite a few different targets, not just one.

#6 Updated by rez (Forum User) about 2 years ago

I've hacked together a python script to dump the modified base mesh given a target file.

Here is how data/targets/macrodetails/height/male-young-minmuscle-minweight-minheight.target.obj looks like with the knee joint helpers highlighted:

I'll play around a bit to see if there is a way to fix them using a script, by moving the helper along the leg bone axis towards the central knee vert ring maybe.

#7 Updated by Jonas Hauquier about 2 years ago

Perhaps better to identify the target combinations first that have wrong joint positioning.
Then we can determine, based on how many have to be modified, whether its worth automating or whether its faster to manually fix.

#8 Updated by Jonas Hauquier about 2 years ago

By the way, you can debug this within MH itself.
Get MH from source, and run

download_assets.py debug

Now, go to the Geometry > clothes tab, and choose the "joint helpers" item (Helpersdebug tag filter).
Then go to Material, and choose the X-Ray material for the human skin.

You should now get something like:

Then you can play around with the modeling sliders and make note of all macro combinations where the knee joints are misplaced.
Saving those models (to mhm) gets you the combination of targets in textual form that exhibit bad joint positioning.

#9 Updated by rez (Forum User) about 2 years ago

Thanks for the debug tip.

From what I see all macro targets are affected.

I also think that max targets have the same issue, although less pronounced, which makes my bug a duplicate of http://bugtracker.makehumancommunity.org/issues/871

#10 Updated by rez (Forum User) about 2 years ago

I think I've got something that works.

I've identified 4 vertices per knee that define the joint rotation axis. I use their center displacement as the displacement of the joint helper.

I need o check a few more targets but it is looking pretty good so far, should also work with max height targets.

#11 Updated by rez (Forum User) about 2 years ago

Here is my fix knees script (run from makehuman dir):

It skips targets without knee data. I've only validated it with data/targets/macrodetails/height. Haven't yet run it on data/targets/armslegs.

I've tried to make the fixed target files diff friendly, unfortunately the float formatting in the original files is not consistent.

It also helps with Bug #871 (to fully fix it one would also have to adjust/reduce knee mesh stretching I think)

#12 Updated by rez (Forum User) about 2 years ago

I've also checked armslegs targets. They don't need fixing, work just fine thanks to the way target blending works.

#13 Updated by Aranuvir # almost 2 years ago

  • Assignee changed from Anonymous to Jonas Hauquier
  • Target version set to MakeHuman 1.1.2

Also available in: Atom