如何导入对象在OpenGL中,什么文件格式的选择呢?文件格式、对象、OpenGL

2023-09-08 10:38:44 作者:神秘嘉宾

我想创建一个机器人,并希望移动在OpenGL。我将创建模型3DSMAX。 我想知道有关导入和移动它在OpenGL。

I want to create a robot and want to move it in OpenGL. I will create the model in 3DsMax. I was wondering about importing and moving it in OpenGL.

在该格式应该保存我的文件在3ds Max中,这样我可以在OpenGL进口吗?

我应该使用转动或机器人的每一部分保存为一个单独的文件? 是否支持OpenGL支点?

Should I use pivots or save each part of the robot as a seperate file? Does OpenGL support pivots?

推荐答案

OpenGL的具有令人惊讶的一点做的答案。 OpenGL的只用于绘制几何体。它不是一个渲染/游戏引擎/场景图本身。因此加载网和动画这是你应该照顾,随后通知的OpenGL它有什么吸引。

OpenGL has surprisingly little to do with the answer. OpenGL is only used to draw your geometry. It is not a rendering/game engine/scenegraph in itself. Therefore loading a mesh and animating it is something you should take care of, subsequently informing OpenGL what it has to draw.

不过,您可以通过寻找基于OpenGL渲染/游戏引擎/ scenegraphs在那里,已经提供您需要的支持,您的生活更容易一点。但你必须要看看那个自己。然后导出网格以任何合适的格式的引擎支持。 OpenGL的本身不拥有的任何文件格式,您希望使用的相关性。如果您或您的发动机可以对付它,并得到所有相关信息出来,你可以使用它。

You can however make your life a bit easier by looking for OpenGL based rendering/game engines/scenegraphs out there that already provide the support you desire. But you'll have to take a look at that yourself. Then export your mesh in whatever suitable format your engine supports. OpenGL itself holds no relevance to whatever file format you wish to use. If you or your engine can deal with it and get all the relevant information out of it, you can use it.