Should the skeleton joint number match the ...

Cd586a7130b6cb95bed9ae57223fad5c
0
SuperPixel 101 Feb 21, 2012 at 16:30

Hi all,

here is the question that is killing me.

Should the number of skeleton joints/bones match the number of the animated joints/bones (the ones linked to the animation channels) in a given animated skeleton pose ?

I ask this because I often get that the number of the joint skeleton hierarchy are more than the ones that are actually animated by their relative channels (i.e. skeleton joints >= animated joints), when I export the

animation data from a Collada file.

Since I’m trying to define a design for my animation file format, I’d like to understand whether the number of joints in the hierarchy is to be considered different (so greater than or equal?) from the number of the
ones effectively animated through their animation channels.
In the meantime I’m considering them to be different in number, but still !

PS.: I use the Assimp library to extract the animation data.

Thanks in advance

8 Replies

Please log in or register to post a reply.

A8433b04cb41dd57113740b779f61acb
0
Reedbeta 167 Feb 21, 2012 at 17:16

I’m not an expert on skeleton/animation issues, but it sounds like maybe it’s just optimizing out joints that don’t move from their bind pose in a particular animation?

6837d514b487de395be51432d9cdd078
0
TheNut 179 Feb 21, 2012 at 19:17

It depends on your editor. For efficiency purposes only the effected bones will have their channel data exported. You can have up to 3 channels for translation and scaling, and 4 channels for rotation (if using quaternions). That’s 10 channels per bone per keyframe. It adds up. If you take a look at the BVH file format, you’ll understand why efficiency is very important.

Though, why draw the comparison? A skeleton should be independent of its animation data, but it’s animation data should be dependent on its associated skeleton. Once you read in the channel data, just map it to the corresponding bone. Why care if one has more than the other?

Cd586a7130b6cb95bed9ae57223fad5c
0
SuperPixel 101 Feb 22, 2012 at 10:10

@TheNut

It depends on your editor. For efficiency purposes only the effected bones will have their channel data exported. You can have up to 3 channels for translation and scaling, and 4 channels for rotation (if using quaternions). That’s 10 channels per bone per keyframe. It adds up. If you take a look at the BVH file format, you’ll understand why efficiency is very important. Though, why draw the comparison? A skeleton should be independent of its animation data, but it’s animation data should be dependent on its associated skeleton. Once you read in the channel data, just map it to the corresponding bone. Why care if one has more than the other?

I was reading in a book that, in fact, they were saying: “They should match …” … maybe because they wanted to point out exactly what you just told me (i.e. the skeleton data should be independent from the animation data but not viceversa and therefore they don’t match in general ;-) ).
So if it’s true that the skeleton data are independent from it’s animation data, is it a good idea to store the bone name into every bone pose to reconstruct the mapping skeleton bone <-> bone channels ? Or maybe could be more efficient to store the index to a given skeleton bone/joint ?

Btw my animation are fully working I was just trying to refactor the file format.

Thanks a lot for your help

Cd586a7130b6cb95bed9ae57223fad5c
0
SuperPixel 101 Feb 22, 2012 at 11:42

@Reedbeta

I’m not an expert on skeleton/animation issues, but it sounds like maybe it’s just optimizing out joints that don’t move from their bind pose in a particular animation?

yeah that’s correct. The problem is that it wasn’t explained further in that book and I got a bit confused … but yeah the idea is to export just the channels relative to the bones that moves regardless by how many bones a skeleton will have.

Cd586a7130b6cb95bed9ae57223fad5c
0
SuperPixel 101 Feb 22, 2012 at 17:17

I have 28 animated bones (the ones that are supposed to affect the mesh vertices and that should have animation channels associated with themselves) and 29 bones in the skeleton (i.e. 28+a bone called COG), nothing strange.

BUT ! The one named COG (center of gravity) is not supposed to be animated as is not in the list of the animated ones, however why when I export the animation channels I can still find channels associated with the joint/bone COG ???

I know that COG bones are like pivot or something like that … maybe there is something related to that concept that justifies the fact that that bone has to have animation channels ? … If yes and if it’s not affecting any of the mesh vertices, why should be animated ?

To summarize the exporter says:

  • 28 Animated bones that affect the mesh (COG bone is not present, therefore is not supposed to be animated mellow.png)
  • 29 Bones in the skeleton, with one of them being the center of gravity (hence its name “COG”)

If the bone COG can have animation channels as well then that is in contrast with the fact that only animated bones can have animation channels associated with them.

One last note: COG bone is also the root of the skeleton hierarchy.

Could someone shed some light on this :mellow: ?

Thanks a lot in advance

Fe8a5d0ee91f9db7f5b82b8fd4a4e1e6
0
JarkkoL 102 Mar 05, 2012 at 00:47

For animation data, you shouldn’t use indices but export the name of the bone for each animation channel, and map it to the skeleton. There are few reasons for that:
1) you skeleton may change after exporting animations (e.g. artist may add new bones to refine animation), which would require you to re-export all animations.
2) same animation may be used for multiple skeletons with different structures (otherwise you would need to copy animations for each skeleton).
3) like others have said, some non-animated animation channels may be optimized out (e.g. upper-body only animations)

Cheers, Jarkko

Cd586a7130b6cb95bed9ae57223fad5c
0
SuperPixel 101 Mar 05, 2012 at 09:56

Being careful that the array of bones is mapped correctly with the bone indices too, otherwise hardware skinning won’t reference them correctly I guess ! That’s the other problem when you output channels … I guess

Fe8a5d0ee91f9db7f5b82b8fd4a4e1e6
0
JarkkoL 102 Mar 06, 2012 at 21:06

For skinned mesh rendering you don’t need to care about the bone names. It’s only for animation purposes, i.e. your skinned mesh needs to provide which bone name maps to which bone index, so that the animation system knows which bone to animate with each animation channel. Unless if you for some reason export mesh skeleton separately from the actual mesh so that they may be out of sync, but I don’t see why would you want to complicate things like that (you said you use COLLADA format which also stores both vertices & skeleton in the same file). I store mesh vertices + skinning (bone indices & weights) and skeleton into the same file so they can’t go out of sync. Animations are exported separately over long period of time thus require the mapping with names.