1
$\begingroup$

For the life of me, I am unable to get instances of different colors using geometry and shader nodes. From what I've seen of other answers on here, there are two ways to get information from the geometry into the shader: You can connect it to the output node, and then give it a name in the modifier window (I used Colo) or you can use the Named Attribute node to define it (in my case, Colou). Then you put the name in the shader nodes Attribute Node, and it's supposed to carry it over. But it isn't.

Is it clear from the setup I have below what I'm doing wrong?

Clockwise from top left: Geometry nNodes, outliner, geometry nodes modifier, Shader Nodes, and the result

$\endgroup$
4
  • 1
    $\begingroup$ In the shading editor, the attribute Type should be Instance. I'm guessing that's it ? $\endgroup$
    – Lutzi
    Commented Jun 23 at 21:52
  • $\begingroup$ Instancer* and make sure it's Blender 3.4 or later. $\endgroup$ Commented Jun 23 at 23:23
  • $\begingroup$ That's part of it, I'm sure. I fixed that and they boxes all turned red. I also forgot to divide the factor by the number of boxes so it's in the range 0-1, but even after I do that, they all stay red, so there must be something else going on. $\endgroup$ Commented Jun 24 at 0:45
  • $\begingroup$ Okay, so I did the division backwards, and that was what I needed to fix the problem. Thank for the help! $\endgroup$ Commented Jun 24 at 1:10

1 Answer 1

0
$\begingroup$

...just to be able to mark this question as solved:

Since you are only creating instances here with geometry nodes, the trick in this case is to set the type of node Attribute in the shader to "Instancer".

Something like this:

Different colors for instanced objects

$\endgroup$

You must log in to answer this question.

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