Check if a vertex index is part of an island

So, In geometry nodes I have two grids or planes, these are two mesh islands, by the geometry node “Mesh Island” one has index 0 and the other index 1, how do I check if the vertex index from each island is to island 0 and 1 or as many islands as there are. I want to do an operation if indexes of verts are not from it’s island to do something. How do I do that, any ideas?

Hi.

Well, Mesh Island already returns an island index for each vert.
You can use Math > Compare node to check if this index is equal to whatever value.

image

1 Like

Hi, what I’m looking for is to detect if the index of the current mesh island is in its own island, if it’s not then I want to use this as a mask to merge by distance so the vertex won’t merge if they are in the same islands, for “n” numbers of islands. Thanks

So, uh, what you’re trying to do is to stitch different islands together?

Yes, kind of, but merge by distance merges even the verts on the island, I have this mask, I want to merge only the edges with number 1 but, I want that number to be merged only with outside islands, not its own island.

Take what stray said and repeat it:


from:
image

Good luck.

4 Likes

This is exactly what I need, I still have trouble understanding how the sample index, evaluate on domain nodes and such work and the blender documentation didn’t help me very much or some tutorials.
Thank you!

1 Like