Assimp in Panda3D doesn't load model properly

I’m having issues when loading big fbx files. If I load the file with Assimp Viewer, I have the correct bones hierarchy but when I load the model with Assimp in Panda3D some of the bones doesn’t appear in the nodepath.
This is the model loaded with Panda3D and Assimp:
image

This is the expected result (with Assimp Viewer):


As you can see, they’re a lot of nodes that doesn’t load in Panda3D and the same problem happens with other big fbx files.

Thank you! :slight_smile:

Could you share the .fbx file?

Hi! This is not the same fbx file as in the question, but this ones doesn’t work either. I also put a test.py file with the code I used to load the fbx file into Panda3D. All the nodes that should load are in the json file.
example.zip (24.6 KB)

Hi @rdb !
Do you think that this error is from my side and not from Panda3D? Or should I post this somewhere else?
Thank you for your time! :smile:

This is an issue in our AssimpLoader. I think this commit should fix the problem:

1 Like

Wow! Thanks a lot, I will test it as soon as I can!

It’s not working as I expected. At least it displays every mesh now, this is the model node I have with your adjustment :
image

This is what I expect to have:
image

This is a capture from Assimp Viewer (sorry for the sizing, their tool can’t expand :no_mouth: ):

I’m also looking in the assimp_loader code if I can make it works :slight_smile:

Try adding notify-level-assimp debug in Config.prc. You’ll see that the joint nodes are being pruned because the joint tree in Panda normally exists in a separate hierarchy in a PartBundle that is assigned to the Character node, rather than being a regular node hierarchy in the scene graph.

We could import the node that corresponds to the joint but it would not automatically synchronize with the actual joint that exists under the PartBundle hierarchy. Though, if you don’t need this synchronization, it would be possible to add a config setting so that the Assimp loader doesn’t prune these nodes.

To expose a joint as a node, you need to call exposeJoint (and to control a joint by positioning a node, use controlJoint). Though, it would be possible to add a config option to Assimp to set this up automatically.

Oh, apparently there is also an Assimp config setting to disable those weird $AssimpFbx$ nodes from being generated, which we could also expose in Panda.

1 Like