1
$\begingroup$

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

$\endgroup$
  • $\begingroup$ Sure there was a question v.similar to this recently...will post link if I find. The operator modal view raycast shows one way this could be done Project thru the cameras bounds. See also .verts in camera view $\endgroup$ – batFINGER Oct 3 '17 at 10:57
  • $\begingroup$ and how to find all objects in the cameras view with python $\endgroup$ – batFINGER Oct 3 '17 at 11:15
  • $\begingroup$ Is there any way to know if a vertex group is camera-visible? $\endgroup$ – m.ardito Oct 3 '17 at 12:11
0
$\begingroup$

Either use an index pass as you suggested, or just mimick one by using an unshaded material with a distinct colour for each body part.

You say you want to do this in Python, but you don't say why or what part of the process you want to automate. If you elaborate in a comment I might be able to give more Python-related info in this answer.

$\endgroup$
  • $\begingroup$ Thanks dr. Sybren. I have a script to do all the pipeline, i.e. load scene, load character, perform retargeting and perform rendering. I use Makehuman characters for this purpose. The meshes it comes with are one mesh for the clothing and meshes for the skin. I'm only interested into split the clothing meshes. What I would like to automate is the split the clothing meshe into different parts and assing them different index pases to easily locate them in the final output image. I don't know if this helps but this big mesh comes with different vertex groups that are use for motion retargeting. $\endgroup$ – Legan09 Oct 3 '17 at 12:14

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.