Question

Me and a friend are working on an openGL game written in python, using the pyglet library. Now we finished the map drawing code, and have come to a point where we need to import some models that will be displayed on the map. Pyglet doesn't seem to support it, apart from some old SVN code, apparently (I googled a bit around with not much luck). Does anyone know a good python script/library that can import 3D models?

Was it helpful?

Solution

Open Asset Import Library (Assimp) supports ~35 different 3D file formats.

It has python bindings in its repository, but I don't know for sure if they're up-to-date and feature-complete. Still, assimp might be worth a try (even though I am not unbiased since i'm one of its founders).

OTHER TIPS

There are 3D models and 3D models. The ease of import will depend on the complexity of the model and which format you have the model data in. Blender includes several python scripts to import model data into blender specific mesh, and export to other formats. You can look there for inspiration.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top