Routing using logic in Geometry Nodes?

I’d like to pick randomly from different collections by “routing” using logic… something like this:

Is there a way to do this?

thanks

Hi

Connect the the output of that random selection into a Separate Geometry node which will produce two separate geometry branches, and then you instance from separate collections on each of those branches and re-join them later.

A more general solution would be to capture the instance domain size of each collection before joining them all and then doing index math to “pick” a index range that falls within the index-size of each collection - that is also possible but less intuitive… may as well just stack the Separate Geometry solution above to match your needs.

Good luck.

3 Likes

Thanks -
Not quite sure how to set this up. Tried it like the image below (file also attached) but I haven’t found the right order of the components to figure this out yet.


random-select.blend (999.1 KB)

You need to “pick” on the Separate Geometry Node:


… inverting the materials here for contrast.

Good luck.

1 Like

Maybe this is what you want:

If greater than 3 pick these points and instance red things, else pick these points and instance blue things.

2 Likes