# Can I duplicate Geometry nodes with "random" materials, and have the randomness be the same in each copy?

Let's say I have a plane and I add a Distribute Points on Faces node and then an Instance on Points node and feed a Collection Info node into the latter node.

The collection is just one object, with a material which is determined by having a Random node feed into a color ramp, and then feeding the color ramp into the base color input of a Principled Shader node. Now I have a bunch of objects with different colors.

So, my question is very specific: can I somehow nondestructively duplicate all those instances collectively, and have each copy have instances of the exact same color as the ones in the other copies?

So as an example, say I make two balls and the left one is red, and the right one is green. Can I duplicate the two balls and have the left one be red and the right one be green in the copy? And then if I scale the red one in the first copy, have the red one scale in the second copy too?

The only thing I can think of is in the material node, to have some sort of calculation based on the "id" attribute of the instance. It seems to be pretty random, so why not just modulo it by 100 and call it a day - but if I try to use the "id" attribute in an Attribute node, it always seems to be zero in the material, even though I can see it in the Spreadsheet view.

I've tried a Particle Info node, but that really only seems to work for particles and not for instances. I've tried an Object Info node and then the Object Index socket on that, but that seems to always be zero too. Maybe an AOV output? But that's a chicken and egg situation because the AOV value would have to have itself as an input, indirectly.

Is there a simple trick I'm missing here? Or is it just not possible at this time?

• you made yourself a lot of work by describing a node tree which would have been less work by just copying it and pasting it in here. And it would even make your question much easier to understand.... Commented Dec 28, 2021 at 14:23
• just as a hint: if you want to attract people to your question you should include screenshots and blend file... Commented Dec 29, 2021 at 10:52

## 2 Answers

if i understood you right, you can do it with this node tree setup:

Shader tree setup:

result:

If you copy and paste the object in your layout, then go to the geometry node workspace and look above all your geometry nodes. There should be some type of name for your workspace and if you click the drop-down menu next to it, you can then select the same geometry node panel your original object was working on.