通用 3D 演示软件的建议框架
我的公司决定我们的技术演示需要一个“通用”演示基础设施,考虑到我可以使用 JOGL 或 OpenGL 编写它并创建我自己的框架,我不想重新发明轮子。但是有如此多的 3D gfx 引擎和如此多的 OpenGL 包装器!
基本上,我们想使用 3D 图形来渲染一些地形并在其上放置简单的模型。 他们的要求是外观漂亮并且跨平台。
基本上,我可以自由决定其遵循的范围和范例,但我在想: - 能够加载 3D 模型并以全屏或窗口模式渲染它们。 - 能够控制摄像机“飞行”穿过最终的场景。 - 能够在所有内容之上显示/隐藏广告牌消息,即固定在屏幕上并始终面向相机的 2D 文本和图像。 - 能够更改场景部分的简单内容,例如使对象出现/消失、更改高光颜色(例如涂成红色)等。 - 我可以选择编写或使用现有的脚本语言来注入事件处理和预编程动画。
示例用例: - 我们公司的某人准备了一些建筑物的地形 3D 模型,本质上是生成一个描述场景及其对象的类似 XML 的文件。 - 然后他继续使用我的程序飞越地形并记录一些“感兴趣的”相机位置。 - 然后,他将其中一些位置绑定到键盘按键和/或现有的 GUI 按钮。 - 他添加了一些浮动文本。 - 他使用我的程序演示了一个演示,加载了他的 3D 模型文件和脚本文件,并且可以开始与观众一起“飞行”,从他选择的一个相机姿势到下一个相机姿势,浮动文本随着他到达和离开而淡入淡出。摄像机位置...当他单击按钮时,地形上的一些建筑物会以红色突出显示...等等。
- 我有一些 OpenGL 和 JOGL,以及 XNA Game Studio 经验。
- 我宁愿使用 Java,这样它就可以尽可能地独立于平台。
我应该怎么办?
My company has decided that we need a "generic" demo infrastructure for our technology demos, given that I can write this using JOGL or OpenGL and create my own framework, I'd hate to reinvent the wheel. But there are so many 3D gfx engines out there and so many OpenGL wrappers!
Basically, we want to use 3D graphics to render some terrain and put simple models on it.
Their requirements are for it to look great and be cross-platform.
Basically, I am free to decide the scope and paradigm this would follow but I was thinking:
- Be able to load 3D models and render them in full-screen or windowed mode.
- Be able to control the camera(s) to "fly" through the resulting scene.
- Be able to show/hide billboard messages on top of everything, i.e. 2D text and images that are fixed on the screen and always face the camera.
- Be able to change simple things about parts of the scene, such as making object appear/disappear, change highlight color (like paint in red), and such.
- I am optionally looking to write or use an existing scripting language to inject event handling and pre-programmed animations.
Sample use case:
- Someone at our company prepares a 3D model of terrain with some buildings, essentially generating an XML-like file describing the scene and its objects.
- He then proceeds to use my program to fly through the terrain and record a few camera positions "of interest".
- Then, he binds some of those positions to keyboard keys and/or existing GUI buttons.
- He adds some pieces of floating text.
- He presents a demo using my program, loads his 3D model file and script file and can start "flying" with the audience from one of his selected camera poses to the next, the floating text fades in and out as he arrives and leaves the camera positions... some buildings on the terrain highlight in red when he clicks a button... etc.
- I have some OpenGL and JOGL, as well as XNA Game Studio experience.
- I'd rather use Java so it can be as platform-independent as possible.
What should I do?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我建议你看看 OpenSceneGraph 或 Ogre。两者都是跨平台 (C++),具有丰富的图形引擎。此外,它们是商业友好的许可证,并且是非常成熟且积极维护的引擎。
我知道 OpenSceneGraph 开箱即用,支持使用一两行代码加载多种模型格式,并且有几个 OSG 库在管理和渲染地形方面已经做得很好。
否则,您将花费 95% 的时间来编写利基引擎,而不是开发可视化功能。
I'd recommend you take a look at OpenSceneGraph or Ogre. Both are cross platform (C++), feature rich graphics engines. Furthermore, they are commercially friendly licenses and are very mature and actively maintained engines.
I know that out of the box, OpenSceneGraph supports the loading of several model formats with one or two lines of code and there are several OSG libraries that already do a great job at managing and rendering terrain.
Otherwise, you'll be spending 95% of your time writing a niche engine rather than developing your visualization capability.
它不是 Java,但您所描述的内容听起来非常接近开源虚拟地形项目。与从更基本的场景图形级别开始相比,您可能会更好地使用添加贡献您开发的附加设施。
It's not Java, but otherwise what you describe sounds extremely close to the Open Source Virtual Terrain Project. You may well be better using that add contributing additional facilities you develop than starting from a more basic scenegraph level.
我建议你使用Ardor3D或JMonkeyEngine 3。Ardor3D对JOGL有很好的支持,它支持Collada格式、地形、高度图,它被NASA和GIS应用程序使用,它不是一个利基引擎。 Ardor3D甚至可以在Android上运行,它是最具跨平台性的3D引擎之一。
我建议您看一下这个在 Ardor3D 中显示程序地形的演示:
http://www.youtube.com/watch?v=bkXFkxrYtLY
I advise you to use Ardor3D or JMonkeyEngine 3. Ardor3D has an excellent support of JOGL, it supports the Collada format, terrains, heightmaps, it is used by the NASA and in GIS applications, it is not a niche engine. Ardor3D even works on Android, it is one of the most cross-platform 3D engine.
I advise you to look at this demo showing a procedural terrain in Ardor3D:
http://www.youtube.com/watch?v=bkXFkxrYtLY