Sub topic 11
Basic materials and UV unwrapping
This chapter covers the step between a finished model and a preview or export. You will give the prop a basic material, mark seams, unwrap it, and check the UV layout. It assumes you can navigate Blender, switch between Object Mode and Edit Mode, and select vertices, edges and faces. It also assumes the prop already has its Mirror, Boolean and Bevel modifiers and its shading and topology are cleaned up, as in the earlier chapters.
Why materials and UVs come last
A material describes how a surface reacts to light: its colour, how rough or metallic it is, and so on. A UV map is a 2D layout of the mesh. Each vertex gets a coordinate on a flat square, written (U, V), so that a 2D image can be wrapped onto the 3D surface. The letters U and V are the axes of that square, to avoid confusion with X and Y in 3D space.
UVs come after modelling because almost every modelling operation changes them. Adding a loop cut, a bevel or a Boolean cut after unwrapping means redoing part of the unwrap. Topology cleanup comes first for the same reason: stray vertices and n-gons produce stretched or broken UV islands.
A flat colour or a procedural material does not need UVs. You need them when you want to:
- Use image textures, such as a painted wear map or a baked normal map.
- Bake lighting or ambient occlusion into an image.
- Export to a game engine or another tool that expects UVs.
If your prop will only ever have solid colours, you can still unwrap it cheaply. Most export pipelines expect a UV map to exist.
Building a basic material
A material in Blender is a node tree. The Principled BSDF node is the main shader for most hard-surface work. Its key inputs are:
| Input | What it controls | Typical hard-surface value |
|---|---|---|
| Base Color | The surface colour | Any colour, or an image |
| Metallic | 0 is a non-metal, 1 is a bare metal | 0 or 1, rarely in between |
| Roughness | How blurred reflections are | 0.2 to 0.6 for painted or machined parts |
Metallic is close to a binary switch. Values between 0 and 1 are meant for transitions, such as paint chipped off to bare metal, and not for a "half-metal" surface.
You can create a material from the UI with the Material Properties tab and the New button. The script below does the same thing, and it is useful when you need the same material on many props.
import bpy
obj = bpy.context.active_object
mat = bpy.data.materials.new(name="Prop_Painted_Metal")
mat.use_nodes = True
bsdf = mat.node_tree.nodes["Principled BSDF"]
bsdf.inputs["Base Color"].default_value = (0.12, 0.25, 0.45, 1.0)
bsdf.inputs["Metallic"].default_value = 0.0
bsdf.inputs["Roughness"].default_value = 0.35
if obj.data.materials:
obj.data.materials[0] = mat
else:
obj.data.materials.append(mat)The if block matters. materials.append adds a new slot each time, so running the script twice without the check leaves duplicate slots.
Using several material slots
Hard-surface props often have more than one surface type, such as painted body panels and bare metal bolts. Use one material slot per surface type. In Edit Mode, select the faces, pick the slot in the Material Properties list and click Assign.
Keep the number of slots small. Each slot is typically a separate draw call in a game engine, so a prop with eight slots costs more to render than one with two.
How UV unwrapping works
Unwrapping flattens a 3D surface onto a plane. A closed surface cannot be flattened without cutting it, in the same way that you cannot flatten an orange peel without tearing it. The cuts are called seams. Blender cuts the mesh along the seams and lays each separate piece flat. Each piece is called a UV island.
Flattening always distorts something. Cuts reduce the distortion, but each seam creates a visible edge on the texture if it is placed badly. Good seam placement is a trade-off between these two costs.
Choosing where seams go
For hard-surface models, the best seams follow edges that are already hard. A sharp edge or a bevelled edge already breaks the surface visually, so a texture discontinuity there is hard to notice.
Practical rules:
- Put seams on sharp edges and on the underside or back of the prop.
- Cut a cylinder along its length with one seam, and cut its end caps off with a ring seam.
- Separate large flat faces that point in different directions, such as the top, the sides and the bottom.
- Avoid seams across a large visible curved surface, because the texture will visibly change at that line.
To mark a seam, select edges in Edit Mode, then use Edge menu → Mark Seam. Seams show as red lines. Use Clear Seam to remove them.
If you already marked edges as sharp for shading, you can reuse them. Select the sharp edges with Select → Select Sharp Edges, or select by the sharp attribute, then mark them as seams. This keeps the seam layout consistent with the shading you set up earlier. It is a good starting point, but check it by eye because sharp edges inside a curved panel do not always make good seams.
Preparing the mesh for unwrapping
Modifiers and the Mirror modifier
UVs are computed on the mesh data, not on the modifier result. This leads to two cases.
- Mirror modifier with Merge on. The mirrored half uses the same UV coordinates as the original half unless you change that. Both halves land on the same UV area, so they overlap. That is useful when you want to save texture space, because both halves share the same texels. It is a problem when the two halves need different detail, such as a serial number on one side only.
- Mirror modifier with Mirror U or Mirror V enabled. The Mirror modifier has options that flip the UV coordinates of the mirrored half. Use Mirror U if you want the halves in separate positions on the texture so they can be painted differently, though in practice you will usually unwrap after applying the modifier in that case.
For a prop with a single shared texture, overlapping halves are fine. For anything that needs a unique texture on each half, apply the Mirror modifier first (see below) and unwrap the full mesh.
Applying modifiers
Applying a modifier turns its result into real mesh data. Do this on a copy:
- Duplicate the object, using Shift+D then Esc to cancel the move.
- Hide or move the original, so you keep the non-destructive version.
- On the copy, apply the modifiers from the top of the stack down: Object → Apply → Visual Geometry to Mesh, or the arrow menu on each modifier.
Applying the Bevel modifier creates a lot of small faces. These get UV coordinates from the surrounding unwrap, and that is normal. Do not unwrap them as separate islands. The bevel faces should stay attached to their neighbours.
A Bevel modifier that is left live can still be unwrapped if the base mesh has UVs. Blender interpolates the UVs across the new bevel faces. For export formats that bake modifiers anyway, this is often enough, and you can avoid the destructive copy.
Unwrapping in Blender
- Enter Edit Mode and select all faces with A.
- Press U and choose Unwrap. The Angle Based method is the default and gives low distortion on most shapes. Conformal is another option that preserves angles but can change scale between islands.
- Open a UV Editing workspace, or change an editor to the UV Editor, to see the result.
Alternatives in the same menu are Smart UV Project, Cube Projection and Cylinder Projection. Smart UV Project creates seams automatically based on face angles. It is quick and often good enough for hard-surface props with flat faces, but its seams ignore your design. Use it for a first pass or for background props. Projection methods are good for simple boxes and cylinders.
The script below unwraps from Python, which is useful for batch work.
import bpy
obj = bpy.context.active_object
bpy.ops.object.mode_set(mode='EDIT')
bpy.ops.mesh.select_all(action='SELECT')
bpy.ops.uv.unwrap(method='ANGLE_BASED', margin=0.02)
bpy.ops.object.mode_set(mode='OBJECT')The margin value is the gap between islands as a fraction of the UV space. A gap that is too small causes colour to bleed from one island into its neighbour when the texture is shrunk, which is called mip-mapping bleed.
Checking the result
Never trust an unwrap without checking it. Two quick checks catch most problems.
A checker or UV grid texture. In the Image Editor, create a New Image and set Generated Type to UV Grid or Color Grid. Assign it to the material as an Image Texture node connected to Base Color. The squares on the model should look square and be roughly the same size everywhere. Stretched or sheared squares mean distortion. Squares that are much larger or smaller on one part mean uneven texel density, which is the number of texture pixels per unit of surface.
Stretch display. In the UV Editor's Overlays menu, turn on Stretch. Blue means little distortion, and red means a lot.
Common problems:
- Islands of very different scale. Select all islands and use UV → Average Island Scale so the texel density is uniform.
- Overlapping islands you did not intend. Check the Mirror modifier case above.
- Islands that go outside the 0 to 1 square. Most texture workflows need all islands inside it, except for deliberate tiling.
- Non-uniform object scale. If the object has a scale such as (1, 1, 2), the checker pattern looks stretched even when the UVs are fine. Apply scale with Ctrl+A → Scale before judging.
Packing the islands
Packing arranges the islands inside the 0 to 1 square with as little wasted space as possible. Select all faces in the UV Editor and use UV → Pack Islands. Set a margin so islands do not touch. The Rotate option lets Blender turn islands for a tighter fit, but rotated islands can make hand painting harder, since lines are no longer horizontal.
Do the scale step before packing. Packing keeps the relative size of islands, so a small island stays small.
Connecting the pieces to export
A prop that is ready for the next chapter has these properties:
- One or a few materials with clear names, such as
Prop_Painted_MetalandProp_Bare_Metal. - A single UV map, with all islands inside the 0 to 1 square and no unwanted overlaps.
- Applied object scale, so that a checker texture has an even size.
- A clean mesh that still has its non-destructive version saved separately.
Summary of the decisions
| Question | Choice |
|---|---|
| Does the prop need UVs? | Yes if it uses image textures, baking or an engine export. Otherwise optional. |
| Where do seams go? | On sharp edges and hidden faces. |
| Same texture on both halves? | Leave Mirror live and let the halves overlap. |
| Different detail per half? | Apply Mirror on a copy and unwrap the whole mesh. |
| Quick result needed? | Smart UV Project, then check. |
| Controlled result needed? | Marked seams and Angle Based unwrap. |
Exercise
You unwrapped a prop and applied a UV Grid texture. The squares on the flat top look square, but on the cylindrical handle they are long and thin, and they are much smaller on the handle than on the top. Name two separate problems shown here and one fix for each.
Show answer
The long, thin squares show stretching, which is distortion in the unwrap. Fix it by checking the handle's seams, for example adding a lengthwise seam and cutting the end caps off, then unwrapping again. The much smaller squares on the handle show different texel density between islands. Fix it by selecting all islands in the UV Editor and using UV → Average Island Scale, then packing again.
Exercise
A prop uses a Mirror modifier with merging on. You paint a serial number on its left side, and the same number shows up mirrored on the right side. Why does this happen, and how do you stop it?
Show answer
The mirrored half shares the original half's UV coordinates, so both halves read the same texels and any painting appears on both. To get different detail on each side, apply the Mirror modifier on a copy of the object, then unwrap and pack the full mesh so each half has its own island.