Non-Destructive Editing in GIMP: Masks, Blend Modes and Groups
The complete guide to layer masks, blend modes, layer groups, and compositing in GIMP - The heart of non-destructive editing.
What is a Layer Mask?
A layer mask is a greyscale image attached to a layer that controls that layer's transparency - Without permanently deleting any pixels. Where the mask is white, the layer is fully visible. Where the mask is black, the layer is hidden. Grey values create partial transparency. For a concise overview, see layer masks explained.
Non-destructive: The original pixels are never deleted. Paint the mask back to white to recover any hidden area instantly.
Reversible: Unlike erasing, masking can be undone at any point in the future - Even after saving the XCF file and reopening it.
Paintable: Use any brush, gradient, or selection to control exactly which pixels are visible.
Key insight: "Paint with black to hide, paint with white to reveal" is the mantra of layer masks.
Mask vs Eraser: Why Masking Wins
Adding a Layer Mask
Method 1: Via the Layer Menu
- Select the layer you want to mask in the Layers panel
- Go to Layer → Mask → Add Layer Mask…
- Choose an initialisation option (see table below)
- Click Add
Method 2: Right-click in Layers Panel
- Right-click the layer in the Layers panel
- Choose Add Layer Mask… from the context menu
- Select initialisation and click Add
| Initialise Mask To | Result | Use When |
|---|---|---|
| White (full opacity) | Layer fully visible; paint black to hide areas | You want to start visible and selectively hide |
| Black (full transparency) | Layer fully hidden; paint white to reveal areas | You want to paint in the effect gradually |
| Greyscale copy of layer | Luminance of the layer becomes the mask | Luminosity masking, HDR effects |
| Selection | Selected area is white, rest is black | Convert an existing selection to a mask |
| Layer alpha channel | Existing transparency becomes the mask | When layer already has alpha information |
Painting & Refining Masks
Basic Painting Workflow
- Click the mask thumbnail in Layers panel
- Select Paintbrush (P)
- Set foreground to Black (press D, then X if needed)
- Paint over areas you want to hide
- Switch to White to reveal areas you over-painted
- Use a soft brush for natural edges, hard brush for precise cuts
Refining Edges
- Feather selection first: Select → Feather (2–5px) before converting to mask for smooth edges
- Soft brush tips: Use 30–50% hardness for natural blends
- Reduce opacity: Paint at 40–60% opacity to build up mask gradually
- View mask: Alt+click the mask thumbnail to see the mask in greyscale
From Selection to Mask
The fastest way to create a precise mask is to make a selection first, then convert it to a mask:
- Create a selection using any selection tool
- Layer → Mask → Add Layer Mask → Initialize to Selection
- The selection becomes a white area on the mask (visible), the rest is black (hidden)
- Refine by painting on the mask with soft brushes
Gradient Masks
A gradient mask creates a smooth transition from fully visible to fully hidden - Perfect for blending two images together or fading an effect. Pair this technique with blend modes for even more creative control.
- Add a layer mask to the top image layer (initialise to White)
- Click the mask thumbnail to make it active
- Select the Gradient tool (G)
- Set gradient type to FG to BG (Black → White)
- Drag the gradient across the image - The direction controls the fade direction
- The top image will fade smoothly into the image below
How Blend Modes Work with Layer Masks
Blend modes control how a layer interacts with the layers beneath it. They are applied to the layer, not the mask. When combined with a layer mask, blend modes let you control both what is visible and how it blends with everything below it.
| Blend Mode | Effect with a Mask | Masking Use Case |
|---|---|---|
| Normal | Opacity of visible mask area controls how much of the layer shows through | Standard compositing - paint the mask to reveal exactly what you want |
| Multiply | Darkens the composite wherever the layer is visible through the mask | Shadow layers, darkening vignettes, tint overlays |
| Screen | Lightens the composite wherever the layer is visible through the mask | Glow effects, light leaks, brightening via masked adjustment layer |
| Overlay | Adds contrast to the composite in masked areas; 50% grey disappears | Masked contrast boosting, texture blending |
| Difference | Shows differences between the masked layer and the layer below | Alignment checks, creative inversion effects |
Photo Compositing with Layer Masks
Compositing means combining multiple images into a single believable scene. Layer masks are essential to this process.
Sky Replacement Walkthrough
-
Open background photo: Your base landscape image
-
Open sky image: File → Open as Layers - Places sky as a new layer above background
-
Reorder layers: Make sure the sky layer is above the landscape layer
-
Scale sky to fit: Layer → Scale Layer to match the canvas size
-
Select the original sky: Use Fuzzy Select on the old sky area of the background layer
-
Refine selection: Select → Grow 1px, then Select → Feather 2px for soft edges
-
Add mask from selection: On the sky layer: Layer → Mask → Add Layer Mask → Initialize to Selection
-
Paint mask edges: Paint with black/white to refine the horizon line
-
Colour match: Add a Colour Balance adjustment layer clipped to the sky layer to match lighting
Layer Groups
Layer groups let you organise related layers together and apply a single mask or blend mode to the entire group.
Creating Groups
- Layer → New Layer Group
- Or click the folder icon in the Layers panel
- Drag layers into the group
- Click the triangle to collapse/expand
Group Masks
- Add a mask to the group layer itself
- The mask affects all layers in the group simultaneously
- Perfect for masking a multi-layer subject against a background
- Each layer in the group can also have its own individual mask
| Group Use Case | Layers Inside | Benefit |
|---|---|---|
| Subject with effects | Subject layer + colour grade + sharpening | Single mask cuts subject from background |
| Text with shadow | Text layer + Drop shadow layer | Move, transform, or mask both together |
| Sky replacement | Sky + colour balance + clouds | Adjust all sky elements with one mask |
| Reusable background | Background + texture + vignette | Toggle or mask the whole background group |
Clipping Masks
A clipping mask constrains a layer's visibility to the shape (alpha channel) of the layer directly below it.
- Create a base layer with the shape you want (e.g. a text layer, or a shape)
- Place the texture/image layer above it
- Right-click the texture layer → Create Clipping Mask
- The texture now only shows through the shape of the layer below
Quick Worked Examples
- Open portrait photo; convert to greyscale (Image → Mode → Greyscale → Colour)
- File → Open as Layers - Add a landscape photo
- Set landscape layer blend mode to Screen
- Add a layer mask to the landscape (White → fully visible)
- With a black soft brush, paint the mask to hide the landscape outside the portrait silhouette
- Adjust opacity to taste (60–75% often works well)
- Open product image; duplicate background layer
- Use Fuzzy Select + Grow + Feather to select the white background
- Add Layer Mask from Selection (inverted) to keep only the product
- Refine edges with a small white/black brush at 50% opacity
- Add a new solid-colour layer below for the desired background
- Add a new layer filled with black above all other layers
- Add a layer mask initialised to White
- Select the Gradient tool - Use Radial gradient, FG to Transparent (White to Transparent)
- Draw a large radial gradient from the centre of the image outward
- Set the black layer opacity to 50–70% for a subtle vignette