Sub topic 5
Array: constant offset and object offset
This chapter covers the two Array offset modes that go beyond relative spacing: constant offset, which places copies at a fixed distance, and object offset, which places them by the transform of a second object. It assumes you have read the previous chapter on relative offset and count. It also assumes you can add a modifier from the Properties editor, tell Object Mode from Edit Mode, and know what an object origin is.
Why relative offset is not always enough
Relative offset measures spacing in multiples of the object's own bounding box. This works well for bricks, fence slats and stair treads, where the spacing follows the size of the part. Two situations break it.
- You need an exact spacing in scene units, such as a bolt every 0.25 m, whatever size the bolt is.
- You need copies that rotate or scale from one to the next, such as a spiral staircase or a ring of petals. A straight-line offset cannot do this.
Constant offset handles the first case. Object offset handles the second.
The three offsets add together
The Array modifier has three offset checkboxes: Relative Offset, Constant Offset and Object Offset. Each can be on or off independently. When several are on, Blender combines them into one step transform and applies it once per copy. Copy 1 is moved by one step, copy 2 by two steps, and so on.
The most common mistake is leaving Relative Offset on, with its default factor of 1.0 on X, while adding a constant offset. The two values add, so the spacing is larger than you intended. If you want only a fixed distance, turn Relative Offset off.
Constant offset
Constant offset adds a fixed translation between copies. Enable Constant Offset and fill in the Distance values for X, Y and Z.
A few details matter in practice:
- The distance is in the object's local space. If the object has a scale other than 1, the spacing is multiplied by that scale. When spacing looks wrong, check the object scale in the N panel, or apply scale with
Ctrl+A. - The distance can be negative, which makes the row grow in the opposite direction.
- Distances on several axes at once give a diagonal row. A Z distance of 0.2 and an X distance of 1.0 make a simple ramp or staircase.
- Constant offset does not depend on the mesh's size. You can edit the mesh in Edit Mode and the spacing stays the same, which is the main reason to choose it over relative offset.
Here is a row of six posts spaced exactly 0.5 units apart, with relative offset disabled:
import bpy
obj = bpy.context.active_object
arr = obj.modifiers.new(name="Array", type='ARRAY')
arr.fit_type = 'FIXED_COUNT'
arr.count = 6
arr.use_relative_offset = False
arr.use_constant_offset = True
arr.constant_offset_displace = (0.5, 0.0, 0.0)If the posts are wider than 0.5 units, they overlap. Constant offset does not look at the mesh, so it never warns you about overlap.
Mixing relative and constant offset
Mixing the two is useful when you want a gap that is independent of the part size. Set Relative Offset X to 1.0, so each copy starts where the last one ends. Then set Constant Offset X to 0.1. The result is a 0.1 unit gap between copies, however wide the part is. If you resize the part, the copies still touch edge to edge plus a fixed 0.1 gap.
Object offset
Object offset uses the transform of another object as the step between copies. Enable Object Offset and pick an object in the field below it. This object is usually an Empty, because an Empty has no geometry and is easy to see and manipulate.
The step is the offset object's transform measured relative to the array object. In other words, Blender asks where the empty is, what its rotation is and what its scale is, all as seen from the array object's origin. That one transform is then applied repeatedly:
- Copy 1 is transformed by the offset once.
- Copy 2 is transformed by the offset twice.
- Copy n is transformed by the offset n times.
Because the transform compounds, rotation and scale accumulate. This gives you a family of shapes with very little setup.
| Empty transform (relative to the array object) | Result with Count > 1 |
|---|---|
| Moved along X | A straight row, like constant offset |
| Rotated around Z, located at the object origin | A ring of copies around the origin |
| Rotated around Z and moved up on Z | A spiral staircase or helix |
| Scaled to 0.9 on all axes | Copies that shrink step by step, like a shell or a taper |
| Rotated, moved and scaled together | A spiral that also tapers |
Building a ring
A ring is the classic use of object offset. The steps are:
- Model one part, such as a tooth or a petal, and move it away from the object origin in Edit Mode. The origin will be the center of the ring.
- Add an Empty at the same world location as the object origin. With the object selected,
Shift+Sthen Cursor to Selected followed by adding the Empty puts it at the cursor. - Rotate the Empty around Z by 360 divided by the count. For 8 copies, rotate 45 degrees.
- On the Array modifier, set Count to 8, turn Relative Offset off, turn Object Offset on and choose the Empty.
Each copy is rotated another 45 degrees around the origin, and after 8 copies the ring is closed. Since copy 0 is the original and copy 8 would sit on top of it, a count of 8 gives exactly 8 distinct parts around the circle.
The same setup as a script:
import bpy
import math
obj = bpy.context.active_object
empty = bpy.data.objects.new("Array_Offset", None)
empty.empty_display_type = 'ARROWS'
empty.location = obj.location
empty.rotation_euler[2] = math.radians(360 / 8)
bpy.context.collection.objects.link(empty)
arr = obj.modifiers.new(name="Array", type='ARRAY')
arr.fit_type = 'FIXED_COUNT'
arr.count = 8
arr.use_relative_offset = False
arr.use_constant_offset = False
arr.use_object_offset = True
arr.offset_object = emptyAfter running it, select the Empty and change its rotation. The ring updates live. If you change the Empty to 30 degrees with a count of 8, the ring no longer closes, and you see a partial arc.
Common problems with object offset
- The copies orbit the wrong point. The pivot of the ring is the array object's origin, and the offset is measured from there. If the ring is off-center, move the object origin, or move the Empty to match it.
- Nothing happens. Object Offset must be checked, and an object must be chosen in the field. Selecting an object without enabling the checkbox does nothing.
- Moving the array object moves the Empty's effect. The offset is relative, so if you move or rotate the array object, the Empty's world position no longer matches the origin. Parent the Empty to the array object, or move both together, to keep the setup stable.
- A scale of 1.1 on the Empty explodes the result. Scale compounds per copy. A scale of 1.1 across 20 copies gives a final scale of about 6.7. Use small deviations from 1.0.
- Copies are not where the Empty is. The Empty marks the step, not the location of the last copy. Copy 1 appears at the Empty's position only if the object origin and the Empty are in the same coordinate space and there are no other offsets enabled.
Choosing between the three offsets
| Need | Use |
|---|---|
| Spacing that follows the part size | Relative offset |
| Exact spacing in units, independent of the part | Constant offset |
| A fixed gap between parts of changing size | Relative offset plus a small constant offset |
| Rotation, scale or a curved path | Object offset |
| A ring or spiral | Object offset with a rotated Empty |
Exercise
A cylinder has Array count 5, Relative Offset X = 1.0 and Constant Offset X = 0.25, both enabled. The cylinder is 2 units wide. What is the distance between the origins of two neighboring copies, and how do you make the spacing exactly 0.25 units?
Show answer
The distances add: 1.0 x 2 units = 2.0 from the relative offset plus 0.25 from the constant offset, so neighboring origins are 2.25 units apart. To get exactly 0.25 units, turn Relative Offset off so only the constant offset remains (the cylinders then overlap, since they are 2 units wide).
Exercise
You want 12 spokes around a wheel hub using object offset. What rotation should the Empty have, around which axis, and where should the Empty and the spoke's origin be?
Show answer
Rotate the Empty 30 degrees (360 / 12) around the axis the wheel turns about, usually Z for a wheel lying flat. Put the Empty at the same world location as the array object's origin, which should be at the hub center, with the spoke modeled away from that origin. Set Count to 12, disable Relative Offset, and enable Object Offset with the Empty selected.