Sub topic 6
Checking for Stretching with a UV Test Grid
This chapter assumes that you can navigate Blender, switch between Object Mode and Edit Mode, select mesh components, and create a basic material. It also assumes that the mesh already has a UV map and has been unwrapped at least once.
A UV unwrap is only useful if it preserves the shape and scale of the surface well enough for the texture. A checker or grid image makes problems visible. Straight grid lines should remain mostly straight, and square cells should remain close to square. Some distortion is normal because a curved 3D surface must be flattened.
Create and assign a UV test grid
Open the Shading workspace or the UV Editing workspace. In the Image Editor, choose New. Set the image size, choose the generated image type UV Grid, and confirm. This creates a temporary image with numbered squares and colored lines.
Assign the image to the material through an Image Texture node:
- Select the mesh.
- Open the Shader Editor.
- Add an Image Texture node.
- Select the UV test grid in the node.
- Connect the Color output to the Base Color input of the Principled BSDF.
- Switch the viewport to Material Preview or Rendered view.
The image uses the mesh's active UV map. Each face corner reads a position in that map, then uses that position to find a pixel in the image.
You can also create the test image with Python:
import bpy
obj = bpy.context.active_object
if obj is None or obj.type != 'MESH':
raise RuntimeError("Select a mesh object first")
image = bpy.data.images.get("UVTestGrid")
if image is None:
image = bpy.data.images.new(
"UVTestGrid",
width=1024,
height=1024,
generated_type='UV_GRID'
)
material = bpy.data.materials.get("UV Test Material")
if material is None:
material = bpy.data.materials.new("UV Test Material")
material.use_nodes = True
nodes = material.node_tree.nodes
links = material.node_tree.links
bsdf = nodes.get("Principled BSDF")
texture = nodes.get("UV Test Grid")
if texture is None:
texture = nodes.new("ShaderNodeTexImage")
texture.name = "UV Test Grid"
texture.label = "UV Test Grid"
texture.image = image
links.new(texture.outputs["Color"], bsdf.inputs["Base Color"])
if len(obj.data.materials) == 0:
obj.data.materials.append(material)
else:
obj.data.materials[0] = materialThis script changes the first material slot, so use it on a test object or a material you can safely replace.
Read the grid and the stretch overlay
Enter Edit Mode and select all faces. In the UV Editor, enable the overlay for Stretch. Blender can display distortion based on angle or area.
- Angle distortion shows how much corners and angles change between the 3D face and the UV face.
- Area distortion shows how much surface area changes between the 3D mesh and the UV layout.
The grid provides a visual check. The overlay provides a measurement-based warning. Use both because a grid can hide small changes, while an overlay can be difficult to interpret on a complex model.
A square grid cell that becomes a rectangle indicates uneven scaling. A line that bends or changes direction indicates more than simple scaling. Large changes around a pole, cap, or sharp bend are common. If distortion appears across a broad flat area, the unwrap or seam layout probably needs adjustment.
Diagnose common problems
| Visible result | Likely cause | Useful response |
|---|---|---|
| Squares become narrow rectangles | Uneven UV scale or a tight bend | Add a seam, then unwrap again |
| Grid lines converge at one end | A pole or cap is compressed | Move the pole to a less visible area |
| One island has much larger cells | Different texel density | Scale the island to match neighboring islands |
| A seam creates a visible texture break | The cut is on an important surface | Move the seam to a hidden edge |
| Distortion appears only at the boundary | The island has been packed or scaled unevenly | Check island proportions before packing |
Do not automatically fix every color shown by the overlay. A small amount of distortion may be the best trade-off when fewer seams produce a cleaner texture. Judge the result from the texture's purpose. A face with lettering needs low distortion, while a hidden underside may tolerate more.
Exercise
What does it mean when square cells in a UV test grid become long rectangles on the model?
Show answer
The UV coordinates scale one direction more than the other, so the surface has directional distortion.