Sign in to follow this  
  • entries
    135
  • comments
    130
  • views
    52446

Adventures in animation

Sign in to follow this  
VisualLR

178 views

So I'm working on getting importing models with full skeletal animation support. I've been doing this for the past couple of days, but mostly I had just been evaluating my options. First I gave Cal3D a try, setting it up was a pain; I'm not fond of DLL's, not for something that's not a plugin to an existing application, I know they're useful in some cases, but if I can avoid them I'm happy, I actually forgot what was the ultimate reason why I decided against it, I didn't like the way it was coded, I didn't like how a model was broken up into many files, just too many negatives. In the end, I decided to go with Microsoft, I mean, I'm already using Direct3D, so why not use their file format?

It took me about 20 minutes to get a hacked in animated character (that completely bypassed my entire rendering architecture), and now I'm working on actually making it conform to the architecture; here's the first thing I saw when I compiled:



This is actually better than I expected, I expected my computer to die a horrible death, but instead I got that! So it's all good, it just means somewhere the data is getting read or written incorrectly and it's jacking up the indices, or the vertices. Shouldn't be too bad to figure out.

Alright, I'm going to keep at it because it's pretty exciting.

Cool, just a few minutes after writing this post I found my error, I forgot to account for the index buffer stride, so after quickly fixing that:



Now, I know that looks weird, but, that's just because I have only converted the geometry over, I completely ignored all the transforms, so every "submesh" is being drawn at the origin (everything has the identity matrix as its transform), so now, it's only a matter of getting the right transforms for each submesh, then I'll have to also get the frame data for the animations and get the bone information as well.

If all goes well, I'll have an untextured, skeletal animated model tomorrow, making it textured is the easiest part, all I need to do is load the textures into the manager and save the handle in the submesh's material, it's so easy, I'll leave it for last.
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now