How to weight instance index?

Hello,

I used to duplicate objects in a collection to get the desired distribution of instances. I.e: 6 instances (ID: 0,1,2,3,4,5), I duplicate three times the first one, two times the second, and one of the third type and order them in the collection by naming (0_name, 1_name, etc…) . This way I get 50% of the first instance, 33% of the second and 17% of the third.

It works but this is not very convenient when it comes to change those values: duplications and renamings. Plus it is not a viable method to duplicate many objects beyond a certain number, especialy if we’re looking to optimize a scene with instances.

I would like to make it lighter and editable on the Geometry node tree instead. I guess it should be done through the Set ID node. So far I don’t know how to weight multiples ID values, only one at a time with a random value node.

I used to make it with an array in Softimage|XSI’s ICE, it allowed to make the same trick without duplicating any object.

Do you know how to do it with Geometry Nodes?

1 Like

You can try index probability mapping like below.

Good luck

1 Like

Hello and thank You, it works. Not with the control level I wanted but good enough.

I’ll let this thread open to further improvement, and not mark it as solution yet.