0

How can you know if a vertex is visible to the camera, or is it obscured by some faces of the same mesh or a mesh of other objects?

I need a python solution for Blender 2.92 or above. At the input of the algorithm there is a Blender scene with objects (meshes) and a perspective camera, at the output I need to get a list of all the vertices of each object that got into the rendering.

This algorithm is needed for automatic preparation of 2D images with marking of visible parts of objects (for example, a person's face, which can be turned with the back of the head towards the camera, or wearing a helmet) for training neural networks.

  • It is necessary to check these scripts, which I found in answers to other questions: https://blender.stackexchange.com/a/176408/113612 and https://blender.stackexchange.com/a/87774/113612 – Vladimir Pankov May 11 '21 at 16:47
  • https://blender.stackexchange.com/questions/169982/check-if-a-vertex-is-visible-in-camera-view https://blender.stackexchange.com/a/40826/15543 – batFINGER May 11 '21 at 16:54
  • I also saw these methods, but it seemed to me that they looked like a kind of workaround. What are the known advantages and disadvantages of this calculation method? – Vladimir Pankov May 12 '21 at 07:21
  • It seems to be more suitable for interactive mode, but I need to calculate hundreds of frames with dozens of objects (one by one) in the background, as a result, for each object, I will need to find its bounding box on the frame, and the percentage of invisible vertices. – Vladimir Pankov May 12 '21 at 07:47

0 Answers0