About tailor guide

Discussions about MHX2 and other plugins that are developed outside the scope of MakeHuman. Note that bug reports should go to the respective code projects and might go unseen here.

Moderator: joepal

About tailor guide

Postby joepal » Fri Oct 21, 2011 2:42 pm

This might be the wrong forum, but I tried to follow the tailor guide. I think there should be an instruction on what to do when you get the "cannot apply to mesh with shape keys" error message. I deleted the shape keys in the clothe, but that malformed the mesh a bit, so I wonder if that was the right thing to do.
Joel Palmius (LinkedIn)
MakeHuman Infrastructure Manager
http://www.palmius.com/joel
joepal
 
Posts: 4626
Joined: Wed Jun 04, 2008 11:20 am

Re: About tailor guide

Postby joepal » Fri Oct 21, 2011 2:56 pm

Also, the make clothes button complains there are no join diamonds even though the diamonds checkbox is checked on import. Do I need to enable diamonds somehow in the mh_export file? I don't see any checkbox for it in gui options in MH.
Joel Palmius (LinkedIn)
MakeHuman Infrastructure Manager
http://www.palmius.com/joel
joepal
 
Posts: 4626
Joined: Wed Jun 04, 2008 11:20 am

Re: About tailor guide

Postby ThomasL » Fri Oct 21, 2011 6:48 pm

About joint diamonds: they are always exported, so the only thing to check is the Diamonds checkbox on import. The make_clothes script assumes clothing selected, character active. I.e. select clothing first, and then shift-select character. If you do it the other way around, and the clothing has no triangles, you get this error message.

But the workflow is a bit awkward, because then the clothing has to be active to project UVs and to export the obj file.
ThomasL
 
Posts: 1139
Joined: Tue Sep 15, 2009 2:46 am

Re: About tailor guide

Postby joepal » Fri Oct 21, 2011 8:31 pm

Ok, I've gotten so far as to get a crash at least. This makes me happy. I like crashes, they're inspiring.

This happens when I hit the make clothes button:

Code: Select all
Traceback (most recent call last):
  File "/make_clothes.py", line 2020, in execute
  File "/make_clothes.py", line 1102, in makeClothes
  File "/make_clothes.py", line 433, in printClothes
KeyError: 'bpy_struct[key]: key "MakeClothesUseProjection" not found'


The steps I took was:

  • Make MH character with diversuit
  • Export as MHX
  • Import in blender with diamonds checkbox
  • Delete a bunch of vertices in the diver suit, just to change it around a bit (I deleted the arms and legs)
  • Delete shape keys on diversuit
  • Apply all modifiers on diversuit
  • Clear parent on diversuit
  • Load make_clothes script
  • Remove all vertex groups on diver suit
  • Remove all vertex groups on human mesh
  • Clear parent on human mesh
  • Disable all modifiers (eye button) on human mesh
  • Assign a "bathsuit" vertex group on diversuit
  • Assign a "bathsuit" vertex group on human mesh, roughly in the same area
  • Rightclick diversuit mesh
  • Shift-rightclick human mesh
  • Hit make clothes button and get crash

I'm not entirely clear if the above steps follows the guide, I guessed a bit from time to time.
Joel Palmius (LinkedIn)
MakeHuman Infrastructure Manager
http://www.palmius.com/joel
joepal
 
Posts: 4626
Joined: Wed Jun 04, 2008 11:20 am

Re: About tailor guide

Postby ThomasL » Sat Oct 22, 2011 9:31 am

This is a design flaw, which I don't know what to do about. It happens if you switch scenes without reloading the script, e.g. with Ctrl-N. Press the Reinitialize button at the top of the panel and everything should be fine.

The settings are stored as properties in the current scene, which is a common trick. Unfortunately, this means that the settings disappear or are changed everytime you switch scenes. It would be better if they could be stored in the panel itself, but even if panels can have properties, it is appearently not possible to expose them in the panel.

OTOH, I have improved user-friendliness a little. The script now figures out itself what is the human and what is clothing, by looking at the MhxMesh property which the mhx exporter sets for the human only. So now it does not matter in which order you select meshes. Those importing things with obj must set this property the the human mesh manually. But I don't manage to get diamonds into Blender with the obj pipeline anyway.
ThomasL
 
