Forum Discussion
Caine
12 years agoHonored Guest
InstantOC - Dynamic Occlusion Culling
Not sure how you folks are dealing with dynamic occlusion culling in Unity but I got 'InstantOC' from the Asset Store and am very happy with it so wanted to spread the word. It does occlusion culling for dynamic objects (as well as static, obviously Umbra can do that part) and LOD. The developer has been great with support and has recently updated it to make it more friendly for Oculus Rift.
Anyways, lest this sound too much like a commercial, it was $15 bucks, and I highly recommend it, makes a huge difference for my more detailed scenes. Link to the Unity forum for it: http://forum.unity3d.com/threads/166748-InstantOC-dynamic-occlusion-culling-LOD
Anyways, lest this sound too much like a commercial, it was $15 bucks, and I highly recommend it, makes a huge difference for my more detailed scenes. Link to the Unity forum for it: http://forum.unity3d.com/threads/166748-InstantOC-dynamic-occlusion-culling-LOD
11 Replies
Replies have been turned off for this discussion
- AnonymousThank you, looks interesting, every mean of optimization is good to take, specially when doing stereo and aiming for 60fps min !
"Caine" wrote:
makes a huge difference for my more detailed scenes
Do you have some numbers ? (just curious) - CaineHonored Guest
"drifter" wrote:
Thank you, looks interesting, every mean of optimization is good to take, specially when doing stereo and aiming for 60fps min !"Caine" wrote:
makes a huge difference for my more detailed scenes
Do you have some numbers ? (just curious)
Exactly - that's why I wanted to do what I could do spread the word about this, plus it covers a big gap left by the Umbra system in Unity pro. While there are undoubtedly some other factors at play (for example I had some unneeded colliders and wonky physics settings), in my haunted house scene implementing InstantOC brought me from an unplayable 15-20 fps right up to smooth as butter 60 fps. The latest version allows you to widen the raycast FOV to wider than your camera FOV to help eliminate 'pop in' in the periphery of your vision (obvs important for Oculus Rift use). If you'd like to get a sense of how it is currently working in my project: http://goo.gl/3AGdBC - if you do get a chance to try this, would be very curious to hear if you are getting the intended fps.
Having said that, there are likely a number of other things I can do to improve FPS that I haven't yet learned, but at this point the impact of InstantOC was absolutely huge! - PrelucidHonored GuestI've found it works well for some large things like buildings in the distance and modular room pieces, but for me, it's been less effective for smaller things or flat planes at extreme angles to the camera like roads pieces and stuff. Especially when you have a scene where the camera is moving very fast (car). It just doesn't run fast enough, but I like it a lot. My only other beefs would be the tag/layer requirements, and the fact that you can't obstruct IOC objects with invisible colliders or you'll see them vanish.
Other ways to improve performance would be Material-related and camera far clipping (which is problematic when factoring in custom skybox). - CaineHonored Guest
"Prelucid" wrote:
I've found it works well for some large things like buildings in the distance and modular room pieces, but for me, it's been less effective for smaller things or flat planes at extreme angles to the camera like roads pieces and stuff. Especially when you have a scene where the camera is moving very fast (car). It just doesn't run fast enough, but I like it a lot. My only other beefs would be the tag/layer requirements, and the fact that you can't obstruct IOC objects with invisible colliders or you'll see them vanish.
Other ways to improve performance would be Material-related and camera far clipping (which is problematic when factoring in custom skybox).
Hi Prelucid - those are very good points, it is not perfect, but I like it a lot too. You might want to try following up with the developer, they have been very responsive and quite willing to make tweaks to improve the scripts based on user's comments :) - FrenchfasoHonored GuestHello everybody,
I'm the developer of InstantOC, first of all thank you for your kind words about InstantOC!
I'll be sticking around here to give some support and to gather suggestions about making InstantOC better and cleaner to integrate with the Oculus.
If you need some infos about InstantOC, here is the webpage:
http://frenchfaso.blogspot.it/p/instantoc.html
with the Manual, some video tutorials and the faq. - FrenchfasoHonored Guest
"Prelucid" wrote:
I've found it works well for some large things like buildings in the distance and modular room pieces, but for me, it's been less effective for smaller things or flat planes at extreme angles to the camera like roads pieces and stuff. Especially when you have a scene where the camera is moving very fast (car). It just doesn't run fast enough, but I like it a lot. My only other beefs would be the tag/layer requirements, and the fact that you can't obstruct IOC objects with invisible colliders or you'll see them vanish.
Other ways to improve performance would be Material-related and camera far clipping (which is problematic when factoring in custom skybox).
Hello Prelucid,
I'm glad you like InstantOC :-) Thanks!
As you mentioned there are some edge cases for which occlusion culling does not give the expected results, but in these cases you can eventually fall-back to the integrated LOD system in InstantOC, and set these objects as LOD only (like the road pieces) and also if you don't have low-res versions of the meshes, you can achieve some more fps by simply having the same model but with a simpler material.
As for the invisible colliders, you can actually use them, just put these invisible colliders on a different layer (one not managed by InstantOC). - PrelucidHonored GuestHi Frenchfaso, thanks for creating an awesome package. I plan on being more diligent and using LOD in the future, but for now my models aren't that complicated anyways. Basically skinned boxes.
"Frenchfaso" wrote:
As for the invisible colliders, you can actually use them, just put these invisible colliders on a different layer (one not managed by InstantOC).
I've found that if I have an invisible wall (not on an IOC layer) to prevent the player from going off into the distance for example, or even one just working as a trigger. The buildings in the distance far on the other side of that wall (managed by IOC) gets obstructed by the collider of the invisible wall and the ray never reaches them. Any way around this?
edit: I might try putting those invisible colliders in the Ignore Raycast layer when I get around to trying to solve this later.
edit2: okay that seems to work. - FrenchfasoHonored Guest
"Prelucid" wrote:
edit: I might try putting those invisible colliders in the Ignore Raycast layer when I get around to trying to solve this later.
edit2: okay that seems to work.
Excellent! Glad to hear this :) - brendenfrankHonored GuestHi Frenchfaso,
This package looks great, just a couple questions for you...
How are you handling the extremities of objects when occluding them?
Let's say you have a tree that you've chosen to occlude, you shoot a raycast at the tree (at it's center point I'd assume) and it gets blocked by a building. But some of the branches of the tree are sticking out above the building and you get a visible disappearance.
My second question is, are the raycasts queued in some way? I'm picturing hundreds of casts in a single frame potentially causing performance issues on its own.
Thanks! - FrenchfasoHonored Guest
"brendenfrank" wrote:
Hi Frenchfaso,
This package looks great, just a couple questions for you...
How are you handling the extremities of objects when occluding them?
Let's say you have a tree that you've chosen to occlude, you shoot a raycast at the tree (at it's center point I'd assume) and it gets blocked by a building. But some of the branches of the tree are sticking out above the building and you get a visible disappearance.
My second question is, are the raycasts queued in some way? I'm picturing hundreds of casts in a single frame potentially causing performance issues on its own.
Thanks!
Hello brendenfrank,
thank you for your interest in InstantOC!
The precision of culling depends on the colliders, with InstantOC you typically use mesh colliders (perhaps a low-res version of your model), this way you get precise results. The InstantOC raycaster uses the quasi-random Halton sequence to fire rays (generated once at startup), this way you get the whole view covered efficiently and quickly. Normally on average PCs and MACs you can cast 1000 rays per Update without a noticeable overhead (you really never need so many rays!). On mobile you typically cast 100-300 rays per Update. InstantOC uses various optimizations to achieve precise and predictable results also with few rays (Halton sequence, rays FOV, pre-cull check, etc..)
Please take a look at the Manual, the faq and the video tutorials to gain a deeper insight on InstantOC and to understand if it fits your needs.
Feel free o contact me if you have further questions.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 10 months ago