true occlusion culling

Started by
21 comments, last by Krypt0n 14 years, 5 months ago
Quote:Original post by staticVoid2
Quote:

from VMem to system mem? that's probably more expensive than anything you can gain from it. if you want to rely on the hardware, you need to work asynchronously and for that occlusion queries are the way to go.



you could implement a basic software rasterizer to render the occlusion geometry to a low-resolution z buffer and then build the mip-maps but then it becomes of a problem of determining the set of occluders that are visible as the software rasterizer will likely be to slow to render them all.


I still don't really get what the use of mip maps are in the ideas..
Advertisement
The objects that I want to know visibility from are always a plane. How about calculating a few rows and columns of points on that plane in world space, and test with rays from the centre of the camera to these points against the view frustum visible objects their bounding volumes?
Quote:
Well yeah, "just 5". These objects are important to be marked as seen once they have been seen, so yeah, a fair small share of the CPU or GPU can be given away for this. To come to a fair trade of cost against speed, I already said it doesn't need to check every game frame, it can be done in a fixed once in a while time step.

so you're cost would be kinda 99% for generating an occlusion buffer, 1% for testing some bounding box against it. that's not effective.

Quote:
Why would a threaded CPU occlusion rasterizer be not done? With Bounding boxes?
why that effort if the result is the same as a hardware occlusion query would be?


in a case where you've few variable costs and most is fixcost, you goal needs to be to reduce the fix costs, so get rid of generating an occlusion buffer.
an alternative method to accomplish that can be raycasts. That's a common way to check for visibility e.g. for AI where you have N objects (typically <10) that need to know if there is any visibility inbetween. that would usually mean you have to rasterize N occlusion buffers. it's cheaper to make raycasts in that case.
especially with just 5 objects to test, you'll probably be faster.


Quote:
I still don't really get what the use of mip maps are in the ideas..

Mipmaps are used to have a conservative representation of far more data. it's useful in cases where u assume that most objects will be culled.
Imagin the simplest case, the mip level with just 1zexel. you just need to compare the nearest-z of an object with one depth value an if everything works out, you reject the whole object immediatelly.
it's of course the opposide with fine occlusion that is not that dense e.g. open enviropments where you always have some skybox-depth value that is max.
for reference: http://www.gamasutra.com/view/feature/3394/occlusion_culling_algorithms.php?page=2



Quote:The objects that I want to know visibility from are always a plane.
you test always 5 planes? i'm really curious what you're doing. with 5 planes you might be able to have the possibility for some fast analytical methode, like projecting the scene triangles on the planes and tesselate it (some kind of 2d bsp). that could be specially fast if you have a low amount of triangles that cause a lot of overdraw.

Quote:
How about calculating a few rows and columns of points on that plane in world space, and test with rays from the centre of the camera to these points against the view frustum visible objects their bounding volumes?

i guess you had the idea already I described above, damn.;)

This topic is closed to new replies.

Advertisement