是否可以将 3D 模型导入到 pyglet 中?

发布于 2024-10-08 00:05:48 字数 175 浏览 0 评论 0原文

我和一个朋友正在使用 pyglet 库开发一个用 python 编写的 openGL 游戏。 现在我们完成了地图绘制代码,现在需要导入一些将在地图上显示的模型。显然,除了一些旧的 SVN 代码之外,Pyglet 似乎不支持它(我用 google 搜索了一下,但运气不佳)。有谁知道一个可以导入 3D 模型的好 python 脚本/库吗?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

千里故人稀 2024-10-15 00:05:48

开放资源导入库 (Assimp) 支持约 35 种不同的 3D 文件格式。

它的存储库中有 python 绑定,但我不确定它们是否是最新的且功能完整。尽管如此,assimp 可能还是值得一试(尽管我并不公正,因为我是它的创始人之一)。

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).

〆一缕阳光ご 2024-10-15 00:05:48

有3D模型和3D模型。导入的难易程度取决于模型的复杂性以及模型数据的格式。Blender 包含多个 python 脚本导入模型数据到搅拌机特定的网格中,并导出为其他格式。您可以在那里寻找灵感。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文