Sub topic 7
Mirror and Decimate modifiers
This chapter assumes you can add primitives, move between Object Mode and Edit Mode, and select vertices and faces. It also assumes you know what the Properties editor is. A modifier is a non-destructive operation that Blender computes on top of a mesh. The original mesh data stays unchanged until you apply the modifier.
Two modifiers do most of the work in a low-poly scene. Mirror halves the modelling effort for symmetrical objects such as a rock, a tent or a trunk with two branches. Decimate reduces the face count of a mesh that is denser than you want.
How modifiers fit into the workflow
Modifiers live in the Modifiers tab (the wrench icon) of the Properties editor. They run from top to bottom, and each one receives the result of the one above it. This order matters, and the examples below show why.
Because the modifiers are not applied, you can keep editing the original half mesh. Every edit shows up on both sides of the model straight away.
The Mirror modifier
What it does
Mirror duplicates the mesh across a plane and joins the copy to the original. The plane passes through the object's origin, measured in the object's local axes. Because of this, a Mirror that looks wrong usually has an origin in the wrong place. It does not usually mean the modifier is set up wrong.
To add it, select the object, open the Modifiers tab, choose Add Modifier > Generate > Mirror. Blender 4.x lists Mirror under Generate.
The settings you will use
| Setting | Python name | Effect |
|---|---|---|
| Axis X, Y, Z | `use_axis` | Which axes to mirror across. X is on by default. Enabling more than one gives 4 or 8 copies. |
| Bisect | `use_bisect_axis` | Cuts off anything on the far side of the plane before mirroring. |
| Flip | `use_bisect_flip_axis` | Chooses which side Bisect keeps. |
| Mirror Object | `mirror_object` | Uses another object's origin and orientation as the mirror plane. |
| Clipping | `use_clip` | Stops vertices on the plane from moving off it while you edit. |
| Merge | `use_mirror_merge` | Welds vertices that are closer than the merge distance. |
| Merge Distance | `merge_threshold` | The welding tolerance. The default is 0.001. |
A typical setup
- Model only one half of the object. Keep the vertices of the centre seam exactly on the plane, for example at X = 0.
- Add the Mirror modifier with X enabled.
- Turn on Clipping. Vertices on the seam can then slide along the plane but cannot cross it, so you cannot open a gap in the middle by accident.
- Turn on Merge so the two halves become one connected surface. Otherwise you get two meshes that touch but are not joined.
- Keep the modifier live until the model is finished.
Scripting it
This script builds a half box, tapers it, deletes the open face on the seam, and adds a Mirror modifier. It then reads the face count of the evaluated mesh, which is the result after modifiers. Run it in Blender's Scripting workspace.
import bpy
import bmesh
# Start from a cube and keep only the +X half
bpy.ops.mesh.primitive_cube_add(size=2, location=(0, 0, 1))
obj = bpy.context.active_object
obj.name = "MirroredRock"
bm = bmesh.new()
bm.from_mesh(obj.data)
for v in bm.verts:
v.co.x = max(v.co.x, 0.0) # flatten the -X half onto the plane X = 0
if v.co.z > 0: # taper the top so the shape is not just a box
v.co.x *= 0.5
v.co.y *= 0.6
# Remove the face that now lies on the mirror plane
seam_faces = [f for f in bm.faces if all(abs(v.co.x) < 1e-6 for v in f.verts)]
bmesh.ops.delete(bm, geom=seam_faces, context='FACES_ONLY')
bm.to_mesh(obj.data)
bm.free()
obj.data.update()
# Mirror across local X, weld the seam, keep seam vertices on the plane
mod = obj.modifiers.new(name="Mirror", type='MIRROR')
mod.use_axis[0] = True
mod.use_clip = True
mod.use_mirror_merge = True
mod.merge_threshold = 0.001
# Read the result after modifiers
depsgraph = bpy.context.evaluated_depsgraph_get()
evaluated = obj.evaluated_get(depsgraph)
print("Faces in the stored mesh:", len(obj.data.polygons))
print("Faces after Mirror:", len(evaluated.data.polygons))The stored mesh has 5 faces and the evaluated mesh has 10. The difference shows that the modifier adds geometry on top of the data without changing it.
Applying Mirror
Applying turns the result into real geometry. Use the drop-down arrow on the modifier header and choose Apply, or hover over the modifier and press Ctrl+A. Apply Mirror only when you want to break symmetry, for example to give the left and right of a rock different bumps. After applying, edits to one side no longer affect the other.
Common Mirror problems
- The mirror appears in the wrong place. The origin is not on the symmetry plane. Move the 3D cursor to the plane and use Object > Set Origin > Origin to 3D Cursor. You can also set a Mirror Object, such as an empty at the centre.
- A visible seam or double vertices in the middle. Merge is off, or the seam vertices are not exactly on the plane. Select them in Edit Mode and set their X value to 0 in the N-panel.
- Dark or inverted shading on one half. The object has a negative scale, often from mirroring it with Ctrl+M earlier. Apply the scale with Object > Apply > Scale, then recalculate normals in Edit Mode with Shift+N.
- A gap opens when you move a centre vertex. Clipping was off. Turn it on before you edit the seam.
- Overlapping geometry down the middle. The half mesh crosses the plane. Delete the extra vertices, or turn on Bisect to cut them off.
The Decimate modifier
What it does
Decimate reduces the number of faces in a mesh while trying to keep the overall shape. The modifier panel shows the resulting Face Count, which helps when you are working toward a polygon budget.
For a scene like this one, hand-modelling is usually the better route. Decimate is most useful when you start from something dense, such as a subdivided icosphere, a sculpted rock or an imported model, and you need a quick low-poly version.
The three modes
| Mode | Python `decimate_type` | Controlled by | Best for |
|---|---|---|---|
| Collapse | `'COLLAPSE'` | `ratio` (0 to 1) | General reduction by merging vertices. |
| Un-Subdivide | `'UNSUBDIV'` | `iterations` | Undoing a subdivision on a regular grid-like mesh. |
| Planar | `'DISSOLVE'` | `angle_limit` (radians) | Merging flat neighbouring faces on hard-surface shapes. |
Collapse is the mode you will use most. A ratio of 1.0 keeps all faces and 0.3 keeps about 30 percent. It produces triangles unless you enable Triangulate, which is off by default but only matters in the sense that collapsed results are generally triangle-based. Collapse also offers Symmetry, which makes the reduction match across an axis, and a Vertex Group, which protects the vertices you assign to it.
Planar mode merges faces whose normals differ by less than the angle limit. A smooth ico sphere has no flat regions, so Planar does little to it. It is much more useful on a cube that has been subdivided with extra loops.
Scripting it
import bpy
# A dense sphere: subdivisions=4 gives 1280 faces
bpy.ops.mesh.primitive_ico_sphere_add(subdivisions=4, radius=1.0, location=(0, 0, 1))
obj = bpy.context.active_object
obj.name = "DenseRock"
mod = obj.modifiers.new(name="Decimate", type='DECIMATE')
mod.decimate_type = 'COLLAPSE'
mod.ratio = 0.1
depsgraph = bpy.context.evaluated_depsgraph_get()
evaluated = obj.evaluated_get(depsgraph)
print("Before:", len(obj.data.polygons))
print("After:", len(evaluated.data.polygons))The "After" count should be roughly 10 percent of 1280. It will not be exact, because Collapse removes vertices in steps and the result is not guaranteed to land on the ratio.
To make the reduction permanent, apply the modifier with the object active:
import bpy
obj = bpy.context.active_object
bpy.ops.object.modifier_apply(modifier="Decimate")
print("Faces now stored:", len(obj.data.polygons))Limits and gotchas
- Topology is not preserved. Collapse ignores your edge flow. Do not run it on a model whose loops you built on purpose.
- Triangles and uneven faces. The result is not tidy quads. For a faceted look this is usually fine. If you plan to keep editing, it is awkward.
- UVs and vertex colours drift. If your model has UV maps, Collapse can stretch them. Solid-colour materials, as used in this tutorial, do not have this problem.
- Shape keys block it. Blender cannot apply Decimate to a mesh that has shape keys.
- Very low ratios break shapes. Below about 0.05, thin parts collapse or vanish. Reduce in stages and check the silhouette.
Using the two together
Order the stack as Mirror first, then Decimate, when you want a symmetrical result. Mirror creates the full shape, and Decimate then reduces it. With Decimate first, the two halves reduce independently, and the seam can end up uneven.
If you do put Decimate before Mirror, or you want the reduction itself to be symmetrical, enable Symmetry in Collapse mode and choose the same axis as the Mirror.
A practical routine for a scene object:
- Model or generate half of the object.
- Add Mirror with Clipping and Merge on.
- Add Decimate only if the mesh is denser than your budget.
- Check the face count in the Decimate panel, or use Statistics in the viewport overlays.
- Apply the modifiers once the shape is final, because later steps such as exporting are simpler with real geometry.
Exercise
You mirrored half a rock across X. In the viewport, the two halves are separate surfaces with a visible line down the middle, and moving a seam vertex opens a gap. Name the two Mirror settings that fix this and say what each does.
Show answer
Turn on Merge (usemirrormerge), which welds vertices on the seam that are closer than the merge distance so the halves become one surface. Turn on Clipping (use_clip), which stops seam vertices from leaving the mirror plane, so moving them can no longer open a gap. Also make sure the seam vertices are exactly at X = 0.
Exercise
A script creates an icosphere with subdivisions=4 (1280 faces) and adds a Decimate modifier with decimate_type='COLLAPSE' and ratio=0.25. Roughly how many faces should the evaluated mesh have, and which object do you read the count from?
Show answer
About 320 faces, which is 25 percent of 1280. Read it from the evaluated object, obj.evaluatedget(bpy.context.evaluateddepsgraph_get()), because obj.data still holds the original 1280 faces until the modifier is applied.
Exercise
Why is Planar mode a poor choice for reducing a smooth icosphere?
Show answer
Planar merges neighbouring faces whose normals differ by less than the angle limit. An icosphere has no flat regions, so almost no neighbouring faces are close enough in angle to merge, and the mode removes very little. Collapse is the right mode for this case.