MHX2 Export Limitations

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

MHX2 Export Limitations

Postby befunkt » Mon Apr 05, 2021 1:48 am

Hello!
<- Quasi-noob. Windows10 64, 16GB RAM, Intel i7-9750H, NVidia RTX2070
MHC 1.2.0a3, Blender 2.8.2

EPISODE I
Q- Is there a theoretical limit (or hard limit) to how much 'stuff' one can export into a .mhx2 file?
Q- If so, where is the bottleneck?

In context: I downloaded a ton of clothes for an MH character, and I can fit only about 10% of it all into a .mhx2 file before the export process starts failing with "MemoryError".
This is with ~20 clothing items attached, each with source folders no larger than 5MB.
I went through and manually excluded any clothing items with larger source folders.
Deselecting all clothing items except for a single item with a source folder of 35MB by itself causes the export to fail.
Can't tell if this is a bug, or a typical limitation (or if it's just user error... that's always possible). :? :roll:


Code: Select all
Exception during event onFileSelected
Traceback (most recent call last):
  File "./core\events3d.py", line 211, in callEvent
    method(event)
.................
  File "codecs.py", line 376, in write
MemoryError
(^^ this is only part of the error message)


EPISODE II
Q- Alternatively, is there a way to import multiple .mhx2 files into Blender, where the assets from one file can be re-parented to the other file's similar model?

I did see this 'alternative' solution discussed in a forum post from a few years ago, but it is unclear if it was resolved.


Sorry if I missed an existing answer to my questions in the forum.
Thx!
-B
befunkt
 
Posts: 2
Joined: Sun Apr 04, 2021 11:59 pm
Location: CA

Re: MHX2 Export Limitations

Postby punkduck » Mon Apr 05, 2021 9:26 am

Hi

First one thing which is important: do not export with option "smoothing" in MakeHuman. Except for clothes made from triangles (they are not smoothed because algorithm does not work correctly with triangles in MakeHuman) the size of the object is 5 times higher now (1 = original + 4 times for the smoothed version, where one rectangle is replaced by 4 new ones).

Smoothing (= subdivision surface or catmull clark algorithm) works better in Blender, there the UV map (texture) is handled more correctly than here in MakeHuman.
So simply export and add a subdivision-surface modifier in Blender

So yes, you can export clothes one by one. In my long gallery thread the "daily life of models", I exported the characters one time and equipped them with strand hair. Each new peace of cloth is exported with a dummy of same size (without hair etc.). So this saves a few bytes of memory when exporting ... and of course a lot of work for the characters themselves.

In blender I typically have at least two files: one with the "nude" character and one with the clothes. Disadvantage is, that the vertices under the clothes aren't deleted and I do have to do it manually or to tweak clothes a bit, so that the skin is not intersecting.

So when you use the same character you can export multiple times. It also makes sense because e.g. a coat would create delete groups on a shirt and your character then can not run around with only the shirt ...

So import the "nude" character first, then import the clothes you need. You have two skeleton then, also two characters. Then you only have to exchange the parenting ( Object properties, relations, parent) and the armature (Modifier properties, Armature) of the imported clothes. After you reparented all the clothes, you can throw away the dummy-character you loaded with clothes.

Btw.: I do fixes for the clothes in Blender like adding metal shader to buttons etc and save the clothes without the skeleton and the character. The information how to work with the skeleton is kept in the vertex groups of the clothes. For later use I can append the clothes the same way and do not have to do my improvements again.
User avatar
punkduck
 
Posts: 1218
Joined: Mon Oct 17, 2016 7:24 pm
Location: Nuremberg, Germany

Re: MHX2 Export Limitations

Postby befunkt » Sat Apr 10, 2021 2:48 am

Awesome, this is what I needed.

Thank you!
befunkt
 
Posts: 2
Joined: Sun Apr 04, 2021 11:59 pm
Location: CA


Return to Bugs, problems and feature requests

Who is online

Users browsing this forum: No registered users and 1 guest

cron