Makeclothes .npz file problem.

If you have problems understanding something or getting started, ask here

Moderator: joepal

Re: Makeclothes .npz file problem. [SOLVED]

Postby Thomasmg81 » Sat Nov 24, 2018 8:07 pm

MargaretToigo wrote:MakeClothes is very picky about what it will and will not process and you'll get error messages if your vertex groups aren't set up correctly, if you have mixed quads with tris (you can have all of one or the other, but not both together), if you have stray verts, or if there are ngons.

So, if MakeClothes made .mhclo and .obj files, that part worked. The .npz and .mhpxy files are made by MakeHuman when the clothing item is chosen to fit on a human.

If MakeHuman is not generating these files, check the log as there is a lot of useful information in there. And if you don't understand it, copy/paste the relevant entries and someone here will probably be able to explain what it means.

Oftentimes, the only thing that needs to be changed is the max_pole setting in the .mhclo file -- it's plain text so all you need is a text editor -- which is almost always set to 4. I have found that setting it to 8 resolves the issue of assets not compiling most of the time.

Looking at the screen grab, it appears that the clothing mesh is all quads, although there could be verts in there with more than four poles.

Once again because it bears repeating: check the logs.


When i'm using blender i am meticulous regarding double vertices, loose geometry etc i know what a pain it is. I've tried going over the model with a fine toothed comb, i've tried selecting vertices by trait, deleting any loose vertices etc and i've also been meticulous ensuring each individual vertice has been assigned to a vertex group.
Thats the reason i included the .blend file in the attachment i hoped somebody might be able to find whatever it is i'm missing.
Last edited by Thomasmg81 on Sat Nov 24, 2018 11:32 pm, edited 1 time in total.
Thomasmg81
 
Posts: 9
Joined: Wed Oct 17, 2018 10:12 pm
Location: Northern Ireland, UK

Re: Makeclothes .npz file problem.

Postby MargaretToigo » Sat Nov 24, 2018 10:07 pm

Thomasmg81 wrote:When i'm using blender i am meticulous regarding double vertices, loose geometry etc i know what a pain it is. I've tried going over the model with a fine toothed comb, i've tried selecting vertices by trait, deleting any loose vertices etc and i've also been meticulous ensuring each individual vertice has been assigned to a vertex group.
Thats the reason i included the .blend file in the attachment i hoped somebody might be able to find whatever it is i'm missing.


If MakeClothes produces .mhclo and .obj files, then your problem is not doubles or loose geometry as those conditions will cause MakeClothes to return an error message without making the .mhclo and .obj files.

I looked at your .blend and after a cursory inspection I just clicked on MakeClothes to see what would happen and it made the .mhclo and .obj files, but would not compile in MakeHuman. This was the relevant log...

Code: Select all
Unable to load obj file: C:/Users/MRT1963/Documents/makehuman/v1/data/clothes/mens_ninja_bottoms/mens_ninja_bottoms.obj
Traceback (most recent call last):
  File "core\files3d.py", line 206, in loadMesh
  File "core\files3d.py", line 165, in loadTextMesh
  File "shared\wavefront.py", line 148, in loadObjFile
  File "core\module3d.py", line 642, in setFaces
  File "core\module3d.py", line 712, in _update_faces
RuntimeError: Incompatible mesh topology.
Failed to index faces of mesh mens_ninja_bottoms.obj, you are probably loading a mesh with mixed nb of verts per face (do not mix tris and quads). Or your mesh has too many faces attached to one vertex (the maximum is 6-poles). In the second case, either increase MAX_FACES for this mesh, or improve the mesh topology. Original error message: (<type 'exceptions.ValueError'>) could not broadcast input array from shape (7) into shape (6)
Failed to load C:/Users/MRT1963/Documents/makehuman/v1/data/clothes/mens_ninja_bottoms/mens_ninja_bottoms.obj


This almost always means that max_pole is set too low. I loaded the .mhclo into a text editor and saw that max_pole was set to 6. I changed it to 8, saved the file, clicked on the icon, and lo and behold, it worked...

Screen Shot 2018-11-24 at 4.25.29 PM.png
mens_ninja_bottoms in makeHuman, max_pole set to 8


And yes, I see that the log up there reads that "Or your mesh has too many faces attached to one vertex (the maximum is 6-poles)" and I don't know why it says that because I've seen max_pole set much higher than that.
MargaretToigo
 
Posts: 175
Joined: Thu Feb 16, 2017 6:46 pm
Location: Tampa Bay Florida, USA

Re: Makeclothes .npz file problem.

