Sub topic 9
Pinning and Relaxing Difficult Islands
This chapter assumes you can mark seams, run Unwrap, and read a checker texture in the UV Editor. It also assumes you know what the stretch display shows. Here you will fix islands that unwrap with twists, folds, or uneven stretching, using pins and relaxing.
When automatic unwrapping is not enough
Unwrap solves a math problem. It looks for 2D positions for the vertices that keep the angles or shapes of the 3D faces as close as possible. The solver has no idea what you want. On long tubes, organic shapes, and islands with many holes, it can return a valid but unhelpful answer. Typical symptoms are:
- A tube that curls into a C shape instead of lying straight.
- A face or limb island that is rotated or mirrored compared to the rest of the layout.
- A patch of stretching in one area while the rest looks fine.
- Overlapping faces, which show up as flipped (red) triangles in the stretch display.
You have two tools to steer the solver. A pin fixes a UV vertex in place so the solver cannot move it. Relaxing lets the solver or a brush spread the UV vertices to reduce stretching, without changing the island's overall shape.
Pinning
A pinned UV vertex does not move when you run Unwrap again. It also does not move when you use relax or Minimize Stretch. Pinned vertices are drawn in red in the UV Editor.
Basic controls
In the UV Editor, select UV vertices and use these shortcuts:
| Action | Shortcut | Menu |
|---|---|---|
| Pin selected UVs | P | UV > Pin |
| Unpin selected UVs | Alt+P | UV > Unpin |
| Unwrap again, honoring pins | E in 3D Viewport (UV > Unwrap) | UV > Unwrap |
Exact menu layouts differ a little between Blender versions. The shortcuts above are the same in 3.x and 4.x.
A typical pinning workflow
Take a sleeve or a leg that unwrapped bent and rotated.
- In the UV Editor, select one vertex at each end of the island. Choose vertices that sit directly opposite each other along the length of the tube.
- Press P to pin them.
- Move the two pinned vertices apart so the island is as long and straight as you want it. Grab (G) moves only the selected, pinned vertices.
- In the 3D Viewport, select the faces of the island and run Unwrap again.
The solver treats the pins as fixed constraints. It places all the other vertices to fit between them, so the island stretches out along the line you chose.
Two pins are enough to control rotation, position, and scale. A single pin only fixes position, so the island can still rotate freely. Three or more pins that disagree with the 3D shape will force distortion, because the solver must honor them exactly. Start with two and add more only when needed.
Pinning and seams interact
Pinned vertices on a seam edge belong to a single face corner, so a vertex that is split across two islands has separate UV points. Pin the point on the island you are working on. If you pin a vertex in one island and unwrap with a selection that includes the neighbor, the neighbor is unaffected, because its UV points are separate.
Relaxing
Relaxing reduces local distortion by moving UV vertices so the faces become more evenly sized and shaped, while keeping the island boundary and any pins fixed. Blender gives you several ways to do it.
- Re-run Unwrap with pins. This is the most predictable method, and the one described above.
- Minimize Stretch (UV > Minimize Stretch, Ctrl+V). This runs an iterative solver that lowers stretching. Press it repeatedly, or adjust the iteration count in the operator panel, until the stretch display settles.
- The Relax tool. Recent versions have Grab, Relax, and Pinch tools in the UV Editor toolbar. Older versions put them under UV Sculpting. The Relax brush smooths a region as you paint over it. Pinned vertices are not moved.
Use the brush for a small area, such as a cheek or elbow. Use Minimize Stretch on a whole island.
Relaxing does not fix a bad seam
Relaxing cannot undo a cut that is in the wrong place. If an island has to wrap around a bulge without a cut, it will carry stretch no matter how many times you relax it. A good sign you are in this situation is that the stretch returns after each relax. In that case, go back to the 3D Viewport and add a seam, as covered in the chapters on seam placement.
Scripting pins
You can pin from a script, which helps when you need the same pins on many objects. The script below pins every UV point that belongs to a selected mesh vertex and reports how many it pinned. Run it in Edit Mode on a mesh that already has a UV map.
import bpy
import bmesh
obj = bpy.context.edit_object
bm = bmesh.from_edit_mesh(obj.data)
uv_layer = bm.loops.layers.uv.active
if uv_layer is None:
raise RuntimeError("The active mesh has no UV map")
pinned = 0
for face in bm.faces:
for loop in face.loops:
if loop.vert.select:
loop[uv_layer].pin_uv = True
pinned += 1
bmesh.update_edit_mesh(obj.data)
print(f"Pinned {pinned} UV points")The pin_uv attribute exists on UV loop data in Blender 3.x and 4.x. To unpin, set it to False.
After pinning, you can unwrap and relax with operators. Select the faces first, because Unwrap works on the selection.
import bpy
bpy.ops.mesh.select_all(action='SELECT')
bpy.ops.uv.unwrap(method='ANGLE_BASED', margin=0.02)
bpy.ops.uv.minimize_stretch(iterations=50)uv.minimize_stretch needs a UV Editor context in some versions. If the operator fails with a context error, run it from the UV Editor area or use the menu instead.
Common problems
- Nothing moves after unwrapping. Every vertex of the island may be pinned. Select the island and press Alt+P.
- The island is squashed after pinning. The pins are closer together than the 3D distance warrants. Move them apart until the checker squares look square.
- Pins seem ignored. Unwrap only affects the selected faces, and UV sync selection changes what counts as selected. Check that the faces you want are selected in the 3D Viewport, or that you are working with sync off.
- Minimize Stretch changes the island's size. Pinned points hold the scale only if two or more are far apart. Rescale afterward as part of texel density work.
- Flipped faces after relaxing. Folded areas can survive relaxing. Pin the boundary, unwrap again, and then relax.
Summary
Pin two well-chosen vertices to control the rotation and length of an island, then unwrap again. Use Minimize Stretch or the Relax tool to smooth out local distortion. If stretching keeps coming back, the fix is a different seam, not more relaxing.
Exercise
A forearm island unwraps as a curved banana shape, and the checker texture squares are bent along the curve. You pin one vertex at the wrist end and run Unwrap again, but the island still rotates and curves. What do you do next, and why?
Show answer
Pin a second vertex at the elbow end, directly opposite the first, and move the two pins apart along a straight line. One pin only fixes the position, so the island can still rotate and bend. Two pins fix rotation and length. Then unwrap the selected faces again so the solver fits the rest of the island between the pins, and check the stretch display.
Exercise
You relax an island with Minimize Stretch several times, but a red stretch patch around a bulge stays. What does this suggest, and what is the fix?
Show answer
The island has to wrap around the bulge without a cut, so the stretch comes from the topology and not from the solver. Relaxing cannot remove it. Add a seam through or around the bulge in the 3D Viewport, then unwrap again.