How can I change the number of copied objects in a Instance on Points node?

Hello, I have a question about a job Instance on Points. It is possible to control the number of objects in a group that are cloned? except for the random way. Is it possible to set a specific number for each object? Example Let Be 1 Suzanne 3 cube 12 cube2

In this one the epsilon lets you control the exact number of instances.
Epsilon of 0 gives one instance 2 gives 3 etc.
They will start the count always at the first point and go up in a lineal way.
Switch if true gives Suzannes, if false the others.
The lower compare node gives the number of cubes.

If you do not want a linear distribution it is more tricky, here I use 2 random boolean values to set 2 switch’s, depending on the seed you have to adjust the probability to get the right count:

seeds at 0

first seed at 1 (note that I had to adjust the probability to get 1 Suzanne 3 cones etc

sorry for the edits I kept uploading the wrong images :upside_down_face:

Edit again (this time more fun)

A variation of the first setup is this:

I am not quite sure how it works (the numbers start to make less sense for my poor brain) but you can change the instance position of the Suzanne by changing the first B float value of the first compare/equal node.
If you raise the value of the epsilon you get more Suzannes.

The same for the cubes in the second compare node.

The only thing is that if you put a Suzanne where a cube is it will replace the cube, so if you want a Susanne there you have to raise the epsilon of the cubes to get another cube (total 3).

3 Likes

Thank you very much, your version is very convenient than I came up with.




1 Like

It is an interesting subject, rearranging indexes is something I have been thinking about a lot and I want to try more methods.

I also found this thread that I have to digest a bit to understand.

https://blender.stackexchange.com/questions/264857/how-can-i-re-sort-the-points-indexes-of-an-object-in-geometry-nodes

1 Like

I had a lot of questions about indexing when I started working on building generation

the idea is to be able to control the number of doors and windows and their location.
But it works well when there is only one building, there are many of them, it does not work and I wanted to know if there is a method to make it so that the index of each new building starts from 0 ?