# How to use the array modifier multiple times in an optimised way?

I've been doing some visualisation exercises and I had this question. I want to recreate

.

I planned to do this by creating a 1x1 cube and then cloning it using the array modifier, but I am not sure how to correctly use this tool.

After this, if I try to add another array modifier, it overrides the previous parameters.

I did not apply the modifier yet.

The array modifier takes whatever is above it in the modifier stack and creates duplicates based on the offset(s) you choose: constant, relative or object based (or a combo of all three). These arrays are additive with the arrays below in the modifier stack. That means if you have 1 unit cube with a relative offset of 1 on X and a count of 3 followed by a second array with a relative offset of 1 on Y with a count of 3, you will end up with a 3x3x1 rectangle lying flat on the X-Y plane.

One way to do what you want to do is extrude faces instead of arraying the cube. You can then use a textures to get the visualization you want. Like this:

You could do this using arrays, because they can be given Start and End Caps which can, themselves, be arrays. But you would be creating a lot of work for yourself.

when you put a second Array modifier on an object, it doesn't override the previous parameters; it generates an array with the entire previous array as its elements.

You might be better off using a different duplication method - perhaps Vertex Instancing:

.. using a simple framework of vertices. Every time you E(XY or Z) extrude a new vertex, a cube will be instanced on it.

• These are really interesting ideas. I wasn't aware of vertex instancing at all! Feb 8, 2020 at 21:46
• @Electric_Wizard I think yours is better for contiguous cubes.. :) Feb 8, 2020 at 21:49