Individual skeletal animation files

aeyr

14-12-2006 02:50:57

Individual skeletal animation files are currently implemented as a sort of file-in-a-file to provide bone-checking requirements. This is a poor way to go about it for several reasons:

1. You require the extra OSMAnimSerializer that does nothing but check bone counts before delegating the "real" work to the Ogre::SkeletonSerializer.

2. The serialization cannot be done in Eihort because of (I assume) changes to endianness checking. It now requires that the stream be at position 0 when checking, and this fails for the file-in-a-file because the start position isn't 0.

3. The skeleton files can't be used by themselves, only with the OSM scene loader or a copy of OSMAnimSerializer.

I think the best way to go about this is to use Linked skeletons (i.e. Skeleton::addLinkedSkeletonAnimationSource() http://www.ogre3d.org/docs/api/html/cla ... keletona29).

That way you:

1. Get bone count checking
2. Get Bone handle identity checking
3. Any other skeleton-linking constraints that are added in the future. ;)
4. Allow scaling adjustments per-linked-animation
5. The animation files are truly stand-alone so you can load them in ogre without any extra overhead if required (for instance, in an animation previewer tool).
6. Animations can be removed by simply unloading the linked animation.

The OSM scene loader could then just link the skeletons rather than try to load into a single monolithic one.