Hi!
I’ve got the sub-urban neighborhood with about 60 houses. Each with gardens, furniture and stuff on the ground floor. The player must be able to get close to the houses and look inside.
Each house consists of about 30 objects (many with texture atlases). Reducing the complexity of the houses is not really an option I’m afraid. Further optimizing would be an option, but there’s not enough time to do this.
Running without OC the maximum draw calls runs up to about 4000 (it’s only meant to run on high-end gaming pcs) and the FPS fluctuates between 100+ and 5 when walking around.
Turning on the OC (occluder 3m, hole 0.5) pushes the fps down to less than 5 fps. From the preview window it is clear that the continuous turning objects on and off slows down the CPU way too much.
I’ve tried a sort of manual OC where your position (devided in zones) determines which blocks of houses are rendered, but that only increases performance a little compared to the automatic OC.
Anyone have any idea to boost the performance either using some smart setting of automatic or manual OC or any other technique?
Cheers!
MArco
OC is not good because use of CPU to calculation.
I recommend you to use these options:
- Per-Layer Camera Culling (Works natively in unity and suitable for any platform)
- Make your houses as billboard. You can find billboard maker tools in asset store. Billboards is not good for mobile.
Make sure that only large items are marked as occluder static, like the houses and walls.
Also, does the slowdown only occur when the visualization is shown?
Hi!
The slowdown is not only when the Visualization is on. Unfortunately.
As each house consists of several large (baked together) meshes there are no real small objects. The houses consists of a few meshes (to preserve quality) for the house itself and basically cover a comparable area as the total house. The furniture is all baked together and thus is a single object that almost covers the same volume as the house.
This is just a suggestion:
What you could consider is adding “occlusion planes” to the scene. These are planes, marked as occluders. These would be the only occluders in the scene. You would have to place them in the houses where the walls would be.
It could be as simple as having 4 planes per house (one for each outer wall)
Enable them when building the OC data. You can set the tag to “Editor Only” so it is not included in the build.
So the OC is based upon these very simplified occlusion planes.