Jump to content
  • Advertisement


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


3dsmax Matrix and hierarchy

This topic is 5206 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!