Fixing cloth working with Actors by reading directly from ModelAsset instead from EMFX Mesh. (#235)

- Fixing cloth working with Actors by reading directly from ModelAsset instead from EMFX Mesh.
- Actor caches map from joint indices in skin metadata to skeleton indices so they can be query later.
- Actor cloth skinning reads indices and weights from Model Asset instead from EMFX Mesh.
- Actor cloth skinning with unlimited skinning bones.
- Sort out cloth unit tests by disabling them until there is a way to create an Atom mesh
- Addressing feedback.
This commit is contained in:
Aaron Ruiz Mora
2021-04-23 19:46:57 +01:00
committed by GitHub
parent a4e1abf6df
commit 5fd8c35878
19 changed files with 191 additions and 214 deletions
@@ -253,7 +253,7 @@ namespace UnitTest
auto actor = AZStd::make_unique<ActorHelper>("actor_test");
actor->AddJoint(JointRootName);
auto meshNodeIndex = actor->AddJoint(MeshNodeName, AZ::Transform::CreateIdentity(), JointRootName);
actor->SetMesh(LodLevel, meshNodeIndex, CreateEMotionFXMesh(MeshVertices, MeshIndices, {}, MeshUVs, MeshClothData));
actor->SetMesh(LodLevel, meshNodeIndex, CreateEMotionFXMesh(MeshVertices, MeshIndices, {}, MeshUVs/*, MeshClothData*/));
actor->FinishSetup();
editorActorComponent->SetActorAsset(CreateAssetFromActor(AZStd::move(actor)));
@@ -284,7 +284,7 @@ namespace UnitTest
auto actor = AZStd::make_unique<ActorHelper>("actor_test");
actor->AddJoint(JointRootName);
auto meshNodeIndex = actor->AddJoint(MeshNodeName, AZ::Transform::CreateIdentity(), JointRootName);
actor->SetMesh(LodLevel, meshNodeIndex, CreateEMotionFXMesh(MeshVertices, MeshIndices, {}, MeshUVs, meshClothDataNoBackstop));
actor->SetMesh(LodLevel, meshNodeIndex, CreateEMotionFXMesh(MeshVertices, MeshIndices, {}, MeshUVs/*, meshClothDataNoBackstop*/));
actor->FinishSetup();
editorActorComponent->SetActorAsset(CreateAssetFromActor(AZStd::move(actor)));
@@ -310,7 +310,7 @@ namespace UnitTest
auto actor = AZStd::make_unique<ActorHelper>("actor_test");
actor->AddJoint(JointRootName);
auto meshNodeIndex = actor->AddJoint(MeshNodeName, AZ::Transform::CreateIdentity(), JointRootName);
actor->SetMesh(LodLevel, meshNodeIndex, CreateEMotionFXMesh(MeshVertices, MeshIndices, {}, MeshUVs, MeshClothData));
actor->SetMesh(LodLevel, meshNodeIndex, CreateEMotionFXMesh(MeshVertices, MeshIndices, {}, MeshUVs/*, MeshClothData*/));
actor->FinishSetup();
editorActorComponent->SetActorAsset(CreateAssetFromActor(AZStd::move(actor)));
@@ -337,7 +337,7 @@ namespace UnitTest
auto actor = AZStd::make_unique<ActorHelper>("actor_test");
actor->AddJoint(JointRootName);
auto meshNodeIndex = actor->AddJoint(MeshNodeName, AZ::Transform::CreateIdentity(), JointRootName);
actor->SetMesh(LodLevel, meshNodeIndex, CreateEMotionFXMesh(MeshVertices, MeshIndices, {}, MeshUVs, MeshClothData));
actor->SetMesh(LodLevel, meshNodeIndex, CreateEMotionFXMesh(MeshVertices, MeshIndices, {}, MeshUVs/*, MeshClothData*/));
actor->FinishSetup();
editorActorComponent->SetActorAsset(CreateAssetFromActor(AZStd::move(actor)));