Hey guys
I have a need to remove/cull foliage efficiently inside of a specific volume. I’m making a survival bush-craft game and need to have all the grass and other foliage disappear once I have completed construction of a structure such as a shelter or fire etc to clear the area underneath the structure so the grass etc doesnt poke through and look terrible. Its a very simple idea and i have it working currently but the problem i have is that there is too much of a lag in doing so even on my small test map.
The way I have it working atm is that all structures have a sphere or box collision around them and once the structure is complete I go through all the foliage instances of the foliage actor and check if the location of the instance is inside the bounds of the collision and if they are they are removed. My map is a large open world forest with a ridiculous amount of foliage in it so this system doesn’t work as going through all the foliage instances would basically stall the game.
I was wondering if anyone had any ideas on how to better access the foliage in the immediate vicinity of the player so i dont have to search through every instance on the map. The built in culling for foliage is super efficient so I am wondering if there’s a way to access only the foliage that isn’t culled at that time or something of the like?