Occlusion culling ideas,
Members - Reputation: 300
Posted 19 May 2011 - 07:35 AM
Or you dont bother with it?
It seems there is only umbra occlusion booster and CHC++ solutions these days.
Umbra is ridiculous in a way that the developer can only evaluate for 30 days.
I would gladly pay them after game is made, or even take a loan and pay on the day of release.
But who knows when my game will be made, maybe it will take 3 years, so I have to pay crazy amounts of money
CHC++ seems incredibly complicated and uncomplete.
Is there any other solutions out there? I am mainly interesting in OpenGL hardware occlusion queries or software.
Moderators - Reputation: 48918
Posted 19 May 2011 - 08:08 AM
The best choice of culling algorithm is going to depend highly on the type of scene you're trying to draw.
Is it static and can you process the data at build time? If so, just use PVS. If you can't pre-compute a PVS, use portals and occlusion shapes.
For dynamic scenes, I'm currently pretty impressed with modern implementations of the HZB.
Regarding Umbra -- evaluation periods are standard practice for expensive middleware. Their business is not targeting cashless indies.
Members - Reputation: 568
Posted 19 May 2011 - 05:54 PM
--Game Development http://nolimitsdesigns.com: Reliable UDP library, Threading library, Math Library, UI Library. Take a look, its all free.
Crossbones+ - Reputation: 12105
Posted 20 May 2011 - 09:02 AM
This, in a nutshell, is very very wise advice. Sometimes it's better to take the overhead of extra polygons that won't be visible in exchange for not having to break a batch. Example (backface, not occlusion, but it's just an example): you can quickly determine if a poly is backfacing in software, and not add it to your draw list if so, but if you've already got all of your data on the GPU in a VBO, this may hurt you - you'll need to break batches and you'll need to rebuild a dynamic VBO. On the other hand, if you just draw the thing the GPU will backface it for you, and the cost is just a few extra per-vertex ops and some command buffer entries. Both methods have a cost, but which is the cheapest? Any kind of culling is all about choosing between tradeoffs, and balancing them so that you come out on top for your own particular needs.
Occlusion culling is very Engine specific. There is no one culling-technique-to-rule-them-all. Like the above posted said, there are other factors that can affect your decision: pre calculated scenes (static); outside, open scenes; portal culling, etc. It does not take much time to develop your own technique and I have found that the best choice is not often the one you thought. Culling --or removing-- work to be done is always a good thing, however, most of the culling techniques will end up costing more and are not advantageous to use. I am mostly targeting the Octrees, or other spacial partitioning methods. You should be very carefull with how you divide up your world because there are lots of objects --or work-- that can be batched which will yield a nice performance increase. I babble about Octrees , and provide some code if you wan .octree and coherent hierarchical culling
It's also worth trying to dig up Mike Abrash's notes from when he was working on Quake; they're old but I believe parts of them are still relevant, in particular the core point that it's not about culling as agressively as possible but more about performance levelling between your worst case and your best case. Example: a solution that runs 20 times as fast in the best case than an alternative, but one-twentieth the speed of the same alternative in the worst case, is probably not an appropriate solution for your needs.
It appears that the gentleman thought C++ was extremely difficult and he was overjoyed that the machine was absorbing it; he understood that good C++ is difficult but the best C++ is well-nigh unintelligible.