stevefsp / critterai

Archive of CAINav Project (Inactive)
MIT License
126 stars 75 forks source link

Contour Generation Fails Due to Unexpected Internal Null Region #4

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Issue discovered via user provided source mesh.  So minimal details here.

Symptom: Region generation completes but contour generation fails, returning a 
null contour set.  The failure results in a failure to generate the final 
detail mesh.

The reason for the failure is that there are more contours than there are 
regions, which is a condition rejected by the contour set builder.

Upon investigation it was found that one of the regions contained an internal 
null region, which is an invalid condition.  This resulted in the the contour 
set builder creating two contours for the region.  On for the external region 
boarder and another around the internal null region.

There is no obvious reason the internal null region exists in the first place.  
(It appears the spans in the internal null region should be part of the 
surrounding region.)

Root cause is under investigation. 

Original issue reported on code.google.com by steve...@gmail.com on 28 Jul 2010 at 5:49

GoogleCodeExporter commented 9 years ago
Further investigation indicates the cause cause of the issue was two fold:

Issue:  In some cases the watershed algorithm results in regions that flow 
around small null regions, fully encompassing the null region.

Resolution: Could not figure out a way to updated the watershed algorithm to 
prevent this issue.  Added a post-processing algorithm which detects and 
repairs the issue.

Issue: In some cases contour detection fails to recognize a null region in the 
vicinity of a span, which subsequently allows two regions to be merged, 
encompassing the null region.  The specific detection failure occurs when a 
region only connects to a null region diagonally.

Resolution: Updating the contour detection algorithm would result in too many 
potential side effects.  Instead, enhanced another algorithm which already 
scans for an detects problematic span configurations to detect and correct this 
one as well.

Changes pending check-in.

Original comment by steve...@gmail.com on 11 Aug 2010 at 4:30

GoogleCodeExporter commented 9 years ago
Fixes committed at part of r121 and r122.  Testing still underway.

Original comment by steve...@gmail.com on 13 Aug 2010 at 6:19

GoogleCodeExporter commented 9 years ago
Distributed as part of NMGen-0.2.0.

Original comment by steve...@gmail.com on 31 Aug 2010 at 5:22