Export .skeleton with animation ONLY

The place for artists, modellers, level designers et al to discuss their approaches for creating content for OGRE.
Post Reply
TheSHEEEP
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 972
Joined: Mon Jun 02, 2008 6:52 pm
Location: Berlin
x 65

Export .skeleton with animation ONLY

Post by TheSHEEEP »

Hey there,

We are currently testing different exporters, and right now we use OgreMax, because so far, it is best (even if animation export is very, very slow).
We also figured out how to export a base .skeleton containing the bone assignments and extra .skeleton files that contain one animation each.

Now the problem is that those animation-.skeleton-files also contain the full bone assignments (I checked with OgreXMLConverter).
This seems rather wasteful, as the bone assignments are already in the base .skeleton file. Given, it's only some kB, but it adds up fast.
We will only use the animations in combination with the base file, so we definitely don't need the bone assignments in each file.
Also, we want all animations to remain valid, even if the bone assignment of of character changes (I know, the result might look different, but it should still work).

So, is there any way to remove the bone assignments from the .skeleton files that include one animation each?
I don't care if we have to use some converter after export, or if this is possible from within Ogremax or another tool. I'd just like to know if this is possible and how :)

One possible way would be to convert skeleton to XML, remove everything but the animation, and convert back to skeleton. But I'm not sure if that would even work.
My site! - Have a look :)
Also on Twitter - extra fluffy
User avatar
Waruck
Goblin
Posts: 210
Joined: Mon Dec 12, 2011 12:52 pm
Location: Germany
x 34

Re: Export .skeleton with animation ONLY

Post by Waruck »

the .skeleton file should contain:
- the list of all bones including their binding-position
- the bonehirarchy
- all animations that this skeleton should be able to play

Ogre loads an Ogre::Skeleton from a single .skeleton file so you should have all animations that you want this skeleton to have in a single .skeleton file.

I've never tried to share animations between different skeletons (which can get ugly pretty quickly if the order of bones is changed etc.), but if thats what you want to do my idea would be to use different files to store animations and write an import-class/function that creates animations from this files for existing skeletons in ogre.
Look into Skeleton::createAnimation() and Animation::createNodeTrack() for that matter
TheSHEEEP
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 972
Joined: Mon Jun 02, 2008 6:52 pm
Location: Berlin
x 65

Re: Export .skeleton with animation ONLY

Post by TheSHEEEP »

Yeah, that's what I feared.
We'll have a talk in the team (the one I work at in Berlin, not Ogre team ;) )if we want to spend the time on doing it ourselves or if we simply live with the added 10-20kB per animation. :)

But if we do it manually at some time, I'll propose to make this change public, as I think this would be generally interesting for the community.
My site! - Have a look :)
Also on Twitter - extra fluffy
User avatar
Waruck
Goblin
Posts: 210
Joined: Mon Dec 12, 2011 12:52 pm
Location: Germany
x 34

Re: Export .skeleton with animation ONLY

Post by Waruck »

If you plan about giving back to the community I suggest that you use an existing animation data-file, like .bvh, and write an ogre-importer for it. That's something that should be really useful to the community.

Though a .bvh also contains the binding-position and bone-hirarchy at the beginning of the file
Post Reply