IS there any way to assign colors from a mesh’s material that is a color ramp to each item in an array of that mesh, so that each element in the array gets its color relative to its offset from the original mesh? i.e. is there some index value that can be used to assign a color from the color ramp to the individual array elements that corresponds to the position of the colors of the color ramp?
I think I’ve seen some clever solution, but I can’t remember it.
I’d use an ortho camera for a UV project modifier on it and floor my uv coords from that to get an index number.
If I needed a non-linear array, I’d make a non-rendering linear duplicate and copy UV on the basis of topology from it.
Probably a better solution (maybe instances get individual object id, so instance from arrayed non-rendering planes instead? Can’t remember.)
Edit: oh duh, 2.8 now has a UV offset for the array modifier. So give it a UV offset of 1,0, then get your UV.x floor and use that as an index. (Feed into a noise texture for random value.)
