Sign in to follow this  
MegaPixel

Question about Animated bones/joints (COG, center of gravity)

Recommended Posts

MegaPixel    241
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 [img]http://public.gamedev.net//public/style_emoticons/default/mellow.png[/img])
- 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 [img]http://devmaster.net/forums/public/style_emoticons/default/mellow.png[/img] ?

Thanks a lot in advance

Share this post


Link to post
Share on other sites
Ashaman73    13715
Normaly all bones will be exported, even when not using them to deform the mesh. Sometimes you need bones as links (i.e. to attach items later in game), as controller (to control other bones) or as connections between deforming bones or just a static bone as root.

When you transform/convert/load your skeleton you can ignore some of them,i.e controller bones, thought some bones are important, like connection bones or static root bones (removing them would result in destroying the hierachy). Either try to analyse the bones and remove them, or use some kind of naming convention, i.e. bones which starts with '_' can be ignored.

Share this post


Link to post
Share on other sites
MegaPixel    241
[quote name='Ashaman73' timestamp='1329982465' post='4915803']
Normaly all bones will be exported, even when not using them to deform the mesh. Sometimes you need bones as links (i.e. to attach items later in game), as controller (to control other bones) or as connections between deforming bones or just a static bone as root.

When you transform/convert/load your skeleton you can ignore some of them,i.e controller bones, thought some bones are important, like connection bones or static root bones (removing them would result in destroying the hierachy). Either try to analyse the bones and remove them, or use some kind of naming convention, i.e. bones which starts with '_' can be ignored.
[/quote]

Yes but why if that bone is not in the animated bone list has animation channels attached to ? Is a nonsense ! ... If I don't understand this It's difficult for me to refactor my file format in a consistent and general way because I don't know what to do in that case ...

Share this post


Link to post
Share on other sites
Ashaman73    13715
[quote name='MegaPixel' timestamp='1329988449' post='4915815']
Yes but why if that bone is not in the animated bone list has animation channels attached to ?
[/quote]
There could be 1000 reasons, you have not even told us which modelling tool, fileformat, exporter you are using. It could be specified in the file format (each bone needs a channel, even if it is not animated), it could be a bug, it could be a feature etc.

The difference between correct and robust software is, that correct software works fine, as long as all external data meets the specifications. Robust software works fine, even if external data are not meeting the specification. You should try to write robust software and just accept, that sometimes data are present, even if it makes no sense in your opinion [img]http://public.gamedev.net//public/style_emoticons/default/tongue.png[/img]

Share this post


Link to post
Share on other sites
MegaPixel    241
[quote name='Ashaman73' timestamp='1330064587' post='4916116']
[quote name='MegaPixel' timestamp='1329988449' post='4915815']
Yes but why if that bone is not in the animated bone list has animation channels attached to ?
[/quote]
There could be 1000 reasons, you have not even told us which modelling tool, fileformat, exporter you are using. It could be specified in the file format (each bone needs a channel, even if it is not animated), it could be a bug, it could be a feature etc.

The difference between correct and robust software is, that correct software works fine, as long as all external data meets the specifications. Robust software works fine, even if external data are not meeting the specification. You should try to write robust software and just accept, that sometimes data are present, even if it makes no sense in your opinion [img]http://public.gamedev.net//public/style_emoticons/default/tongue.png[/img]
[/quote]

Thanks for your reply :D.

I'm exporting from Collada usign ASSIMP as importer library, then from there on I process the data to reflect the file format that I had in mind. I've studied various format.

Someone suggested to me to look at the *.BHV format too for the animations and I did it. The conclusion is that the skeleton can have as many bones as it could and all of

them or just a subset can be animated. So, for what that concern animations I should export just the animation data.
I'm just trying to avoid to wake up one day saying: Oh noo ! that is missing ... and someone else laghing saying: And now where is your god? :D

Share this post


Link to post
Share on other sites
Ashaman73    13715
[quote name='MegaPixel' timestamp='1330077035' post='4916154']
I'm exporting from Collada usign ASSIMP as importer library, then from there on I process the data to reflect the file format that I had in mind. I've studied various format.
[/quote]
When you are already exporting as Collada and then try to convert it in your own format (which is the right way in my opinion !), then I would choose a binary fileformat for your engine alone, no need to convert it in any other known format. This is the way I do it in my engine: A binary, engine specific , fast to load, without any preprocessing format.

Share this post


Link to post
Share on other sites
MegaPixel    241
[quote name='Ashaman73' timestamp='1330143021' post='4916425']
[quote name='MegaPixel' timestamp='1330077035' post='4916154']
I'm exporting from Collada usign ASSIMP as importer library, then from there on I process the data to reflect the file format that I had in mind. I've studied various format.
[/quote]
When you are already exporting as Collada and then try to convert it in your own format (which is the right way in my opinion !), then I would choose a binary fileformat for your engine alone, no need to convert it in any other known format. This is the way I do it in my engine: A binary, engine specific , fast to load, without any preprocessing format.
[/quote]

Yes, I have my own binary format and I studied other formats just to be sure that I've included all the necessary data. Well, I use assimp to load collada just because I'm lazy to write my own collada loader ... I could have been using fcollada too I think.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this