The obj2egg included with the SDK does not currently support textures or .mtl files, sorry. You might have more luck exporting via a different format, or using one of the other .obj importers found around the forums.
Or you could compile the latest Git version of Panda from source with the Assimp loader which allows loading .obj files with materials. This is currently experimental.
I would also like to load .obj models with textures. I managed to use treeform’s converter as well as some of the blender exporters to convert OBJs to .egg or .bam which then load properly with textures. I also figured out how to compile panda3d from source with assimp support. However, I don’t know how to load an .obj model using the assimp loader. I assume the assimp loader is not automatically used when I call
In the meantime I tried loading a blender file (a format that assimp supports) with the same command as above and it would not succeed and output a list of formats that panda3d supports. By the fact that this list is much shorter than the list of formats that assimp supports and also the fact that blender files are not supported when using the default loader command, I assume that the assimpl loader has to be invoked in another way. It could also be, that something went wrong during compilation of panda3d with assimp support, but everything seemed fine there. Could somebody explain me how to load obj files using assimp?
In order to activate the assimp loader plug-in, you need to add “load-file-type p3assimp” to your config.prc file.
I’m not sure, but since there are now two plug-ins that can load .obj, you may or may not need to tell Panda to force it to use this plug-in for the particular format using “load-file-type obj p3assimp”. Worth a try if you run into trouble.
I installed panda3d by pip on mac. I modified the config.prc, but nothing happened
Do i need to build panda3d by myself if I want to use assimp for loadModel() function?