Occlusion metric

dave_ 101 Jan 08, 2007 at 22:33

Anyone done occlusion before? I’m using a metric to sort my occluders so I only actually have to do the hard part for the top few occluders.

What algorithms are there to measure the influence of an occluder?
At the moment I’m using: 2 * Area² * cos(A) / D
A = angle between camera forward and the occluder’s normal.
D = Distance from the occluders plane to the eye.

Does anyone know a cheap approximation to area of a convex polygon? At the moment I’m using cross product to calculate the Area

2 Replies

Please log in or register to post a reply.

Phaetos 101 Jan 09, 2007 at 07:54

A year ago I went to build a first-person-shooter and I tried to fuse triangles
to get larger occluders - the silouette of the larger occluder was then used
together with the point of view to build an occlusion volume. The occlusion-test
was then done against the occluded region behind the occluder: If the
bounding object of the thing to occlude is completely within the volume (and
behind the occluder) it is invisible… I did not implement a measure of the
size of the occluder completely, but as far as I remember I used the area of the
triangles, too.

A far better approach may be to use the angle extends of the occlusion volume
in horizontal and vertical directions - the larger the angle the more part of
the visible screen the occluder will occlude :)

I did not get my occlusion query working right - there were always far too
many elements that were still drawn. And another problem was that two
large occluders together could occlude large parts of a scene, but my test
fails for this as it requires the fused occluders to stay convex :wacko:

So I switched to portals after a while of fighting with this…


Nils_Pipenbrinck 101 Jan 09, 2007 at 12:30

I’ve used distance (eyepoint, occluder_plane). Worked for me.