I'm pretty new to blender. Currently I work in animate a rigged character, and render the depth for a computer vision project. My scene consist of some walls, floor, random objects and a human character performing re-targeted motion. In addition I also add an index pass to the human character to render a binary mask to locate it easily in the depth image.
Everything works fine. Now, I would like to know which of the parts of the object are visible to the camera, e.g. head, arms, hands, etc. The character consist only in one big mesh. Does any body know what would be the best way to achieve this? I thought that perhaps the best way is to split the mesh into different meshes and assign an index pass to each of them but I didn't find a good example to do this in python. Thanks in advance