• Eraser tool in Photoshop. Erase unnecessary background in Photoshop

    Good afternoon, my dear readers. How are you feeling? Are you ready for work and defense? Remember how, as a child (or maybe not as a child), you drew something and noticed that something was wrong here, that it went beyond the edges, etc. Rubber product No. 3 (no, not 2, namely 3) came to our aid, i.e. eraser. We used it to erase everything we messed up.

    So in Photoshop, the developers have provided this tool. Therefore, today we will look in detail at how to use the eraser in Photoshop so that you can erase all unnecessary nonsense. And if you think that this is a very simple tool, then you are mistaken. He has his own tricks. So, let's go!

    Simple eraser when working with multiple layers


    Of course, it is clear that the cat is not sitting naturally, that it can still be retouched, etc. But here there was a different task. We're still learning about the eraser tool. And, by the way, you noticed that now our tool did not paint over the picture, but actually erased it. All because we didn't do the laundry new layer, and the top one. Therefore, he removed the native background, thereby leaving it transparent.

    As you can see, the thing is very convenient and irreplaceable, so you can never exclude it.

    Background eraser

    Now it will be even more interesting, so take a sip of water, crack your fingers and let's go!

    The next tool on our list of erasers will be the background eraser. This tool is usually used to erase unnecessary background and the more uniform it is, the better. Let's look at an example. Open the picture with the cat, only not with the previous one, but with a new one, growling. Oh, what a handsome man.


    Why do you need permission? The tolerance decides which color range is included in the erase area. If the tolerance is 1%, then the background eraser will erase strictly the color you clicked on, and it will not affect all shades, even those that differ by a couple of units. If the tolerance is larger, then when erasing it will affect not only the color that you want to erase, but also those that are similar in color.

    In general, in this way we erase the unnecessary background and voila. Now our cat is on transparent background, and we can transfer it to another image.

    Magic eraser

    Perhaps you didn't think that the eraser tool might not be so simple? At first I also thought that it was only for regular erasing: the main thing is not to touch the edges. And he turns out to have a bunch of properties and two brothers.

    So we move on to another element in the group, namely "Magic eraser". Why is he so magical? And the fact that it can erase homogeneous (or similar in color) backgrounds not by constantly erasing and dragging the mouse, but with just one click of a button. This makes the task much easier.


    Well, in general, I started talking about something. It's time to finish. Finally, I would like to recommend you one great video tutorial on photoshop, in which learning takes place visually and in human language. Moreover, in video format, information is absorbed a little better. I watched this course myself and discovered a lot of interesting things that I now use regularly.

    Best regards, Dmitry Kostin.

    Lesson difficulty: for beginners
    Duration: short

    (what we will create)

    In many of the lessons I’ve written, you might have come across the following phrase: “Delete a part using a layer mask or simply an eraser.” If you are just a beginner designer, you will most likely use the Eraser since you are already familiar with it. But the “Layer Mask” sounds somehow scary, like something that only professionals use.

    But the truth is that working with a layer mask is very little different from working with an eraser, and is also very flexible. Layer masks will save you a lot of time and greatly expand your capabilities. But the only advantage of the Eraser is that it is very similar to a real object that you already know well. However, is it right to limit yourself to using “traditional-like” tools when it comes to digital painting?

    This short Photoshop tutorial will teach you some tricks to get the most out of some digital tools. You will learn about a new, non-destructive erasing method that will allow you to restore previously deleted areas without difficulty or any loss.

    1. Why is the Eraser tool not the best solution?
    Let's look at a very simple example where you could use the Eraser. Let's say you have a sketch of a snow leopard ready.

    Eraser tool
    Suddenly it seemed to you that the tail was too long, and you used the Eraser Tool (E) to erase its tip.

    But! Having understood the situation, you suddenly discover that snow leopards actually have disproportionately long tails. Next, you have three methods to solve the problem:

    Use the Undo command (Control-Z) as many times as necessary to restore previous state tail;
    - close the document without saving changes, and then open it again to return to an earlier state;
    - re-draw the area erased with an eraser.

    The first solution will work if you have saved a sufficient history of actions (the larger the history stored, the less Photoshop performance will become), and also if you have not entered significant changes after erasing the tip of the tail. The second solution is applicable only if you saved for the last time shortly, or better yet, immediately before erasing the tail. Well, by choosing the third method, you will simply waste time again on work already completed previously.

    Layer mask
    But if you used a layer mask, you could quite safely erase even more of the tail. For example, sweat like this:

    Then use the “anti-eraser” to restore any previously deleted part of the image. Moreover, even if after that the file was closed and opened again.

    Doesn't sound very plausible, does it? Let's figure out how it works.

    2. How to use a layer mask
    To repeat my steps exactly, you can download the attached file from the resources section of the lesson.

    Step 1
    A layer mask is assigned to a specific existing layer. Select in your layers palette the one to which you would like to apply a mask.

    Step 2
    Now click on the create layer mask icon at the bottom of the layers palette:

    Next to the icon of the selected layer, another icon will appear in the form of a white rectangle:

    Step 3
    Please note that you can now select any of these icons. It is very important to keep track of which one is highlighted in at the moment, since both of them are, as it were, on the same level. All manipulations you perform will be applied exactly to the icon that is currently active.

    Step 4
    So, make sure to select the mask icon. Select any brush and paint a large black spot on the canvas right in the middle of the leopard's body.

    Look what happened! When the mask icon is selected in the Layers palette and you paint on the canvas with black, you are essentially specifying the parts of the image (the contents of the layer to which the mask is applied) that will become transparent.

    Step 5
    Switch to white. Draw another white spot inside the existing spot.

    This part is visible again! This is how our “anti-eraser” works.

    Step 6
    Now you only see the effect of the applied mask. To see the mask itself, press the \ key. Here the red areas represent completely black areas of the mask.

    Step 7
    To restore your original image, simply paint over the surface of the mask with a large white brush.

    Step 8
    As we have already found out, white denotes completely opaque areas, and black denotes transparent areas. But besides this, you can also use gray color. In this case, the darker the selected shade, the more transparent the area it paints will be.

    Step 9
    Let's use this technique to hide the tips of the leopard's paws, as if burying them in snow. So, select the mask and paint the tips of the paws with a soft black brush.

    By changing brushes and combining them, you can achieve a wide variety of results:

    Step 10
    By right-clicking on the mask, you will have access to the following context menu. We are only interested in the first three options:

    1. Disable Layer Mask – disables the mask effect so that you can see the original image. You can turn on the mask again at any time using the same item.
    2. Delete Layer Mask – completely deletes the layer mask, returning the image to its original state.
    3. Apply Layer Mask – permanently applies the mask effect to the image, after which the mask itself is removed.

    Step 11
    If you suddenly need to copy a masked layer, then first hide all other layers and use the keyboard shortcut Control-Shift-C. Trying to copy a masked layer in the usual way, you will simply receive a copy of the original image.

    3. When to use layer masks
    This one is wonderful and very powerful tool It's best used whenever you need to hide part of an image. In addition, if you are, for example, creating a sketch, then the Eraser is more effective. By combining it with systematic copying of the working layer, you can also ensure that you can return to an earlier state of the image.

    Layer masks are most effective when working with photographs and digital painting when editing separate areas any large image

    1. Image overlay
    Layer masks can be used to create soft, seamless overlays of images. Unlike the Eraser, a mask allows for countless adjustments to blend transitions and borders.

    2. Applying selective areas of texture
    When applying any photo texture to your object, you will often be faced with the need to overlay only a certain part of it. By using a layer mask, you can easily remove texture from areas where it is not needed.

    3. Drawing shadows
    Beginners very often draw light and shadow separately, forgetting that a shadow is just the absence of light. When doing digital drawing, you can first cover the entire scene with shadow, and then “highlight” the desired areas (remove the shadow) by processing them on the surface of the mask.

    4. Adjustment Layers
    As you may have noticed, each adjustment layer created is automatically assigned an individual mask. That is, using a familiar technique, you can apply an adjustment layer effect to selective areas of the image.

    That's all!
    In Photoshop there is large number digital tools, the procedure for handling which, at first glance, is not so obvious. But once you master them, you discover that these tools are much more effective than their counterparts, existing analogues. One of these tools is the layer mask, which, starting today, will not be difficult to use.

    We transferred the newlyweds from one photograph to another; to do this, we first erased the “extra” background. In this case, we used the eraser tool ( Eraser Tool on the toolbar), which was used to carefully erase everything unnecessary.
    In fact, Photoshop has many more erasing options, and the only problem is which tool to choose for this? The choice of one tool or another depends on the quality of the background. Today we will consider the option of a uniform background, contrasting to the object. And we will separate the object from the background using the tool "Background Eraser".

    The Background Eraser tool is ideal for separating foreground objects from the background, as you'll see for yourself in a moment.

    Let's get started!

    1. Launch Photoshop.
    2. Open the photo in it: File – Open…(File – Open…).
    3. Double-click on the layer with the photo - a window for renaming the layer appears, click OK. This must be done because the original Background layer, when erased, will leave the background color “underneath”, and we want nothing to remain, i.e. gray and white squares appeared in a checkerboard pattern - this is just a kind of substrate, in fact, there will be nothing there now.

    4. Click on the small black triangle next to the Eraser Tool “button” on the toolbar, a drop-down list appears - select “Background Eraser” from the group of erasing tools ( Background Eraser Tool).


    5. Now select a brush with a diameter of 100 pixels with soft edges


    and start “erasing” the background next to the object.


    In the center of the diameter of the brush, a sample of color is taken (indicator Tolerance– allows you to adjust the sensitivity of the sample, i.e. how close the erased color should be to the sample. The larger the tolerance, the more color shades the tool erases. Tolerance values ​​can be specified quick input numbers from the keyboard).


    6. It is best to work with short strokes, erasing the background, but keeping the object intact.


    It is very convenient to create a new layer (lying “under” the layer with the photo) and fill it with bright contrasting color- this way the entire erasing process will become more visual and errors and shortcomings will become more obvious:

    Create a new layer ( Create a new layer)
    - move it to a position lower than the photo layer


    - the layer with the future background is active (dark in the list of layers)
    - choose a color (in our case, green)
    - Fill tool ( Paint Bucket Tool) fill the backing layer: click on the icon, click on the window with the photo.


    It's also worth learning how to use the Healing Brush tool ( History Brush Tool). If you accidentally delete pixels, you can use the Healing Brush to return the desired areas. This allows you to work faster without being particularly precise when erasing.


    Let's summarize:
    The Background Eraser tool isn't bad, but it's designed for erasing relatively simple backgrounds. If you see that it will take a long time to cleanly separate an object, leave this tool alone and use other Photoshop features.


    In addition, nothing prevents us from combining different tools. Here we removed the main part of the background with the “Background Eraser”, and more complex areas with a regular eraser, enlarging the desired fragment.
    Don't forget to change the eraser size, tolerance and other properties for speed and accuracy of the process.
    After cleaning is complete, delete the layer with the (green) fill - we no longer need it: at the bottom of the list of layers (to the right of the button to create a new layer) there is a “trash can”, so we drag the “unnecessary” layer onto it and it is deleted.

    7. This is where we finish separating the object from the background. Don't forget to save the result File – Save as...(File - Save As...) in psd format or png (they have the property of transparency of layers) or, having substituted the desired (new) background, save it in jpeg format or other necessary.

    To delete the green column, I will move the cursor so that the crosshair is located inside the green column and press the left mouse button. When I press a key, everything green pixels in the circle, corresponding in color to the pixel in the crosshairs, are deleted:

    To remove the green color further, I just need to drag the cursor while holding the key down over the column area. Note that even though the circle sometimes goes over the blue columns, they remain untouched because those pixels are not the same color as the ones I'm erasing. This makes it easy to get right down to the edges of the area I want to erase. As long as the crosshair is in the green area. I erase only green pixels:

    If I accidentally move the cursor crosshair to blue Photoshop area will take as an example blue and will begin removing blue pixels without removing green ones:

    We cancel the erroneous deletion, as usual, with the combination Ctrl+Alt+Z.

    Note. If you erase with the Background Eraser on a background layer, and because the background layer does not support transparency, Photoshop will automatically convert the background layer to a normal layer.

    Removing the sky from a photo using the Background Eraser

    Let's look at the action of the tool using a practical example.
    I can easily erase the blue sky around the tree branch, as long as the cursor crosshair is on the blue sky:

    However, if the crosshair lands on a branch or leaf of a tree, i.e. to a different color, Photoshop will begin to erase the wood, in which case you should undo the last step and try again:

    So far, we've found that Photoshop selects the color swatches to remove located directly below the crosshairs in the center of the Background Eraser cursor in real time and erases all pixels of the selected color that fall within the cursor circle. We also learned that as you move the eraser, if a different color falls under the cross in the center of the cursor, Photoshop will select that color as a reference and begin erasing that new color.

    But what we just described here is the default behavior of the Background Eraser, and it's not the only way the tool behaves.
    You can change the tool settings in the options panel located at the top of the program window, we will look at this later.

    Setting Background Eraser options

    One of the most important tool settings is how the tool selects color samples to remove.

    On the right side of the options panel there are three icons in the form of eyedroppers - these are the switches for the three different modes collection of samples. Sample selection modes from left to right:
    - Continuous
    - Once
    - Background Swatch

    Of these three modes, the first two are the most commonly used. We have just looked at the operation of the "Continuous" mode, enabled by default. IN this mode works well when there are only a few clearly distinguishable colors in the image, but when there are smooth transitions from one color to another and the colors do not differ too much from each other, as is the case with tree branches, the second mode is better suited - Once. I'll turn it on by clicking on the middle icon.

    As the name implies, in this mode a color sample is taken once when you press the left mouse button, and is saved until you release the key, i.e. The pattern of the color removed does not change depending on what color the crosshairs are on when you move the cursor.

    Look what happens now that I "accidentally" moved the crosshair to the blue column. This time the Background Eraser doesn't have any effect on the color because... The color sample was taken from the green column:

    The same thing happens in our photo when the sky is removed. Currently, Photoshop is ignoring tree branches and leaves for removal, since I first clicked on the blue sky, this color is selected as a sample for removal and remains unchanged:

    If you have trouble selecting a color swatch to remove (which is quite rare), try selecting the third mode - Background Swatch.
    In this mode, you can independently select a color to delete on the color palette, and then switch it from the foreground to the background. In the picture I have chosen blue color for deletion:

    Limitations on erasable areas

    One more important parameter to remove the background is “Limits”. Once Photoshop knows what color to erase, Constraints sets the setting, Where select pixels to delete. The two main choices for the Constraints option are Contiguous and All Pixels:

    The Contiguous option is turned on by default and means that Photoshop can only erase pixels in areas that are physically touching the pixels under the cursor's crosshairs.

    In other words, it can't jump over tree branches, poles, or anything else in the photo that separates and isolates one area of ​​pixels of one color from another of the same color. In my case, this creates a problem because I'm trying to erase the sky peeking through the tree branches, i.e. pixels of one color are delimited by another color:

    To get around this issue, I switched the option to All Pixels mode.

    "All pixels" means that Photoshop will erase all pixels anywhere in the image that match the color of the sample without restriction.
    Once I've clicked on the blue sky with my crosshairs, I can simply drag the Background Eraser across the branches and erase the sky in the process (sampling mode set to Once):

    However, if we look closely at the area of ​​removal, we can unfortunately see patches of darker blue sky remaining around some of the tree branches:

    Tolerance

    This brings us to the third important option for background removal, which can set the tolerance for differences in shades of the color being removed, this option is called “Tolerance”:

    The last, third of the three main parameters of the Background Eraser is the Tolerance parameter, which determines the extent to which the color being removed can differ from the sample.

    The default Tolerance value is set to 50%, and this value is usually optimal, but if you find that the Background Eraser is erasing areas you want to keep because the color of those areas is similar to the color of the sample, a Tolerance value is needed decrease. If the background color is very different from the color of the objects that are not subject to removal, the Tolerance value can be increased.

    I'm going to undo my previous sky removal steps and try again, but now I'll increase the Tolerance value to 70% because... the sky is a different color from the tree branches. I click to try the blue sky area with the target symbol, and this time, with more high values"Tolerance", the Background eraser gives a much better result:

    Protecting foreground color from erasing

    A very interesting option. In Photoshop with Russian-language interface it is called "Foreground Color", in English - Protect Foreground Color.
    The meaning of the option is that in the color palette you specify the main color, which will be protected from erasure.

    To activate it, click on the corresponding checkbox:

    The figure below shows how the "Background Eraser" works with the "Background Pattern", "All Pixels" and "Basic Color" options active. On the color palette, the main color is set to green, and the background color is set to blue. Accordingly, the "Background Eraser" will remove the blue and leave the green. I made just one click on the image, with the cursor crosshair on the green color. But, as a result, green remained untouched (since it is currently the main one), and the blue color was removed (since it is background, and the “Collect samples” option is in the “Background sample” mode), although I repeat, I clicked on the green one with the crosshair:

    I hope this point is clear. Now let's look at the effect of the "Primary Color" option using a practical example.

    In the photo below, the flowers are very similar in color to the background, causing the Background Eraser, along with the background, to partially erase these flowers (the "Base color" option is disabled):

    Let's try to protect flowers from erasing by activating this option; to activate it, check the checkbox.

    First, we need to take a sample of the color that I don’t want to protect from being deleted, to do this, click Alt key, which temporarily gives me access to the Eyedropper tool, and click on the flower. This color will become the main color in the color palette, i.e. protected from erasure.

    Now let's try to erase the background, the result is much better:

    To summarize, I will say that competent setup tool options will greatly facilitate the task of removing the background from a photo.

    In many of my tutorials you might have come across this command: “Remove part of the image using Layer Masks (Layer Mask) or using a tool Eraser (Eraser Tool)».

    Since you are a beginner, you will of course choose Eraser, because you already know how to use it, but Layer Mask will sound to you like some kind of complex professional technique. The truth is that using Layer Masks not much different from using Eraser, but it gives you more options and will save you a lot of time.

    The only advantage Eraser is that it replaces the "real eraser" you're already familiar with. But why limit yourself to replacing a traditional tool when working digitally?

    I suggest you check out this easy tutorial to understand how you can use Photoshop and its tools for your ideas. Discover new type An eraser that will allow you to erase an image without any loss!

    Why the Eraser is not always convenient to use

    Let's imagine a very simple situation where you could use the Eraser. For example, you drew a sketch of a snow leopard:

    Eraser

    Looking at the sketch, you notice that the snow leopard's tail is too long. Therefore, with the help Eraser you erase the end of the tail.

    By studying the body proportions of the snow leopard, you find out that these animals actually have disproportionately long tails.

    And to return the sketch to its original appearance, you can choose one of the proposed solutions:

    • Use command Undo(Undo) by pressing the Ctrl+Z key combination as many times as necessary to return to the original state.
    • Close the file without saving latest changes, then open it again to see the original sketch.
    • Re-draw the tail.

    The first solution works great, but only if you have a sufficient number of story actions (the more there are, the slower Photoshop will work), and also if, in addition to erasing the tail, you have not made any other changes to the sketch. The second solution will only work if you saved the sketch before erasing the tail. And the third solution can take a lot of your time.

    Layer Mask

    If you use instead Layer Mask, then you could erase most of the tail, as in the picture:

    You can even use this anti-eraser to get back parts you deleted, even after you've closed and reopened the file!

    It's like magic, isn't it? Let's see how to achieve this!

    How to use a Layer Mask

    You can download this file to follow the lesson step by step:

    Step 1

    To take advantage Layer Mask, you need to initially select the snow leopard layer.

    Step 2

    Click on the icon Add Layer Mask(Add a layer mask).

    A white layer mask thumbnail will appear in the Layers palette, next to the layer thumbnail.

    Step 3

    Please note that you can choose one of two layers to work with. This is very important as you may confuse them due to their proximity. If you select one of the layers, then everything you draw will be displayed on the layer thumbnail.

    Step 4

    Make sure you select the layer mask. Select a black round brush and paint a large dot right in the middle of the snow leopard's body.

    See what's happening? When you select the layer mask thumbnail, you can use black to erase any part of the image (on the layer you're working on).

    Step 5

    Now you need to select white color and use a brush to draw white dot black inside.

    See, part of the image is back! This is how our anti-eraser works!

    Step 6

    At this point you can see the layer mask effect itself. To see the mask itself, you need to press the “\” key. The black dot area will be shown in red.

    Step 7

    To get everything back, you need to take a white brush and paint a black dot on the layer mask.

    Step 8

    As you have already noticed, with the help of black we can make the image transparent, and white will help restore the opacity of the picture. You can also use gray shades - the darker the shade gray, the more transparent the mask effect will be.

    Step 9

    Let's use this technique to hide the snow leopard's paws under the snow. Select the layer mask and use a soft black brush to paint over the snow leopard's paws.

    You can change the brush size at your discretion to get the desired effect:

    Step 10

    If you hover your cursor over the layer mask thumbnail and press the right mouse button, you will see context menu. In this menu we only need the first three items:

    1. Disable Layer Mask(Turn off layer mask) - turns off the mask effect so that you see the original image. You can use this anytime.
    2. DeleteLayerMask(Remove Layer Mask) - will allow you to delete the entire mask, while the original image will remain unchanged.
    1. Apply Layer Mask(Apply Layer Mask) - Allows you to combine the layer mask effect with the image. In this case, the mask itself will disappear, but the image will remain with the changes.

    Step 11

    If you want to make a copy of the image with a layer mask, you will need to hide the other layers and use CopyMerged(by pressing the key combination Ctrl-Shift-C). If you use the normal copy method, you will copy the original image completely without changes.

    When is the best time to use a Layer Mask?

    Even though Layer Mask A great tool, you shouldn't use it every time you want to erase some part of an image. If you are sketching, a faster and more efficient option would be to use Eraser in order to erase something. Also, if at the same time you periodically make several copies of the layer with the sketch, so that you can correct them at any time.

    Layer Mask It is best used when working with large images, for example, photo processing or digital painting.

    Blending the Image Together

    By using Layer Masks you will be able to achieve soft blending between images. Unlike Eraser, with Layer Mask you will get more options in customizing it when working with an image.

    Partial texture application

    When you apply a texture to an object, sometimes you only need to use a small part of it. Using a layer mask you can remove those parts of the texture that you do not need.

    Drawing light and shadow

    Beginners often draw light and shadow separately, but the truth is that shadow is only the absence of light. In digital painting, you can darken the entire image and then use Layer Masks lighten the areas you need.

    Adjustment Layers

    You may also have noticed that all adjustment layers have their own layer masks. You can use the same mechanism to apply an adjustment layer to just the part of the image you want.

    This is all!

    Photoshop has many different tools that you may not have thought about, but once you learn about them, they become very useful and effective for you than their simpler counterparts.

    The Layer Mask is one of those tools, but I'm sure it's no longer magic for you!