Fbx Animation

Started by
3 comments, last by AxeGuywithanAxe 7 years, 12 months ago

Hello Guys, So I'm honestly on my wits end here. I've spent a lot of time, more hours than I'd honestly like to admit trying to fix this issue, but can't seem to figure out what i'm doing wrong. I've done multiple tests with my mathematics to see if it aligns with the extracted bone matrices, including inverse matrices, breaking into sqt, and recombining, and they have the same results. The picture on the top is the one where all of the skinning matrices are set to identity matrices, while the skinning matrices on the bottom are set to the reference pose matrices. Thank you to anyone who can help me, I've honestly never had such a hard time fixing a problem

Advertisement

Here's what I would do:

*Make a tall box with a cross-section in the middle
*Create a 3-joint skeleton for it, with one at one end, one in the middle, and one at the other end

*Skin it appropriately

*Load it into your code, and write a routine that slowly rotates the middle joint so you can see what happens

If you experience bugs with even a model that simple, then you'll be able to debug it in a simpler way that is much more intelligible than looking at that garbled mess of polygons.

If you don't experience the bug with that model, then that in itself will be enlightening. Maybe your bug is related more to complex models, for example perhaps the way you handle complex joint hierarchies is messed up.

Oh God, I has do much trouble with this myself :)

I used some of these links to eventually solve it, by much trial and error and brain-pain :)

http://www.gamedev.net/page/resources/_/technical/graphics-programming-and-theory/how-to-work-with-fbx-sdk-r3582

http://www.gamedev.net/page/resources/_/technical/graphics-programming-and-theory/skinned-mesh-animation-using-matrices-r3577

http://www.gamedev.net/topic/517946-fbx-sdk-again-prerotation-and-post-rotation/

http://help.autodesk.com/view/FBX/2016/ENU/?guid=__cpp_ref_annotated_html

http://forums.autodesk.com/t5/fbx-sdk/how-can-i-get-the-correct-position-of-fbx-mesh/td-p/5964692

http://forums.autodesk.com/t5/fbx-sdk/am-i-missing-something/td-p/4176388

I hope some of them can help you!

.:vinterberg:.

To begin with, just change one matrix, eg rotate the shoulder of one arm 90 degrees. Is it parenting the rest of the arm, is it rotating correctly etc.

Secondly, I recommend having a debug avatar that is drawn just as spheres or sprites at the bone heads. There are no rotations applied. This will quickly pick up problems like:

Row vs column error

Z up vs y up error

Skeleton scaled, or rotated differently to skin.

With FBX, I've had problems where Blender exports the mesh and armature with different up's and you need to know which matrix to apply as you build the mesh to correct it. This is why I now only use collada, I have more visibility of what's going on.

Thank you guys for your help, I have finally figure out the issue that I had. There were two issues actually, using EvaluateLocalTransform, I wanted to make bones local to their parent bone, was returning values that did not make sense for the skeleton, and my bone influences were not being sent to the gpu correctly. I have now solved the issue by changing the vertex declaration and just using EvaluateGlobalTransform. Gah It's amazing how Fbx is one of the most used formats in the industry, and it is still filled with so many bugs.

This topic is closed to new replies.

Advertisement