Sign in to follow this  
AxeGuywithanAxe

Fbx Animation

Recommended Posts

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this