You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OpenAssetImporter.cs::FindSkeletonRoot looks for the skeleton root by finding the bone that is closest to the scene root. However its candidate bones are only bones that are skinned - if you have a root bone which is not skinned to any vertices but purely a root node then it is ignored along with any transforms. This behavior is different to the XNA importer and means the model is not rendered correctly. We are using .X files but this may also happen in FBX
There is no obvious way to determine the skeleton root that i can tell - hence the above algorithm. All of our models have 2 child nodes from the scene root - one is the mesh, the other is the skeleton but that also seems a naive solution and I don't know if it works for FBX as well as .X
If I 'rig' the code for our models then we also get IK chains included in the skeleton - I'm not 100% sure if thats what happens with XNA too.
My proposal is to simplify the search to
Choose any bone.
Walk back to sceneroot
The node you visit before sceneRoot is the skeleton root
This makes the assumption that all bones are in 1 skeleton and the skeleton is always a child of the scene root.
My other alternate is
Choose any bone
Walk back to scene root
Remember the highest parent with a non identity transform - that is the skeleton root.
This makes the assumption that nodes that are just there for organization have identity transform. SideEffect - a skeleton root with no transform would get ignore incorrectly.
Any ideas from people who have looked at this more than me.
The text was updated successfully, but these errors were encountered:
So proposal #1 fixes the orientation and position of our models... there's still some rendering issues with bones to track down but ading back the root node seems to be a good step #1
I have no idea how to begin to test that my code won't break other games though... we really dont have a wide enough selection of 3d models to do test do we?
OpenAssetImporter.cs::FindSkeletonRoot looks for the skeleton root by finding the bone that is closest to the scene root. However its candidate bones are only bones that are skinned - if you have a root bone which is not skinned to any vertices but purely a root node then it is ignored along with any transforms. This behavior is different to the XNA importer and means the model is not rendered correctly. We are using .X files but this may also happen in FBX
There is no obvious way to determine the skeleton root that i can tell - hence the above algorithm. All of our models have 2 child nodes from the scene root - one is the mesh, the other is the skeleton but that also seems a naive solution and I don't know if it works for FBX as well as .X
If I 'rig' the code for our models then we also get IK chains included in the skeleton - I'm not 100% sure if thats what happens with XNA too.
My proposal is to simplify the search to
This makes the assumption that all bones are in 1 skeleton and the skeleton is always a child of the scene root.
My other alternate is
This makes the assumption that nodes that are just there for organization have identity transform. SideEffect - a skeleton root with no transform would get ignore incorrectly.
Any ideas from people who have looked at this more than me.
The text was updated successfully, but these errors were encountered: