InstantOC 3.0.0 is out!It's live on the Asset Store!
Here are the new features in order of coolness:
Culling Group API based optimization for static objectsIt's a powerful new optimization that drastically reduces the "popping" effect on distant/sparse/small game objects and improves the overall perceived quality, specially with low Ray Samples.
And low Ray Samples come very handy for CPU-constrained platforms like Mobile and WebGL!
It can be so effective that in some cases you can get really good results with as less as 10 Ray Samples when combined with the "PreCull Check" option.
It's based on the Unity Culling Group API, it can be used with static game objects, that is, objects that won't move, and is fully compatible with procedurally generated objects, and/or dynamically loaded prefabs/objects.
It works in the following way, when an object is instantiated (dynamically or at startup) InstantOC creates a bounding sphere with proper radius and position, and adds it to a bounding spheres array.
Once per frame, before InstantOC fires its Rays, it asks the Unity Culling Group API for a list of bounding spheres that are in the current View Frustum. With this list at its disposal, InstantOC fires 1 Ray for each bounding sphere in this result list, in direction of the bounding sphere (random point on the sphere). This way, there is a high probability of hitting an object with this first shot, drastically reducing blank shots.
After this first run, InstantOC continues with it's Halton Sequence based Ray firing, for culling moving and/or other possible remaining objects.
But thanks to this highly effective first run, the Ray Samples needed for the Halton Sequence are now far less.
To use it, add manually the "IOClod" script to your Game Object and enable the "Static" option on the IOClod script inspector panel.
Unfortunately, I have yet to find a way to read the "Static" value of the main inspector section at run-time.
Automatic Lod MarginFinding the sweet-spot for this value was rather an ethereal undertaking.. now you don't need anymore to fiddle around with it. InstantOC 3 will do the magic.
If needed, you can always override the automatic value by setting it in the "IOClod" script options.
Just to refresh your memory, the right Lod Margin avoids the annoying "flickering" between LOD levels when approaching the switch distance.
Infinitely deep GameObject hierarchyPrior to version 3, InstantOC needed you to setup your GameObject hierarchy in a certain way, that is, the collider(s) needed to be either on the same GameObject with the "IOClod" script, or on a direct child(s). Now, when a ray hits an InstantOC managed collider, it recursively searches for the "IOClod" script upwards. A whole new level of flexibility for your GameObjects hierarchy and far easier setup!
That's all folks! Hope you'll enjoy this update.
PS: 4 LOD levels didn't make it in time for this one, but stay tuned :-P