渲染大量网格(对象)

发布于 2024-08-05 07:59:30 字数 209 浏览 7 评论 0原文

我有一个项目,希望在 16 平方英里的景观上渲染大量网格。虽然网格并不都是唯一的,但它们有很多(可能只有 1000 个网格,但它们的使用量有数百万次)

我想知道是否有任何论文或(好的)资源涵盖该主题。我找到了大量有关地形/景观渲染的论文,但不知何故未能找到任何有关大量网格渲染的论文。

编辑 我所说的网格是指景观中的物体、建筑物、树木等

I have a project where I am looking to render a large number of meshes over a 16 square mile landscape. While the meshes are not all unique, there are a lot of them (Probably only 1000 meshes but several million usages of them)

I was wondering if there were any papers or (good) resources covering the topic. I have found loads of papers about terrain/landscape rendering, but somehow have failed to find any on rendering of large amounts meshes.

EDIT
By meshes I mean objects on the landscape, buildings trees etc

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

冷血 2024-08-12 07:59:30

要有效渲染包含大量对象的大型景观,需要考虑两个重要方面。一是通过仅绘制从当前摄像机角度可见的内容来最大程度地减少冗余工作,二是最大限度地提高渲染可见内容的效率。

有两种主要方法可以最大限度地减少冗余渲染工作。首先,您要避免绘制相机视野之外的任何内容。这种可见性剔除可以使用各种数据结构来加速:八叉树、四叉树、球体树、bsp 树(通常更适合不太开放的环境而不是景观)等。某种分层场景排列对于加速这种类型也很有用的扑杀。相同的数据结构还可用于跳过屏幕上低于特定尺寸阈值的对象的渲染。

其次,您要避免渲染被较近的对象遮挡的对象。遮挡剔除有许多不同的技术,有些通过遮挡查询使用 GPU 加速,有些则完全在 CPU 上运行。遮挡剔除的值在一定程度上取决于典型的摄像机角度、地形粗糙度和地形上物体的大小。相对平坦、开放的地形,只有小物体或相机主要向下看地面而不是向地平线看,将减少遮挡剔除的机会。场景的某些层次结构将再次有助于遮挡剔除,就好像父对象被遮挡一样,您可以跳过对其子对象的测试。

一旦您最小化了需要渲染的对象集,您就可以将注意力转向最大化可见对象的渲染效率。细节层次技术在这里很有用(远处物体的较低多边形网格)。另一个答案中提到的冒名顶替者技术是另一种有用的方法,用简单的广告牌代替复杂的几何形状。各种实例化几何体的方法也值得追求——现代图形硬件可以通过对图形 API 的一次调用来渲染具有不同位置和其他变化的相同几何体的许多副本。最后,有效使用图形硬件的所有标准技术都适用于此:排序以实现最大渲染效率(在某种程度上依赖于硬件)、最小化每帧的冗余工作、有效地打包几何体、优化顶点和像素着色器等。

提到的每个领域都非常有用。其本身很复杂,有许多论文、书籍和文章详细阐述了细节。希望这里提到的技术足以为您指明谷歌研究的正确方向。

There's two important areas to consider for efficient rendering of large landscapes with lots of objects. One is to minimize redundant work by only drawing what is visible from the current camera angle and the other is to maximize the efficiency of rendering what is visible.

There are two main ways to minimize redundant rendering work. First you want to avoid drawing anything that is outside the field of view of the camera. This visibility culling can be accelerated using a variety of data structures: octrees, quadtrees, sphere trees, bsp trees (generally more suited to less open environments rather than landscapes), etc. Some kind of hierarchical scene arrangement is also useful in accelerating this kind of culling. The same data structures can also be used to skip rendering of objects below a certain size threshold on screen.

Second you want to avoid rendering objects that are occluded by nearer objects. There are many different techniques for occlusion culling, some using GPU acceleration through occlusion queries and others operating entirely on the CPU. The value of occlusion culling will depend somewhat on your typical camera angles, terrain roughness and the size of objects on the terrain. A relatively flat, open terrain with only small objects or a camera that looks mostly down at the ground rather than out towards the horizon will reduce opportunities for occlusion culling. Some hierarchical organization of your scene will again help with occlusion culling as if a parent object is occluded you can skip tests for it's children.

Once you've minimized the set of objects that need to be rendered you can turn your attention to maximizing rendering efficiency for the objects that are visible. Level of detail techniques are useful here (lower poly meshes for distant objects). The impostor technique mentioned in another answer is another approach that can be useful, replacing complex geometry with simple billboards. Various approaches to instancing geometry are also worth pursuing - modern graphics hardware can render many copies of the same geometry with different positions and other variations with a single call to the graphics API. Finally all the standard techniques for efficient use of graphics hardware apply here: sorting for maximum rendering efficiency (somewhat hardware dependent), minimizing redundant work per frame, packing geometry efficiently, optimizing vertex and pixel shaders, etc.

Each of the areas mentioned are quite complex in themselves and there are many papers, books and articles elaborating on the details. Hopefully the techniques mentioned here are enough to point you in the right direction for some google research.

初心未许 2024-08-12 07:59:30

该解决方案称为八叉树Google 图片搜索会让您一目了然地理解这个概念:)

基本上,八叉树将允许您快速消除渲染过程中不可见的网格(因为它们在您身后或太远)。

对于距离很远的网格,您可以预先计算一个降低分辨率的类似网格,这样您仍然可以拥有一个地平线并将其附加到树的节点。如果树的部分有一定的距离,则只需使用缩小的网格而不是高细节的网格。

The solution is called octree. A Google image search will make you understand the concept in a glance :)

Basically, an octree will allow you to quickly eliminate meshes which can't be visible during rendering (either because they are behind you or too far away).

For meshes that are far away, you can precalculate a similar mesh with a reduced resolution so you can still have a horizon and attach that to a node of the tree. If the part of the tree has a certain distance, you just use the reduced mesh instead of the one with the high detail.

柠栀 2024-08-12 07:59:30

我不确定这是否是你的情况,但是冒名顶替者呢?据我记得,人们可以使用 3D 纹理或类似的东西来伪造大量的几何数据。这可能只是您的情况。
它用于渲染森林之类的东西。

I am not sure if this is your case, but what about impostors? As far as I remember, one can use 3D texture or something like that to fake a very large amount of geometry data. This can be just your case.
It is used for rendering of the forests and the stuff like that.

还不是爱你 2024-08-12 07:59:30

“网格”是指景观中的物体,例如建筑物、车辆、树木、灌木丛等?也就是说,您不是在谈论构成地面本身的网格吗?

如果是这样,我认为您需要研究一般的可见性检查,以便在进行地形渲染时,您可以查询给定的网格是否可见或隐藏在山/谷墙后面。

此外,您当然需要研究“实例化”,因此您只需为每个唯一的网格保留一个数据集,并通过将其转换为它出现的每个位置来重复使用它,当然,一旦该位置被确定为可见。

像这样查看论文可能会如果您错过了,也具有指导意义。

By "meshes", do you mean objects in the landscape, e.g. buildings, vehicles, trees, bushes and so on? That is, you're not talking about meshes making up the ground itself?

If so, I think you need to look into general visibility-checking, so that when you have your terrain rendering, you are able to query if a given mesh would be visible, or hidden behind a hill/valley wall.

Further, you of course need to look into "instancing", so you only keep a single dataset for each unique mesh, and re-use that by transforming it into each position it appears in, once that position has been determined visible of course.

Looking at papers like this might also be instructive, if you've missed it.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文