1
$\begingroup$

I have a simple geometry node setup, where I'm distributing a cube on a plane. I don't want any of the cubes to be overlapping, so I turned up the distance min on the distribute points on faces node. Is there any way to tell the Geometry Nodes to distribute an exact amount of cubes on the plane? For instance, can I distribute exactly 1,000 cubes on the plane?

enter image description here

$\endgroup$

1 Answer 1

2
$\begingroup$

You can use this node setup:

enter image description here

it deletes all indexes which are greater than a number.

The attribute statistic node gives information about the geometry which is plugged in the attribute. Here the index is plugged in. Index is running from 0 - 1299. So if i now delete all indices which are greater than 299 i got exactly 300 points. I didn't instance anything and i didn't join geometry because i just wanted to show which nodes are necessary so - in my opinion - it is easier to understand.

Here an example with the instancing:

enter image description here

and here the node setup with the "input geometry":

enter image description here

Note: Index is counting from 0. So if you say greater than 1000, you will get 1001 cubes. So enter greater than 999 and you will get 1000 cubes.

$\endgroup$
7
  • 1
    $\begingroup$ just change the 300 to 999 in the greater than node. i updated my answer $\endgroup$
    – Chris
    Mar 10 at 18:22
  • 1
    $\begingroup$ @RyanKingArt: i hoped you know the instance on points node, because you made a tutorial with it here: youtu.be/lrhlOBWXd7Y $\endgroup$
    – Chris
    Mar 10 at 18:25
  • 1
    $\begingroup$ Yes, the number is important. The number says how „dense“ the distribution should be. If you now increase your distance, of course you get less points/instances and if this number is then lower than your limit you won‘t get your exact number. So to get your exact number you have to raise that value until the number of your points are higher than the limit you want to have. That’s why I plugged in a viewer to check the value of the points. $\endgroup$
    – Chris
    Mar 10 at 18:46
  • 1
    $\begingroup$ Thanks for your help! $\endgroup$ Mar 10 at 19:24
  • 2
    $\begingroup$ You are welcome $\endgroup$
    – Chris
    Mar 10 at 19:31

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.