So i have a procedural scenario, we have connected “rooms”.
Due to the nature of how it is architected, there is a scenario where rooms are inserted /moved randomly on runtime.
I don’t understand how to properly integrate it with recast graph.
I can precalculate the bounds of the graph based on the initial room choice, but this means that the total bounds can be later expanded by randomly inserted ones, how does the recast graph handle it?
Does it recalculate the whole graph, or it only adds missing internal data?
I also tried to set recast graph to high size of over 1000 units, this however leads to insane initialization cost and memory footprint. I was reading on the github implementation of the recast, and it says something along the lines of “voxelizes meshes”, as i understand it is supposed to only voxelize participating meshes, but it seems it is preallocating internal arrays, i guess there is no way around it?
Is the data value based? Is there any optimization i could do? Is there some “flyweight pattern” where only voxels that are needed are allocated?
Event in case of a smaller graph that only encompasses existing room bounds, it would reallocate if the bounds were changed?
Main question is - what should i do, what is the best approach that would allow arbitrary growth of the bounds without massive performance hit?