🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Animation Streams

Published March 22, 2010
Advertisement

Animation Streams

After getting the skinning system set up and functional with my scene graph last time, I came to the conclusion that I didn't really have a good, general purpose animation system set up yet. So I started out with some old interpolation code, and generated a few template classes to allow the creation of a contain class (called AnimationStream) and add states to it (called AnimationState). The states each have a time stamp associated with them, and then the AnimationStream class provides methods for selecting a start/end frame and playing the animation.

The whole thing works pretty good now, but it took some work to get the templates to play nice with a static library. I have always liked the concept of templates in C++, but generally tend to stay away since it is takes a certain level of experience with them to make them compile correctly. In this case, I need to explicitly instantiate the templates that I will provide with the engine which isn't such a big deal since I'm currently the only user of my engine (as far as I know anyways - if you use it for something let me know!). It just seems bewildering that in the age of managed languages, fantastic compilers, and all sorts of dynamic languages that nobody has found an easy to use semantic system for C++ templates. I'm sure there are good reasons for the way things are, but come on - someone surely has something better in mind...

Anyways, now that the templated animation streams are working I need to add those to the bone controllers as a means of setting the bone node position and orientation. Since the scene graph already updates the transform matrices, this should 'just work' with the skinning shaders already set up. The final piece to the puzzle will be to aggregate all of the animation streams into the SkinnedActor class to package things up properly, and then I'll be finished with the animation system. Well, at least with the animation playing system - then I need to actually load the model files and parse the keyframe data... I think that won't be too bad of a job though...

I also get the keys to my permanent address in Germany tomorrow. We've been living in a hotel for the past 3 weeks, which gets old really quick with 2 kids and a dog. Soon I'll have my own lair again!
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement