What's new
Photoshop Gurus Forum

Welcome to Photoshop Gurus forum. Register a free account today to become a member! It's completely free. Once signed in, you'll enjoy an ad-free experience and be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Replacing only part of a background


douggoss

Member
Messages
7
Likes
2
Hello. I have a photo that was shot partially in front of a window.
I want to replace the window with a neutral shade such as the table the product is sitting on or the right side wall
I know that if I select a portion of the right tan wall then free transform and drag to the left it will extend it over the green area of the window,
but it also will cover the product.
How can I protect the product while extending the neutral area to cover the window?
I also tried the method of selecting a color range then adjusting the hue/saturation levels but did not work well due to (I think) many shades
of green in the window from the foliage behind it.
Thanks in advance!
Root_Beer_Float_New.jpg
 

IamSam

Administrator
Staff member
Administrator
Messages
22,721
Likes
13,258
Hello and welcome to PSG.

douggoss said:
How can I protect the product while extending the neutral area to cover the window?
With a layer mask. You must make a selection of the areas/objects you wish to preserve and make those selections into a layer mask.

edit: Give me a few minutes to demonstrate.
 

IamSam

Administrator
Staff member
Administrator
Messages
22,721
Likes
13,258
This is done very fast for demonstration.........you take your time and do it right.

First I made a selection of the area I wanted to preserve using the Pen Tool.
Screen Shot 2016-08-02 at 6.48.36 PM.png

With the selection active, I added a layer mask to the layer by hitting the "add layer mask" icon located at the bottom of the layers panel.
Screen Shot 2016-08-02 at 6.49.08 PM.png

The I create a new layer below that layer.
I used the color picker to select the foreground color by sampling from the original image.
The I use the Gradient tool, set to Foreground to transparent, to add in the new BG color.
Screen Shot 2016-08-02 at 6.49.53 PM.png

Here's my layers panel.
Screen Shot 2016-08-02 at 6.50.05 PM.png
 

IamSam

Administrator
Staff member
Administrator
Messages
22,721
Likes
13,258
If I were going to stretch the wall area over.

Make 2 duplicates of the original layer. (Always duplicate!)

Make the selection and add the mask on the top layer.

Then on the second, or the duplicate below the top layer, use your Rectangular Marquis tool to make a selection like this.
Screen Shot 2016-08-02 at 7.00.23 PM.png

Then hit Cmd/Cntrl + T to enter Fre Transform
Screen Shot 2016-08-02 at 7.00.33 PM.png

Grab the center left control handle and drag to the left.
Screen Shot 2016-08-02 at 7.00.46 PM.png

Hit enter to accept the state change.
Cmd/Cntrl + D to deselect.

And Ta Da!
Screen Shot 2016-08-02 at 7.01.03 PM.png

Screen Shot 2016-08-02 at 7.06.52 PM.png

Of course now you have to deal with that ugly line.
 

douggoss

Member
Messages
7
Likes
2
Sam - THANKS SO MUCH for the advice. I've spent some time last night and this morning learning to use the pen tool. I can see where it can be very accurate.Right now I'm using a mouse but have a Wacom Tablet that I'll need to learn to use as it looks like it would be even more accurate. But, for the sake of speed and needing to get this done, will use the mouse for this one.

