Jump to content
  • Advertisement
Sign in to follow this  
x0ras

Per-pixel occlusion culling

This topic is 4829 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 haven't found any description of subj in the web. Can anyone help me with detailed information about this algorithm?

Share this post


Link to post
Share on other sites
Advertisement
Take a look at this article:
http://www.cs.unc.edu/~zhangh/dissertation.pdf

I've found that an implementation of this technique can work really well with a software renderer for the occluders and thus access to a precise depth buffer as well.

- Kasper

Share this post


Link to post
Share on other sites
Ok. How can I achieve results like these?
Quote:

Reality Engine Features

* Hierarchical Per-pixel Occlusion Culling. No more portals, zones, vis-gen waiting times, or manual occluders! Occlusion is fully automatic, fast, and accurate to the pixel.

Share this post


Link to post
Share on other sites
Check out this article. I wrote it right when DX9 came out (when hardware occlusion queries were new). It is pretty primitive, but check out these optimizations that I never got around to:

Quote:

Here are some of the preliminary things I've been thinking about:

(1) Use an array of IDirect3DQuery9's (100-200 of them seems to work well, depending on the amount of objects you are using). First, draw the bounding meshes of all the objects, and use a separate query for each. After all objects are drawn, go back and query the data. At this point, it should be ready, and you don't have to waste any CPU cycles in the while loop.

(2) Batch render all of the bounding meshes for the preliminary render. This will save many DrawIndexedPrimitive (DIP) calls.

(3) Couple this occlusion technique with another culling technique, such as octrees. That way, you aren't wasting valuable DIP calls for an object that isn't even close to being in the scene.

(4) Use occlusion culling in an offline method, coupled with PVS. The occlusion tool will take the world, render all possible viewpoints, and export the PVS data. The engine will then load the PVS data, and use it accordingly. This is nice, because it's very accurate (you won't experience overdraw/underdraw), and it replaces some complicated offline algorithms. It should also be very flexible for both indoor and outdoor environments. However, this is a little complicated to implement in an article.

(5) Only test the objects that are above a certain triangle count. This is to make sure that actually rendering the full object is not faster than doing all of the occlusion stuff.

The biggest killer for this method is all of the DIP calls it sucks up. The rendered meshes actually take up 3 calls a piece, which is *definetly* not good.

Share this post


Link to post
Share on other sites
When people answers your questions you should try to actually put an effort into checking out what they suggest to you!

Read the article I linked, think about what I wrote above and try to figure out for yourself if this will help you in your own engine.

I don't know exactly what they do in the Reality engine but I would be impressed if they get fast and accurate occlusion culling with *no* effort. Still, if used with the real rendering geometry, the method I talk about could do what they claim - but since it's currently slow/hard to get access to the real z-buffer I cannot think of a way where that would be practical. With access to the real z-buffer and frame coherency you might be able to use the z-buffer from last frame to occlusion cull the current. I find it more practical to select and render a few manually created occluder meshes (which can be really low-poly).

- Kasper

Share this post


Link to post
Share on other sites
There's an article in GPU Gems 2 that has very good coverage of a practical hierarchical occlusion system, which I recommend you read.

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!