Leg deform

Discussions about MHX2 and other plugins that are developed outside the scope of MakeHuman. Note that bug reports should go to the respective code projects and might go unseen here.

Moderator: joepal

Re: Leg deform

Postby Solkar » Tue May 07, 2013 6:07 am

About Version r5085 (io_import_scene_mhx.py, maketarget, and mh_utils copied to the resp. blender 2.66a scripts dirs)

When I follow this advice
http://makehuman.org/doc/node/corrective_shapekeys.html
I indeed can alter the shape of the leg for the "extreme"¹ pose but it seems stuck to that afterwards regardless of the bend, even if one manually creates keyframes for VisualLocRotScale parallel to the armature keyframes.

In addition, the current blender manual
http://wiki.blender.org/index.php/Doc:2 ... Shape_Keys
unfortunately has only empty pages for the related topics
Animating Shapes
Shape Keys
- Editing Shape Keys
- Animating Shape Keys
- Shape Keys Examples

¹For the record: "sitting on heels" is "extreme" only in terms of the max. rot angle of LoLeg, but not from a usage point of view - that's an everyday pose.
Last edited by Solkar on Tue May 07, 2013 9:18 am, edited 1 time in total.
User avatar
Solkar
 
Posts: 63
Joined: Thu May 02, 2013 5:34 pm

Re: Leg deform

Postby Solkar » Tue May 07, 2013 8:00 am

OK, it's s "i" for "insert keyframe" while the shape slider has focus.
http://www.youtube.com/watch?v=gDZcmAWL2jA 3:20 min

But that only assigns the morph to keyframes but does not map
LoLeg X Angle -> LoLeg Morph.
once and for all
User avatar
Solkar
 
Posts: 63
Joined: Thu May 02, 2013 5:34 pm

Re: Leg deform

Postby Solkar » Tue May 07, 2013 9:18 am

...and when I try to add a driver of type "Scripted Expression" with a var related to "Rotational Difference" to that shape key Blender 2.66a simply crashes...
User avatar
Solkar
 
Posts: 63
Joined: Thu May 02, 2013 5:34 pm

Re: Leg deform

Postby Solkar » Tue May 07, 2013 10:14 am

..still no idea why that craches, but HEUREKA!

This
knee-bend-morph-driver.png

does the job ("kiko" being the name of the armature).
User avatar
Solkar
 
Posts: 63
Joined: Thu May 02, 2013 5:34 pm

Re: Leg deform

Postby duststorm » Tue May 07, 2013 1:24 pm

Nice find.
I'm not familiar with using deforms when animating in blender myself, so I'm not able to help. But maybe Thomas does.
I hope in the future the shapekeys won't be necessary anymore, when we have a rig that takes care of it.
MakeHuman™ developer
User avatar
duststorm
 
Posts: 2569
Joined: Fri Jan 27, 2012 11:57 am
Location: Belgium

Re: Leg deform

Postby Solkar » Tue May 07, 2013 2:50 pm

I'm currently working on python-scripting that key creation and driving.

I'm wondering if, because of the very simple form of the backside of the human leg from just underneath buttock to just above ankles, one could try surface fitting that with a low-order polynomial and work with a bit of diff'geo and measure to get a correct volume-preserving morph.

Unfortunately I'm not overly familiar with numpy/scipy; I normally do numerics with Fortran and C++ only.
From that I know (and appreciate) http://www.ics.forth.gr/~lourakis/levmar, which is an implementation of Levenberg-Marquardt (wiki, [Mar63]) algorithm.

The core would not have to be an mh runtime module, but only a develoment tool for generating shape keys - would that also violate mh "pure python" philosophy?


[Mar63] Marquardt, D. An Algorithm for Least-Squares Estimation of Nonlinear Parameters. Journal of the Society for Industrial and Applied Mathematics, 1963, 11, 431-441. doi:10.1137/0111030
Last edited by Solkar on Thu May 09, 2013 10:15 am, edited 1 time in total.
User avatar
Solkar
 
Posts: 63
Joined: Thu May 02, 2013 5:34 pm

Re: Leg deform

Postby Manuel » Wed May 08, 2013 7:43 pm

Solkar wrote:
duststorm wrote:https://www.makehuman.org/doc/node/advanced_some_notes_about_the_base_mesh_helpers_and_fittings.html
https://www.makehuman.org/doc/node/the_ ... panel.html

Trying to access those docs triggers a chrome SSL-error because they redirect to the site "makehuman.jwp.se".


Ah ok. The correct links are:

http://www.makehuman.org/doc/node/advan ... tings.html
http://www.makehuman.org/doc/node/the_m ... panel.html
Manuel
 

Re: Leg deform

Postby Solkar » Thu May 09, 2013 4:04 pm

Thx, Mamuel, unfortunately the main image embedded here
Manuel wrote:http://www.makehuman.org/doc/node/advanced_some_notes_about_the_base_mesh_helpers_and_fittings.html
is not displayed.

Btw - concerning http://makehuman.org/doc/node/corrective_shapekeys.html:
I've found the 'correctives' dir for the respective targets - but where are data files for the drivers driving them?
Or are the drivers programmatically breeded up-from-scratch on export?

Regards, S.
User avatar
Solkar
 
Posts: 63
Joined: Thu May 02, 2013 5:34 pm

Re: Leg deform

Postby Solkar » Fri May 10, 2013 6:26 am

Solkar wrote:I'm wondering if, because of the very simple form of the backside of the human leg from just underneath buttock to just above ankles, one could try surface fitting that with a low-order polynomial


A polynomial fit indeed works quite well - even with a scipy-ignorant like me at the keyboard curve_fit's resistance was futile
poly-fit.blend.png


Of, course, a polynomial ansatz is not exactly brilliant, a z-axis harmonics and elliptic xy-profile give quite a natural ansatz function and put more value in it - I stay tuned to that.
User avatar
Solkar
 
Posts: 63
Joined: Thu May 02, 2013 5:34 pm

Re: Leg deform

Postby duststorm » Fri May 10, 2013 10:11 am

Solkar wrote:Or are the drivers programmatically breeded up-from-scratch on export?

I fear that they are buried in some .py source file in shared/mhx/
Try mhx_drivers.py
MakeHuman™ developer
User avatar
duststorm
 
Posts: 2569
Joined: Fri Jan 27, 2012 11:57 am
Location: Belgium

PreviousNext

Return to MHX2 and other plugins developed outside MakeHuman

Who is online

Users browsing this forum: No registered users and 1 guest