Jump to content

  • Log In with Google      Sign In   
  • Create Account


Assimp only importing some bones?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 Conoktra   Members   -  Reputation: 137

Like
0Likes
Like

Posted 10 July 2012 - 10:59 AM

Hello!

I have written a tool based off of Assimp that converts collada/fbx models to a custom format. For some reason assimp is omitting some of the mesh's bones from the aiMesh::mBones list, but they still appear in the aiScene::mRootNode node tree. This causes my converter to mangle the bone tree structure, because some of the bone's parent bones don't appear in the aiMesh::mBones list!

Here is an example. The "RiggedModel_Final_FootNull" gets omitted from the aiMesh::mBones list but its children are not. Why does assimp do this and how would I fix it? It would be great if assimp would store all bones in the bone list.
<node name="RiggedModel_Final_FootNull" id="RiggedModel_Final_FootNull" sid="RiggedModel_Final_FootNull" type="JOINT">
				  <matrix sid="matrix">-0.059679 -0.519840 0.852176 6.103344 -0.147692 0.848900 0.507499 -0.000000 -0.987231 -0.095573 -0.127438 -0.000000 0.000000 0.000000 0.000000 1.000000</matrix>
				  <extra>
					<technique profile="FCOLLADA">
					  <visibility>1.000000</visibility>
					</technique>
				  </extra>
				  <node name="RiggedModel_Final_Outtue_L" id="RiggedModel_Final_Outtue_L" sid="RiggedModel_Final_Outtue_L" type="JOINT">
					<matrix sid="matrix">0.922692 0.327107 -0.204061 1.479940 -0.312313 0.944503 0.101859 0.000000 0.226055 -0.030253 0.973645 0.000000 0.000000 0.000000 0.000000 1.000000</matrix>
					<extra>
					  <technique profile="FCOLLADA">
						<visibility>1.000000</visibility>
					  </technique>
					</extra>
				  </node>

I really appreciate any and all help!

Thanks.

Edited by Conoktra, 10 July 2012 - 11:01 AM.


Sponsor:

#2 wolfscaptain   Members   -  Reputation: 200

Like
0Likes
Like

Posted 11 July 2012 - 07:21 AM

Nodes are not necessarily bones.

Are you getting the bones from all the meshes in the scene (if there are more than 1)? for some reason I don't understand Assimp doesn't save the whole skeletal structure, but rather splits all the references throughout the meshes.
This means that you will have to figure out what the skeleton really is, because it does not have to be equal to the node hierarchy started with mRootNode.

Here are two links that talk about this in addition to some other animation related stuff:
http://gamedev.stackexchange.com/questions/26382/i-cant-figure-out-how-to-animate-my-loaded-model-with-assimp
http://ephenationopengl.blogspot.se/2012/06/doing-animations-in-opengl.html

#3 Conoktra   Members   -  Reputation: 137

Like
0Likes
Like

Posted 11 July 2012 - 09:54 AM

Nodes are not necessarily bones.

Yah, I kinda put 2+2 together and figured that out (some nodes are linked to bones others are not, but all nodes can have channels. So what is the difference between a boneless node and a weightless bone, you may ask? Well, I would like to know the answer to that myself xD). I just wish the assimp team could put some half-decent documentation up, it would sure save a bunch of people a lot of time.

Anyway, thanks for the help :)

#4 larspensjo   Members   -  Reputation: 1526

Like
0Likes
Like

Posted 13 July 2012 - 05:05 AM

For some reason assimp is omitting some of the mesh's bones from the aiMesh::mBones list, but they still appear in the aiScene::mRootNode node tree.

Each mesh has a list of bones. This list only consists of the bones that define weights for this specific mesh. You don't want to maintain weight lists for bones that are not used. And some bones are used in more than one mesh.

I documented my experience using Assimp and animations at Doing animations in OpenGL, I hope it can help you.
Current project: Ephenation.
Sharing OpenGL experiences: http://ephenationopengl.blogspot.com/




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS