MoBu: Get models that are visible to camera in viewport via Python

coding
python
mobu

#1

Hey guys, my question is simple but my research has yielded pretty much nothing; does anybody know of a way to get FBModels that are visible to a given FBCamera in the viewport? I’ve tried this method:

FBSystem().Scene.Renderer.IsModelInsideCameraFrustum(FBModel, FBCamera)

which returns a bool and would be exactly what I need, though it seems to always return True even if the given model isn’t within the given camera’s frustum / view. Any other methods or thoughts are welcome :slight_smile:


#2

Just in case anyone is curious, I was able to use:

FBSystem().Scene.Renderer.IsModelInsideCameraFrustum(FBModel, FBCamera)

to see if a given model is visible within the camera’s frustum(view). This also accounts for models that are hidden via the “Show” property.