linking skeletal animation files causes bad animations

Anything and everything that's related to OGRE or the wider graphics field that doesn't fit into the other forums.
Post Reply
cyrfer
Orc
Posts: 424
Joined: Wed Aug 01, 2007 8:13 pm
Location: Venice, CA, USA
x 7

linking skeletal animation files causes bad animations

Post by cyrfer »

Hi,
I have several Max files, each containing a single animation meant to be used with the same mesh. My goal is to link all exported animations to one mesh so that I can have a single file with all the character's moves. I've learned that upon export I can separate the .mesh from the .skeleton and .skeleton animations and I'm trying to exploit that to get all the moves linked to one mesh after exporting from each Max file.

So, for each export, I have 3 files (1 mesh, 2 .skeletons, base & animation). I arbitrarily chose one skeleton base file, converted to XML, added extra links for the animations exported from the other Max files, converted back to .skeleton. This allows me to play all the animations for the single character by loading and showing one mesh/Entity. Unfortunately, the animations play differently than when they play with their original skeleton base file. Sometimes they rotate about a point far from their center axis. They play fine when only linked to their original skeleton base.

I assume I need to use the original base skeleton when playing each animation. Is it possible to have a mesh link to multiple skeleton base files? If not, what is the point of the 'animationlink' XML node in the skeleton.xml? I see bad results when using it.

Here are videos showing that I mean:
The good
The bad

User avatar
tuan kuranes
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 2653
Joined: Wed Sep 24, 2003 8:07 am
Location: Haute Garonne, France
x 4
Contact:

Re: linking skeletal animation files causes bad animations

Post by tuan kuranes »

you can add multiple animations to a single base, but they are "relative" to that base.
You cannot choose arbitraly the "base" it has to be the same for all.

cyrfer
Orc
Posts: 424
Joined: Wed Aug 01, 2007 8:13 pm
Location: Venice, CA, USA
x 7

Re: linking skeletal animation files causes bad animations

Post by cyrfer »

Hi Tuan,
Thanks for your thoughts. I also realized this was the problem. My problem is what can I do with the resources I have. Has anyone else faced this issue?

cyrfer
Orc
Posts: 424
Joined: Wed Aug 01, 2007 8:13 pm
Location: Venice, CA, USA
x 7

Re: linking skeletal animation files causes bad animations

Post by cyrfer »

Thinking about this some more...

Because each .skeleton file specifies its own base that the animation is relative to, it seems incorrect to render the animation relative to the base specified in the "top-level" .skeleton file (the one that links to other .skeleton files). The memory requirements to store separate bases would add up quickly, so you would want to transform the key-frame data into the space of top-level base because that is apparently the base being used for rendering. However, this definition might abuse the intention of the 'animationlink' parameter. I admit I don't know what is the definition of that feature.

Post Reply