Publishers of technology books, eBooks, and videos for creative people

Home > Articles > Design > Adobe Photoshop

This chapter is from the book

A Deeper Look Into Layer Masks

LET’S TAKE A DEEPER LOOK INTO LAYER MASKS AND SOME OF THE COOL THINGS YOU CAN DO WITH THEM

Layer masks aren’t just for collaging and blending photos, they’re actually a very powerful selection and design tool. Let’s take a look at a real project and see how layer masks can be used to make something appear in a photo that it didn’t originally appear in. Plus, you’ll see the effect of stacking multiple layers with layer masks on top of each other for an even better result.

Step 1: Open the Images for the Masking Project

Open the photos that you want to bring together with layer masks. In this example, I’ve got a photo of an LCD screen and a photo of a woman skiing. We’ll use layer masks to make it appear as if she is breaking out of the LCD screen, and then put it onto the home-page of a website.

Step 2: Use Select>Color Range to Select the Skier from the Background

Start with the photo of the skier first. Click the Select menu and choose Color Range. Since we want to make it appear as if the skier is breaking out of something, we need to get rid of the sky. In the Color Range dialog, click on the photo near the top part of the sky. That tells Color Range to select those colors. With the preview set to Selection, you’ll see the selected portion turn white. Press-and-hold the Shift key and click in other areas of the blue sky to select them, since the color gradates toward the bottom (Shift-click and select about five other points). Then, set the Fuzziness slider to 160 and click OK.

Step 3: Inverse the Selection and Copy it to its Own Layer

Right now, you should have the sky selected. What we really want is the skier selected, so click the Select menu and choose Inverse to reverse the selection (or press Command-Shift-I [PC: Ctrl-Shift-I]). Then, put this selection on its own layer by pressing Command-J (PC: Ctrl-J).

Step 4: Select Both Layers and Move them into the LCD Photo. Link the Two Layers

Select both layers in the Layers panel by Command-clicking (PC: Ctrl-clicking) on them. Then click-and-drag them over the LCD screen in that photo. Now you’ll have three layers in the Layers panel, and the two skier layers should still be selected. Go ahead and click on the Link Layers icon on the far left at the bottom of the Layers panel to link these layers. Now, anytime you move one layer, the other will always follow. If they don’t cover the screen completely, press Command-T (PC: Ctrl-T) to go into Free Transform, click the Link icon in the Options Bar, increase the Width percentage until they do, then press Return (PC: Enter) to lock it in.

Step 5: Hide the Two Skier Layers. Use the Polygonal Lasso Tool to Select the Screen

Click on the Eye icons in front of the two skier layers to hide them, so you can see the LCD again. Select the Polygonal Lasso tool from the Toolbox, or press Shift-L until you have it, and make a rectangular selection of the LCD screen.

Step 6: Unhide the Skier Layers and Add a Layer Mask to the Bottom Copy

Click where those Eye icons used to be to unhide the two skier layers so you can see them again. Don’t deselect yet, though. Click on the bottom skier layer (the entire photo), and click on the Add Layer Mask icon at the bottom of the Layers panel to add a layer mask to it. Photoshop automatically hides all parts of the layer that extend beyond the LCD screen. However, we still have the layer with only the skier on top of it, so we’ll still see her.

Step 7: Copy the Layer Mask by Option-Dragging it from One Layer to the Other

Now we’ll want to apply that same layer mask to the layer above it. The last thing we want to do, though, is make the selection all over again. Instead, we’ll just copy the layer mask. The easiest way to copy a layer mask is to press-and-hold the Option (PC: Alt) key and click-and-drag the layer mask from one layer to another. This duplicates the mask onto the other skier layer. Notice that it hides any areas that extend beyond the LCD screen, though, including part of her arms, head, and skis. No problem—we’ll take care of that in a minute.

Step 8: What Happens if You Need to Reposition the Layers?

Before we move on, I want to show you some tips you’ll use often. See, back in Step 4 we moved the two layers of the skier on top of the LCD screen and just left them there. But what happens if you decide later you want to move them and you’ve already added masks (as in this case)? I’m glad you asked. First, we just added a mask over the skier so we can’t see most of her anymore. But I want to reposition her skis so they break out over the monitor, which means I’ll need to see the layer without the mask. Easy stuff. Just Shift-click on the layer mask thumbnail in the Layers panel to temporarily disable the mask.

Step 9: Unlink the Layer Mask from the Layer so You can Move it

