cheak if object is visible on screen

Previous topic - Next topic

djtoon

hi
im trying to chk if an object is visible on screen and not behinde other object witch hides it
any way to do this?
i tryed geting the 3d to 2d point and getting the pixel color from there but its very very slow
any ideas?

Kitty Hello

with X_WORLD2SCREEN you get a 2d-point and a "z" information. You can use z to determine if the point is behind the camera (negative).

djtoon

i mean if anoder object is obscuring the object
if a ball is behine a box and the box is hiding the shear

backslider


Kitty Hello

usually occlusion culling takes more time than rendering the hidden objects. You can do that when you pack objects into large chunks and only render the chunks that are visible.