swordlegend / recastnavigation

Automatically exported from code.google.com/p/recastnavigation
zlib License
0 stars 0 forks source link

Min region setting not removing all regions below that size #71

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Take the supplied 'import.obj' and load into the demo tool
2. Set min region size to 150
3. Build the navmesh data

What is the expected output? What do you see instead?

I expect to see only large regions, but a small region persistst.

What version of the product are you using? On what operating system?

Latest version on x86 vista

Please provide any additional information below.

I've included the import and the export from our tool where I can set the
min region size to very large and it still does not remove the region. I'll
dig some more, but it seems the region removal code is not pruning the data
correctly.

Original issue reported on code.google.com by sbrek...@gmail.com on 20 Apr 2010 at 4:50

Attachments:

GoogleCodeExporter commented 9 years ago
I've found that by duplicating the 'remove when too small' test below the 
post-merged
data inside filterSmallRegions(...) removes more of the items, leaving only a 
couple
of pieces that are near the edge - perhaps this is required? I've attached 
another
obj of the generated nav mesh data with this change. You can see an orphaned 
small
section which has no doubt been merged to another region.

Original comment by sbrek...@gmail.com on 20 Apr 2010 at 5:50

Attachments:

GoogleCodeExporter commented 9 years ago
I think I've seen this happen when a region borders a tile boundary.

Original comment by cameron....@gmail.com on 20 Apr 2010 at 7:50

GoogleCodeExporter commented 9 years ago
I have not had the change to take a look at the mesh yet. Only regions which are
_not_ connected at all will be removed by this code.

This means that if a small area is divided to two because of a hole, then there 
will
be two regions and they will not be removed. The same goes for regions which 
touch
the tile border. Thy may be part of larger area when the tiles are connected, 
so it
is not possible to know of they should be removed or not.

Please note that regions here mean the colored voxel patches.

Original comment by memono...@gmail.com on 21 Apr 2010 at 4:38

GoogleCodeExporter commented 9 years ago
I can understand the limitation in that code. Is that what the boundary flag
represents? I'm hoping to still remove those regions that are made up of 
multiple
tiles if all of the tiles are available, as well as remove regions that are not
seeded with specific tokens, and flood filled.

Original comment by sbrek...@gmail.com on 21 Apr 2010 at 2:32

GoogleCodeExporter commented 9 years ago
I think surface area itself may not be a good way to prune your navmesh. I can 
add
functionality which will floodfill the voxel surface from specified seed 
locations
and only keep the visited cells.

That may still create problem cases if a tile contains only a small piece of 
mesh,
which is not reachable by the current tile's seed point but would be from 
neighbour
tiles seed point.

Original comment by memono...@gmail.com on 21 Apr 2010 at 3:35

GoogleCodeExporter commented 9 years ago
I'm closing this bug as WontFix, as it turned out to be different thing than 
indicated initially.

Original comment by memono...@gmail.com on 8 Jul 2010 at 11:09