关于八叉树
我正在创建一个类似 Minecraft 的地形引擎,我想知道八叉树到底是什么。通过我的引擎,我将它的每个部分分成块或区域 - 从我读到的内容来看,这与它有关。另外,我想知道指数是否确实可以提高游戏的性能,如果可以的话,提高多少?任何其他提高性能的想法/方法将不胜感激。请注意,我已经包含了背面剔除,并且如果隐藏了框或一侧,则不会显示该侧。
I am creating a Minecraft like terrain engine thing, and I was wondering what exactly octrees are. With my engine I have seperated each part of it into chunks or regions - which from what I have read has something to do with it. Also, I was wondering if indices do increase performance within a game and if so how much? Any other ideas/ways to increase performance would be much appreciated. Note that I have already included backface culling and that if the box or a side is hidden don't show that side.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
阅读这篇关于 FlipCode 的精彩文章
Google 搜索 Octree 和 Flipcode 或 Gamedev.net 将为您提供很多参考资料。
关于性能的想法很难给出,因为很大程度上取决于你在做什么。 (“世界”发生了多少变化,是否有任何物体在移动,您想使用八叉树做什么(可见性、碰撞检测、渲染……)阅读有关 Kd-trees 也是因为它们可能更适合您的问题。
Read this excellent article on FlipCode
Googleing for Octree and flipcode or Gamedev.net will give you a lot of references.
Thoughts on performance are hard to give because a lot depends on what you are doing. (how many changes are being made to the 'world', are there any objects moving, what do you want to use the Octree for (visibility, collision detection, rendering, ...) Read about K-d-trees too because they might be more appropriate for your problem.