交互式空间数据可视化的 3D 库建议? [英] 3D library recommendations for interactive spatial data visualisation?

查看:31
本文介绍了交互式空间数据可视化的 3D 库建议?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

随着时间的推移,我们的软件会生成大量经过地理配准和记录的数据.我们正在考虑改进可视化的方法,并在 3D 视图中显示(处理过的)数据,因为它是地理参考的,这似乎是一个好主意.

Our software produces a lot of data that is georeferenced and recorded over time. We are considering ways to improve the visualisation, and showing the (processed) data in a 3D view, given it's georeferenced, seems a good idea.

我正在寻找 SO 的建议,以便在基于 Delphi/C++Builder 的 Windows 应用程序中构建此类可视化时最好使用哪些 3D 库作为基础.我会尽可能增加赏金.

I am looking for SO's recommendations for what 3D libraries are best to use as a base when building these kind of visualisations in a Delphi- / C++Builder-based Windows application. I'll add a bounty when I can.

  • 随着时间的推移(数小时到数天)进行记录并带有 GPS 标记.因此,随着时间的推移,我们有大量数据遵循某个路径.
  • 是空间的:它代表地球的真实 3D 元素,例如陆地,或地球周围物体的 3D 元素.
  • 容量大:我们可以拥有一个点云,比如数十万到数百万个点.处理后的数据可能会显示为从这些点云创建的表面.

由此,您可以看到基于空间的交互式 3D 可视化似乎是一种不错的方法.我正在设想一些您可以轻松快速地在太空中导航的东西,并且数据将根据您正在查看的内容加载或即时生成.我希望我们不要尝试从头开始编写我们自己的 3D 库 - 对于这样的事情,必须有我们可以使用的好的现有库.

From that, you can see that an interactive, spatially-based 3D visualisation seems a good approach. I'm envisaging something where you can easily and quickly navigate around in space, and data will load or be generated on the fly depending on what you're looking at. I would prefer we don't try to write our own 3D library from scratch - for something like this, there have to be good existing libraries we can work from.

所以,我希望有一个支持以下内容的库:

So, I'm hoping for a library which supports:

  • 良好的导航(例如,该库是否仅基于欧拉旋转?您能否选择"对象以进行旋转或轻松移动?);
  • 现代 GPU(仅着色器渲染是可以的;能够连接到管道中以编写将值映射到颜色并动态更改的着色器会很棒 - 认为通过颜色查找表);
  • 动态数据/对象(数据可以随记录添加;如果数据量太大,我们应该可以分页进出或重新创建它们,并且只显示一个明智的子集,以便用户的视口在屏幕上看到的任何内容,但其他数据可以加载/重新生成,最好是异步的,或者至少在用户导航时快速.显然数据创建依赖于我们,但具有钩子的库因为这种事情会很棒.)
  • 在技术上,使用 Delphi/C++Builder 和 VCL.
  • good navigation (is the library based on Euler rotations only, for example? Can you 'pick' objects to rotate around or move with easily?);
  • modern GPUs (shader-only rendering is ok; being able to hook into the pipeline to write shaders that map values to colours and change dynamically would be great - think data values given a colour through a colour lookup table);
  • dynamic data / objects (data can be added as it's recorded; and if the data volume is too high, we should be able to page things in and out or recreate them, and only show a sensible subset so that whatever the user's viewport is looking at is there onscreen, but other data can be loaded/regenerated, preferably asynchronously, or at least quickly as the user navigates. Obviously data creation is dependent on us, but a library that has hooks for this kind of thing would be great.)
  • and technologically, works with Delphi / C++Builder and the VCL.

到目前为止,我考虑过两个主要的图书馆 - 我正在寻找关于这些的知识渊博的意见,或者我没有考虑过的其他图书馆.

There are two main libraries I've considered so far - I'm looking for knowledgeable opinions about these, or for other libraries I haven't considered.

1.FireMonkey

这是 Embarcadero 的新 UI 库,仅在 XE2 及更高版本中可用.我们的应用程序基于 VCL,我们希望将其托管在 VCL 窗口中;这似乎不受官方支持,但 非官方工作正常,或者通过第三方.

This is Embarcadero's new UI library, which is only available in XE2 and above. Our app is based on the VCL and we'd want to host this in a VCL window; that seems to be officially unsupported but unofficially works fine, or is available through third-parties.

UI 框架和 3D 框架与着色器等的混合听起来很棒.但是我不知道这个库有多复杂,它对不是像立方体或球体这样的简单对象的数据有什么支持,以及 它的设计有多好.最后一个链接对库的 3D 方面提出了重大批评 - 严重到我不确定 在撰写本文时的当前状态对于非平凡的 3D 应用程序是否值得.

The mix of UI framework and 3D framework with shaders etc sounds great. But I don't know how complex the library is, what support it has for data that's not a simple object like a cube or sphere, and how well-designed it is. That last link has major criticisms of the 3D side of the library - severe enough I am not sure it's worthwhile in its current state at the time of writing for a non-trivial 3D app.

是否值得尝试使用 FireMonkey 在我们的 VCL 应用程序中编写一个新的可视化窗口?

Is it worth trying to write a new visualisation window in our VCL app using FireMonkey?

2.GLScene

GLScene 是著名的 Delphi 3D OpenGL 框架.我自己从未使用过它,因此对它的工作原理或设计方式没有任何经验.但是,我相信它可以很好地集成到 VCL 窗口中并支持着色器和现代 GPU.我不知道它的场景图或导航是如何工作的,也不知道动态数据的实现效果如何.

GLScene is a well-known 3D OpenGL framework for Delphi. I have never used it myself so have no experience about how it works or is designed. However, I believe it integrates well into VCL windows and supports shaders and modern GPUs. I do not know how its scene graph or navigation work or how well dynamic data can be implemented.

它的功能列表特别提到了一些我感兴趣的东西,比如容易旋转/movement、过程对象(暗示动态数据很容易实现)和用于拾取的辅助函数.似乎着色器只是 Cg(不是 GLSL 或其他非供应商特定的语言.)它还支持对纹理的多态图像支持(允许多种格式以及程序纹理),易于扩展" - 这可能只是意味着许多图像格式,或者它可能表示可以动态更改纹理的内容,例如动态颜色映射.

Its feature list specifically mentions some things I'm interested in, such as easy rotation/movement, procedural objects (implying dynamic data is easy to implement), and helper functions for picking. It seems shaders are Cg only (not GLSL or another non-vendor-specific language.) It also supports "polymorphic image support for texturing (allows many formats as well as procedural textures), easily extendable" - that may just mean many image formats, or it may indicate something where the texture can be dynamically changed, such as for dynamic colour mapping.

这是我所知道的仅有的两个用于 Delphi 或 C++Builder 的主要 3D 库.我错过了什么吗?有我不知道的利弊吗?您是否有将其中任何一种用于此类目的的经验,我们应该警惕哪些陷阱或我们应该了解和使用哪些功能?

These are the only two major 3D libraries I know of for Delphi or C++Builder. Have I missed any? Are there pros and cons I'm not aware of? Do you have any experience using either of these for this kind of purpose, and what pitfalls should we be wary of or features should we know about and use?

我们目前使用 Embarcadero RAD Studio 2010,我们的大部分软件都是用C++.我们有少量的 Delphi,可能会考虑升级 IDE,但我们最有可能等到 64 位 C++ 编译器发布.出于这个原因,在 RS2010 中运行的库可能是最好的.

We currently use Embarcadero RAD Studio 2010 and most of our software is written in C++. We have small amounts of Delphi and may consider upgrading IDEs, but we are most likely to wait until the 64-bit C++ compiler is released. For that reason, a library that works in RS2010 might be best.

感谢您的意见 :) 我追求高质量的答案,所以我会尽可能增加赏金!

Thanks for your input :) I'm after high-quality answers, so I'll add a bounty when I can!

推荐答案

我已经在我的 3D 地理映射软件中使用了 GLScene,虽然它没有达到您正在寻找的程度,但我可以保证它似乎最适合什么你正在尝试做.

I have used GLScene in my 3D geomapping software and although it's not used to an extent you're looking for I can vouch that it seems the most appropriate for what you're trying to do.

