Light of Sight render clipping?

BlitzMax Forums/MiniB3D Module/Light of Sight render clipping?

CloseToPerfect(Posted 2011) [#1]
Is there LOS render clipping where if an object is behind another it is not rendered?

I got a feeling if it's infront of the camera it is rendered as long as it is in the camera range?

ctp


Kryzon(Posted 2011) [#2]
Hi,

there's no such clipping. If an object is inside the camera frustrum (the whole visible area that the camera can see), then it is rendered. This is done even if the object is completely occluded by something in front of it (say, a big wall).

To do something like hiding an object if it's completely behind another, even when in front of the camera, you'd have to use something like the ARB_Occlusion_Query extension to OpenGL. It's possible to do so with MiniB3D, but that'll require some knowledge of its internals and how to manage things with OpenGL.
I think that implementing this might be a bit overkill; I'd probably only try to implement this if I actually needed the performance gain, perhaps only if I were using triple-A graphics with lots of polygons.
Occlusion methods more worthy of implementing are Portals\Sectors and\or an Octree.

Last edited 2011