I need to know if a pixel is visible to a particular camera. I don't need to know if it's blocked by another object (as is the case in this answer), so I'm thinking the answer might be simpler. For instance, if I have a point in my scene and a Camera 2, is there a way, in a Python script, to tell if that point is visible to Camera 2?

I'd also settle for what seems a converse of this, if I could find what the boundaries of the camera's view area is at a particular distance from the camera, then I could easily use that to create a plane and see if a particular point or pixel is in that plane.

  • 2
    $\begingroup$ Related:blender.stackexchange.com/q/185446/35559 $\endgroup$ – Robin Betts Jun 6 at 7:50
  • 1
    $\begingroup$ blender.stackexchange.com/a/219003/15543 Think this is pretty much a dupe blender.stackexchange.com/questions/32975/… (confusingly similarly named to link in question) in that it is simply testing if the global vertex coordinate is in the camera field of view. If UV coordinate returned is outside 0, 1 range. $\endgroup$ – batFINGER Jun 6 at 8:26
  • $\begingroup$ @RobinBetts: Did you notice I had linked to that and said I think there are differences in those two? $\endgroup$ – Tango Jun 6 at 18:43
  • $\begingroup$ Ahhh.. OK, sorry, I guess, as you and @batFINGER have suggested, it should be simpler. $\endgroup$ – Robin Betts Jun 6 at 18:49
  • $\begingroup$ @batFINGER The first one is good, but it only gives the size at the camera. The 2nd one is interesting - oddly, when I was searching, I got the one about vertices that I linked to in the question, but the one you linked to did not show up for me. I’m going to try that when I can get back to the computer for a while. I noticed a comment in there about making it work for 2.8. It looks to me like there’s a reference to ‘’’world_to_camera_view```. Isn’t that a pre-2.8 thing? I’m hoping that one gives me the answer I’m looking for. Thanks! $\endgroup$ – Tango Jun 6 at 19:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.