Jump to content
  • Advertisement
Sign in to follow this  
wildboar

OpenGL Occlusion culling ideas

This topic is 2617 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am interested to know what you guys use for occlusion culling these days?
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
every year.

CHC++ seems incredibly complicated and uncomplete.

Is there any other solutions out there? I am mainly interesting in OpenGL hardware occlusion queries or software.

Share this post


Link to post
Share on other sites
Advertisement
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

Share this post


Link to post
Share on other sites
GPU queries are good for determining that something is not visible, but you have to assume a safe default of everything that's in an undefined state being visible, and you have to be prepared to accept that results may lag a frame or two behind what you see on-screen. Creating and deleting query objects has some overhead, and if you do need to fetch the results as soon as possible, then you need to stall the pipleline while waiting for them to finish. In other words they're a bit lazy and sloppy, but sometimes lazy and sloppy is plenty good enough for your need, so don't discount them.


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

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.

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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!