gpt4 book ai didi

opengl - 转储正在运行的 Direct3D 或 OpenGL 应用程序的 3d 几何数据

转载 作者:行者123 更新时间:2023-12-04 12:12:06 25 4
gpt4 key购买 nike

对于我的一个涉及 3d 打印机的业余爱好项目,我想从各种计算机游戏中捕获 3d 模型。这些游戏在 Windows 上运行,通常使用 DirectX9,但也有一款可以配置为使用 OpenGL。

是否有任何工具/软件可以让我从正在运行的应用程序中获取整个场景并将其转储到可以转换为一些流行的 3d 格式(如 OBJ)的文件中?

我只需要几何图形;点、边、多边形。我不需要纹理或着色器数据。这可能吗?

最佳答案

Is there any tool / software which allows me to grab an entire scene from a running application and dump it into a file that can be converted into some popular 3d format like OBJ?



是的,也不是。拦截发送到 OpenGL 或 Direct3D 的数据是完全可能的。问题是,OpenGL 和 Direct3D 都不是场景图。他们正在绘制 API,所以你最终得到的是一堆绘制命令。

这些束不一定是每个对象或整个对象。例如,在现代游戏中绘制角色发生在多次传递和块中(面部动画需要比 body 其他部分更复杂的着色器)。

从技术上讲,您可以假设顶点数组或顶点缓冲区对象至少包含整个对象,因此基于 glDrawElements 或 glDrawArrays 调用和使用的顶点数组指针或 VBO 偏移量转储对象是合理的。

然而,立即模式是一个亮点:你没有丝毫的信息,什么时候呈现。从技术上讲,您可以使用调用的时间和顺序尝试一些启发式方法。但那是徒劳的。

Is there any tool / software which allows me to grab an entire scene from a running application and dump it into a file that can be converted into some popular 3d format like OBJ?



在我本地的黑客空间,一个非常基本的 OpenGL 拦截器就是为这个任务编写的。我们遇到了我提到的所有问题。

关于opengl - 转储正在运行的 Direct3D 或 OpenGL 应用程序的 3d 几何数据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8721291/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com