(MPFB2) Shape keys for everything?

Discussions about MakeHuman, Blender and MPFB. It is ok to ask for general Blender support here, even if it isn't directly related to MakeHuman

(MPFB2) Shape keys for everything?

Postby entikan » Fri Oct 11, 2024 11:46 am

Excuse me if this thread is not in the right subforum, it's been a while I've visited one. This is about MPFB2.

I'm trying to export a makehuman base model for use in a game engine using GLTF. I want to use it as the basis for a simple character creator (as opposed to makehuman plethora of amazing features).

My current approach is thus: By slightly incrementing each slider in the Model tab I can gather all the shape keys which can be easily exported to gltf. This seems to work quite beautifully though I have not tested it thoroughly (is there any morph data missing this way?). If this works I'll automate that process. Problem I'm facing now is that assets like eyes, tongue, teeth, and whatever MakeClothes is doing, are not refitted using these shape keys, rather it seems the plugin makes a new mix of the base and then iterates and compares vertices. I could try re-implementing this algorithm for my project but I am not nearly clever enough to understand it in a realistic time, nor do I think this is feasible for real-time editing.

One idea I have is to write a python script that copies the base shape keys, refitting them using the plugin's algorithm, effectively "baking" the morphs for each asset.

I'd love to hear some opinions and ideas on this. Does the plugin have some magic tricks up its sleeve for this per chance?



P.S. I should probably mention I'm using the Panda3D engine for this, which is also scripted with python. Perhaps there's a more direct bridge to build there I'm overlooking that skips the blender step altogether?
entikan
 
Posts: 2
Joined: Fri Oct 11, 2024 11:20 am

Re: (MPFB2) Shape keys for everything?

Postby entikan » Sat Oct 12, 2024 11:31 am

Darn, I must have overlooked that subforum. If anyone can move this there that would be great. Otherwise I'll cross my fingers and hope someone from that space sees this :)


Things are -kinda- working though! The weights of the skirt in the helper mesh doesn't seem to be surviving the exporter step but that's off-topic.
Image
entikan
 
Posts: 2
Joined: Fri Oct 11, 2024 11:20 am

Re: (MPFB2) Shape keys for everything?

Postby tomcat » Sun Oct 13, 2024 3:36 am

entikan wrote:If anyone can move this there that would be great.

I think I almost got it to reschedule.
My current approach is thus: By slightly incrementing each slider in the Model tab I can gather all the shape keys which can be easily exported to gltf.

It should work. I'm going to make a character generator for Godot/Redot based on this principle.
Problem I'm facing now is that assets like eyes, tongue, teeth, and whatever MakeClothes is doing, are not refitted using these shape keys

My immediate plans are to start researching this issue. As soon as the disks are sorted out.

Things are -kinda- working though! The weights of the skirt in the helper mesh doesn't seem to be surviving the exporter step but that's off-topic.

The picture is not displayed.
Foreigners' reactions to Russian "Bird's Milk" candies
— Are your birds being milked?
— In Russia everyone is milked. Here even the zucchini is used to make caviar.
User avatar
tomcat
 
Posts: 477
Joined: Sun Sep 27, 2015 7:53 pm
Location: Moscow (Orcish Stun), The Aggressive Evil Empire

Re: (MPFB2) Shape keys for everything?

Postby joepal » Sun Oct 13, 2024 9:42 am

I have no first hand knowledge of Panda3d, so this might be daft, but: Seeming as Panda3d has some concept of python, maybe it would not be so far-fetched to port the target loading and asset fitting from MPFB to Panda3d? Although there are some blenderisms in the code, the logic should be reasonably clean and straight-forward.

Almost all the core logic is collected in these files: https://github.com/makehumancommunity/m ... b/services

I've spent some considerable effort putting in doc comments etc, so I hope it should be readable.

Otherwise, MPFB2 should be reasonably friendly for scripting. Same principle: import the core logic classes mentioned above and use them to script changes. That way you get the asset refitting included. Calling the gltf export from python should be reasonably easy too.
Joel Palmius (LinkedIn)
MakeHuman Infrastructure Manager
http://www.palmius.com/joel
joepal
 
Posts: 4622
Joined: Wed Jun 04, 2008 11:20 am

Re: (MPFB2) Shape keys for everything?

Postby tomcat » Tue Oct 22, 2024 11:12 pm

entikan wrote:Problem I'm facing now is that assets like eyes, tongue, teeth, and whatever MakeClothes is doing, are not refitted using these shape keys

This is where the eyes, hair and clothes stay in the right place and fit the figure.
Foreigners' reactions to Russian "Bird's Milk" candies
— Are your birds being milked?
— In Russia everyone is milked. Here even the zucchini is used to make caviar.
User avatar
tomcat
 
Posts: 477
Joined: Sun Sep 27, 2015 7:53 pm
Location: Moscow (Orcish Stun), The Aggressive Evil Empire


Return to Blender and MPFB

Who is online

Users browsing this forum: No registered users and 1 guest