This topic is now archived and is closed to further replies.


3dsmax Matrix and hierarchy

Recommended Posts

zarma    122
Hi. I''m trying to export 3DSmax keyframes and hierarchy with an export plugin. The retrieved hierarchy is good. But the way I compute matrices doesn''t work. The playback result isn''t the same as 3DSmax. Can someone explain me what I''m doing wrong. I compute the offset matrix for each mesh that way: Matrix3 xtempi=node->GetNodeTM(0); xtempi.Invert(); tm=node->GetObjTMAfterWSM(0)*xtempi; I multiply each vertex from the mesh by this matrix. I store the resulting vertex. I sample the animation key frames and get the animation matrix this way: tm = node->GetNodeTM(t) * Inverse(node->GetParentTM(t)); decomp_affine(tm, &ap); Point3 pos = ap.t; Vertex vtpos; vtpos.x=pos.x; vtpos.y=pos.y; vtpos.z=pos.z; // vtpos is the sampled translation vertex // I do the same to get scale factors and rotation quaternion For playback animation, I do this way: - I build the matrix with translation/rotation/scale information from the sampled animation - I multiply this matrix with the parent matrix (if any) - A call to glMultMatrix to draw the object - I send it to the childrens to compute their matrix Thanks for your advices.

Share this post

Link to post
Share on other sites