1

For Windows there are many tools for extracting 3D data from programmes by intercepting the OpenGL data (e.g. 3D Ripper DX, glintercept, Ogle, OpenGLXtractor, HijackGL).

Are there any similar tools for Linux? If not, would it be possible to make one? (and if would anyone be interested in starting an open source project with me?)

I will actually automate the process, but that is another story.

4

1 回答 1

3

首先警告一句:OpenGL 不是场景图。OpenGL 中没有“场景”或“对象”(物理意义上的)这样的东西。OpenGL 所做的只是在场景中绘制点、线和三角形,一次一个,并且彼此独立。所以拦截OpenGL绘图调用来提取对象本质上是不可靠的。话虽这么说,大多数使用 OpenGL 的程序都以某种方式执行此操作,使得提取渲染的几何图形并将其解释为对象实际上是非常可行的。

我的黑客空间的另一位成员编写了一个用于拦截 OpenGL 调用以提取网格的工具(最初的用途是让我们可以在 RepRap 上 3D 打印游戏资产和类似内容)。这个工具的源代码可以在这里找到https://github.com/mazzoo/ogldump

但是ogldump非常有限。它不支持顶点缓冲区对象 (VBO),交错的顶点数组会搞砸事情,像着色器和通用顶点属性之类的东西是完全闻所未闻的。如果您愿意,请随意修补它。

于 2013-07-25T09:07:52.973 回答