Sub topic 4
Array: repeating geometry with a count and relative offset
This chapter covers the Array modifier's core behavior: how it copies geometry, how Fixed Count and Relative Offset work together, and the errors that most often confuse people the first time. It assumes you can navigate the 3D viewport, switch between Object Mode and Edit Mode, and that you know what an object origin, a vertex, an edge, a face, and a normal are. It also assumes you have read the chapter on the modifier stack, so you know modifiers evaluate from top to bottom.
What the Array modifier does
The Array modifier takes the mesh it receives from the modifier above it (or the base mesh, if it is first) and produces several copies of that geometry, placed one after another. The copies are not separate objects. They are extra geometry inside the same object, generated on the fly.
This is non-destructive. You model one tooth of a gear, one fence post, one stair step, or one window. You then let the modifier build the row. If you later change the original shape in Edit Mode, every copy updates. If you change the count, the row grows or shrinks.
To add one in the interface, select an object, open the Modifiers tab (the wrench icon) in the Properties editor, choose Add Modifier, then Generate, then Array. A new default Array modifier appears with a count of 2. That is why a new Array modifier seems to show one extra copy of your object right next to it.
The two settings you use first
Most simple arrays depend on two things: how many copies, and how far apart.
Fit Type and Count
The Fit Type menu decides how the number of copies is chosen. This chapter uses Fixed Count, the default. Other fit types are covered in a later chapter.
With Fixed Count, the Count field is the total number of copies, and it includes the original. A count of 5 gives you the original plus four more, five pieces in total. A count of 1 shows only the original, so the array appears to do nothing. A common beginner mistake is to set the count to 5 and expect four visible copies in addition to the original.
Relative Offset
Relative Offset is enabled by default. It places each copy a distance from the previous one, measured in multiples of the object's own size along each axis. The three values are labeled Factor X, Y, and Z.
1.0on X means the next copy starts one full object width further along X. The copies touch edge to edge.1.1on X leaves a gap of one tenth of the width.0.5on X makes each copy overlap the previous one by half.-1.0on X builds the row toward negative X.- Values on more than one axis build a diagonal.
The default is 1.0 on X and 0.0 on Y and Z, so a fresh Array modifier lines copies up along X with no gap.
The word "relative" matters. The distance is not in Blender units. It is a fraction of the object's bounding box size along that axis. A 2 m wide wall segment with a factor of 1.0 moves each copy 2 m. A 0.2 m wide post with the same factor moves each copy 0.2 m. This is why the same settings work on objects of any size, and why you rarely need to calculate distances by hand.
How the spacing is measured
Blender measures the object's size from its bounding box, which is the smallest box that contains all of the mesh being fed into the Array modifier. Two consequences follow:
- If you scale the object in Edit Mode, the bounding box changes and the spacing changes with it.
- If you scale the object in Object Mode, the object's scale is applied after modifiers run, so the spacing keeps its proportion. The whole row scales together.
Because the measurement uses whatever the previous modifier produced, adding a modifier above the Array that changes the size of the mesh also changes the spacing.
A worked example: a row of fence posts
Suppose you have a single post, 0.2 m wide, 0.2 m deep, and 1.5 m tall. You want five posts with a gap between them equal to one post width.
A gap of one width means each copy begins two widths from the previous start: one width for the post, one for the gap. So the relative factor on X is 2.0.
- Select the post in Object Mode.
- Add an Array modifier.
- Keep Fit Type on Fixed Count and set Count to 5.
- Keep Relative Offset enabled and set Factor X to 2.0.
You now have five posts with equal gaps. Change Factor X to 3.0 and the gaps widen to two post widths. You never touched the mesh.
The script version of the same idea is below. This is the example from the plan, which uses a factor of 1.1 for a small gap.
import bpy
obj = bpy.context.active_object
arr = obj.modifiers.new(name="Array", type='ARRAY')
arr.fit_type = 'FIXED_COUNT'
arr.count = 5
arr.use_relative_offset = True
arr.relative_offset_displace[0] = 1.1
arr.use_merge_vertices = FalseEach line maps to a setting in the panel.
| Script property | Panel setting |
|---|---|
| `fit_type = 'FIXED_COUNT'` | Fit Type: Fixed Count |
| `count = 5` | Count |
| `use_relative_offset = True` | Relative Offset checkbox |
| `relative_offset_displace[0] = 1.1` | Factor X |
| `use_merge_vertices = False` | Merge checkbox (off) |
Here relative_offset_displace is a three-value vector, so index 0 is X, 1 is Y, and 2 is Z. The script needs an active mesh object, otherwise obj is None and the script fails with an attribute error.
How the copies are built
The following diagram shows how one base shape becomes a row.
The first copy sits where the original is. Each later copy is shifted by one more step of the offset. The offset for copy n (counting from 0) is n multiplied by the factor, in object widths.
Where the row grows from
The array starts at the original and grows in the direction of the offset. The original does not sit in the middle. If you want the row centered on the object, you have to move the object's origin or move the mesh in Edit Mode. The modifier does not do it for you.
This matters when you plan to combine arrays with other modifiers, because the object origin is also the reference point for Mirror. That interaction is covered in the chapters on modifier order.
Common errors
Only one object appears. Count is 1, or the offset is 0 on every axis so the copies sit exactly on top of each other. Check both.
Copies overlap or leave gaps you did not expect. The factor is a multiple of the object's size, not a distance in meters. Do the arithmetic as "step size in widths", not "gap size". A gap of one width needs a factor of 2.0, as shown in the fence example.
The row runs the wrong way. The offset is applied in the object's local axes. If the object is rotated, the row follows the rotation. Check the object's rotation values, or apply rotation with Ctrl+A in Object Mode if you want the row to follow the world axes.
Copies seem to share one smooth blob. If Merge is switched on and the copies touch, vertices closer than the merge distance are welded. This is useful for continuous shapes such as a chain of pipe segments, but it is wrong for separate posts. Merge is covered in the chapter on fit types and caps.
Editing the original appears to do nothing. You may be editing a different object, or the Array modifier's display in Edit Mode is hidden. Use the modifier's Edit Mode toggle in its header to show the result while editing.
A note on modifier position
The Array modifier acts on whatever arrives from the modifier above it. If a Mirror modifier is above the Array, the Array repeats the mirrored whole. If the Array is above the Mirror, the whole row is mirrored. These give different results, and later chapters explain why. For now, remember that moving a modifier up or down in the stack changes what the Array copies.
Exercise
A post is 0.4 m wide along X. You add an Array modifier with Fixed Count, Count 6, and Relative Offset with Factor X set to 1.5. How many posts do you see, and what is the distance from the start of one post to the start of the next?
Show answer
You see six posts, because Count includes the original. Each step is 1.5 times the post width, so 1.5 × 0.4 m = 0.6 m from one post's start to the next. The gap between posts is 0.6 m − 0.4 m = 0.2 m.
Exercise
You want five identical crates in a row with a gap between neighbors equal to half a crate width. What Count and Factor X do you use?
Show answer
Count 5 and Factor X 1.5. Each step is one crate width plus a half-width gap, which is 1.5 widths.