Advertisement

Hertel-Mehlhorn NavMesh optimization: Long polygons

Started by February 19, 2011 09:56 PM
0 comments, last by LorenzoGatti 13 years, 9 months ago
l48hH.jpg

I have implemented the Hertel-Mehlhorn algorithm to optimize my navigation mesh. As you can see in the image there are many cells that are long and thin. This happens when I have large open spaces.
Is that a known behavior of H-M algorithm or do I do something wrong? Is it possible to somehow define a maximum width of a cell? Or are there other ways to deal with this?

(Please ignore that the diagonal obstacles produce a pixel-like effect, that's a topic for another post).

Thank you!
Cheers,
Martin
You are applying the Hertel-Mehlhorn algorithm to a starting triangulation that is full of slivers: both the short sides and the long sides are all in the source data.
You apparently fail to merge polygons over what should be collinear segments (for example, each of the rectangular platforms should be one piece): look for accidentally nonplanar geometry (ouch!) or for subtly wrong geometric tests that don't like angles of exactly 180 degrees.

Omae Wa Mou Shindeiru

This topic is closed to new replies.

Advertisement