Creating a MHFB model with Underwear + Clothes

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

Creating a MHFB model with Underwear + Clothes

Postby volovolovolo » Sun Nov 17, 2024 7:22 pm

Hi,
I am using Make Human to create 3D characters. After adding both a bra and a sports suit to the female, I have the problem of the bra being over the clothes (see picture). At the end of the day, I want to export the character to my Unity project, where I could easily change between the character being in underwear and the character being dressed. Ideally, I would like it to be done by disabling the meshes and not loading another 3D model.

As you can see, there is delete.female_casualsuit01 and delete.joepal_plain_bra options in modifiers. The casual suit works well, and I can control it if I hide, but the bra does not take any effect. How could I do it? Is it possible to achieve what I need?
Attachments
Screenshot 2024-11-17 201637.png
volovolovolo
 
Posts: 3
Joined: Sun Nov 17, 2024 7:06 pm

Re: Creating a MHFB model with Underwear + Clothes

Postby volovolovolo » Sun Nov 17, 2024 7:51 pm

UPD: actually I need to have all underneath meshes enabled, but hidden under the clothes. How can I achieve it?
Attachments
Screenshot 2024-11-17 204931.png
volovolovolo
 
Posts: 3
Joined: Sun Nov 17, 2024 7:06 pm

Re: Creating a MHFB model with Underwear + Clothes

Postby tomcat » Mon Nov 18, 2024 4:22 am

volovolovolo wrote:UPD: actually I need to have all underneath meshes enabled, but hidden under the clothes. How can I achieve it?

Simply turn off the visibility of underwear when you turn on outerwear.

Not really sure why the visibility of the underneath meshes is needed?
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: Creating a MHFB model with Underwear + Clothes

Postby volovolovolo » Mon Nov 18, 2024 1:16 pm

tomcat wrote:
volovolovolo wrote:UPD: actually I need to have all underneath meshes enabled, but hidden under the clothes. How can I achieve it?

Simply turn off the visibility of underwear when you turn on outerwear.

Not really sure why the visibility of the underneath meshes is needed?




It is not the visibility that is needed. It's the base mesh that will either disappear if the "delete" modifier (right model on the screenshot) is enabled or overlay the clothes(left model). Sorry, my initial question was maybe confusing. I can disable or enable underwear, but the base mesh is the problem. I need to export the model so that it has the body mesh underneath but does not overlay the clothes.
Attachments
Screenshot 2024-11-18 141342.png
volovolovolo
 
Posts: 3
Joined: Sun Nov 17, 2024 7:06 pm

Re: Creating a MHFB model with Underwear + Clothes

Postby tomcat » Mon Nov 18, 2024 6:19 pm

volovolovolo wrote:I need to export the model so that it has the body mesh underneath but does not overlay the clothes.

There is no simple solution to this issue. In practice, various workarounds are used. For example, you can disable the visibility of body parts hidden by clothes when you turn on (wear) casual clothes (as opition in MakeHuman “hide faces under clothes”) and turn on visibility when you change to underwear. Yeah, that's cutting the model or replacing the skin texture with a material with transparent areas.

I'm currently working on a character generator for the game engine (Godot) and I don't see any easy ways to solve this ancient problem.
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: Creating a MHFB model with Underwear + Clothes

Postby joepal » Wed Nov 20, 2024 8:43 am

As tomcat says, there's no simple solution to this.

Take for example an open trench coat added on top of a shirt. If we would simply hide a clothes piece based on in which order they are added, then the shirt would disappear and not be visible despite the trench coat being open. Theoretically we could interpolate the trench coat delete group from the body to the shirt, but that would end up very crude since the geometries are very different. Further, it would also mean that when you remove the trench coat, the shirt would have a big hole in it.

In MakeHuman, the hiding is done in OpenGL, where a tri on a mesh with a lower z-depth value is hidden if it is covered by a tri on a mesh with a higher z-depth value. But "covered" is then calculated via a camera ray from the camera position through the tris. That is not achievable using modifiers in blender, and would most definitely not make it through an export to a different application.

Now, what you can do, is make sure that the clothes are actually covering each other, instead of having intersecting meshes. In blender, you could for example use the sculpt "inflate" tool to move the shirt vertices outwards so that the bra no longer pokes through. This is also the only viable path I can see that would make it through an export to unity.
Joel Palmius (LinkedIn)
MakeHuman Infrastructure Manager
http://www.palmius.com/joel
joepal
 
Posts: 4625
Joined: Wed Jun 04, 2008 11:20 am


Return to Blender and MPFB

Who is online

Users browsing this forum: No registered users and 1 guest