swordlegend / recastnavigation

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

Regions not generated if there are no border regions. #30

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a small flat floor area to generate a nav mesh for
2. Set the bounds of the area to generate for to be larger then the small 
piece of geometry, such that walkable voxels will not be at the "boarder".
3. Generate Data

What is the expected output? What do you see instead?
Notice that regions were never created for the piece of geometry and thus 
no contours and no nav mesh.  It is expected that regions would be 
generated for the piece of geometry.

What version of the product are you using? On what operating system?
r81, WinXP 64bit

Please provide any additional information below.
This issues is arising for me when doing a tiled generation approach much 
like in the demo.  For certain tiles in my test case the walkable height 
field happens to not be at the "border".  It seems that rcBuildRegions 
assumes that border regions will be generated via ln 1173-1176.  Those 
regions are then expanded in the while loop following it.  In this test 
case sense no regions are generated for the borders no regions are 
generated for the entire data set.

Original issue reported on code.google.com by shawnlha...@gmail.com on 7 Dec 2009 at 4:35

GoogleCodeExporter commented 9 years ago
Have tried adjusting the cfg.minRegionSize? Check
http://digestingduck.blogspot.com/2009/08/recast-settings-uncovered.html for
adjusting the value.

Original comment by memono...@gmail.com on 7 Dec 2009 at 4:40

GoogleCodeExporter commented 9 years ago
Just to clarify, the border regions are never expanded.

Original comment by memono...@gmail.com on 7 Dec 2009 at 4:41

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I've not changed the minRegionSize.  If I move the bounds to the edge of the 
geometry 
the generation works correctly.  Might be an issue with the distance 
calculations?  
I'll try and debug it a bit more when I get a chance today and I'll post any 
updates.

Original comment by shawnlha...@gmail.com on 7 Dec 2009 at 4:48

GoogleCodeExporter commented 9 years ago
If you move the border close to the region, the region will have a neighbour 
and it
will not be suppressed because of the small area deletion rule. Try to set the
minRegionSize to zero and see the area comes back to life.

A good minRegionSize is around 20-25 (assuming you have followed the rules of 
thumb
for the settings from the blog), you should keep it at least above 4.

Original comment by memono...@gmail.com on 7 Dec 2009 at 5:16

GoogleCodeExporter commented 9 years ago
That seems to be exactly the issue.  Thanks for reply to this quickly with a 
solution. 

Original comment by shawnlha...@gmail.com on 7 Dec 2009 at 6:18

GoogleCodeExporter commented 9 years ago
Good. I will close this bug as invalid.

Original comment by memono...@gmail.com on 7 Dec 2009 at 6:25