Question relating to the structure of related animations

Hey everyone,

I’ve done my parsing of xml and COLLADA data now and I’m currently writing my ‘translation’ module for turning all my COLLADA data structures into meaningful game data. I’m currently implementing the animation feature for skinned skeletal animation and I have a quick question.

Can I make the assumption that for all animations, the timings that are used are of the same count?

For example, an animation that moves, say an arm during a walking animation has 100 key frames. I.e. The <animation>::<source> for TIME has 100 entries). If I also had a leg moving for the walking animation (separate animation tag) can I assume that this is to have the same number of key framed time entries? (Or do all my examples just have this by coincidence?)

Extension To Question:
Should they have the same key frame count and timed entries if the animation is part of an animation clip?


Answer for Question 1:
NO, but they could.
You should not assume that all animations have the same number of key frames nor each key frame is about the same time apart from adjacent frames.

Answer for Question 2:
NO, but they could.
<animation_clip> could group several <animation> and pick a start and stop frame inside those <animation>

If you encounter a COLLADA document that does not have the same number of key frames. You can definately create a conditioner to add additional key frames by the corresponding interpoluation. Run this conditioner before you parse the document. That way, you might save some work in your “translation” module

Ok, thanks for clearing that up Herbert, I’ll have a look at doing that.