|
Hi all,
my name is Carsten Fuchs and I’m the main author of the Cafu game and graphics engine, an open-source 3D game engine for Windows and Linux with full networking support.
I’m currently working on a Model Editor for Cafu, so that we can import FBX files, then make engine specific settings and adjustments, and finally use the models in our map editors and the games.
I found loading the FBX nodes hierarchy quite easy, including loading the animation data from anim stacks, but I’m having problems with skin deformers and their clusters.
Please consider this chain of objects:
Node // with an attribute of type eMESH
Mesh
SkinDeformer
Cluster
LinkNode // (normally) some node of attribute type eSKELETON
The question is:
How can I find the coordinate of the control points affected by “Cluster” in the local space of “LinkNode”?
I studied the reference documentation for all related classes, but the texts are somewhat confusing. For example, from the description of KFbxCluster:
Transform refers to the global initial position of the node containing the link.
What is “initial” position?
What is the node containing the link? With the above example objects (regarding “LinkNode"), is it “Node”, or the parent of “LinkNode”?
etc.
(More similar questions with the other matrices of a cluster...)
For rendering (which cannot use and is independent of the FBX SDK), the implementation outline is to first compute the matrices of the skeleton nodes for the current point in time of the animation sequence, then use the above computed local coordinates to obtain the global coordinates by traversing “up” the hierarchy, doing the appropriate matrix multiplications, and finally doing the appropriate weighted sums.
In fact, the rendering part works already, all that I’m still missing is how I get the local coordinates in “LinkNode” space.
I’d be very grateful for your help!
Best regards,
Carsten
http://www.cafu.de
|