Jump to content
  • Advertisement
Sign in to follow this  

Need help with DX Animation library

This topic is 5232 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 need some help in setting my animation library using DX animation library as a backbone. I'm using DX 9.0c. The goal: Use separate .X files for models and animations. The model file would be tiny.x with no animation sets. The animation files would be tiny_wave.x, tiny_walk.x, etc... The approach: 1) Load tiny.x model using the process used in SkinnedMesh and MultiAnimation samples. I'm only using fixed-function indexed skinning technique. This works fine right now with tiny_4anim.x file. So it's not a skinning problem. 1a) Tiny.x contains the frame hierarchy with FrameTransformMatrix, the mesh data, and the others, with no animation set data. 1b) Tiny_wave.x, tiny_walk.x, etc... contain the frame hierarchy with no FrameTransformatMatrix data and one animation set data. The frame hierarchy was needed for the file to be loaded. 2) After loading the animation-less tiny.x file, I load tiny_wave.x using D3DXLoadMeshHierarchyFromX. I'm using the same ID3DXAllocateHierarchy class as loading the model. Let's call the new animation controller, pTempAC, and the animation controller the model is using, pModelAC. 3) It seemed to load fine, so I'm requesting the animation set from the animation controller I got from the previous step. I register this animation set using pModelAC->RegisterAnimationSet(). And unregister pTempAC->UnregisterAnimationSet(). I set the track and enable the track correctly on pModelAC. 4) It seemed like it should work, but when I play the animation, nothing is moving. One debugging approach I tried to create a new ID3DXAllocateHierarchy that will not create new frames inside of CreateFrame(), but return the existing frame with the same name from the original model frame hierarchy. But this doesn't work because after the first frame, which is the root in all the cases, DX wipes out the siblings and children frame pointers. So the second time around, the root has no siblings or children. One thing I don't understand is how animation sets are associated with frames. Or even how animation controllers are associated with frames. Maybe I'm storing wrong type of data in my separated .X files. Got any ideas besides having all the animations in one file? There's a related thread, but not much help in depth. http://www.gamedev.net/community/forums/topic.asp?topic_id=217123&forum_id=10 Thanks in advance.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!