Jump to content
  • Advertisement
Sign in to follow this  
programci_84

[Dx9] Loading And Using An Animation From A Seperate File.

This topic is 2897 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 all,

First of all, the new design of GDNet looks cool :)

Anyway, let me come to my question.

I don't want to use only .X files for animated models in my renderer.

I want that my renderer can load model files and animation files seperately, and use that animation for the model. Just like id Tech 5 engine, you know there're .md5mesh and .md5anim files. Each .md5anim file contains animation data for corresponding .md5mesh model file. But in .X files, animation data is embedded into the file itself.

I've heard a library called "Assimp" (Schrompf is one of it's developers), and it can do the stuff I described above.

How can I add seperate animation file support for my renderer? Are there any examples, tutorials etc. for it?

Any suggestions will be greatly appreciated.

Thx. in advance.
-R

Share this post


Link to post
Share on other sites
Advertisement
You don't say, but I assume you're using a DirectX animation controller. If so, the documentation for ID3DXAnimationController implies you can add your own animations. Note: I've never done that, so I can't give you any advice on that subject. I don't know of any tutorials or articles describing what you want to do, but there is evidence various places that others have done just that. It appears to be a matter of determining the internal format of the DX animation set, converting imported data appropriately and registering the new animation set with the animation controller.

In any case, googling for some of the above terms (particularly "directx animation controller") may provide some help.

Another possibility, if you want to mix and match animation sets from various sources for one particluar model (with a particular bone hierarchy), is to write your own animation controller class as you'll have to ensure an imported animation set is compatible with your model (same hierarchy, etc.). It's not extremely difficult to code the basic functions ( AdvanceTime, etc.) but blending tracks is a bit more difficult.

Share this post


Link to post
Share on other sites
You could download older dxsdk (9.0b) witch has source for "mview" utility. If you didn't know it is x model viewer and it has option to stitch/add animations together from other x files so you can look into how it is done. If you have trouble finding one let me know and i'll upload source files for it if you need it.

Share this post


Link to post
Share on other sites
@Buckeye;
Yeah I'm using ID3DXAnimationController. Your suggestion (using ID3DXAnimationController and registering animations/matrices/bones manually) shows me what exactly I needed. Thank you (also for the link)!

@belfegor;
I've found mview [Mesh Viewer] and it's source. Is that you meant? 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!