Jump to content
  • Advertisement
Sign in to follow this  

Swapping Multiple X Meshes WIth Animation

This topic is 3685 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 guys, I have an interesting situation with my player--The player has several animations animated with slightly different rigs (the idle, run, and jump animations were on the original rig, newer animations required a better rig). Previously I've loaded the mesh from the first animation as the base mesh, and then added the AnimationSets from the other animations to the base mesh's AnimationController. I then made a tool to merge AnimationSets from separate files into one .X file, again using one of the files as a base mesh. This works fine, except for the differences between rigs. If I use the original rig as the base mesh, I lose facial animation. If I use the newer rig I get slight deformations in the face. The system I'm working on now loads a merged .X file for each rig (one file with the old animations in it, one with the new facial rig animations). My original plan was to keep one AnimationController with all of the animations in it and then switch meshes when swapping to an animation using a different mesh. When I tried this, only the animation from one of the files worked. I'm cloning both the animation controller and the whole frame hiearchy for each mesh. I've tried everything I can think of to try to get this to work. I've tried saving each file's loaded animation controller with the mesh and swapping animation controllers out. I've tried merging all of the mesh's animations together and then cloning that to each mesh's storage. I've tried calling D3DXFRAMERegisterNamedMatrices() in every case--this fails when I try to register the second mesh with the animation controller, which is why I tried registering with separate animation controllers and swapping them. The problem is usually that animations will play for the last mesh loaded, but not for any others (which seems screwy considered each mesh is loaded separately and animation controllers are also save separately). But no luck so far. Any ideas? Am I approaching this right? Thanks.

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!