How to change occlusion culling distance?
TheNovaProject opened this issue · 2 comments
Hi! First off I just want to thank you for the plugin, its invaluable to the project I'm working on at the moment and I want to thank you for the contribution.
I just have one query in relation to the occlusion culling setting in project settings, I'm wondering if I can change the distance that it lets levels load in at since my project is fairly openly spaced I'm wanting it to only come into effect maybe 10 levels wide so that the effect wouldn't be noticed as much by the player instead of the 2/3 levels distance at present but I'm not sure if this is something I can change and if it is how I could do so?
Thanks in advance, keep up the good work!
Hi TheNovaProject,
The occlusion culling is just a check (BoxOverlap) to know in which room the player is. And then it set the visibility on of this room and its directly connected rooms (because we see them through the opened doors).
This was done that way because of the specs of the project I had developped the plugin for (it was made of closed rooms).
So, to answer your question, there is no "distance" taken into account for the culling (and therefor no setting for it).
Nevertheless, you can make yourself the occlusion you want depending on, your project.
You have multiple ways for doing it :
- If your project is C++, you can modify the plugin's code directly (and maybe make a PR here to share it)
- You can disable the occlusion of the plugin from the settings, and make your own in your project (C++ or BP)
What is done actually in the plugin is not a "loading/unloading" of the level, but just a visibility toggle of the static actors inside of the rooms (computed during the generation process).
Thus, all of the rooms are already loaded and in memory. Again, this is because of the specs of the initial project (because of the computed navmesh mainly).
I hope htis will helps you in your project 🙂
Just to make an update for future readers, the occlusion distance can now be changed since plugin's version 2.1.0