Before you jump ahead and move the layer, we need to do one more thing. There’s a little link icon between the layer thumbnail and the layer mask thumbnail. This means that if we move the layer, the layer mask will follow because they’re linked. However, that’s not what we want here. We just want to move the layer and leave the mask where it is, since the LCD screen position won’t change. So, click the link icon to turn it off. Remember, though, we have two skier layers linked together here, so you’ll need to turn the other layer mask link off, too. Now select the Move tool (V) and move both layers. The masks will stay put. Relink the layer masks to the layers, and click on the top layer’s mask to turn it back on.

Step 10: Select the Brush Tool and Paint the Hidden Portions of the Skier Back in

Okay, take a breath for a minute. Look at the Layers panel—specifically the top layer. It’s the one of the skier with the sky removed. We added a layer mask to it in Step 7 that hid any areas that extend beyond the LCD screen. Right now, the only part of this layer we see is where the mask is white, right? We need to see the parts of the skier that extend beyond the screen to get that breaking out effect. Select the Brush tool (B), make sure you’re Foreground color is white, and paint to reveal only the skier as she breaks out of the screen. Use a fairly large brush (I used a 100-pixel brush here) and don’t worry if you reveal any extra areas. We’ll get rid of them next.

Step 11: Zoom in and Use Smaller Brush Sizes to Make it Look More Realistic

If yours looks like mine at this point, then you probably revealed too many extraneous areas around the skier in the last step. That’s totally fine and actually it’s better that way because now you can use the Zoom tool (Z) to zoom in, press X to switch your Foreground color to black, and paint with a smaller brush to hide all of those little areas that just don’t fit. In this example, I hid any snow areas that appeared over the monitor edges so only the skier and her skis show up outside the monitor, not any of the little pieces of snow. This part takes a little time, though, so be patient and make it look good.

Step 12: Use the Dodge Tool to Lighten the Snowflakes

If your image still looks like mine, you’ve also probably got some little blue outlines around some of the snowflakes. This happened when we selected the skier from the sky and is pretty normal. You can always choose to hide them with the layer mask. If you want to leave them in, however, select the Dodge tool from the Toolbox (or just press O). Click on the layer’s thumbnail instead of the mask, set the Range to Shadows in the Options Bar, and set your Foreground color to black. Then paint over the edges of the snowflakes to lighten the darker colors. This should help them blend in.

Step 13: Let’s Bring in a Photo for the Background

We’re almost done. One thing we’ll want to do is bring in a photo for the background of the webpage. So, open another photo. Select the Rectangular Marquee tool (M) and make a large rectangular selection. Then click the Select menu and choose Modify>Smooth. Enter 20 pixels for the Sample Radius, and click OK.

Step 14: Copy-and-Paste the Background Photo into Our Webpage Image. Add a White Stroke

Copy-and-paste the selection into our main webpage image by pressing Command-C (PC: Ctrl-C), switching to the webpage image, and pressing Command-V (PC: Ctrl-V). Choose Edit>Free Transform to resize it and position it toward the top middle of the image. Then Command-click (PC: Ctrl-click) on the layer thumbnail to put a selection around the photo. Click the Edit menu and choose Stroke. Enter 6 pixels for the Width and set the Color to white. Click OK, and now you’ll have a white stroke around the selection. Press Command-D (PC: Ctrl-D) to Deselect.

Step 15: Make a Selection Around the Entire LCD Monitor

You’ll notice that the large photo we just copied in covers the LCD and the skier. We’ve got to change that. So, guess what that means. Yep, another mask. This time, instead of selecting just the inside of the LCD screen, we’ve got to select the whole LCD monitor itself. Click on the Eye icon next to the snowy mountain photo layer to hide it. Grab the Polygonal Lasso tool again and make a selection around most of the monitor. It’s okay if you don’t select the bottom part, but make sure you get the whole screen and some of the stand. Once you’ve made the selection, unhide the layer.

Step 16: Add a Layer Mask to the Large Photo Layer and Invert it

Since we have a selection active, go ahead and add a layer mask to the mountain photo layer. This masks the photo so it fits into the selection, which is actually the opposite of what we want. We want to see the photo everywhere but over the LCD. Well, that leads me to another cool tip—inverting. Click on the layer mask and choose Image>Adjustments>Invert. This inverts, or reverses, the color of everything on a layer. Black becomes white and white becomes black.

Step 17: Move the Mountain Layer Below the Skier. Bring in the Final Elements

Now, click on the mountain photo layer and drag it below the skier layers so she doesn’t cover the photo. Now add the final elements that make up the webpage. Here, they’re pieces in another file, but you could just as easily create the text right here in the document itself (see Chapter 5 for more on creating text).

Peachpit Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from Peachpit and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about Peachpit products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites; develop new products and services; conduct educational research; and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email ask@peachpit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by Adobe Press. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.peachpit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020