How to apply material to disjointed object duplicated with array modifier Ok, so I created an object that looks like this:



The internal object is surrounded on all sides by another object.  The inner object has a marble material.  The outside object does not.

I duplicate the object via the array modifier in the x and y direction like so:



Now, if I apply a marble material to the inner object, it applies the whole material scaled down to fit in the little inner object rather than spreading it out over the entire array.

I'd like to know how to make the material apply to the entire array.  The image below is the actual blend.  The "stairs" and the individual squares on the board are the same material.  As you can see, it looks like the material is compressed into each square, versus being spread out as on the "stairs".
When dealing with the Array Modifier it's important to know that object coordinates (which you are using) are generated for the whole object, but the 0-1 texture space is matched to the un-arrayed object. If you were using UVs, the UV map would repeat on each tile, which is even less of what you want in the long run. So your approach is the right one, but instead of having UV coordinates between 0 and 1, you have them between 0 and 7, because you need 7 tiles to fill the space. That makes the texture repeat again on your tiles.

Luckily the solution in your case is simple: Plug a Mapping node right after you generate the random coordinates, and set the scale to 1/7 (or if you change the number of tiles later, fill in the numOfTiles respectively). Blender will do the math for you. Voila: The coordinates have been transferred back to 0-1 space:



You can check the modified Blend file here: