Jump to content
Posted 19 May 2011 - 07:35 AM
Posted 19 May 2011 - 08:08 AM
Posted 19 May 2011 - 05:54 PM
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 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.