Exported fbx issues

Exported fbx issues

Hi Martin,

Your message box is full, I have to reply here:smile:

To regenerate the issue:
1. Open the 'Alien Walk' sample project, delete the unused 'Take 0', then export to a FBX file.
2. Open a new project, import the exported FBX file, click the skeleton component of the character, click 'Show bind pose', nothing happened, the bind pose was lost.

I had found that all the exported joint types are 'FbxSkeleton::eRoot', which should be 'FbxSkeleton::eLimbNode', this cause the bones look weird in other 3d softwares, after I had fixed them, the bones look fine in other 3d softwares.

Art
 
Hi Art,
the bind pose isn't really lost since otherwise skeletal animation wouldn't work. So the bind pose is still there it's just not in a form that it can be used by the show bind pose button. In FBX the bind pose of a joint is simply saved as a single matrix in world coordinate space. On import it's not possible to completely reconstruct to Cheetah3D internal bind pose parameters so the bind pose button won't work for imported scenes. It just works for a .jas workflow.

But I will have a look into the FbxSkeleton::eLimbNode thing. I've overseen that.

Bye
Martin
 
Hi Martin,

It seems that Cheetah3D does not store bind pose to FBX at all, if you import it to Maya LT, it will report that no bind pose was found.

I use both Cheetah3D and Blender3D to work, sometimes I need to export FBX from Cheetah3D and import to Blender3D, the missing bind pose and the wrong joints type are really annoying, I have to write a patch program to fix the exported FBX file.

For example, 'Alien walk' sample use 'T' pose as bind pose, I have to store the 'T' pose as the first keyframe and export to FBX, then I use my patch program to add bind pose(the pose of the first keyframe), and fix wrong joint types, then export to FBX again.

After I had fixed the FBX, Blender3D and Maya LT will import it correctly, the bones look fine, and the bind pose works fine.
 
Last edited:
Hi Art,
the bind pose isn't really lost since otherwise skeletal animation wouldn't work. So the bind pose is still there it's just not in a form that it can be used by the show bind pose button. In FBX the bind pose of a joint is simply saved as a single matrix in world coordinate space. On import it's not possible to completely reconstruct to Cheetah3D internal bind pose parameters so the bind pose button won't work for imported scenes. It just works for a .jas workflow.

But I will have a look into the FbxSkeleton::eLimbNode thing. I've overseen that.

Bye
Martin

Yes, there exists a default bind pose, but I want the 'T' pose as the bind pose.

I have to patch the exported FBX file to get 'correct' bind pose and 'correct' joint type.

After patched the FBX, everything is fine in Blender.

FBX SDK let us store a set of matrices as bind pose, I guess that when exporting FBX, C3D did not store the 'correct' bind pose, when imported the FBX, other 3d softwares have to generate a bind pose from the first keyframe, this cause the 'correct' bind pose lost.

This issue exists since v6.3.2, though the animation works, but it is not perfect, I look forward the issue can be fixed in future.
 
Last edited:
Hi,
I'm currently on vacation but I will be back soon. But from a fast look in the FBX SDK documentation it looks like that I just have to export the bind pose via the FBXPose class. That shouldn't be a big problem.

Bye
Martin
 
Hi,
I've added the proper export/import of the joint type ('FbxSkeleton::eRoot', 'FbxSkeleton::eLimbNode'). That should work in v7.1 beta 3.

The bind pose is causing some problems since setting up a FBXPose requires way more informations than Cheetah3D records during mesh binding. Especially all the global transformations of the parent objects arn't recorded. That makes it sort of difficult to export that data since it's no longer available.

Have you tried to use the Collada file format? Does Maya extract the bind pose from that file format?

Bye
Martin
 
Hi Martin,

I examined the samples of the FBX SDK, though it says:
'Plus, we must store all the parent(s) global matrix of a link, even if they are not themselves deforming any model.'

But it only store the global matrices of all bones as the bind pose.
PHP:
// A pose must be named. Arbitrarily use the name of the patch node.
FbxPose* lPose = FbxPose::Create(pScene,pPatch->GetName());
        
// default pose type is rest pose, so we need to set the type as bind pose
lPose->SetIsBindPose(true);
        
for (i=0; i<lClusteredFbxNodes.GetCount(); i++)
{
    FbxNode*  lKFbxNode   = lClusteredFbxNodes.GetAt(i);
    FbxMatrix lBindMatrix = lKFbxNode->EvaluateGlobalTransform();
            
    lPose->Add(lKFbxNode, lBindMatrix);
}
        
// Add the pose to the scene
pScene->AddPose(lPose);
The parent information is not stored at all, you just need to store the global matrix of each bone in bind pose.

I had patched the exported FBX in the same way, no issue appears.
 
Last edited:
But it only store the global matrices of all bones as the bind pose.
The parent information is not stored at all, you just need to store the global matrix of each bone in bind pose.

The FBX SDK example you are revering to is saving all the parent objects to the Pose. Please read the full StoreBindPose() and AddNodeRecursively() functions. Especially how the lClusteredFbxNodes array is created.

According to the FBX SDK documentation (http://help.autodesk.com/view/FBX/2017/ENU/?guid=__cpp_ref_class_fbx_pose_html).

The Bind Pose holds the transformation (translation, rotation and scaling) matrix of all the nodes implied in a link deformation. This includes the geometry being deformed, the links deforming the geometry, and recursively all the ancestors nodes of the link. The Bind Pose gives you the transformation of the nodes at the moment of the binding operation when no deformation occurs.

I had patched the exported FBX in the same way, no issue appears.

Your solution should only work under certain circumstances but not generally. If the mesh or a parent object of a joint has been moved after binding the mesh the FBX style bind pose can't be fully recovered.

Bye
Martin
 
Back
Top