I'm sure this question must have been asked before, but I can't find the right search terms.
Using geometry nodes, I'm creating multiple instances of a collection. I'm not using 'pick instance', but simply want to duplicate the whole collection like this:
Here, a collection consisting of a white cube and a blue sphere is simply instanced three times.
I know that I can also address indivdual instances via their index. Here, I'm picking out the middle instance (the one with index 1) via a separate geometry node and giving it a red material:
However, what I want is to not just pick out a specific collection instance, but then also a specific object from it.
So in this example, let's say I want to apply the red material only to the sphere from the middle instance.
What I've tried:
Simply adding a second Separate Geoemtry node behind the first one doesn't work, since it seems to still use the same Index field as before (the one that indexes the instances created by Instance on Points):
Workaround:
While I can't seem to separate the geometry after indexing, I can separate it before and then instance everything individually like this:
This produces the desired output, but makes the node tree pretty unwieldy and defeats the purpose of putting the objects in a collection to begin with.
I'm using Blender version 3.4.1.
Attached is a .blend file producing the above: the node trees are assigned to a plane object, and there's a node tree for both the failed attempt and the workaround.