View Full Version : MXS -identify visibility of objects from camera?

04 April 2009, 03:37 AM

Is there anyway I can identify objects visibility from a perticular camera? so I can only loop through visible objects in my scene and can ignore all objects outside or behind of my camera.

because in my script it makes no sence to process objects those are hidden inside or beyond some another object or may be it is not covered by frustum of camera.

I know this method from bobo -

camTMatrix = (viewport.getcamera()).transform
select (for o in geometry where in coordsys camTMatrix o.pos.z < 0 collect o

but this method can only ignore objects behind the camera and also one drawback is if there is any object that is partially covered by camera +tive X axis and also partially covered by -X axis then it gets ignored which should not happen you will need that partially visible object in your scene.

Thanks in advance

04 April 2009, 08:09 AM
I really want to know if it is possible to identify objects visibility from camera. if somebody has any idea pls share...

04 April 2009, 09:38 AM
from earlier thread

CGTalk Moderation
04 April 2009, 09:38 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.