Jump to content


Occlusion metric


2 replies to this topic

#1 dave_

    Senior Member

  • Members
  • PipPipPipPip
  • 584 posts

Posted 08 January 2007 - 10:33 PM

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
Where:
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 Phaetos

    Member

  • Members
  • PipPip
  • 57 posts

Posted 09 January 2007 - 07:54 AM

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...

Stefan

#3 Nils Pipenbrinck

    Senior Member

  • Members
  • PipPipPipPip
  • 597 posts

Posted 09 January 2007 - 12:30 PM

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





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users