Jump to content
  • Advertisement
Sign in to follow this  
Aquad

Translate animated Meshes

This topic is 4037 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 was wondering how animated meshes are rendered in Directx using X files. I found an article (http://www.toymaker.info/Games/html/load_x_hierarchy.html) which described how to load x files using the DirectX function D3DXLoadMeshHierarchyFromX. Now I'm wondering how I can move these meshes? As far as I understood the tutorial there is an D3DXMATRIX array of bone-matrices after the x file is loaded. What do I have to do to move this model along the different axis? Zerd *edit* Ok, now I read that the whole model will move if I translate the TransformationMatrix of the root frame. How could I miss that? But still I have the problem to translate the mesh. Here is what I do:
D3DXMatrixTranslation(&m_frameRoot->TransformationMatrix, ticks, 0.0f, 0.0f);
DXUTGetD3DDevice()->SetTransform(D3DTS_WORLD, &m_frameRoot->TransformationMatrix);

Any Idea what I'm doing wrong? [Edited by - Aquad on October 2, 2007 9:32:15 AM]

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by Aquad
Any Idea what I'm doing wrong?


Yes, you're doing the programming equivalent of trying to run four consecutive marathons without ever having jogged a few laps around the track.

I say that because it sounds like you don't have an understanding of transformation matrices and how they work at all, but you're trying to render animated meshes which require a thorough understanding of transformation matrices.

Read Chapter 6. Vertex Transformations from my book. It will explain what you need to know about matrices and how to combine them.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!