To see what formats are supported by Assimp in Panda currently, I simply created an empty “test.txt” file and tried to load it, which led to the following console output:
:loader(error): Extension of file test.txt is unrecognized; cannot load.
Currently known scene file types are:
Bam .bam
Assimp Importer .3d, .3ds, .3mf, .ac, .ac3d, .acc, .amf, .ase, .ask, .assbin, .b3d, .blend, .bvh, .cob, .csm, .dae, .dxf, .enff, .fbx, .glb, .gltf, .hmp, .ifc, .ifczip, .irr, .irrmesh, .lwo, .lws, .lxo, .md2, .md3, .md5anim, .md5camera, .md5mesh, .mdc, .mdl, .mesh, .mesh.xml, .mot, .ms3d, .ndo, .nff, .obj, .off, .ogex, .pk3, .ply, .prj, .q3o, .q3s, .raw, .scn, .sib, .smd, .stl, .stp, .ter, .uc, .vta, .x, .x3d, .xgl, .xml, .zgl
Egg .egg
MultiGen .flt
Lightwave .lwo
DXF .dxf
VRML .wrl
DirectX .x
obj .obj
Also available: .ma .mb
So as you can see, .glb and .gltf are definitely supported. Yet, when I export the cube model in Blender’s default startup scene to .glb, i get this error when trying to load it in Panda:
:assimp(error): GLTF: Unable to read the file header
followed by other errors about being unable to open the indicated file and ultimately:
OSError: Could not load model file(s): ['blenderbox.glb']
similar to the error reported by sazearte.
Then I export that same cube to .gltf format, and when trying to load the resulting model file there are no errors, but all I get then is a ModelRoot node with nothing attached to it; calling ls()
on the loaded model gives this:
ModelRoot blenderbox.gltf
Loading .obj files through Assimp seems problematic too, as I reported here.
And now I see that loaded .x models are scaled by -1 along the Z-axis (so they are rendered inside-out) and have their pitch value set to -90:
ModelRoot blenderbox001.x
PandaNode Root T:m(hpr 0 -90 0 scale 1 1 -1)
GeomNode Cube (1 geoms) S:(MaterialAttrib)
Haven’t tried any other formats yet.