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.
Solved! Go to Solution.
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.
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.
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!
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.