Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk® FBX® / FBX SDK / Get KFbxSkeleton KFbxXMatrix
  RSS 2.0 ATOM  

Get KFbxSkeleton KFbxXMatrix
Rate this thread
 
60859
 
Permlink of this thread  
avatar
  • JCAA
  • Posted: 10 October 2011 08:00 AM
  • Total Posts: 20
  • Joined: 01 April 2010 05:06 PM

Good morning.

I am iterating over all the skeletons in the scene:

for(int j 0lScene->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 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

joint.png



Replies: 0
avatar

Hi JCAA,

As I understand it, you want the position, at bind pose, of bones that are not part of the skinning. Since those bones are not part of the skinning, there is no position defined for them at bind pose. So the matrix you are looking for does not exist.

Please comment if I misunderstood you. I would be eager to help you.



Viviane Rochon
Maya Data Platform
Autodesk

Replies: 1
/userdata/avatar/cka037326.jpg

Yes, you are right… i’m looking for a matrix that not exist. I think that the correct way to obtain the initial transformation matrix for this joints is “Skeleton->GetNode()->EvaluateGlobalTransform()”.

Thanks for your time Viviane. :)

Author: JCAA

Replied: 13 October 2011 03:29 AM