0
$\begingroup$

I make a simple exemple for me problem.

enter image description here

I have a GN object with limited integrer random value for Z position (or anything) , I want compare this values for delete the instance with the same value. I suppose that the best way is to transform array to enter in the "selection" socket of "instance points" node.

In JS, I Think something like this

const GeometryNodeToto.valueZ = [5, 1, 1, 5, 4];

for (let i = 0; i <GeometryNodeToto.valueZ.length; i++) 
{
    valueI = GeometryNodeToto.valueZ[i];
    valueJ = GeometryNodeToto.valueZ[j];
    
    for (j = 0; j <GeometryNodeToto.valueZ.length; j++)
        {if (valueI  ==  valueJ)
            {
                GeometryNodeToto.valueZ[j] = false;
            }

        }
  }

Is it possible in GN ???

Thanks for your help. ^^

$\endgroup$

1 Answer 1

0
$\begingroup$

You can use Accumulate Field's Group Index to see that the Group Index is already in use:

enter image description here

$\endgroup$
1
  • $\begingroup$ Thanks a lot. The node "accumulate field" is exactly the solution to my problem. $\endgroup$
    – Stef
    Oct 28, 2022 at 17:18

You must log in to answer this question.

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