Sub topic 8
Controlling Shading with Sharp Edges and Smooth Shading
This chapter assumes you can navigate Blender, switch between Object Mode and Edit Mode, select mesh elements, and use modifiers. It also assumes your prop already has basic forms, panel cuts, and bevels. The goal is to make those forms look smooth where they should and crisp where they should.
Why hard-surface shading needs control
A mesh is made from flat polygon faces. Blender can display the boundary between those faces in two main ways:
- Flat shading displays each face separately. This keeps edges crisp but can make curved surfaces look faceted.
- Smooth shading blends the surface normals between faces. A normal is the direction Blender uses to calculate how light hits a surface.
Smooth shading works well on rounded handles, pipes, and curved housings. It can look wrong on a box because Blender may blend across an edge that should remain sharp. The result is a dark ripple or a surface that appears inflated.
Bevels and shading solve different problems. A bevel creates real geometry at an edge. Shading controls how Blender displays the faces around that geometry.
A practical shading workflow
Start by selecting the object and applying smooth shading:
- In Object Mode, select the mesh.
- Right-click the object.
- Choose Shade Auto Smooth if your Blender version provides it.
- Set an angle such as 30 or 45 degrees in the operator panel.
Auto smooth keeps edges sharper than the chosen angle while smoothing smaller changes. The exact menu name can vary between Blender versions. In recent Blender versions, the command may add a Smooth by Angle modifier. In older versions, it may configure an angle setting on the mesh.
A lower angle preserves more sharp edges. A higher angle smooths more of the object. Use the smallest angle that keeps intended hard edges crisp.
You can also mark specific edges as sharp:
- Enter Edit Mode.
- Select the edges that must remain crisp.
- Choose Edge > Mark Sharp.
- Make sure your smooth-by-angle setup respects sharp edges.
Marking an edge is useful when geometry alone does not describe the design. For example, two faces may meet at a shallow angle but still represent a deliberate panel boundary.
import bpy
obj = bpy.context.active_object
if obj is None or obj.type != 'MESH':
raise RuntimeError("Select a mesh object before running this script.")
# Smooth every polygon so the object's smoothing rule can control the result.
for polygon in obj.data.polygons:
polygon.use_smooth = True
# Preserve sharpness on currently selected edges.
for edge in obj.data.edges:
if edge.select:
edge.use_edge_sharp = True
print("Enabled smooth polygons and marked selected edges sharp.")This script does not decide which angle should be smooth. It prepares the mesh for a smooth-by-angle rule and preserves any selected sharp edges.
Inspecting artifacts
Rotate a strong area light around the model or use the material preview. Look for:
- Wavy highlights on flat panels.
- Dark patches near Boolean openings.
- A bevel that appears pinched at corners.
- A hard edge that has become rounded by smoothing.
- Sudden changes in brightness across a supposedly flat surface.
Check the model in solid view and rendered view. A shading problem can be hidden by one lighting direction.
Modifier order and normals
A common hard-surface stack is:
- Mirror
- Boolean
- Bevel
- Smooth-by-angle or weighted normal treatment
The exact order depends on the prop. A Boolean before Bevel lets the Bevel modifier round the new opening. A Bevel before a Boolean can leave the cut edge untreated.
Apply scale before judging bevel width or shading. Non-applied scale can make the same bevel value produce different widths on different axes.
If flat faces still show gradients after smoothing is configured, inspect the topology around the face. Long, thin triangles, overlapping vertices, internal faces, and messy Boolean results can all produce unstable normals. Recalculate normals outside with Shift+N, remove internal geometry, and add support edges only when they improve the surface.
Exercise
Exercise
Your box-shaped prop has smooth curved handles, but its main panels show wavy highlights. What should you check first?
Show answer
Confirm that the main panels are not being smoothed across their intended hard edges. Check the smooth-by-angle setting, mark required edges sharp, apply object scale, and inspect the topology near Boolean cuts.