makehumancommunity/mpfb2

Reimplement a full version of MakeClothes

joepal1976 opened this issue · 4 comments

TL;DR: If you want to test the new MakeClothes, simply go to the "create assets" -> "MakeClothes" panel in the blender4 version of MPFB.

The standalone MakeClothes tool is outdated both in the sense that it is primitive and in the sense that it is not usable in blender 4.

At the same time, the very limited MakeClothes functionality available in MPFB2 up to now was only able to extract a vertex group. It was not able to produce actual clothes.

We need a modernized version of MakeClothes available inside MPFB2. This issue tracks the work with providing such.

Current status:

  • GOOD: Able to set up clothes, assign type and properties
  • GOOD: Matching algorithm finds roughly the same verts as the old MC tool
  • GOOD: A reasonably complex asset can be loaded without being visibly broken in MPFB2
  • GOOD: A reasonably complex asset can be loaded without being visibly broken in MakeHuman
  • GOOD: Works on any basemesh created with MPFB2, with or without modifiers and shape keys
  • GOOD: Works with and integrates with MakeSkin, producing usable materials
  • GOOD: Integrates with asset library, so that a saved asset is immediately equipable from the library
  • GOOD: Saves delete groups
  • GOOD: Has a new function for auto-creating a rough delete group
  • GOOD: Has UI for checking clothes viability
  • SO_SO: The clothes checking is missing some checks (if vgroup is present on body, tris/quads...)
  • SO-SO: The new function for auto-creating a delete group is very rough
  • SO-SO: Weighting and offsets calculations uses a copy/paste of the MakeClothes2 code, which is difficult to understand and which should be refactored
  • SO-SO: z-depth hardcoded to 50
  • SO-SO: Still requires manual steps if output is to be used as proxy/topology (this is #199)
  • BAD: Object properties from old MC projects are not aliased and reused (this is #198)

When I try to use this it says "the selected object is not valid as clothes"

This can happen for many reasons. There is a lengthy checking procedure that makes sure that, for example, this is fulfilled:

  • All faces have the same number of vertices (all tris or all quads)
  • All vertices belong to at least one face
  • All vertices belong to exactly one vertex group

The UX around this could certainly be improved. A list of exactly what is wrong is dumped to the concole and to the error log. The easiest is to open the console and read the error message. In windows there is a "toggle console" menu entry in the "window" menu.

Another approach is exporting the log as a text file. On the developer panel, there is a "export log" button, and the log file you want is "makeclothes.clothescommon". If you need furhter help, I'll need to see the contents of this file.

As a side note, this is one of the "BAD" entries in the list above: there is no coherent UI for displaying the sanity check.

I've now added UI functionality for performing and displaying a clothes viability check:

image

This will appear in tomorrow's nightly build.

@emberlightstudios : I realize this is a bit late, but this might help understanding why the clothes are rejected.

Going to consider this port good enough for beta 1. I've written a separate issue for the MC2 properties, #198 and another issue for body proxies, #199.

If bugs are encountered, open separate issues for these.