0
$\begingroup$

I am working on an application where I want to create segmentation masks of individual instances in a scene. I've created these instances by using the 'instance on points' node in geometry nodes. The collection of objects that I use contains up to 100 individual objects and the number of vertices varies between objects. Simplified geometry nodes setup

What I would like to achieve is an individual segmentation image for every single image (see example below). However I can't seem to figure out how to isolate one single instance. Hopefully someone has an idea about how to achieve this, thanks in advance guys!

segmentation masks

$\endgroup$
5
  • $\begingroup$ your text is quite complicated to read...did i understood you right, you just want to see one instance per frame? is that what you want? $\endgroup$
    – Chris
    Commented Feb 22, 2022 at 11:08
  • $\begingroup$ Thanks for your reply. I want to render one image with all instances + one mask image per instance. Does that make it more clear? $\endgroup$
    – teun_Q
    Commented Feb 22, 2022 at 11:45
  • $\begingroup$ Unfortunately no. What do you mean by mask image? I just know mask from compositor of mask modifier. And your examples just show one image. How does your „mask image“ look like? $\endgroup$
    – Chris
    Commented Feb 22, 2022 at 11:51
  • $\begingroup$ Ok, mask image might be a confusing choice of words for Blender. For every scene, I want to render: (a) one image with all objects; this is the top image in my examples. and (b) one image per instance in black and white, where white indicates the instance. (that's what I meant with 'mask image'); these are the bottom three images in my examples. $\endgroup$
    – teun_Q
    Commented Feb 22, 2022 at 11:57
  • $\begingroup$ @Chris I think the screenshots clearly show what a mask image per instance could be... $\endgroup$ Commented Feb 22, 2022 at 12:10

1 Answer 1

1
$\begingroup$

you can show "single" instances like this:

enter image description here

result:

enter image description here

for a "cheap" mask image you could e.g. use emission material with strength 3

enter image description here

enter image description here

then use the material in your GN tree:

enter image description here

$\endgroup$
2
  • $\begingroup$ +1 I guess this is quite close to what @teun_Q wants... if the Color Management would be set to Standard instead of Filmic, an Emission Strength of 1 should be sufficient. Maybe an Override Material with emission set for the scene (so that each object can keep it's own material) together with animating the Index (i.e. the "Equal to" value) with #frame-1 to cycle through all objects. Then it's possible to render an image sequence with one instance visible per frame. $\endgroup$ Commented Feb 22, 2022 at 13:49
  • $\begingroup$ Thanks for the elaborate suggestions! I'll try this method! $\endgroup$
    – teun_Q
    Commented Feb 22, 2022 at 14:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .