Archived

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

Small problem with ms3d animation

This topic is 5653 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 have (mostly) solved .ms3d skeletal animation in D3D. My only three remaining problems are: 1. I have been testing my code on Brett Porters bert.ms3d model. It looks pretty good now, but it looks a little funny around the shoulder region when the model jumps (though not when it walks) and it (the whole model) rotates strangely around the z axis when it jumps. 2. Also, the model walks backwards, but when I negate the x (!)translation in the keyframes it walks correctly. 3. I also made an animation with a cube rotating on an arm around the origin. It is supposed to rotate around the z axis but instead it rotates around the x axis. When setting up the transformations I create a matrixfor each bone, relative that I 1. Insert the x axis rotation. 2. Multiply by the y axis rotation 3. Multiply by the z axis rotation 4. Multiply by the translation. Then I create another matrix, absolute, that is the product of relative and the absolute matrix of the parent, if there is one, else it is set to the relative matrix. All the vertices are then transformed with the inverse of their bone''s absolute matrix. When advancing the animation I use quaternions to slerp the rotations and insert that into a matrix. This matrix is multiplied by the translation and then by the relative matrix. Then it is multiplied by the parents final matrix, if there is one, to create the final matrix which is used to transform the vertices. I have decided to write a small tutorial explaining the differences between D3D and OpenGL in doing ms3d animations, but I''d like to get it right first... I realise that this is alot of abstraction but there is quite alot of code and I dont think it would help to post all that... Does anyone know why the models behave like this. I thought that it had to do with translating first and then rotating, but that produces a rather weird model...

Share this post


Link to post
Share on other sites
Does You know any good tutorial about "how to animate ms3d model"?

If does, pleas give me request URL.

I''m waiting for yours TUTORIALS .

Share this post


Link to post
Share on other sites
It''s somewhere in the middle of the page. And yes it''s OpenGL. I have as of yet not found any D3D ms3d animation tutorials (which is why I thought of writing one)

Share this post


Link to post
Share on other sites