TUTORIAL: Working With Layer Masks in GIMP

Working with Layer Masks in GIMP

Level: Beginner.
This tutorial will show you how to use layer masks in GIMP.
Software used:

  1. GIMP 2.10: It is a Photo Manipulation Software; A free alternative to Adobe Photoshop. Download link for GIMP.

Prerequisites:
  1. You should have a basic understanding of layers in Gimp.
  2. We will be using this image I got from PEXELs in this tutorial. Download Here


C:\Users\user\AppData\Local\Microsoft\Windows\INetCache\Content.Word\pexels-photo-1188079.jpeg
Pexels-photo.jpeg

Introduction:


Layer Masks allow us to non-destructively change the opacity of a layer.
Below is the layer dialog box.
This image contains two layers; pexels-photo layer and background layer.

Layers Panel

Create a new layer, call it red, and bucket fill it with red (#ff0000)
Layers Panel
Entire GIMP window
The layer red has opacity 100. If we changed opacity to 50, 0, 25 or 75, the transparency of the whole layer will change.
This is different for layer masks. it allows you to change the opacity of different sections of a layer.
Opacity 70.0

Opacity 100
Image
Note: return the opacity to 100
Layers Panel
Image

Step 2: Creating the layer mask

Right click on red layer and click add layer mask.
Add layer mask
A dialog box will appear.
It has many options to choose from. White, Black, Layer's alpha channel, etc.
Add Layer Mask Dialog box
Choose white and click the Add button.
As we selected, a white layer mask will appear next to the layer icon
Mask added to layer

Note: When dealing with layer masks, White means opacity: 100, black means opacity: 0.
The layer mask we have now is white so the entire layer will be visible.

Step 3: Manipulating the Layer Mask

Note: The layer is different from the layer mask. Each of them can be selected and worked on. When working on the layer Mask, make sure it is selected. Same goes for the Layer itself.
Layer Mask selected
Layer Select


Get a paint brush tool and paint black (#0000) on the layer mask. (Make sure the layer mask is selected.
I am using a hard brush.
Layers Panel
Image
As you can see, the part of the layer mask painted black (#0000) is transparent (opacity: 0).
Paint over the layer mask with a light grey (#d4d4d4)
The opacity of the area painted grey is about 20. It is transparent.
light grey area circled in BLUE

Let's see what our layer mask looks like.
Right-click the red layer and click/check on Show layer mask.
show layer mask

This is what our layer mask looks like.
The black area has opacity: 0 (transparent); the white area has opacity: 100 (opaque).
Any color on the black and white scale will vary the opacity of the layer mask. Grey will be about opacity: 50 (translucent)
showing the layer mask on layer red

Example 1: Making a red face using the Layer Mask

In this example, we will be using a layer mask to remove the face of the lady in this photo.
C:\Users\user\AppData\Local\Microsoft\Windows\INetCache\Content.Word\pexels-photo-1188079.jpeg
Image
Delete layer red.
Layers Panel

Step 1: Creating the Layer Mask

Right-click on pexels-photo layer and add a white layer mask.
Mask added to layer pexels-photo.jpeg

Step 2: Removing the Face

Using the Paths tool (B) make a path around the lady's face. Simply click and drag to create paths. Ctrl + click to complete the path.
Path made around the face
Go to tools options at the bottom-left region of your screen and click on selection from path.
You should see some ants moving along the path. It shows that a selection has been made.
Tool options, Paths Tool
Selection from Path
Select the Layer mask
Layer Mask circled in red

Using the Paintbrush Tool (p) , paint over the  entire selection with black (#0000)
Make sure you selected the white layer mask
tool, color, brush used

painting within the selection
The mask is hiding the lady's face.
That face is now transparent. It looks brown because the Background layer is brown.
Hit Ctrl + Shit + A to remove the selection
This is what our Layer Mask looks like
It is hiding the lady's face and showing the rest of the photo.
showing the layer mask


Step 3: Showing the Face (Inverting the Layer Mask)


Duplicated the pexels-photo layer and delete its Layer Mask
Note: right click on the layer and click on remove layer mask to delete the layer mask.
duplicate layer pexels-photo.jpeg

delete the layer mask
Toggle the visibility of the second layer. Make it invisible.
hide the second layer

Select the Layer mask of the first layer.
click on the layer mask

Go to Color tab and click on Invert.
Make sure the layer mask is still selected.

Note: we want to reverse the layer mask. We want to change black to white and white to black. This way we can make the lady's face show.
Navigate to invert
Click on invert
Layer Mask inverted: black is white, white is now black
The mask is now inverted.
image
Only the face is showing now

Step 4: Making the 'Red Face'

Make the second layer visible again
make the second layer visible again
Second layer is visible now
image: second layer is now visible

Select on the First Layer
Note: Not the layer mask, we are selecting the layer itself.
Layer Selected
Go to Color > Color Balance


color balance

Adjust the Scales as shown below.
Notice that the color of the face is changing.
color balance dialog box and resulting image

C:\Users\user\AppData\Local\Microsoft\Windows\INetCache\Content.Word\pexels-photo-1188079.jpeg
Before
After

Reddish face complete.

Congratulations!
This is the end of the Layer Masks tutorial. It was written based on my experience. If you have any questions, tell us in the comment section below.


Post a Comment

0 Comments

SEARCH THIS BLOG