|
Good morning.
I am iterating over all the skeletons in the scene:
for(int j = 0; j < lScene->GetSrcObjectCount(KFbxSkeleton::ClassId); j++) {
/*.....*/ }
The next step i do is obtain the local matrix of each one
m_LocalMatrix = m_Skeleton->GetNode()->EvaluateLocalTransform();
The problem comes here, because this method gives me the local matrix in the first frame of a take
I want the position at bind pose. You will question me why i don’t use this way.
KFbxDeformer *def = m_meshData->m_mesh->GetDeformer(0);
KFbxSkin *skin = KFbxCast<KFbxSkin>(def);
int clusterCount = skin->GetClusterCount();
for (int i = 0 ; i < clusterCount ; i++)
{
KFbxCluster *cluster = skin->GetCluster(i);
KFbxXMatrix lFbxLinkMatrix;
cluster->GetTransformLinkMatrix(lFbxLinkMatrix);
}
This is because as you said in the FAQs the value of lFbxLinkMatrix is the skeleton’s transform when the binding happened.
If you evaluate the below image the selected joint is not a deformer in the mesh.
when yo get the skin->GetClusterCount(); this joint is not part of the skin and is ignored.
This is the why. Now i must get the initial position of the bones that are not part of the KFbxSkin

|