Postby Thomasmg81 » Sat Nov 24, 2018 11:29 pm

Thank you very much Margaret, it is working for me now as well.

Sorry, i have one last question, can you explain to me what max pole is?

Is this a method declaring maximum number of polys?


This fix is very hard to find. Can i suggest an admin makes it more readilly accessible?
Thomasmg81
 
Posts: 9
Joined: Wed Oct 17, 2018 10:12 pm
Location: Northern Ireland, UK

Re: Makeclothes .npz file problem.

Postby loki1950 » Sun Nov 25, 2018 3:02 am

It's the maximum number of faces that meet at one vertex(pole).

Enjoy the Choice :)
my box::HP Envy i5-6400 @2Q70GHzx4 8 Gb ram/1 Tb(Win10 64)/3 Tb Mint 19.2/GTX745 4Gb acer S243HL K222HQL
Q8200/Asus P5QDLX/8 Gb ram/WD 2Tb 2-500 G HD/GF GT640 2Gb Mint 17.3 64 bit Win 10 32 bit acer and Lenovo Ideapad 320-15ABR Win 10/Mint 19
User avatar
loki1950
 
Posts: 929
Joined: Thu Dec 18, 2014 6:27 pm
Location: Ottawa,Ontario

Re: Makeclothes .npz file problem.

Postby Thomasmg81 » Sun Nov 25, 2018 5:22 am

loki1950 wrote:It's the maximum number of faces that meet at one vertex(pole).

Enjoy the Choice :)



Thanks for the clarification.

For me its not enough to understand what i did incorrectly, but also to understand whats happening when its working correctly.
Thomasmg81
 
Posts: 9
Joined: Wed Oct 17, 2018 10:12 pm
Location: Northern Ireland, UK

Re: Makeclothes .npz file problem.

Postby MargaretToigo » Sun Nov 25, 2018 10:53 pm

Thomasmg81 wrote:For me its not enough to understand what i did incorrectly, but also to understand whats happening when its working correctly.


Actually, you didn't do anything incorrectly. Your ninja pants are rather well made. What probably got MakeClothes all confused were the little tie-offs on the back of the pants legs -- a nice touch of detail, BTW.

Those tie-offs are bunch of vertices, close together. It's hard to tell just looking and selecting various edge loops (to see where they go), whether there are any verts in there with more than six poles, but when you have a lot of vertices close together, you sometimes have to increase max_pole to get the clothing item to compile in MakeHuman. I don't really know why this is, it's just what I've experienced.

Whenever something goes through MakeClothes and makes the .mhclo and .obj files, but won't compile in MakeHuman, the very first thing I try is increasing max_pole, which resolves the issue most of the time. This should be considered as part of the process of making clothing items for MakeHuman because as you add more details to an article of clothing -- this is essential if you're going for realism -- the process itself also becomes more complex.
MargaretToigo
 
Posts: 175
Joined: Thu Feb 16, 2017 6:46 pm
Location: Tampa Bay Florida, USA

Re: Makeclothes .npz file problem.

Postby Aranuvir » Mon Nov 26, 2018 11:19 am

The max_pole thingy was addressed 1.5 years ago and should be fixed with the recent alpha release, though MH will still show a warning if max_pole is exceeded, but it should work. If anyone could test? Attention: The default output folder was changed to v1py3 for that version!
Furthermore, I think to remember there were situations were MC created incomplete mhclo/obj files. If an asset does not load it could be a good habit to check the consoles for error messages and delete all files of the newly created asset, before running MC again.
Aranuvir
 
Posts: 1048
Joined: Sun Oct 12, 2014 2:12 pm

Re: Makeclothes .npz file problem.

Postby wolgade » Mon Nov 26, 2018 3:00 pm

Aranuvir wrote:MH will still show a warning if max_pole is exceeded, but it should work. If anyone could test?

I tested with the alpha version provided by the PPA (Ubuntu 18.04) and a simple filled circle (16-pole). Worked.
wolgade
 
Posts: 790
Joined: Wed Jan 30, 2013 6:50 pm

Re: Makeclothes .npz file problem.

Postby Aranuvir » Mon Nov 26, 2018 3:04 pm

wolgade wrote:I tested with the alpha version provided by the PPA (Ubuntu 18.04) and a simple filled circle (16-pole). Worked.

Great. That's good to know. Thanks for testing. :D
Aranuvir
 
Posts: 1048
Joined: Sun Oct 12, 2014 2:12 pm

Previous

Return to Newbies

Who is online

Users browsing this forum: No registered users and 1 guest