End cap not keeping its original colour

Hi All,
I have a simple array of an object that follows a curve.
I’ve added a different object to the end field under caps in the array modifier and all works well, accept for the end cap object should be red, but has taken on the colour of the main array object which is blue.
how can make the end cap keep it own colour?

it should more sense in the screen shot

Any help would be great
Cheers
A

The easiest solution is to use material slots.

  • give the cap object the cap material in slot 2 (put a blank dummy material in slot 1)
  • give the main array object the main material in slot 1 and cap material in slot 2.

The cap geometry can’t bring its material with it into the main object, but it does keep its material slot index, so it will look up whichever material happens to be in that slot on the main object.

Example blend: arraycapmat.blend (122.7 KB)

Thank you very much, that’s just what I needed.
so if I understand this correctly, the main array section ( middle) should have all the colours used for the three different parts in slots
slot 1 green for the “tail” piece, slot 2 blue for the " middle" and slot 3 red for the “head”?

For the tail piece should 2 blank slots then 3 slot be the green, because green is the third colour slot of the main array section.

As for the head piece this should have 1 blank slot then the 2 slot would be red, because red is the second colour of the main array section.

Or am I totally wrong?

Cheers
A

the slot positions of the materials should be the same in each object.

so if tail material is in slot 1 on the main object, it should also be in slot 1 of the tail.
and if head material is in slot 3 on the main object, it should also be in slot 3 of the head.

objects
main head tail
slots 1 tail mat - tail mat
2 main mat - -
3 head mat head mat -

I’m using blank materials to fill unused slots, but there’s no reason you couldn’t have the same full complement of materials on each object if you find that easier:

objects
main head tail
slots 1 tail mat tail mat tail mat
2 main mat main mat main mat
3 head mat head mat head mat

remember that you also need to go into edit mode for each object, select all, select the correct material, and click assign - otherwise they use the first slot by default.

That all makes sense.
thanks for the heads up about edit mode I could of missed that.

Cheers
A