Known Issues

This page contains known issues with the current implementation of NMGen. The issues are either errors in code (bugs) or situations the NMGen algorithms can't handle (defects in design).

Setting Smoothing Threshold Too High

Setting the smootingThreshold too high can result in malformed regions that result in triangulation and contour matching failures. During testing, the issue exhibited when using smoothing values greater than four.

The problem is caused during region generation.  If there is no border, the smoothed border area ends up becoming a malformed region.

Impact: Low. Haven't found a reason for using a value greater than two.

Workaround: Set the traversableAreaBorderSize to a value greater than zero, or reduce the value of smoothingThreshold.

Triangulation Failure Due to Vertical Region Overlap

In some test cases it was found that a region can form in such a manner that it overlaps itself on the vertical axis. When this occurs, triangulation of the region fails.

This is likely a code defect.

Impact: Low. This issue was only noted during test cases that resulted in a single region for the entire mesh. This is an abnormal case.

Workaround: Add a border that is large enough to prevent the overlap.

Issue Example: The region, shown in red, wraps around and under itself. Triangulation fails.

Large

Workaround Example: A border is added that prevents the region, shown in red, from overlapping itself.

Large

Seams Form When Regions Connect at a Vertical Corner

If two regions connect at a location with a high change in height, and one of the regions wraps the corner of the other region, a seam can form resulting in malformed mesh connections between the regions.

The cause is a design issue with the algorithms, not a code defect. Details are available in the code documentation in the ContourSetBuilder source file.

Impact: Moderate. This problem only appears to occur when using simplified geometries. E.g. A floor plan without walls, such as the one show below. Complex, realistic geometries don't seem to exhibit this issue.

Workaround: Add a border that is large enough to force the regions away from areas with high vertical differentials.

Issue Example: A seam has formed due to two regions meeting near the end of a ramp. There is a high vertical differential, and the red region wraps around the corner of the brown region at the point of high vertical differential.

Large

Workaround Example: Adding a border forces the region connection away from the ramp so that the connection occurs in an area with low vertical differential.

Large

Silent Triangulation Failure

There will always be the possibility of triangulation failures as long as there are floating point errors and the possibility of malformed region contours. This issue is not an issue with triangulation.  Rather it is an issue with that fact that the current design of NMGen results in silent failures. If triangulation of a region fails, the region is just dropped from the meshes.

This issue will be considered resolved if logging is added to NMGen.

Impact: Moderate, since there is no way for the user of the library to auto-detect a failure.

Failure to Locate Correct Vertex Height During Contour Matching

In certain cases triangles in the mesh will contain vertices with a very high y-value such as Integer.MAX_VALUE. This will only happen if contour matching is enabled.

All of the reasons this occurs is not known.  Various causes have been found and fixed.  Others show up from time to time.

Impact: Moderate since it can usually be worked around.

Workaround: Tweak cellSize and traversableAreaBorderSize.

Issue Example

Large