mpfb2 icon indicating copy to clipboard operation
mpfb2 copied to clipboard

Cleavage-less clothing helper.

Open angavrilov opened this issue 2 years ago • 7 comments

I'm not sure how hard would it be to add more helper geometry to the base mesh, but I've always wondered why there is a 'tights' helper, which is basically a lower resolution body with displacement, but no helper for more loosely fitted clothes that drape into a flat panel between breasts (basically follow a convex hull of the breasts, at least in each horizontal slice of the mesh).

The hair helper actually does that, except it's even more low poly and displaced further, while the proposed one could be a replacement for a subsection of the tights helper between the breasts.

Since it's essentially a convex hull, it actually can be defined by a different grouping of existing vertices into faces. The problem is that MakeClothes is based on vertex groups for selecting which faces can be used for binding. Maybe it could be a load time option, or an operator button, that alters the set of faces created for that area of the tights helper without changing the vertices of the mesh (some of them would have to become loose vertices).

Also, I noticed that the tights helper doesn't seem to follow some of the breast targets correctly.

angavrilov avatar Jan 15 '23 16:01 angavrilov

Actually, extending the base mesh is not as dramatic as it might seem at first glance. I think PunkDuck has already experimented with a basemesh with extra helpers such as tails and wings.

As long as the vertex indices in the current base mesh are maintained, adding additional vertices after these should not pose much problem.

It is also something I have been considered doing for some non-human deform helpers.

joepal1976 avatar Jan 17 '23 19:01 joepal1976

I imagine the main problem would be the targets. In this case you probably do want to use the vertex positions from the tights helper to both save on work, and ensure the altered area is synchronized with the rest of the helper.

Probably some framework for updating targets for new helpers based on the existing one should be considered - maybe it could use the clothes system somehow, i.e. some way of generating target data via mhclo bindings. I also wondered about a way to propagate targets to assets, which would be a related task. I think you also mentioned people wanting to include extra targets in the mesh object for morphing variation later, and in that case I think they would also like being able to inject the shapes into assets to basically bake MPFB's refit math.

Basically, maybe the procedure could be to make a mhclo asset that defines the new helper in terms of existing geometry, and then run some kind of script to add it to the base mesh and all targets.

angavrilov avatar Jan 17 '23 19:01 angavrilov

@joepal1976 On the topic of mass updating targets, I wonder if you have a procedure for that?

I noticed an issue with two breast vertices near the middle (mirror pair of 1863 and 8535) being poorly positioned (pushed into the body by about 5mm) in 'young female' targets ('child' and 'old' seem fine) and think about fixing it, but there are a lot of layered target shapes to check and fix (as in, some additional variations on muscle/weight/etc actually fix it and need to be unfixed...)

angavrilov avatar Jan 17 '23 19:01 angavrilov

No, I don't. So far, targets have been fixed or extended manually using MakeTarget on a target per target basis.

Regarding fixes for things as the poor positioning you mention here then I guess that's acceptable if only a few targets are involved. But say we need to fix all phenotype target combinations or add another helper which should be influenced by all macro targets? We'd obviously need some automated interpolation in order to modify relevant target files.

If we go about mass changing targets (which is probably needed in more instances than the breast verts), MakeTarget should be extended with some form of batch support to provide automatic replication or interpolation.

The same goes if we adapt the base mesh and add extra helper verts. It isn't really feasible to manually adapt all existing targets to take these into account. As you say, we have the mhclo approach available, so it shouldn't be rocket science to write a routine for interpolating the target influence on the extra verts. But no such solution exists today.

joepal1976 avatar Jan 18 '23 13:01 joepal1976

Unfortunately, for those two vertices it's literally necessary to check manually every target, because it's inconsistent whether the detail targets ignore the problem or try to fix it at the wrong detail level. The only improvement could be tools to make that less cumbersome.

To that purpose, one thing I think about doing is adding two buttons to the Developer panel: one to import multiple targets as shape keys (you can configure the Blender select file dialog to allow multiple file selection; this can also address #40 somewhat), and one that exports the active shape key as target (instead of hardcoded PrimaryTarget or whatever).

angavrilov avatar Jan 18 '23 15:01 angavrilov

I'm all for it. The current toolset for working with targets is pretty ancient and haven't gotten an overhaul in quite some time.

joepal1976 avatar Jan 18 '23 15:01 joepal1976

Another weirdness I noticed: in the 'old' target the helper actually isn't following the body here. I wonder if the age slider really should affect the draping of clothing in this way.

angavrilov avatar Jan 22 '23 11:01 angavrilov