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

Export .skeleton with animation ONLY

Post by TheSHEEEP » Thu Aug 23, 2012 11:00 am

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.
0 x
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

Re: Export .skeleton with animation ONLY

Post by Waruck » Thu Aug 23, 2012 5:57 pm

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
0 x

TheSHEEEP
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 972
Joined: Mon Jun 02, 2008 6:52 pm
Location: Berlin

Re: Export .skeleton with animation ONLY

Post by TheSHEEEP » Fri Aug 24, 2012 9:31 am

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.
0 x
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

Re: Export .skeleton with animation ONLY

Post by Waruck » Sat Aug 25, 2012 3:52 am

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
0 x

Post Reply