RecastNavigation中solomesh和tilemesh的区别

看了一下网上说的:

  • Solo Mesh,纯粹的邻接凸多边形集合
  • Tile Mesh,基于tile划分的N个邻接凸多边形集合
  • Temp Obstacles,支持动态障碍物的,基于tile划分的N个邻接凸多边形集合

看完了感觉这个基于tile划分的概念,不是很清楚。
看到网上的一个回答:
Solo mesh builds one big mesh. Tile mesh builds it up out of lots of little tiles. Good if you want to build your world dynamically. Don’t know which is faster on query.
If you want temp obstacles look at the temp obstacles example. I’m pretty sure Mikko said he wanted to remove solo mesh from the demo at one point, so I wouldn’t bother with it.

也就是说,solomesh是直接生成一个大的mesh,而基于tile的是,生成一小块一小块的凸多边形,再把它们连接起来。

具体什么是TIle,tile有什么用,可以看这篇文档
https://blog.csdn.net/u013272009/article/details/80281642

tileSize 和cellSize 的区别
两个参数都是在生成导航网格时,进行配置的参数。
cellSize:由于Recast过程是将obj模型体素化的过程,体素,作为一个正方体,cellSize对应的是该正方体在世界坐标系长度下的边长,所以cellSize越小,代表导航网格的精度越高,对应的运算量也越大。
tileSize: 我在论坛上看到了谷歌上mikko关于这个问题的回复,我的理解是,tileSize是关于导航网格中的tile大小的参数设置,tileSize代表着tile在x、z方向上的体素的个数,举个例子
假定cellSize =0.5f, 如果想要在世界坐标系中设定tile的长宽都为50, 那么tileSize = 50/0.5f =100。

原论坛地址如下
https://groups.google.com/forum/#!topic/recastnavigation/l4Sr5TjwNtQ

具体的,我还有疑问,如果cellSize不变,tileSize增大,导航网格的精度是变大还是变小呢?

posted @ 2019-08-20 14:58  弹吉他的小刘鸭  阅读(684)  评论(0)    收藏  举报