|
hi there,
i am writing my first importer using fbx sdk and i am still a bit confused about a couple of issues.
After struggling a bit around transformations matrices, i came across this post,
and it solved a lot of problems. I have implemented a couple of functions,
following the example of
KFbxXMatrix GetLocalPositionFromTake(KFbxNode* pNode, KFbxTakeNode* lCurrentTakeNode, KTime& pTime)
KFbxXMatrix GetDefaultLocalPosition(KFbxNode* pNode, bool bUseDefaultPosition)
Whenever i convert a static scene, or an animated scene where the animations are attached directly to the geometries, the code works like a charm.
Eventually i tried an fbx exported from 3dmax. It’s a model that uses helpers to translate/rotate different geometries. The scene has it’s own hierarchy, something like:
mainHelper (translation, rotation)
|
|- groupHelper01 (translation, rotation)
| |
| |- geo01 (small translation)
| |- geo02
|
|- groupHelper02
| |
Now, with this file I can’t retrieve any correct transformation. My best guess is that i am missing something important about transformation combination. When i call
GetLocalPositionFromTake do i retrieve the tranformation matrix relative to the node parent? Or i retrieve the global tranform (and so, if i push all the transformations toghether i end up appling multiple times the same transformations).
Thanks for any help
edited:
solved it was just a trivial quaternion conversion problem. My fault....
|