1
$\begingroup$

I've been wanting to make a model so when I make a single mesh into an array, each part of that array has a different color. The image below is some kind of example. For example, the first ribbon could be the main object and then the array repeats it 6 times below it.

What I'm asking is how can I make each array have a separate color so when I animate the original, the others animate the same and still keep their color. I've tried using the color ramp, but it won't let the colors stay on each array. So if the object curves, it will mix with the other colors.

I'm sure I'm using the wrong shader nodes, but that's all I can think of to show what issues I'm coming into. If I can do this without making separating all the arrays into their own object and make a material for each object, then that would really help.

enter image description here enter image description here

$\endgroup$
2
  • $\begingroup$ As well as the answers below, you might want to consider blender.stackexchange.com/a/233708/35559 $\endgroup$
    – Robin Betts
    Commented Mar 9, 2023 at 15:23
  • $\begingroup$ I think here it would be distance from center, perhaps modified by the normal for more even distribution. $\endgroup$ Commented Apr 27, 2023 at 13:07

1 Answer 1

4
$\begingroup$

Geometry nodes can be used for such tasks:

enter image description here

Here is how it works:

First, an array can be created inside geonodes, such as this round one based on curve:

enter image description here

But you can also use Mesh island node and use regular array.

enter image description here

In this case the setup will look like this:

enter image description here

Then store index in custom attribute:

enter image description here

That can be used in material:

enter image description here

Point that, then you make an array using geometry nodes, you should set attribute in instances instead of points and get data in shader from instances instead of geomtery.

$\endgroup$

You must log in to answer this question.

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