简体   繁体   English

如何填补八叉树移动立方体算法中不同细节级别之间的差距?

[英]How to fill gaps between different level of detail in octree-marching cubes algorithm?

I'm trying to implement marching cubes on octrees.我正在尝试在八叉树上实施行进立方体。 Here is a 2D drawing of what I am trying to figure out, it'll be easier to explain:这是我想弄清楚的二维图,它会更容易解释:

行进立方体 - 八叉树

Each node of the octree represent a square in the plane (or cube in space), and stores a value for the potential on which I run the marching cube algorithm.八叉树的每个节点代表平面中的一个正方形(或空间中的立方体),并存储我运行行进立方体算法的势能值。

Now, the octree isn't built on the data set (the potentials in space), but it is built at runtime to give details wherever I want, and branches can be unloaded / loaded to change detail zones (zoom on the model for example)现在,八叉树不是建立在数据集(空间中的势能)上,而是在运行时建立以在任何我想要的地方提供细节,并且可以卸载/加载分支以更改细节区域(例如缩放模型)

Each node contains 4 references to children, which are a subdivision of the space of the actual node.每个节点包含 4 个对子节点的引用,它们是实际节点空间的细分。 (8 in 3D-space) (3D 空间中的 8 个)

Now, I would like to use a marching cube algorithm to render my mesh (for example, a sphere) with parts that will be more or less detailed.现在,我想使用移动立方体算法来渲染我的网格(例如,一个球体),其中的部分或多或少会有一些细节。

It's pretty easy to do the MC algorithm on a node that contains 4 empty children (I'll refer as empty children as child that only have a potential value, but no other children. they are not drawn on the tree, but they are in black on the right drawing) because I already have my potential values in a square (or cube for 3D space) (orange here) and can create a mesh inside (yellow) with one pass of the marching cubes algorithm在包含 4 个空子节点的节点上执行 MC 算法非常容易(我将空子节点称为只有潜在值的子节点,但没有其他子节点。它们没有绘制在树上,但它们在右图中的黑色)因为我已经在一个正方形(或 3D 空间的立方体)(此处为橙色)中有我的潜在值,并且可以通过一次行进立方体算法在内部(黄色)创建一个网格

Now, my problem is that I can't figure out how to fill the gaps between the so-made meshes.现在,我的问题是我无法弄清楚如何填充如此制作的网格之间的间隙。

My thoughts were to recursively call a GenerateMesh() method in the tree, and each children will return to his parent the useful data so that the parent can fill the gaps, and return the new useful values for his own parent, etc...我的想法是在树中递归调用 GenerateMesh() 方法,每个孩子都会将有用的数据返回给他的父母,以便父母可以填补空白,并为他自己的父母返回新的有用值,等等......

But I can't figure out how to deal with different level of details (for example, the red cell would have to combine meshes from the top-left cell that is a 2x2 grid, and the top-right cell that is 4x4但我无法弄清楚如何处理不同级别的细节(例如,红色单元格必须组合来自左上角单元格的 2x2 网格和右上角单元格的网格 4x4

I've already searched a lot online, but most of the papers I've read on the subjects explain theory and not how to deal with this.我已经在网上搜索了很多,但我读过的关于这些主题的大部分论文都解释了理论,而不是如何处理这个问题。

How could I solve this?我该如何解决这个问题? Do you have any references to detailed ways of doing it?你有没有详细的方法参考?

There is the Transvoxel algorithm ( https://transvoxel.org/ ).有 Transvoxel 算法 ( https://transvoxel.org/ )。 It's a modified version of the marching cubes algorithm that uses addition lookup tables, to create new so called transvoxels for seamless transisions between different LODs.它是 marching cubes 算法的修改版本,使用附加查找表来创建新的所谓的 transvoxels 以实现不同 LOD 之间的无缝转换。 In its current form though, it only allows for seamless transitions between LOD with double/half resolution, so you would still have to deal with that.但在当前形式下,它只允许在具有双/半分辨率的 LOD 之间无缝过渡,因此您仍然需要处理它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM