MakeClothes Traceback error

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

MakeClothes Traceback error

Postby Danewilliams » Sat Apr 25, 2020 5:33 pm

I just made something new in Blender with MakeClothes, but every time I press the makeclothes button I get a traceback error. What should I do?
Attachments
error.png
Danewilliams
 
Posts: 19
Joined: Wed Mar 14, 2018 7:23 am

Re: MakeClothes Traceback error

Postby loki1950 » Sat Apr 25, 2020 5:46 pm

Very hard to read error messages on a screen shot making the report almost useless try going to the blender console then copy/pasting the trace back to a text file then posting here.

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: 1219
Joined: Thu Dec 18, 2014 6:27 pm
Location: Ottawa,Ontario

Re: MakeClothes Traceback error

Postby Danewilliams » Sat Apr 25, 2020 6:14 pm

Traceback (most recent call last):
File "C:\Users\Owner\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\makeclothes\operators\createclothes.py", line 85, in execute
(b, hint) = mc.make()
File "C:\Users\Owner\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\makeclothes\core_makeclothes_functionality.py", line 179, in make
self.findBestFaces()
File "C:\Users\Owner\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\makeclothes\core_makeclothes_functionality.py", line 277, in findBestFaces
for polygon in self.humanmesh.vertPolygons[vertIdx]:
KeyError: -1

location: <unknown location>:-1
Danewilliams
 
Posts: 19
Joined: Wed Mar 14, 2018 7:23 am

Re: MakeClothes Traceback error

Postby loki1950 » Sun Apr 26, 2020 3:45 am

@punkduck @Aranuvir Your code guys ;)

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: 1219
Joined: Thu Dec 18, 2014 6:27 pm
Location: Ottawa,Ontario

Re: MakeClothes Traceback error

Postby Aranuvir » Sun Apr 26, 2020 7:14 am

I think I'll have to ask Punkduck here. If I understand the error correctly some vertex indices get negative values, which shouldn't happen. @Danewilliams: As a basic workaround get the latest version of MakeClothes. I'm not sure, if we update the downloads from tuxfamily automatically. Therefore I'd recommend to download directly from github. Then run check human and check clothes, too.
Aranuvir
 
Posts: 1314
Joined: Sun Oct 12, 2014 2:12 pm

Re: MakeClothes Traceback error

Postby punkduck » Sun Apr 26, 2020 10:51 am

Hi

I am not sure if we already checked everything what can go wrong, although my friend Elv and myself are using the new tool very often.

It looks like you created group(s) on human and clothes. But no vertices are assigned to the group for the human ... but I am not sure. Could that be the reason?

Greetings
punkduck
User avatar
punkduck
 
Posts: 1216
Joined: Mon Oct 17, 2016 7:24 pm
Location: Nuremberg, Germany

Re: MakeClothes Traceback error

Postby Danewilliams » Tue Apr 28, 2020 4:14 pm

Maybe that is the reason, but I'm afraid I can't tell. If it is the reason, could you please tell me how to fix it? This error is really annoying.
Can you tell from this image?
Attachments
help.png
Danewilliams
 
Posts: 19
Joined: Wed Mar 14, 2018 7:23 am

Re: MakeClothes Traceback error

Postby punkduck » Tue Apr 28, 2020 7:58 pm

Hi there

According to the line numbers of the traceback it is an early version released approx. in December. I added code after that to work with so-called rigid-groups. When testing it I forgot to assign at least 3 vertices in one case. And I got a similar error.


So I already added code to avoid this error. If the following error would still happen it would be line 322 today, not line 277

Code: Select all
File "C:\Users\Owner\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\makeclothes\core_makeclothes_functionality.py", line 277, in findBestFaces
for polygon in self.humanmesh.vertPolygons[vertIdx]:
KeyError: -1


So we have to make sure you use a newer version.

Just to understand the problem:

Blender tries to find the nearest vertex for each vertex of your piece of cloth on the human (or helpers, if you use them). To avoid problems when using helper and body and for more flexibility we don't use the whole geometry of the human. So you have to create at least one group on both objects with vertices assigned.

So "body" must be a group on your human and your clothes then (I would call this group head btw ;) ) . Select the vertices of the head on the human and assign them to "body". Make sure this group on the human is not empty. It must contain at least 3 vertices, but in your case take the whole head except the ears and the inside of the mouth + at least one loop outside of the mask ...

If the error now will appear again with the new line number then I have to fix something. I guess in this case I will need the blend file itself ... because this -1 is a result from the blender internal find_n function of the KD-tree and I don't have an idea what still can go wrong ( :ugeek: )
User avatar
punkduck
 
Posts: 1216
Joined: Mon Oct 17, 2016 7:24 pm
Location: Nuremberg, Germany

Re: MakeClothes Traceback error

Postby Danewilliams » Wed Apr 29, 2020 4:21 am

punkduck wrote:Hi there

According to the line numbers of the traceback it is an early version released approx. in December. I added code after that to work with so-called rigid-groups. When testing it I forgot to assign at least 3 vertices in one case. And I got a similar error.


So I already added code to avoid this error. If the following error would still happen it would be line 322 today, not line 277

Code: Select all
File "C:\Users\Owner\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\makeclothes\core_makeclothes_functionality.py", line 277, in findBestFaces
for polygon in self.humanmesh.vertPolygons[vertIdx]:
KeyError: -1


So we have to make sure you use a newer version.

Just to understand the problem:

Blender tries to find the nearest vertex for each vertex of your piece of cloth on the human (or helpers, if you use them). To avoid problems when using helper and body and for more flexibility we don't use the whole geometry of the human. So you have to create at least one group on both objects with vertices assigned.

So "body" must be a group on your human and your clothes then (I would call this group head btw ;) ) . Select the vertices of the head on the human and assign them to "body". Make sure this group on the human is not empty. It must contain at least 3 vertices, but in your case take the whole head except the ears and the inside of the mouth + at least one loop outside of the mask ...

If the error now will appear again with the new line number then I have to fix something. I guess in this case I will need the blend file itself ... because this -1 is a result from the blender internal find_n function of the KD-tree and I don't have an idea what still can go wrong ( :ugeek: )


I use MakeClothes 2.
What should I do?
Please, be specific.
Thank you.
Danewilliams
 
Posts: 19
Joined: Wed Mar 14, 2018 7:23 am

Re: MakeClothes Traceback error

Postby loki1950 » Wed Apr 29, 2020 3:37 pm

Use the latest code the code you are using is old and has since been replaced. Get it directly from the GitHub repo that is always the latest code.

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: 1219
Joined: Thu Dec 18, 2014 6:27 pm
Location: Ottawa,Ontario

Next

Return to Blender and MPFB

Who is online

Users browsing this forum: No registered users and 1 guest