I am writing a .X to Unity converter. .X character is loaded in a legacy D3DX based game engine and its information is dumped into text files. These text files are read by Unity scripts and a mesh with bones, skin, and textures is created in Unity.
The problem I am facing is that once I assign my bone weights (exported from D3DX engine) and bind poses in Unity, the mesh gets distorted beyond recognition. My bones appear to have the correct transforms when I compare them in a .X viewer but they are created away from the mesh. Otherwise, the mesh appears fine.
I am using combined frame transformation matrices from .X to create bone transforms in Unity. I am not using the bone offset matrices from .X in Unity at the moment. I am calculating bind poses in Unity by multiplying worldToLocal and parent's localToWorld matrices.
I need someone who is familiar with these techniques and has specific experience in D3DX model loading and creating skinned characters in Unity at run-time through script. I will share the code in Unity and also one in D3DX game engine and the problem in mesh creation will need to be solved in Unity.
About the recuiterMember since May 20, 2018 Nibin Shajahan
from Diyala, Iraq