Eventually, I might give it 20 different UVMaps in Object mode, and seperate them by loose parts.
What I want now, is a shader that randomly choose between my UVMaps and hence, the parts of the texture (that I have specified, in this case, about 20 different parts of the texture) whenever I duplicate a roof tile.
Preferebly, it should work with array modifier.
I initially tried solving the problem by grouping my roof tiles, and then distributing them using a particle system… problem is, particles are randomly placed, even with even distribution and random off, it still is random. Random enough for this not to work.
I’m not sure if this is what you want, and I expect the math to be broken, but something like this is how I would randomly choose a square (divide muted) or full height (divide on) in a texture map containing 20 variations side by side. If you want to preview the UV map coordinate readout, I recommend switching color management to none (so that 0.5 actually reads out 0.5 instead of gamma corrected). Dupli and manual cloning would work, but not array since that keeps things in the same mesh. So setup looks something like this:
Here’s the method I normally use:
create one uvmap for all tiles, so that each tile occupies the whole UV area.
create another uvmap, but with all tiles as islands, and then scale the islands to Zero (with individual origin selected).
then you can use the second uvmap to drive a noise for the randomness, and the first for the textures.
ps: what I really did was:
create one tile, unwrap.
add two array modifiers (X and Y) and apply.
add a new uvmap, and unwrap again.
with uv selection set to islands and pivot to individual origins, scale the islands to 0.
play with the material.