Sign in to follow this  
UnshavenBastard

HW Occlusion Culling ?

Recommended Posts

Hallo there. Some years ago, there has been a thread about occlusion culling here, also the hardware occlusioon culling via GL extention was discussed and concluded it was still too slow. Well that's been over 2 years ago I think. How is it today? Fast enough? And btw., Will I still have to use the NVidia extension or is there a general GL one? thanks, unshaven

Share this post


Link to post
Share on other sites
There's a chapter in GPU Gems 2 that describes a relatively robust realtime hierarchical occlusion culling system that runs in hardware. So I'd say it's good enough now.

Share this post


Link to post
Share on other sites
The asynchronous nature of occlusion queries has not changed since they were first introduced, so you will get the same raw performance out of them like you always have. However, if you tweak it continuously, you can probably make it work. Personally, I regard other systems like PVS (or even simpler methods such as octrees and quadtrees) to be more effective, in terms of performance and ease of implementation.

Share this post


Link to post
Share on other sites
Occlusion queries are second-to-last-chance culling; they're not meant to substitute for BSP or portal-cell culling, and they don't partially cull partially occluded objects like Z-buffering. Because of this, they occupy a small--perhaps vanishingly small--niche. And given the difficulty of making them work well across a wide range of hardware, they may well not be worth it. I'd focus on all other levels of my visibility determination before I even started thinking about occlusion queries.

Share this post


Link to post
Share on other sites

HW Occlusion queries might be quite useful when creating PVS sets. They can save you from great deal of complicated and unprecise calculations.

Share this post


Link to post
Share on other sites
Quote:
Original post by Sneftel
Occlusion queries are second-to-last-chance culling; they're not meant to substitute for BSP or portal-cell culling, and they don't partially cull partially occluded objects like Z-buffering. Because of this, they occupy a small--perhaps vanishingly small--niche. And given the difficulty of making them work well across a wide range of hardware, they may well not be worth it. I'd focus on all other levels of my visibility determination before I even started thinking about occlusion queries.


I know of at least one commercial PC-nextgen engine that uses them as the primary (and I think only) technique.

Share this post


Link to post
Share on other sites
Quote:
Original post by Sneftel
Occlusion queries are second-to-last-chance culling; they're not meant to substitute for BSP or portal-cell culling, and they don't partially cull partially occluded objects like Z-buffering. Because of this, they occupy a small--perhaps vanishingly small--niche. And given the difficulty of making them work well across a wide range of hardware, they may well not be worth it. I'd focus on all other levels of my visibility determination before I even started thinking about occlusion queries.


I'm familiar with more "crude"/general visibility detection methods for real-time use and common data structures. But occlusion culling as such in addition to that can be damn powerful, and having hardware supporting it properly would be really nice.


Quote:
Original post by Demus79

HW Occlusion queries might be quite useful when creating PVS sets. They can save you from great deal of complicated and unprecise calculations.


Would you elaborate that? I'm not sure I understand.
The "occlusion culling" I know of is based on a view point and frustrum. Yes I know a method of PVS calculation where a camera is set to many points and angles to test for visibility, but this is, whatever you do, very inaccurate, no?

Share this post


Link to post
Share on other sites

Quote:

Quote:

HW Occlusion queries might be quite useful when creating PVS sets. They can save you from great deal of complicated and unprecise calculations.

Would you elaborate that? I'm not sure I understand.
The "occlusion culling" I know of is based on a view point and frustrum. Yes I know a method of PVS calculation where a camera is set to many points and angles to test for visibility, but this is, whatever you do, very inaccurate, no?


yes you are right about the fact that choosing some positions and directions is inaccurate, but the rendering accuracy is for the occlusion tests is outstanding (not perfect though).

I am not totally familiar with calculating the PVS sets, but with HW occlusion culling you can reduce the time when creating them. Consider the alternative of making your own rasterizer with z-buffer or some other PVS calculation system vs HW occlusion culling.

When making occlusion queries with HW, I think that you need to render only the z-buffer, which is rather fast.

Cheers

Share this post


Link to post
Share on other sites
Quote:
Original post by Demus79
I am not totally familiar with calculating the PVS sets, but with HW occlusion culling you can reduce the time when creating them. Consider the alternative of making your own rasterizer with z-buffer or some other PVS calculation system vs HW occlusion culling.


PVS are not calculated with renders IMHO because of the accuracy. BSP-like PVS are mathematically obtained using portals and antipenumbria volumes.

Share this post


Link to post
Share on other sites
Quote:
Original post by superpig
I know of at least one commercial PC-nextgen engine that uses them as the primary (and I think only) technique.

