Hi,
I'm generating nav meshes of fairly large maps. These can easily reach hundreds of MB. A sizeable chunk of them, however, consists of polygon islands that will never be reachable by the player's starting position.
Is there any good approach to remove them from the nav mesh entirely, in order to reduce size a bit?
I've seen the PruneTool in recast demo, which does something relatively similar with its flood fill algorithm. From what I understand, this simply flags unreachable polys, but does not actually remove them from the mesh, so doesn't appear to impact/reduce the size of the navmesh.
The only way I could think of so far is to 1) generate the mesh, 2) mark unreachable polys, then 3) revisit the original input-data and remove all vertices/tris that are close to the flagged polys, and then 4) re-generate the mesh with the pruned mesh data. I haven't tried implementing this yet, so I have no idea if this would work (it does sound somewhat hack-y); so wanted to check in here first to discuss if there are any (other) ways of achieving this.
Thanks!