Creating an animation system

Started by
0 comments, last by dpadam450 14 years ago
I don't know whether this was the right forum or not. If not, I apologize. I'm trying to create an animation system for my game project and since it's supposed to be a RPG of some kind I will have rather many characters in game at the same time, both some that need their own instance of the animation and some that will share one, like guards. I'm quite unsure of how this stuff really works and I haven't been able to find much about it so my questions are: 1) Should I create an animation controller which I would just need 1 instance of that will do all calculations for all the animations/animation instances? 2) I'm currently loading animations from a file and since I need several instances of the same animation should I have 1 animation which mustn't be changed and then clone all the instances from it? 3) What would I need for each animation instance? A set of bones with their respective keyframes that will be advanced through time by the Animation Controller? So my whole structure is an Animation Controller to do the calculations, a set of Animations which contains the length of them, all keyframes, name of the animation etc. Also there'd be the Animation Instance structures which should contain a reference to the Animation (to make the Animation Controller able to access the animation keyframes etc) and a set of matrices representing the current transformation. What are your thoughts on this?
Advertisement
Get one mesh animating first.

Quote:Should I create an animation controller which I would just need 1 instance of that will do all calculations for all the animations/animation instances?


Sure. Just have the instances have a pointer to that animation controller. You can pass variables like what keyframe you want it to compute, a blend factor if you are blending keyframes.

Quote:What would I need for each animation instance? A set of bones with their respective keyframes that will be advanced through time by the Animation Controller?


Your set of bones are just matrices. So you will need to compute a new matrix for each bone every time you draw a new version of your model. Again the way I do it is all the instances call on the animation controller to compute new matrices.

NBA2K, Madden, Maneater, Killing Floor, Sims http://www.pawlowskipinball.com/pinballeternal

This topic is closed to new replies.

Advertisement