Some things were a bit painful to debug. Looks like the tile stitching needs to be redone at some point in the future. As you can see in the above picture, the navmesh is missing a detail mesh. I have an idea how to make a semi good detail mesh really quickly.
Anyways, once I check in the stuff it means that Detour and Recast APIs will change a bit. I will write migration guide once I have polished the code a bit.
Looking quite promising, Mikko. Is it my imagination or is the resulting navmesh alot more "coarse" coming out of this?
ReplyDeleteYes and no :) The navmesh polys are about the same, there are a couple of extra vertices thought. So the data that is used for most of the operations is about the same.
ReplyDeleteWhat is most different in the above picture is that the detail mesh is missing. Detail mesh captures the height differences on those curved surfaces. The way the detail mesh is currently build is too time consuming for regenerating tiles quickly, but I have an idea how to improve the heigh accuracy and still keep the process really fast.
Yes, it was mainly the top right case that tweaked my "hang on a second" reflex. I'll wait until you're finished then before making stupid remarks about the WIP :)
ReplyDeleteWhy do you need a special detail mesh? Wouldn't it be possible to simply map the query-position on the 2D grids?
ReplyDelete@btolputt, ok :)
ReplyDelete@YAY, that is one potential solution. The problem with that is how to store the heighfield in such case?
Keeping all the tiles uncompressed is too memory consuming. But maybe some kind of cache of currently used layers could work and evict them if not used recently. Or maybe some other format which is much more compressed than the heighfield, like, a triangle mesh... ;)
Anyways, it needs further testing. For example animated character foot planting could benefit from the heightfield data since it can also describe high frequency detail (i.e. discontinuities like stairs). I'm currently trying to get the layer stuff up to the par of the existing solution and then see if it could be improved.
Are your heightfield precise enough to avoid artifacts when used for foot planting ?
ReplyDeleteIt is not going to be as accurate as something you would get from physics raycasts, but it is more accurate than the detail mesh that is stored in the current recast implementation.
ReplyDeleteDefinitely not AAA FPS quality.
This is the reason why we're sticking to exact ground representation in Golaem Path, we need the data for animation.
ReplyDeleteBut there's a tradeoff in memory footprint and the perfs.
google 324
ReplyDeletegoogle 325
google 326
google 327
google 328
google 329
google 330