Posts: 1139
Joined: Tue Sep 15, 2009 2:46 am

Re: About tailor guide

Postby ThomasL » Sat Oct 22, 2011 12:49 pm

Changed the code so that only the Reinitialize button shows if reinitialization is necessary.
ThomasL
 
Posts: 1139
Joined: Tue Sep 15, 2009 2:46 am

Re: About tailor guide

Postby joepal » Sat Oct 22, 2011 2:53 pm

Still no luck here. I'm following the exact steps I listed above, but reinitialize when needed.

When I hit the make clothes button I get an error that an optimal solution could not be found for a specific vertex, so I uncheck forbid errors.

The process completes for the make clothes button, but the output .mhclo is 0 byte large.

Is there some way to debug what happens?
Joel Palmius (LinkedIn)
MakeHuman Infrastructure Manager
http://www.palmius.com/joel
joepal
 
Posts: 4626
Joined: Wed Jun 04, 2008 11:20 am

Re: About tailor guide

Postby brkurt » Sat Oct 22, 2011 6:46 pm

I don't want to sound critical, but it makes a lot more sense to parent the clothing to the rig, and not the mesh. That way you don't have to hide/delete vertices in Makehuman's state-of-the-art mesh. And...you can apply deform modifiers germane to the particular 3d editing suite that you are using. The same applies for wigs. My advice is sit down with your girlfriend/wife/daughter and ask her how she would dress a figure; normally clothes and wig 'tack on' to the figure, so that our womenfolk can change their minds ofter, which they are wont to do. ;)
brkurt
 
Posts: 1100
Joined: Sun Feb 17, 2008 8:49 pm

Re: About tailor guide

Postby ThomasL » Sun Oct 23, 2011 1:05 pm

Hi joepal,

Not sure what happened. You need to remove the old vertex group and assign new ones. This is tedious to do manually, so I created buttons for that. There might also be problems with the output directory. By default the directory was something on my machine, which does not necessarily exist elsewhere. It has been changed to the user's home directory, which should exist with writing permission everywhere. The script now applies transformations, removes parent and silences modifiers itself, so you should not need to do that by hand anymore.

Here is the minimal new workflow:

1. Import human + diversuit with mhx.

2. Edit diversuit

3. Remove and auto create vertex groups for human.

4. Remove and auto create vertex groups for clothing.

5. Set output directory.

6. With human and clothing selected (in any order), press Make clothes.

7. Select clothing and Export Obj file.

There are of course additional steps if you want to project UVs or are not happy with the default three groups.

Hi brkurt,

I think there must be a misunderstanding. All meshes are parented to the rig when imported. You need to unparent them to remove the influence of any parent transformation. Analogously, the script is confused if there are any object level transformation, which is why they must be applied first. E.g., a mesh imported from an obj file with Z up has a 90 degree object rotation, which from the scripts viewpoint means that the mesh lies on its back, even if it does not look so in the viewport. Anyway, since object transformations are now applied automatically this should no longer be a problem.
ThomasL
 
Posts: 1139
Joined: Tue Sep 15, 2009 2:46 am

Re: About tailor guide

Postby brkurt » Sun Oct 23, 2011 3:05 pm

Thanks Thomas...

The clothing feature has generated a lot of interest, and rightly so, because if it works well, Poser and DAZ 3d have a true competitor. I read several times about how the base mesh would have deleted / hidden faces once clothing was added, and that's where my misunderstanding came in.

My intuition on this subject--I'm a designer, not a coder--is that the real problem lies in Blender's limitations. Ultimately there must be rock-solid code that handles collision detection, which is presently the weakness in Blender's otherwise marvelous SoftBody modifier.

A very practical test for clothing would be to create a Dravidian (South East Indian) female, and drape her in a summer sari, which if National Geographic photos are correct, will allow strong sunlight to shine through those areas not blocked by her body. Animating this model would be a great test both for Makehuman and Blender, as there are millions of women who were saris. Respectful but accurate is the goal, imho.
brkurt
 
Posts: 1100
Joined: Sun Feb 17, 2008 8:49 pm

Next

Return to MHX2 and other plugins developed outside MakeHuman

Who is online

Users browsing this forum: No registered users and 1 guest