Adding some varying materials to members of an array modifier

I am working on some animations involving DNA, in which I have a single nucleobase pair arrayed with an object offset twisting the array members into a double helix. I do it this way so I can animate the DNA strand uncoiling by transforming the empty from which the array is offsetting.

My problem is I want to have different colored nucleobases along the array, but I cannot think of a way to achieve that without baking results and manually coloring the nucleobases, which would probably mess up the versatility of my system.

Is there some nifty trick out there that I’m not seeing?

Projection might work for you? It works by projecting a texture from another object’s location (i.e. the Empty in the example scene) on to the target object. Kind of like a slide projector would cast on to anything in it’s path. It always projects along the Z-axis, so you can not rotate the Empty along that axis. You can scale the Empty to scale the projection.

This will not give you exact materials on exact objects, but by parenting the empty to the array object, you should be able to prevent the materials from “swimming” across the target.

Attachments

25_project_material_to_array.blend (394 KB)