   Convert fbx to DirectX correctly
  hi everyone,I want to write an fbx importer for my C++ DirectX Project. But I have some problems when I convert the meshes to DirectX. I have a static Object without animations or something like this. Only a cube with normals and UV coordinates. I deformed the cube a little bit. So it looks like this:The first problem is, that the axis-alignment is wrong. So I must convert it to to the DirectX alignment.The second problem is, that I can't get only the vertices (controlpoints) to get the cube like it shows in the picture above. I must also import the Global transformation Matrix to get the right positions of the vertices.Otherwise it would look like a normal cube which is not deformed. To convert the axis system I used this part of code: KFbxAxisSystem SceneAxisSystem = m_pScene->GetGlobalSettings().GetAxisSystem();KFbxAxisSystem OurAxisSystem(KFbxAxisSystem::DirectX) ;if( SceneAxisSystem != OurAxisSystem ){OurAxisSystem.ConvertScene(m_pScene);} It doesn't work correctly because the rotation is not like in 3ds max.To transform the vertex positions I call GetGlobalFromCurrentTake to get the global matrix. Then I apply the matrix to the mesh, such like this: pMesh->SetPivot(pNode->GetGlobalFromCurrentTake(KTime(0)));pMesh->ApplyPivot();It works correctly to the vertices, but i think it doesn't convert the UV coordinates.Finaly it looks in my programm like this:But in 3ds max it looks like this:How can I convert it correctly?Here I post also my complete convert code: KFbxAxisSystem SceneAxisSystem = m_pScene->GetGlobalSettings().GetAxisSystem();KFbxAxisSystem OurAxisSystem(KFbxAxisSystem::DirectX) ;if( SceneAxisSystem != OurAxisSystem ){OurAxisSystem.ConvertScene(m_pScene);} pMesh->SetPivot(pNode->GetGlobalFromCurrentTake(KTime(0)));pMesh->ApplyPivot();// My new Vertexcrx::VertexcrxVertex;// Get controlpointsKFbxVector4* controlPoints = pMesh->GetControlPoints();int* indices = pMesh->GetPolygonVertices();// Get texcoords, normalsKFbxLayerElementUV*uvElement= 0;KFbxLayerElementNormal*normalElement= 0;uvElement= pMesh->GetLayer(0)->GetUVs();normalElement= pMesh->GetLayer(0)->GetNormals();for (int i = 0; i < pMesh->GetPolygonVertexCount(); i++){crxVertex.vx = (float)controlPoints[indices].GetAt(0);crxVertex.vy = (float)controlPoints[indices].GetAt(1);crxVertex.vz = (float)controlPoints[indices].GetAt(2);crxVertex.nx = (float)normalElement->GetDirectArray().GetAt(indices).GetAt(0);crxVertex.ny = (float)normalElement->GetDirectArray().GetAt(indices).GetAt(1);crxVertex.nz = (float)normalElement->GetDirectArray().GetAt(indices).GetAt(2);crxVertex.u = (float)uvElement->GetDirectArray().GetAt(indices).GetAt(0);crxVertex.v = (float)uvElement->GetDirectArray().GetAt(indices).GetAt(1);m_pCrxManager->AddVertexAndIndex(crxVertex);}  I add the texture map and the fbx file (ASCII).Here is an extern link to the fileshttp://netload.in/datei7k5iOIlG9g/Files.rar.htm   
  The KfbxAxisSystem has known bugs when converting to DirectX.  I haven't tried the new version (2011.2), but the old versions had it.  You can see the discussions on the Autodesk forums if you're interested.  The fix I use is to convert to OpenGL (Right-handed, Y-up, Z-out).  Then I manually apply the conversions to DirectX (Left-handed, Y-up, Z-in) whenever I need them.As for the transform, I don't understand what you're doing, is this an animated model?   ;  The newest fbx plugin for 3ds max lets you specify Y-up when you export. I made my exporter when this functionality wasn't there, but all I did was apply a conversion matrix that flips the z any y axis:1 0 00 0 10 1 0   