A few more questions:
When using the pen tool do you position the points slightly inside the area you wish to protect or right on the line (in this case between the glass/cookie/can and the green background?

When I blew up the image to better use the pen tool, it noticed some of the green foliage showing thru the glass at the top. These will be made into 8x10 prints so maybe that won't be too obvious. But if it is, is there a way to fix this?

Could you expound a bit more on using the gradient tool?
 

IamSam

Administrator
Staff member
Administrator
Messages
22,721
Likes
13,258
Right now I'm using a mouse but have a Wacom Tablet that I'll need to learn to use as it looks like it would be even more accurate. But, for the sake of speed and needing to get this done, will use the mouse for this one.

A few more questions:
When using the pen tool do you position the points slightly inside the area you wish to protect or right on the line (in this case between the glass/cookie/can and the green background?
I have and use a Wacom tablet religiously...................however the Pen Tool is the only tool that I NEVER use with the tablet! I'm much more accurate with the mouse!

douggoss said:
When I blew up the image to better use the pen tool, it noticed some of the green foliage showing thru the glass at the top. These will be made into 8x10 prints so maybe that won't be too obvious. But if it is, is there a way to fix this?
Here?
Screen Shot 2016-08-03 at 10.56.29 AM.png

Don't worry about it, it shouldn't be noticeable at all.

douggoss said:
Could you expound a bit more on using the gradient tool?
Sure. It's hard for me to know what your experience level is. What do you want me to expound on specifically?
 

douggoss

Member
Messages
7
Likes
2
THANKS AGAIN for the advice
Regarding the Gradient tool I get lost at this point "The I use the Gradient tool, set to Foreground to transparent, to add in the new BG color."
I am a fairly new user and what I did learn was several years ago but have generally used Lightroom since, forgetting most of what I did know
I actually like the look of the first image vs the second. No ugly line to deal with
But one more question: in the first image the left side looks like a much smoother transition where the lower right side (by the root beer can)
looks much rougher. Is there a way to fix that?
Thanks again!
 

IamSam

Administrator
Staff member
Administrator
Messages
22,721
Likes
13,258
Regarding the Gradient tool I get lost at this point "The I use the Gradient tool, set to Foreground to transparent, to add in the new BG color."

When you have the Gradient Tool selected, click here to open the Gradient editor.
Screen Shot 2016-08-03 at 2.42.27 PM copy.png

Then choose this preset for Transparent to foreground.
Screen Shot 2016-08-03 at 2.43.39 PM copy.png

Now the Gradient Tool will use whatever color the foreground color is set to as the color that will be made when using the gradient tool.


douggoss said:
But one more question: in the first image the left side looks like a much smoother transition where the lower right side (by the root beer can)
looks much rougher. Is there a way to fix that?
Thanks again!
Yes, you would just make adjustments to the layer mask with the Brush Tool.
 

IamSam

Administrator
Staff member
Administrator
Messages
22,721
Likes
13,258
Here is the first ugly masking job did using the Pen Tool shown with a white BG for visualization. (Mind you it was done in a hurry for demo purposes)
Note the areas pointed out by the green arrows are sharp and rough.
Screen Shot 2016-08-03 at 3.00.36 PM copy.png

Here's how I fixed them.
Select the layer mask. You do this by clicking on the layer mask itself and you will see white brackets around the mask.
Then select your Polygonal Lasso tool.
Make 3 selections that look like this.
Screen Shot 2016-08-03 at 3.08.09 PM.png

Now select your Brush Tool.
Set your brushes hardness to 0%
Set your Opacity to 30% and your flow 1%
Color set to black.

Make your brush fairly large and work slowly.
Brush it until it's smooth.
Screen Shot 2016-08-03 at 3.12.10 PM.png

Cmd/Cntrl + D to deselect.

Doesn't look too bad with just a plain white background.
Screen Shot 2016-08-03 at 3.15.36 PM.png
 

douggoss

Member
Messages
7
Likes
2
Well, I'm good up to the point of making the selections and setting the brush.
But when I choose Black (foreground color) and brush inside the selected areas it begins to reveal the layer below - which is transparent (checkerboard)

Also one (hopefully) last question. When I get done I assume I will do Layer>Merge Visible. But I did not open this from Lightroom, I opened from the desktop,
but want to get the photo into Lightroom to do a few more things then print. How would I go about that?

THANKS!
 

IamSam

Administrator
Staff member
Administrator
Messages
22,721
Likes
13,258
Well, I'm good up to the point of making the selections and setting the brush.
But when I choose Black (foreground color) and brush inside the selected areas it begins to reveal the layer below - which is transparent (checkerboard)
Yes! That's what it's supposed to do! I just did mine with a white BG layer below the image and mask layer.
Here it is without the white BG....
Screen Shot 2016-08-03 at 4.01.28 PM.png

douggoss said:
Also one (hopefully) last question. When I get done I assume I will do Layer>Merge Visible. But I did not open this from Lightroom, I opened from the desktop,
but want to get the photo into Lightroom to do a few more things then print. How would I go about that?
Once you have it done and you have merged the layers (which is not necessary) then just "save" as a PSD......this is your back up. The choose "save as" and select whatever format you wish to use in lightroom.
 

douggoss

Member
Messages
7
Likes
2
So now I have this:
Screenshot 2016-08-03 17.43.10.png
Layer 1 on top with the layer mask>then the BG Fill layer>then the Color Fill Layer
Yet when I paint it appears to be doing nothing?
 

IamSam

Administrator
Staff member
Administrator
Messages
22,721
Likes
13,258
This color fill layer mask is the problem, it should be all white.
Select the mask, then hit the letter D on your keyboard. This will set your foreground and background colors to black and white (default)
Then hit Cmd.Cntrl + delete to fill with white.
Screen Shot 2016-08-03 at 6.18.04 PM copy.png

Select the images layer mask (your layer 1) and try the Brush Tool again.

Or just turn off both of those layers beneath your image layer.
Then create a new layer below the image layer and fill it with white. You can change it's color later.
 

douggoss

Member
Messages
7
Likes
2
Ok that worked - kind of.... I'm part of the way but still having trouble with the area between the glass and the can
The left side looks good and the right side is passable (think I could have done better in the lower right corner)
But can't seem to do anything with that middle section hard line.
Screenshot 2016-08-03 21.50.14.png
 

IamSam

Administrator
Staff member
Administrator
Messages
22,721
Likes
13,258
You need to turn off that background fill layer.
Screen Shot 2016-08-03 at 10.54.30 PM copy.png
 

douggoss

Member
Messages
7
Likes
2
Well here is my finished image. I can't say THANK YOU enough. You saved me hours of watching videos, reading books, etc.....
Its amazing how much of this you forget when you don't use it!
RB_Float.jpg
 

hawkeye

Guru
Messages
2,378
Likes
1,113
Not to belittle the pen tool, I use it a lot, but some selections are more easily done with other tools. I made this selection with the quick selection tool and polygon lasso very quickly. If you are going to use the pen tool for something like this, try adding a vector mask.
 

Attachments

  • MaxthonSnap20160804150339.png
    MaxthonSnap20160804150339.png
    233.4 KB · Views: 5

Top