Fix for GHI-4644: mesh optimization breaking skin influences (DCO fix) (#6336)

* Average incoming skin influences when multiple vertices have been welded. This is one option which will average out the weights even if two welded vertices have differing boneIds, but we probably also need to add the influences earlier in the process and enforce a process where the vertices do not get welded if they have influences with differing boneIds

Signed-off-by: Tommy Walton <waltont@amazon.com>

* Move skin influences from MeshBuilderSkinningInfo to the vertex attribute layers so they are considered when choosing which vertices can be welded and so they are not duplicated when compatible vertices have been welded

Signed-off-by: Tommy Walton <waltont@amazon.com>

* Updating unit tests

Signed-off-by: Tommy Walton <waltont@amazon.com>

* Remove unused functions

Signed-off-by: Tommy Walton <waltont@amazon.com>

* Update based on feedback from burelc

Signed-off-by: Tommy Walton <waltont@amazon.com>
This commit is contained in:
Tommy Walton
2021-12-13 13:07:04 -08:00
committed by GitHub
parent 71bb200e0a
commit 7188529652
7 changed files with 299 additions and 188 deletions
@@ -28,6 +28,12 @@ namespace AZ
{
int boneId;
float weight;
bool IsClose(const Link& other, float tolerance) const
{
return boneId == other.boneId &&
AZ::IsClose(weight, other.weight, tolerance);
}
};
virtual ~ISkinWeightData() override = default;