Panda3d p3assimp in windows?

Hello, i try to load glb file model in panda3d but i have this error
OSError: Could not load model file(s): [‘mymodel.glb’]

i create config.prc file and i have this :
load-file-type p3assimp

theoretically I should be able to load and display my file in panda3d?
why isn’t it working?
I view an old message on this forum last year, that assimp would be soon integrated to panda3d under windows
Today p3assimp is integrate to panda3d windows version or not ?

Could you tell me which exact version of Panda3D you are using? You can find out with one of the following two pieces of code:

import panda3d
from panda3d.core import PandaSystem

yes i have panda 1.10.0.dev1443

The latest development build is 1.10.0.dev1690 and I know for sure that they are built with Assimp support. Could you update to the latest development build to see if it is still a problem?

ok no problem
I’ll try the latest version, thank you.
I will make you a return

i try with last development version 1.10.0.dev1690
with python 3.7 64bits on windows 10 pro 64bits, i have same error

i upload my glb file
but the file is valid, I can open/modify it with blender and paint3d (1.5 KB)

Does Assimp actually support glb? If it does, it probably needs a newer dev build than what was used by the buildbot.

I think this issue is due to old Assimp in Panda3D.
If my guess is correct, current Panda3D uses repository that does not support GLB.

do you think it would be possible to integrate a more recent version of assimp with panda3d?
as I understand it on your links, this actual version support the 3mf format, I will try with this format for now

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.

You can export EGG files from Blender using YABEE or you can export to BAM using either the BAM Exporter or BlenderPanda. Have you tried exporting non-binary glTF? Also, keep in mind that glTF uses PBR materials, which are not well supported in Panda (e.g., the auto shader does not support PBR).

@Moguri, not sure if your reply is directed at me, but I did say that I also exported to .gltf (non-binary glTF) and that loading the resulting file leads to basically an empty model.

Also, I rarely use Blender (I have my own project, Panda3D Studio, to create models - feel free to check it out some time :wink:), but I used it here to quickly generate some model files of various formats to test Assimp in Panda.

Re-reading your post, I see that you did indeed try non-binary glTF.

While it doesn’t help you now, you may want to keep an eye on this project that includes a gltf2bam utility. This project is not ready to accept arbitrary glTF yet since the code it was based on made a lot of assumptions because it knew the exporter being used.