Notifications
Clear all

[Closed] MXS -identify visibility of objects from camera?

Hi,

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
bkr

2 Replies

I really want to know if it is possible to identify objects visibility from camera. if somebody has any idea pls share…