Hi guys!
First, I’d like to express my appreciation for creating and maintaining this wonderful framework.
So, I’ve run into a bit of a problem. I’d like to create a skeletal mesh (I tried a simple cube) and import it into Panda3D for procedural animation. I’ve tried two approaches: 1. Blender add-on (converting to an egg file) 2. Exporting as gltf.
-
Conversion: I can successfully export the armature and the mesh (which is its child). When I try to create an actor in the script, everything works fine, but I don’t see the mesh. I also don’t see the mesh in pview during export.
-
Gltf: When I try to create an actor, I get the warning: “:Actor(warning): cube.gltf is not a character!”
Can anyone explain how to set up a scene to properly import a skeleton mesh?
Or, for example, share a scene with a default cube and one armature bone in Blender that imports into Panda3D without any problems (with successful actor creation)? Or just a scene with anything.
After searching for a solution for a long time, I decided to look at the “panda3d-gltf” Python library examples… there’s a file called “Fox.gltf” that imported perfectly as an actor in panda3d (with a skeleton, animations, and mesh).
I imported this file into Blender and noted a few key points that helped me:
- The armature must be renamed “root”
- The model must have an Armature modifier, and the model itself must be a child of the Armature (aka “root”)
I think this is clearly written somewhere in the documentation; I just missed it or didn’t understand it.
So, I create the model and armature in Blender, following the two rules above, then export glb, and get an Actor with the ability to create a controlJoint!
P.S. I’d just like to ask more experienced community members to add to or correct my posts, in case anyone else encounters similar difficulties.
Can I ask which egg-exporter you used?
And when exporting via that exporter, did you have all relevant objects (in this case both the cube and the armature) selected?
I don’t use panda3d-gltf myself, but I’d be surprised if it required either a specific name or a parent-child relationship.
I would, however, indeed expect that it would require the the object have an armature modifier, with the armature being a target of that modifier.
But then, perhaps this is related to some difference in exporters, or in the more-recent versions of Blender. I’ll confess that I’m still using old stuff!
To be honest, I used the latest version of Blender and the YABEE exporter. Yes… I know it’s designed for earlier versions
. And yes, I selected both the cube (model) and the armature (skeleton) before exporting.
I want to emphasize! I currently don’t use either YABEE or the panda3d-gltf exporter. I use the built-in glb exporter and get the results I need. I’ll write a more detailed report here later so I don’t rely on my own memories.
Aaah, yeah–that may very well be the reason that it didn’t work! Blender has changed since the older versions, I think!
That’s fair! It’s just that, in the past, we’ve had some people try to use derivatives of YABEE that don’t always produce good results, so I wanted to check, I think.
This I’m glad to read! 