Hi,
Im busy working on a game using my own game engine, I wrote a Blender export script to export models from blender into my engines custom model format. Animations worked fine but the models (and their skeletons) I used up to now were quite simple (not that many bones). I now have much more detailed models with more detailed skeletons and importing them into my game I notice that the animations are a little wrong in some places, and very wrong in others (compared to how it looks in blender). The place were things go wrong the most is “Twist/Turn” bones, bones that only rotate on the Y axis (Y being up), like a bone that twists/turns the arm or the wrist as opposed to the bones that bend the arm and the wrist. My earlier placeholder models never had “Twist/Turn” bones so I never really noticed the problem. apart from the “twist/Turn” bones most other bones are either fine or only slightly off when animating.
for each bone i export a 3x3 matirx for it's local rest rotation and also its length (the engine will read the length and construct a vector3 (0,length,0) that will be the bones translation) Im not sure if storing and using the bone data like this is might be the problem.
To export an animations rotations I Export an quaternion for each keyframe of each bone thats used in the animation.
This might be a long shot but I'd appreciate any insights as to what might cause this, And/or helping me to confirm that the way i store bone/animation data is correct/incorrect.
I tried to keep it brief but please ask for more information if needed, I can also upload some screenshots to illustrate the problem if it would help.
Thank you for your time!