# How can I get the materials used in an array's caps to be properly assigned?

After building an object for an array, and its start and end caps, I added materials to the objects. The caps appear with the materials in the wrong place. The objects themselves have the materials where they should be, but when they appear as part of the array, they are in the wrong place.

Deleting the material assignments and the array modifier and redoing them all hasn't helped. I don't think there are any normal issues. The objects that are the caps display properly, it's only when displayed as part of the array that they are wrong.

As this seems like an odd thing, I've included the file.

• is this for Cycles? – icYou520 May 14 '18 at 17:00
• Yes. Oh... the materials were linked. Let me do something about that. – kim holder May 14 '18 at 17:02
• I was able to recreate your problem, I am trying to see how to fix it. – icYou520 May 14 '18 at 17:03
• Ok I figured it out, it was weird not sure if its a bug or its supposed to work that way (maybe with material ID's) I will post the answer now. But the trick was that the materials are out of order for each object. I guess using the end caps all the materials need to be in order for all objects. – icYou520 May 14 '18 at 17:41
• @icYou520 Ahhhh.... huh, interesting. Thanks for tracking it down, you have a clearer mind than me. – kim holder May 14 '18 at 17:43

I took a look at your blend.

It seems that the order of materials matters when using the start/end caps in an array modifier (maybe because of material ID's!?). Not sure why it works this way or if its a bug.

Notice on my RGB pic of materials the colors match the slot number on all objects.

However in yours, the metal brush and mirror are swapped. I guess this "swap" does not carry over in the caps of the array modifier.

So just make sure all the objects have the same material on the same slot number.

• It's certainly a 'feature' if not a bug .. If you assign materials in non-overlapping slots for the arrayed object and its start and end caps, then so long as you add enough material slots to the combined object, you don't even have to assign materials to the slots. The combined object just picks them up. – Robin Betts May 14 '18 at 19:14

To make a black paint in vertex paint mode (with face selection masking for painting) and in node editor, mix the two materials. Connect an attribute node to the fac in a mix shader, from the color output. And write name in your Vertex Color input field.

• This doesn't seem to address this question. Did you post here by mistake? – Duarte Farrajota Ramos Jul 17 '19 at 17:05
• Yes, couse it could solve the problem, even if your caps have more material. But this is strange with this correction. The first "To" is unnecessary. – zsolt oravecz Jul 18 '19 at 13:34