Good Evening Gentlemen,
I would like to share with You some fancy idea I’m currently working on, “Instant Occlusion Culling”.
Let me explain what I mean:
“Instant” means zero baking time, no pre-process needed, works like a charm on mobile (tested on iPhone 3GS ) and best of all, it’s compatible with the free/basic versions of Unity. All you need is colliders for your Models (need them anyway…)
It is a fully dynamic Occlusion Culling solution, so it works perfectly fine with moving objects too
So, concept web player is here, would love some precious feedback from You! Would You like it on the Asset Store?
(The minimap shows all the houses been drawn by the engine with and without Instant OC)
more then 10X performance boost on my MacBookPro (Core i5 - GeForce GT330M)
insanely awesome on the iPhone 3GS!!! (the same scene is absolutely unusable without Instant OC on the 3gs and with it, it performs pretty acceptable ~ 16-20 fps)
UPDATE 1
added LOD (2 levels of details, but will add more in final version)
demo scene is now a little bit more tweakable, you can generate randomly up to 10.000 Houses and adjust LOD distance
ZOMG! Wow, you have a real gem here sir, I’m quite jealous. If this was in the asset store, I would pick it up in a heartbeat. And not to pry, so if it reveals to much, say no more, but I’m wondering how you managed this. Since it requires colliders, are raycasts involved at all?
It definitely runs a heck of a lot faster when the optimization is on. Presumably this would work great with any scene that has a tonne of occlusion. For me it was like 3fps versus 50fps. You’d think something like this should be a built-in part of Unity.
I presume you’re doing some kind of ray-casts for visibility or something against all those colliders out there in game land, and then switching those objects off that don’t get a collision?
Very very nice, i was thinking about doing this and the way i thought of doing it was disabling all the objects for rendering then doing a raycast and when the ray hit something it would enable that object and stop the ray. But to me it seemed like it would of caused too much lag for each render.
I see their is no Colliders attached to the houses? I think that might make them be a bit slower to “turn on”?
I did something similar with a grid based system not as nice however. But similar. The models I used were pretty high tris and had many objects and colliders. I had to add a delay to enable them otherwise you’d get a studder as well as only activating colliders for the player when he was in a certain range… Otherwise the fps would drop like crazy.
Optimisation rate is perfect, but there is very visible poping up of occluded buildings. Maybe if you can you should decrease “loading time” of object when occluded or not.
Its clearly based on some partial raycasting based on screen pixels, which also explains why it sometimes takes a split second to show a house. For many games this is fully acceptable and it does provide a significant boost in performance.
However I noticed that while standing still and looking down a road the houses would pop in and out of view quite frequently. You should add a delay before items gets hidden to remove these random artifacts where a house gets “hidden” just because its impact is very small in the current view frustrum.