mat4 transformation chain

hi,

i'm having problem to correctly animate separate nodes of a model. the nodes are hierarchically structured, and each node has a "mat4 Transform" (relative to its parent). to animate nodes, each nodes has an additional member "mat4 Animation" (relative to the base transform "mat4 Transform").

to get the final "mat4 world_transform":

Code cpp:

mat4 Node::WorldTransform() const
{
return
m_parent ?
inverse(inverse(Animation) * inverse(Transform) * inverse(m_parent->WorldTransform())) :
Transform * Animation;
}

that works fine, but the "assimp" library i use to load models delivers the "mat4 Animation" as absolute transform relative to the node's parent.

in other words:

--> assimp gives me [Transform * Animation] and [Transform]

--> i want [Animation] only (separated)

how do i do that ??

http://assimp.sourceforge.net/lib_ht...ctai_node.html

http://assimp.sourceforge.net/lib_ht...node_anim.html

beside that:

is it better to pre-calculate all the possible animation matrices for each "key frame tick" or just do the calculations "on-the-fly" ?