Skip to main content
GameDev.net gamedev.net
🔒 Locked

Matrix Hell

Started by musikit Aug 7, 2002 at 7:44 AM 0 replies 450+ views
Original Post
musikit
musikit
Hello, I''m working on some skinned Mesh code and i''m using Jim Adam''s code as an example to work from. however i''ve defined my own matrices plus with the one''s Jim uses i''m a little confused about the order that i should be multiplying them in. So here are my matrices matDefScaling; //scaling in case the 3d artist made the mesh too big or too small matScaling; //world scaling matDefRotation; //Rotation in case the 3d artist put the mesh at a wierd angle matRotation; //World rotation matDefTranslation; //translation in case the 3d artist put the mesh in a wierd postition. matTranslation; //World Translation and to avoid gimble lock i''ve been applying them in the order Scaling*Rotation*Translation so matDefScaling*matScaling*matDefRotation*matRotation*matDefTranslation*matTranslation now with the new matrices i have from the skinned mesh in my frame struct i have 3 matrices matOriginal; //the original X file matrix matInherited; //a transform inherited from a parent frame matCurrent; //the current frame transform and as far as i''m to understand skinned meshes matCurrent = matOrginal*matInherited Now in my class that holds data about the individual parts of the skinned mesh (the equivelent to Jim''s sMesh structure) i have some more matrices. The matrices Jim calls m_Matrices; //bone matrices m_FrameMatrices; //frame matrices m_BoneMatrices; //X file bone matrices so i really have 2 questions here. 1. what order do i multiple the matrices to get the disired effect that i''m looking for? 2. what''s the difference between m_Matrices and m_BoneMatrices? i''ve read tutorial and tutorial and example after example i''m still confused. any help is greatly appreciated. thank you

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.