Sign in to follow this  
Ryder052

ASSIMP aiMesh missing bones

Recommended Posts

Ryder052    284

Hi, I'm working on skeletal animation and got stuck at this really weird issue.

 

Using ASSIMP to import a .dae model.

 

I have loaded the model's bone hierarchy (nodes), but the

mesh->mBones

contains only 10 bones, while there are 29 total. I thought there are only those which are active during the transforms, but nope, that is not the case. Active bones are missing.

 

When reading the scene, I'm using

aiProcess_ValidateDataStructure

Importer throws no errors.

 

The exact problem is I don't have all the aiBone structures needed to obtain bone weights. Is it bad exporting or something else?

 

I'm attaching the object model and the scene. Thanks for all help smile.png

[sketchfab]d03c6f09eb9a4b118f80711a156923cb[/sketchfab]

Edited by Ryder052

Share this post


Link to post
Share on other sites
Misantes    2092

I didn't personally find anything weird in your dae file, though I'm rather new with collada/assimp. However, that said, perhaps try exporting with an .fbx file and seeing if Assimp reads that correctly (offhand, I don't think you'll need to alter your code at all). You didn't mention what program you're using to export, but recently I've had nothing but one headache after another with collada files and blender (and scouring the internet for solutions usually turned up a plethora of similar cases, with few solutions). I'm not discounting user error here, it's likely my fault. Nevertheless, I found the fbx files to be much more idiot-proof.

 

Apologies if this didn't quite answer your question, but thought it would be worth mentioning, if only to rule out coding vs exporting errors.

Share this post


Link to post
Share on other sites
Ryder052    284

Thanks for the input, forgot to mention that I can import the .dae back to 3ds max (that's the software I'm using btw) and everything works just fine. Just the assimp seems to read it wrong. I'm considering recreating the mesh with fewer bones and checking which go missing...

 

I'm afraid fbx is not supported by Assimp. Already tried FBX SDK. Do not touch that.

If anyone could export it from the scene file and get it to load correctly (with more than 10 bones), would be great.

Edited by Ryder052

Share this post


Link to post
Share on other sites
Ryder052    284

Apparently I was using Assimp 3.0. Version 3.1 supports FBX. Maybe the old version is the source of the problem. I'll get back when I get it working.

Share this post


Link to post
Share on other sites
Ryder052    284

Nope, 3.1 doesn't fix anything. Tried FBX version 2013 and collada, same thing. 

Another problem I see is that aiNodeAnim keys are constant for all frames....

 

I'm probably making another model with a really primitive skeleton and go from there.

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