Duilio

08-18-2016, 01:46 PM

Hi guys, I'm making my engine and now it's time for animations. I learned a lot of things on the internet and on this site too, I think I have understood the overall principles, but I can't figure out some things.

I made an fbx loader, no problem with the meshes, but if I think in terms of animations, apparently I don't have problems to extract data, but I don't know what kind of information to extract from the file.

Every tutorial or disussion, speaks about a bind pose. Many of these use the concept of local matrix,local transform, global transform, parent transform, ...

I have some problems with this local matrix. I have a number of joints, every joint, except for the root joint, has a parent joint. For what I understood, the parent of the root joint is the world space. Now I have to think about joint spaces, I have to transform the joints in relation with their parents with something like:

Joint.GlobalTransform = Joint.Parent.GlobalTransform * Joint.LocalTransform;

I have to do this at the beginning for make the bind pose inverse matrices and on the engine cycles for the keyframes interpolation, is this correct?

If this is correct, my problem is calculate the LocalTransform, because for every joint in the file(fbx), I can evaluate the global and the local transformation matrices at a given time for the animations and a "pose matrix" if any, for the bind pose.

If I have a normal object in my engine, this has a position and rotations, I put this object in the "scene" by rotating it and then translating it, so I think I have to do with the joints and my questions are: is this transformation the LocalTrasform I need?

If not, what positions and rotations need I, for relate the joint to its parent?

Because in the file, the global transformations are the same as the world reference in the modeler I use for models, and the locals are transformations relative to the parents, where the origin of the joint is the parent.

I miss something in the way because I tried with both globals and locals to get the correct joints positions and orientations, ignoring the skinning part for now, but are always wrong, only the root joint seems to move correct, the quaternion interpolations works and the timing too.

Maybe you can help me.

Thank you in advance!!!

I made an fbx loader, no problem with the meshes, but if I think in terms of animations, apparently I don't have problems to extract data, but I don't know what kind of information to extract from the file.

Every tutorial or disussion, speaks about a bind pose. Many of these use the concept of local matrix,local transform, global transform, parent transform, ...

I have some problems with this local matrix. I have a number of joints, every joint, except for the root joint, has a parent joint. For what I understood, the parent of the root joint is the world space. Now I have to think about joint spaces, I have to transform the joints in relation with their parents with something like:

Joint.GlobalTransform = Joint.Parent.GlobalTransform * Joint.LocalTransform;

I have to do this at the beginning for make the bind pose inverse matrices and on the engine cycles for the keyframes interpolation, is this correct?

If this is correct, my problem is calculate the LocalTransform, because for every joint in the file(fbx), I can evaluate the global and the local transformation matrices at a given time for the animations and a "pose matrix" if any, for the bind pose.

If I have a normal object in my engine, this has a position and rotations, I put this object in the "scene" by rotating it and then translating it, so I think I have to do with the joints and my questions are: is this transformation the LocalTrasform I need?

If not, what positions and rotations need I, for relate the joint to its parent?

Because in the file, the global transformations are the same as the world reference in the modeler I use for models, and the locals are transformations relative to the parents, where the origin of the joint is the parent.

I miss something in the way because I tried with both globals and locals to get the correct joints positions and orientations, ignoring the skinning part for now, but are always wrong, only the root joint seems to move correct, the quaternion interpolations works and the timing too.

Maybe you can help me.

Thank you in advance!!!