2
$\begingroup$

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.

In this example, the collection consists of a white cube with a blue sphere above it, and it is instanced three times:

enter image description here

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:

enter image description here

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 Geometry 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): enter image description here


Workaround:

While I can't seem to separate the geometry after indexing, I can separate it before and then instance everything individually like this: enter image description here

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.

$\endgroup$
2
  • $\begingroup$ An instance is a linked duplicate of an existing object, collection or other things. It is not editable on its own and is acting as a closed unit. Therefore you cannot pick single items out of an instance. For the same reason the Set Position cannot move vertices of an instance separately unless they are converted into a mesh by realizing them. $\endgroup$ Mar 16, 2023 at 19:22
  • $\begingroup$ ...thinking about it now it might be possible to capture an attribute or store a named attribute before instancing, for example the index assigned to the separate objects in the collection (which you would use for picking a certain object to instance specifically this) and later call this attribute as a selector for parts of the instance. But this might fail due to the fact that an instance acts as a unit as well, I'm not on a PC to check this out at the moment. $\endgroup$ Mar 16, 2023 at 19:27

1 Answer 1

4
$\begingroup$

You have to realize the instance and then separate by mesh island

enter image description here

enter image description here

$\endgroup$
1
  • 1
    $\begingroup$ Oh, of course that's a good solution. I was somehow thinking it was not only the goal to pick one object in one instance, but let's say all spheres in all instances. But in the question is asked for a specific object in a specific instance, so I misunderstood that. $\endgroup$ Mar 17, 2023 at 12:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .