Proxy Weighting

This forum is aimed at user contributions, in the form of assets, side projects, code patches and similar.

Moderator: joepal

Proxy Weighting

Postby Apeiron » Mon Jan 31, 2022 1:51 pm

Hello all!

Is there a tutorial on how to properly do weighting for Proxy Meshes?

I tried to do this myself and only ever wind up with issues when trying to apply poses or using targets.

I was trying to merge "Female Generic" (included with installation) with "Adult Female Genitalia (new) HEALED" but always have odd results with poses and targets that deform the region. Eventually also wanted to add several different body types aside from Muscular and Generic (but also want them to be accurate in regards to anatomy).
I have read how to create proxies and I believe the problem comes from weighting.

Only thing I found was this "...the algorithm used to generate the barycentric coordinates of each new point relied too heavily on orthogonal projection. This is what causes the median vertices (in the YZ plane) to have "random" displacements along X when morphed or animated (the correct projection of those vertices lies on an edge in the YZ plane, rather than on any of the adjacent faces). The perineum was messed up a lot too, because it is the area that deforms the most for even the most basic morphs. Orthogonal projection onto alternative triangulations of non-planar quads also caused some discontinuities in the weight map. I kept the original mesh and topology but regenerated the proxy from scratch, with a consistent projection algorithm (straight line towards root point, and only one triangulation for each quad)..." From the guy that fixed the proxies for genitals, but I have no idea what this means in practical terms.

Anyone have any idea/where to look on what that means?
Apeiron
 
Posts: 3
Joined: Mon Aug 16, 2021 7:50 am

Re: Proxy Weighting

Postby joepal » Tue Feb 01, 2022 4:05 pm

Most proxies do not have weights files. The weighting is done on the basemesh.

The proxy is created using the standard clothing algorithm. In very rough summary, each vertex on the proxy is matched against three vertices on the basemesh, paired with a distance to the center between these three. It's a bit more complicated than this, but this is roughly speaking what is meant with the "barycentric coordinates".

The weighting is interpolated by picking the weights from the vertices on the basemesh and calculating a mean for the corresponding vertex on the proxy. Again, in very rough and not entirely accurate summary.

But the sum total is this: the weighting for the proxy gets calculated based on the weighting of the base mesh.

The upside of this is that you don't need to create a new weighting file for each combination of proxy and rig. The downside is that it sometimes goes wrong.

Now, it is possible that your problems stem from weighting problems. I have seen these appear, particularly in the female genitalia proxies, where posing of the legs make the genitalia area deform rather strangely. This is one example of when the automatic weight interpolation goes wrong. This could theoretically be fixed with a weights file, but this would then need to be done per rig.

However, it is also possible that what goes wrong is the matching of proxy vertex against basemesh vertices. This would make more sense with the problem that targets deform the mesh strangely, since targets do not care about weights in the first place. This would then rather be fixed by making more detailed vertex groups on the proxy and the basemesh in order to help the matching algorithm along a bit.

In any which way, I think your project sounds interesting. Maybe you could attach a blend file and I can take a look at it to see if I can figure out things to do to improve the situation?
Joel Palmius (LinkedIn)
MakeHuman Infrastructure Manager
http://www.palmius.com/joel
joepal
 
Posts: 4465
Joined: Wed Jun 04, 2008 11:20 am

Re: Proxy Weighting

Postby Apeiron » Sun Feb 13, 2022 5:14 pm

Hello joepal!

I am sorry for taking my sweet time with this, I do have the blend file as well as the two targets I have been working with to diagnose if I have the correct solution (the pose used was Benchmark). I also included the exported .proxy files and the associated folders.

I think the latter is the problem I am having, I used the Right/Mid/Left groups, also tried to use more detailed groups but both result in the same mess, the deformation in the nether regions is odd compared to the genitalia proxies (Adult female genitalia healed) used to create the new topologies in the file (duplicate selected>separate selection).

I used the MakeHuman blender add-on to get the meshes loaded in with "Import human" button on the MakeClothes preset (seems to work the same if other methods are attempted - this gives the least amount of oddities).
Attachments
Proxy_Generation.rar
Unzip with WinRar
(3.08 MiB) Downloaded 1593 times
Apeiron
 
Posts: 3
Joined: Mon Aug 16, 2021 7:50 am

Re: Proxy Weighting

Postby Apeiron » Sun Feb 13, 2022 5:16 pm

Replied above

joepal wrote:Most proxies do not have weights files. The weighting is done on the basemesh.

The proxy is created using the standard clothing algorithm. In very rough summary, each vertex on the proxy is matched against three vertices on the basemesh, paired with a distance to the center between these three. It's a bit more complicated than this, but this is roughly speaking what is meant with the "barycentric coordinates".

The weighting is interpolated by picking the weights from the vertices on the basemesh and calculating a mean for the corresponding vertex on the proxy. Again, in very rough and not entirely accurate summary.

But the sum total is this: the weighting for the proxy gets calculated based on the weighting of the base mesh.

The upside of this is that you don't need to create a new weighting file for each combination of proxy and rig. The downside is that it sometimes goes wrong.

Now, it is possible that your problems stem from weighting problems. I have seen these appear, particularly in the female genitalia proxies, where posing of the legs make the genitalia area deform rather strangely. This is one example of when the automatic weight interpolation goes wrong. This could theoretically be fixed with a weights file, but this would then need to be done per rig.

However, it is also possible that what goes wrong is the matching of proxy vertex against basemesh vertices. This would make more sense with the problem that targets deform the mesh strangely, since targets do not care about weights in the first place. This would then rather be fixed by making more detailed vertex groups on the proxy and the basemesh in order to help the matching algorithm along a bit.

In any which way, I think your project sounds interesting. Maybe you could attach a blend file and I can take a look at it to see if I can figure out things to do to improve the situation?
Apeiron
 
Posts: 3
Joined: Mon Aug 16, 2021 7:50 am


Return to User contributions

Who is online

Users browsing this forum: No registered users and 1 guest

cron