Archived

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

constructing ms3d matrices?

This topic is 5984 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

I am writing a game and am using native .ms3d files for my models/animations. I have my program loading in the vertices, normals, materials, textures, groups, and everything else and displaying them fine. I''m even loading in the joints correctly. My problem is constructing the transformation matrices of the individual vertices. Here''s what I''m doing, in pseudocode: mbase = make_base_matrix mbaseinverse = make_inverse(mbase) kfrot = interpolate_rot_keyframes kfpos = interpolate_pos_keyframes mrot = make_rot_matrix(kfrot) mpos = make_pos_matrix(kfpos) mtransformation = mrot * mpos mparent = parent->get_final_matrix mfinal = mparent * mbaseinverse * mtransformation * mbase //mfinal is the one that is sent to its children Why does this not work? I get wierd motions and stuff. My top-level parent object moves pretty much like it should, but all of its children move erratically. Am I constructing the matrices wrongly? ~BenDilts( void );

Share this post


Link to post
Share on other sites