2
$\begingroup$

enter image description here

Can someone please explain the Group ID input in the Index of Nearest node? My current understanding is that it probably is like the "selection" input in extrude or set position node.

The thing is that selection is a pink socket so I'm probably wrong. What is the input that connects to ID socket? I know there's a Set ID node but have never used it so do I use Separate Geometry on a point cloud and use the Set ID node to give it an ID and then use it in Index of Nearest node?

I'm sorry if I was just babbling in the above paragraph but if someone could maybe make a very basic use case to show the method to use these nodes I would be very thankful.

$\endgroup$
1
  • 1
    $\begingroup$ You can use an arbitrary (integer) attribute to group your geometry by. Members from a group won't search geometry that's outside of their group $\endgroup$
    – Gorgious
    Jul 10, 2023 at 5:31

1 Answer 1

5
$\begingroup$

I will try to show this as simple as possible with an example:

  1. I create a grid with four faces.
  2. On it I create some points with Distribute Points on Faces.
  3. Then I connect the points with their nearest neighbors.

This looks like this:

enter image description here enter image description here

And now I want only those points to be connected that share a common face.

To do this, I also capture the index of each face with Capture Attribute, and use it to feed the input Group ID of the node Index of Nearest:

enter image description here enter image description here

This way the node Index of Nearest finds only those points that share the same face index.

In simple terms, this gives you the ability to define which items should be considered when searching for the nearest item.

P.S.: One more interesting thing at this point:
You may notice that in this example, I also use Capture Attribute to capture the previously captured face index again in the point domain. Funnily enough, although the value is available with the first node in the point domain, it is sometimes interpreted incorrectly. So this is probably still an early bug in the node.


(Blender 3.6+)

$\endgroup$

You must log in to answer this question.

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