EDIT:
#1 was due to older formats of FBX.
#2 was a bug in our FBX converter, where a vertex's weights were not properly intialized.
#3 was due to a team-member hardcoding a rotation in order to fix the wrong rotations the objects had when they were previously exported without converting to FbxAxisSystem::DirectX
Got a few problems importing and using data from FBX SDK.
#1
Been working a while with an importer for our game engine. Most things worked as they should with homemade models, however when I e.g. download a random model online and try to export the mesh, FBXSDK does not recognize it as a mesh.
FbxNodeAttribute::EType AttributeType = pCurrentNode->GetNodeAttribute()->GetAttributeType();
if (AttributeType != FbxNodeAttribute::eMesh) continue; //Does never pass unless I made the model myself directly in Maya
Any ideas what might be the cause?
#2
When importing our animated meshes we obviously export weights with the vertices. The odd thing is that some vertices do not have normalized weights.
I.e. a vertex's weight for bone1 might be 0.95 and for bone2 0.45 or whatever. It is usually only a few vertices that are affected, but needs a fix regardless.
Any ideas?
#3
For testing, we have an animated sphere bouncing up and down in maya. Problem is that in our engine the sphere is bouncing along the floor plane.
I thought this had to do with difference in coordinate systems used, and tried this fix:
//Set to DirectX axis system ///////
FbxAxisSystem SceneAxisSystem = scene->GetGlobalSettings().GetAxisSystem();
FbxAxisSystem OurAxisSystem(FbxAxisSystem::DirectX);
if (SceneAxisSystem != OurAxisSystem)
{
OurAxisSystem.ConvertScene(scene);
}
Obviously we are not using the same coordinate system, since the scene is indeed converted.
However, when animated in our engine, the model winds up quite distorted.. no clue whats going on here.
Feel free to adress as many or as few of these problems as you wish. Any help is greatly appreciated! :)
If you need more information I will gladly supply it, such as code, graphics debugging etc!