Huh... they do occlusion queries on every potentially visible piece of the level without regards to the player's position?

Share this post


Link to post
Share on other sites
Quote:
Original post by superpig
I know of at least one commercial PC-nextgen engine that uses them as the primary (and I think only) technique.


UE3?

My experience with HW occlusion queries is that they are fine if you can get them set up properly. However, that can sometimes (not always) be a bit challenging.

[Edited by - Brian Lawson on March 6, 2006 10:37:01 AM]

Share this post


Link to post
Share on other sites
I heard that NVIDIA is doing a NVX_conditional_render extension, that, besides others things, can do hardware occlusion without querying a result. So, there is no latency...

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Quote:
Original post by superpig
I know of at least one commercial PC-nextgen engine that uses them as the primary (and I think only) technique.



The latest Serious Sam?

Share this post


Link to post
Share on other sites
Quote:
Original post by Brian Lawson
Quote:
Original post by superpig
I know of at least one commercial PC-nextgen engine that uses them as the primary (and I think only) technique.


UE3?

My experience with HW occlusion queries is that they are fine if you can get them set up properly. However, that can sometimes (not always) be a bit challenging.


Quote:
Original post by Sneftel
Huh... they do occlusion queries on every potentially visible piece of the level without regards to the player's position?


The engine that I believe superpig was referring to was the Serious Sam 2 engine, which is basically all occ-query based according to this interview. The interview says that it's all OQ, but they'll have large bounding boxes laid out in the level by a level designer to instantly cull numerous objects in one go. However, even those large BB's are still culled based on OQ results.

Share this post


Link to post
Share on other sites
Huh... hierarchical OQ. It's an interesting approach. I'll have to do more thinking about it.

Share this post


Link to post
Share on other sites
Quote:
Original post by Xunil_RJ
I heard that NVIDIA is doing a NVX_conditional_render extension, that, besides others things, can do hardware occlusion without querying a result. So, there is no latency...

Bingo. Hardware OC will finally become viable, as soon as conditional rendering gets mainstream and HW support is vendor independent. Until then, it's not worth it, IMO.

But then, one should never make the mistake to underestimate the efficiency of OC with respect to reduction of geometric frame complexity. OC queries aren't supposed to replace frustum culling, obviously, but to work hand in hand with existing spatial culling systems. I have had scenes where the number of visible faces would increase by a factor of 2 to 3 when OC was turned off - and that despite very accurate frustum culling and LOD.

Share this post


Link to post
Share on other sites
Quote:
Original post by Yann L
OC queries aren't supposed to replace frustum culling, obviously, but to work hand in hand with existing spatial culling systems. I have had scenes where the number of visible faces would increase by a factor of 2 to 3 when OC was turned off - and that despite very accurate frustum culling and LOD.


Absolutely! And same here.

Share this post


Link to post
Share on other sites
Quote:
Original post by Cypher19
The engine that I believe superpig was referring to was the Serious Sam 2 engine, which is basically all occ-query based according to this interview. The interview says that it's all OQ, but they'll have large bounding boxes laid out in the level by a level designer to instantly cull numerous objects in one go. However, even those large BB's are still culled based on OQ results.

So did Reality engine. If you look on the site, you can download all documentation and video tutorials for the engine.

Share this post


Link to post
Share on other sites
Quote:
Original post by Cypher19
Quote:
Original post by Brian Lawson
Quote:
Original post by superpig
I know of at least one commercial PC-nextgen engine that uses them as the primary (and I think only) technique.


UE3?

My experience with HW occlusion queries is that they are fine if you can get them set up properly. However, that can sometimes (not always) be a bit challenging.


Quote:
Original post by Sneftel
Huh... they do occlusion queries on every potentially visible piece of the level without regards to the player's position?


The engine that I believe superpig was referring to was the Serious Sam 2 engine, which is basically all occ-query based according to this interview. The interview says that it's all OQ, but they'll have large bounding boxes laid out in the level by a level designer to instantly cull numerous objects in one go. However, even those large BB's are still culled based on OQ results.


Actually, it wasn't the SS2 engine, but if they're doing hierarchical occlusion culling then it sounds like they're doing the same thing as the engine I am thinking of (which, for NDA reasons, I won't name here). I point again to the chapter in GPU Gems 2 that describes how to do this stuff in both a hierarchical and temporally cohesive manner; by that technique, AABB trees plus OQs gives you a full culling solution (with frustum culling thrown in for good measure).

The conditional render stuff is already exposed in the D3D10 API, iirc. Worth looking into.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this