GLScene 支持地形渲染和向场景添加可自定义的对象.对象可以交互,您可以使用 GLScene 的各种构建块创建对象的复杂 3D 模型.不幸的是,我无法说明它将如何处理数百万个点,但我知道它经过了相当的优化并且在最少的硬件上表现出色 - 话虽如此 - 我发现的目标 PC 需要能够使用 OpenGL 2.1 扩展的专用显卡或更高(我发现集成显卡的小问题).

GLScene supports terrain rendering and adding customizable objects to the scene. Objects can be interacted with and you can create complex 3D models of objects using the various building blocks of GLScene. Unfortunately I cannot state how it will work with millions of points, but I do know that it is quite optimized and performs great on minimal hardware - that being said - the target PC I found required a dedicated graphics card capable of using OpenGL 2.1 extensions or higher (I found small issues with integrated graphics cards).

我查看的另一个库是 DXscene - 尽管使用 DirectX 而不是 OpenGL,但它看起来与 GLScene 非常相似.从记忆中,这是一个商业产品,其中 GLScene 在 GPL 下获得许可.(编辑 - 该页面目前似乎已关闭:http://www.ksdev.com/index.html)

The other library I looked at was DXscene - which appears quite similar to GLScene albeit using DirectX instead of OpenGL. From memory this was a commercial product where GLScene was licensed under GPL. (EDIT - the page seems to be down at the moment : http://www.ksdev.com/index.html)

GLScene 仍在积极开发中,并提供了一个相当全面的函数库、基础对象和纹理等.旋转、平移、俯仰、滚动、转弯、光线投射等内容都为您提供.为每个基础对象以及查看相机、照明和网格提供了可见性剔除.基础对象包括立方体、球体、管道、四面体、锥体、地形、网格、3d 文本、箭头等等.可以用鼠标拾取对象并沿 1,2 或 3 轴移动.包含帮助函数以自动计算鼠标所在的最顶部对象.可以通过以分层方式将基础对象附加到其他基础对象来构建复杂的 3D 形状.因此,例如,可以使用矩形作为基础对象并在其上为车轮连接四个圆柱体来构建汽车 - 然后您可以将汽车"作为一个整体进行操作 - 因为四个圆柱体连接到基础矩形.

GLScene is still in active development and provides a fairly comprehensive library of functions, base objects and texturing etc. Things like rotation, translation, pitch, roll, turn, ray casting - to name a few - are all provided for you. Visibility culling is provided for each base object as well as viewing cameras, lighting and meshes. Base objects include cubes, spheres, pipes, tetrahedrons, cones, terrain, grids, 3d text, arrows to name a few. Objects can be picked with the mouse and moved along 1,2 or 3 axes. Helper functions are included to automatically calculate the top-most object the mouse is under. Complex 3D shapes can be built by attaching base objects to other base objects in a hierarchical manner. So, for example, a car could be built using a rectangle as the base object and attaching four cylinders to it for the wheels - then you can manipulate the 'car' as a whole - since the four cylinders are attached to the base rectangle.

我可以提请您注意的唯一缺点是有时您可以获得的帮助/支持有限.是的,有参考手册和许多演示应用程序向您展示如何执行诸如选择对象和移动它们之类的操作,但是参考手册并不完整,并且有可能卡住"在如何完成某项任务.论坛支持有限/稀少.如果您对 3D 基础知识和概念有充分的了解,我相信您可以完全理解.

The only downside I could bring to your attention is the sometimes limited help/support available to you. Yes, there is a reference manual and a number of demo applications to show you how to do things such as select objects and move them around, however the reference manual is not complete and there is potential to get 'stuck' on how to accomplish a certain task. Forum support is somewhat limited/sparse. If you have a sound knowledge of 3D basics and concepts I'm sure you could nut it out.

至于 Firemonkey - 我没有这方面的经验,所以我无法发表评论.我相信这更针对硬件要求较低的移动应用程序,因此您可能会遇到较大数据集的问题.

As for Firemonkey - I have had no experience with this so I can't comment. I believe this is more targeted at mobile applications with lower hardware requirements so you may have issues with larger data sets.

以下是您可以考虑的其他一些链接 - 我没有使用它们的经验:

Here are some other links that you may consider - I have no experience with them:

最后一个是针对游戏开发的 - 但可能会提供有用的信息.

The last one is targeted at game development - but may provide useful information.

这篇关于交互式空间数据可视化的 3D 库建议?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