Rigid groups cause incorrect fitting if vertices are shared.
|Assignee:||Thomas Larsson||% Done:|
|Target version:||MakeHuman 1.1.0|
MakeClothes supports (seemingly undocumented) semi-rigid fitting by using vertex group names that start with '*' and contain exactly 3 vertices on the human side. This works perfectly well if those 3 vertices only belong to that group, but if some of them are shared, clothing vertices can effectively get fitted to the wrong group.
This happens because part of the rigid group implementation is that the code creates a virtual triangular face out of those 3 vertices and uses it to replace the lists of actual faces the vertex is part of. This obviously cannot work correctly if a vertex is shared. The attached patch seems to fix it nicely by storing those virtual faces in a new separate table indexed by vertex group id to avoid any conflicts.
To reproduce the actual problem, try to create two rigid groups that share two of their base vertices - 2 chances out of 3 vertices intended for one of them will get fitted to the other one instead.
Also available in: Atom