Community
FBX Forum
Welcome to Autodesk’s FBX Forums. Share your knowledge, ask questions, and explore popular FBX topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

FBX SDK 2014 skeleton animation and rotation issues

10 REPLIES 10
SOLVED
Reply
Message 1 of 11
Kuja01
3889 Views, 10 Replies

FBX SDK 2014 skeleton animation and rotation issues

Hello everyone 🙂

I'm using FBX SDK to read data from an fbx file generated from Maya 2014.
I need to read all the data from the fbx file and convert it into a custom file that will be used later on to render.
So far I wasn able to read vertex data, normal, bones, weights without problems, I can rendere a static geometry without problems.
I also can export data about animated meshes, bones etc but I have a couple of issues.

I'm using animation evaluator to get keyframes data which works nicely if I set keyframes for xyz rotation or xyz translation. If I try to set keyframes only on the Y rotation for example, the animation evalutaror does not return me anything, it says there is nothing to animate.
The problem is easily solved by putting keyframes on all axies xyz on maya but can you explain me why one single axis doesnt work?

On top of this, my biggest problem is related to bones rotations.

Still using my evaluator I use GetNodeLocalRotation for each bone to get the rotation.
This function returns me the values I have in maya.
For example if my bone in maya has rotation x of 90  and y of 5 at a specific time, the animation evaluator will return me the same values of x = 90 and  y= 5. 
So far I thought that everything was good, but when I render the animation does not work properly.
Instead of rotating around the arbitrary axis of the bone, my model is rotating about the stantard xyz axis, so the rotation is dofferent from the one in maya. To be more precise, in maya the model will rotate around the Y axis of the bone while on my application it will spin around itself (standard Y).
Translation on the other hand works perfectly.
To convert from model space to bone space, I'm using cluster->GetTransformation matrix

At first I thought that I was using the wrong matrix but this is the only matrix that does work.

What am I doing worg? Any advice or Ideas?

Thank you very much for your time.

10 REPLIES 10
Message 2 of 11
Kuja01
in reply to: Kuja01

I figure out that my bindpose matrix doesnt work.

I tried hard to come out with a solution, readin forums, looking at the fbx samples but I couldnt figure this out.
I have local rotation and translation for all my bones and all my keyframes, when I calculate the animation matrix, I calculate local matrix (I received thedata with animation evaluator OFFLINE) and I multiply it with parent local matrix.
After this I need to multiply the resulting matrix with the bone's inverse bindpose (which I can't figure out), pass the resulr to the shade which will multiply it with the vertex using the appropriate weight.

Can someone help me out?
Thanks.

Message 3 of 11
Kuja01
in reply to: Kuja01

I solved all my issues, thanks

Message 4 of 11
tlang
in reply to: Kuja01

Hi Kuja01,

 

Could you please tell me how you solved your problems with bindpose?

I am getting the same problem. I need bindpose to compute the inverse of bindpose for my skeletal animation but I have no clue how to compute it.

 

Thank you for your time.

Message 5 of 11
Kuja01
in reply to: Kuja01

Hi 🙂 I will write you a private message

Message 6 of 11
tlang
in reply to: Kuja01

Thank you very much!
Message 7 of 11
kaomao
in reply to: Kuja01

can you send me the solution via private message, please?

 

Maurizio

Message 8 of 11
p.kirill
in reply to: Kuja01

may i have a look at this ?

Message 9 of 11
Kuja01
in reply to: Kuja01

Hello there 🙂
Please send me a private message and I will be happy to help!
Message 10 of 11
dante_17
in reply to: Kuja01

Hey,

 

getting the exact same results here. Everything works fine except that some Bones seem to rotate on global XYZ-axis rather then their local XYZ-Axis.

 

Is there any chance, that anyone has a solution for this?

 

Any help is really appreciated.

Thanks in advance!

Message 11 of 11
Numerator
in reply to: dante_17

The quaternions do not always take the shortest path, sometime they take the long rotation path to get from q1 to q2.  You need to detect this case and fix the quat with a dot product.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report