Announcements

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

FbxCluster produces some incorrect TransformLinkMatrix when scene has multiple meshes + animation in it

ilan.keshet
Enthusiast

FbxCluster produces some incorrect TransformLinkMatrix when scene has multiple meshes + animation in it

ilan.keshet
Enthusiast
Enthusiast

I am using the FbxCluster::TransformLinkMatrix to get the global transform of joints in the scene.

 

I have Imported the FBX file into maya, and put the mesh/bones into bind pose -- and it looks like below:

ilankeshet_0-1657493031564.png

 

Which is correct. 

 

I then do the following snippet of code on all joints in the hierarchy to get their global binding transform matrixs, and print out the transform respectively

 

 

 

          FbxAMatrix boneBindingTransform;
          cluster->GetTransformLinkMatrix(boneBindingTransform);

          auto name = StringUtil::ToStdString(linkName);
          StringUtil::AppendLine(*logger, indent, "Global Joint Bind Transform for %s", name.c_str());
          StringUtil::AppendTRS(*logger, indent, boneBindingTransform);

 

 

 

 

The joint in question, (which is highlighted int he picture above produces the following global transform:

 

 

 

  Global Joint Bind Transform for M_Lip_TopJ
  Translate x: 0.00000 y: 152.45087 z: 13.54772 w: 0.00000
  Rotate x: -5.02226 y: 0.00000 z: 0.00000 w: 0.00000
  Scale x: 1.00000 y: 1.00000 z: 1.00000 w: 0.00000

 

 

 

(Translate = matrix.GetT(). Rotate = matrix.GetR(); Scale = matrix.GetS();)

 

I've now created a new node, not part of the hierarchy, and using the global transform information to position it in maya, and here is where the node appears, -- which is incorrect. A picture below is the resulting node:

 

ilankeshet_0-1657494356174.png

 

 

both it's rotation, and translation are off, as can see above. 

 

What's going on? I'm confused how Maya can correctly put the Model into bind pose, but yet the data that I'm getting from FBX appears to be broken.  Is there anything else that could be required to multiply to the global transform to put it into the correct place?

 

-----------------------

Note

-----------------------

I've done the exact same thing, on multiple other FBX files, with animations but only singular meshes + and everything then produces correct Bind Global Transform. 

 

0 Likes
Reply
Accepted solutions (1)
314 Views
1 Reply
Reply (1)

ilan.keshet
Enthusiast
Enthusiast
Accepted solution

I have found out that the Scene has multiple bind poses in it, and the reason I'm seeing the discrepancy is because the data I'm getting is the other bind pose. 

0 Likes