I’ve made a procedural dungeon generator based on square tiles. In order to improve performance, I created the actual floor and wall tiles using Instanced Static Mesh Components. The problem is that no navmesh is generated in my levels. After a lot of googling and testing things, I swapped ISMC for regular Static Mesh Components, and I got my navmesh working as I wanted. Of course the next thing I tested was performance on a larger level. Since my test levels were 15x155 and 30x30 tiles, I pumped up the map size all the way to 128x128, and my frame rate went down the drain (from a steady 120 fps with ISMC to around 50-70 fps with SMC, as well as dramatically increasing the time for the dungeon to be ready), and I’m still not dressing up the level.
The following images show the same level (15x15) with different combinations of SMC and ISMC.
First, this is the level with all tiles created as regular Static Mesh Components:
Next, this is the same level using only Instanced Static Mesh Components:
Finally, I tested making the rooms into SMC and the corridors as ISMC, and the results were even more baffling:
As you can see, the vertical corridor at the right doesn’t get any navmesh at all, while the horizontal corridor gets it, but it’s disjointed from the room to the right.
Note that my Navmesh Bounds Volume exists in the persistent level, but it gets automatically resized in a constructor using the map size and tile size data so it fits the entire area where the tiles can be present.
The last thing I tried was an empty level with just a test actor with a Navmesh Bounds Volume, an SMC and an ISMC with a manually added instance, both with the same mesh I’m using for my floor tiles. This resulted in navmesh being generated on top of both tiles. This leads me to think the problem is not with ISMC and Navmesh not playing together, but related to run time instance addition not paying along with Navmesh. Just now, I took this test a step further and added two more instances programatically, one from the construction script, the other from Begin Play event. They all got their navmesh generated properly.
I would appreciate any advise you could provide to help me get my dynamically created ISMC working with Navmesh.