Sub topic 2
What the Subdivision Surface modifier does to your base mesh
This chapter explains what the Subdivision Surface modifier computes, so you can predict how a base mesh will look after smoothing. It assumes you can navigate the 3D viewport, switch between Object Mode and Edit Mode, select and move vertices, edges and faces, and add modifiers from the Properties editor.
The base mesh is a control cage
The mesh you edit is a control cage. It is not the final surface. The Subdivision Surface modifier reads the cage and generates a denser, smoother mesh. It does not change your original vertices. Your base mesh stays low-resolution and easy to edit, and the modifier produces the smooth result each time Blender redraws or renders.
By default the modifier uses the Catmull-Clark algorithm. Blender computes it with the OpenSubdiv library. Each level of subdivision does three things:
- It adds a face point at the center of every face.
- It adds an edge point on every edge. This point is pulled toward the neighboring face points, so it is not simply the edge midpoint.
- It moves each original vertex to a weighted average of itself and its surrounding edge and face points.
Blender then connects the new points. Every face with n sides becomes n quads. A triangle becomes 3 quads, a quad becomes 4 quads, and a 5-sided n-gon becomes 5 quads.
Growth per level
After the first level, every face is a quad. From then on, each level multiplies the face count by 4. The first level's result depends on the base mesh. It produces one quad per corner of the base mesh faces.
The table shows a default cube, which has 6 quad faces.
| Level | Faces | Vertices |
|---|---|---|
| 0 (base mesh) | 6 | 8 |
| 1 | 24 | 26 |
| 2 | 96 | 98 |
| 3 | 384 | 386 |
| 4 | 1536 | 1538 |
Because the count grows by 4 each level, high levels get expensive fast. A 20,000-face base mesh at level 3 produces about 1.28 million faces. This is why the modifier has separate Levels Viewport and Render values. Keep the viewport value low so editing stays responsive. Use a higher render value for the final image.
The limit surface
If you repeated the process forever, the mesh would converge to a limit surface. This is a smooth surface defined entirely by the cage. Three consequences follow:
- The surface does not pass through your vertices. Original vertices are pulled inward toward their neighbors. A cube becomes a rounded blob close to a sphere, and it is smaller than the cube you started with.
- Denser cages hug the surface more closely. More vertices means each vertex pulls less strongly on the shape.
- Flat areas stay flat only if the surrounding edges are close together. Edge spacing controls how tightly the surface follows the cage. This is the idea behind support loops, covered in a later chapter.
Surface quality also depends on vertex valence, which is the number of edges that meet at a vertex. A vertex with 4 edges is regular and gives a smooth surface with continuous curvature. A vertex with 3, 5 or more edges is extraordinary. The surface around it is still smooth, but its curvature can vary, and this can show up as pinching or uneven shading. Poles are covered in their own chapter. For now, remember that the modifier handles regular quad grids best.
Adding the modifier from Python
The same settings are available in the Properties editor under the Modifiers tab. In Python, the modifier type is 'SUBSURF'.
import bpy
obj = bpy.context.active_object
mod = obj.modifiers.new(name="Subdivision", type='SUBSURF')
mod.levels = 2 # subdivision level in the viewport
mod.render_levels = 3 # subdivision level when renderingIn Object Mode, Ctrl+1 through Ctrl+5 add the modifier or set its viewport level to 1 through 5, and Ctrl+0 sets level 0.
To see the effect of the modifier on counts, read the evaluated mesh. This is the mesh after all modifiers have run.
import bpy
obj = bpy.context.active_object
depsgraph = bpy.context.evaluated_depsgraph_get()
eval_obj = obj.evaluated_get(depsgraph)
mesh = eval_obj.to_mesh()
print(f"Base faces: {len(obj.data.polygons)}")
print(f"Evaluated faces: {len(mesh.polygons)}")
eval_obj.to_mesh_clear() # release the temporary meshWith a default cube and a viewport level of 2, this prints 6 base faces and 96 evaluated faces. The call to to_mesh_clear() frees the temporary mesh and is not optional housekeeping.
Settings that change the result
- Catmull-Clark and Simple. Catmull-Clark smooths the shape. Simple subdivides the faces but keeps every point where it is, so it adds geometry without rounding anything. Use Simple when you need more faces and no smoothing.
- Levels Viewport and Render. These set the subdivision depth for the viewport and for final rendering.
- Optimal Display. This hides the extra edges the modifier creates in wireframe and Edit Mode overlays. It only affects display, not the geometry.
- Quality. This sets how accurately the surface is evaluated at displaced positions and for normals.
- UV Smooth. This controls how UV coordinates are smoothed along island boundaries. The default keeps the corners of UV islands sharp.
- Boundary Smooth. This controls how mesh boundary edges, where a face has an open side, are treated. All Edges rounds the boundary. Keep Corners keeps the corners fixed.
- Use Creases. This allows edge crease values to sharpen edges. It is covered in the creases chapter.
- Use Custom Normals. This preserves custom split normals on the subdivided result.
The modifier also has display toggles for Edit Mode and the viewport, plus an On Cage button. When On Cage is enabled, you edit the subdivided surface directly instead of the base cage. For topology work, keep it disabled so you always see and edit the real control mesh.
Modifier order
Modifiers run from top to bottom, and each one receives the output of the one above it. A Mirror modifier should come before the Subdivision Surface modifier. Then the mirror merges the two halves into a single surface, and the subdivision smooths across the seam. Here is a Mirror followed by a Subdivision Surface modifier:
import bpy
obj = bpy.context.active_object
mirror = obj.modifiers.new(name="Mirror", type='MIRROR')
mirror.use_axis[0] = True # mirror across the X axis
mirror.use_clip = True # keep center vertices on the mirror plane
mirror.use_mirror_merge = True
subsurf = obj.modifiers.new(name="Subdivision", type='SUBSURF')
subsurf.levels = 2If the order is reversed, each half is smoothed separately. Each half shrinks away from the center line, and a visible gap or seam appears. The mirror workflow gets its own chapter later.
Common errors
- The shape looks smaller than the cage. This is expected. Vertices are pulled inward. Scale or adjust the cage, or add support loops near edges you want to keep full size.
- Smoothing looks right in the viewport but wrong in the render. Check that the viewport and render levels are not too far apart. A level 1 preview can hide pinching that appears at level 3.
- Flat shading on a subdivided object. The modifier generates the geometry, but face shading is a separate setting. Use Shade Smooth on the object if you want smooth shading. The surface still looks faceted at low levels if the shading is flat.
- Pinching at a vertex with 3 or 5 or more edges. This is the extraordinary-vertex effect described above. Move the pole to a flatter area or reroute the edges.
- Triangles and n-gons causing dents. Catmull-Clark turns them into quads, but the points where they meet the quad grid are extraordinary, and the surface there can be uneven. The next chapter looks at this in detail.
- Applying the modifier by accident. Applying with the wrong level gives you a mesh with far more geometry than you needed. Undo immediately with
Ctrl+Z.
Exercise
A base mesh has 500 quad faces and no triangles or n-gons. How many faces does it have at Levels Viewport 3, and what happens to the shape compared with the cage?
Show answer
Level 1 gives 500 × 4 = 2,000 faces. Level 2 gives 8,000. Level 3 gives 32,000 faces. The smooth surface does not pass through the cage vertices. It is pulled inward and rounded, so the shape is slightly smaller than the cage, especially at corners and where edges are far apart.