PDA

View Full Version : Two Handy Photoshop Techniques



StarRaven
07-09-2009, 03:47 AM
These techniques have been useful to me as I play with Photoshop, I hope you find them useful too! They work on Photoshop CS2 and CS3, I cannot speak for other versions, unfortunately, though I imagine they'll be much the same.

1.) Taking black lines off of a white background (without the mess):
(Also known as "the secret art of turning a scanned image into transparent lineart" although that is hardly this technique's only application.)

So, you've got a black and white layer, and you want to get rid of the white. (Preferably without turning your lovely black lines/landmass into a jumbled mess of pixels in the process.)

1: Select all and copy the contents of the entire layer.
2: Create a new layer and fill it completely with black.
3: Click the "Quick Mask" button all the way at the bottom of the tool box, or press "Q."
4: Paste. It should now show your black and white layer, with black where the white was and red where the black was. Lovely.
5: Now press the quick mask button (or Q) again. There should be a big selection separating the black from the white. Of course, this is on your all-black layer, so the whole layer will still be black. To fix this...
6: Press delete. This should delete everything on that all-black layer that was white in your original layer, leaving the bits that were varying shades of grey before (between the white and black) as varying shades of transparent now.

2.) The magic wand tool is evil.
So, now that we've got our lovely continent on a separate layer from the sea, what happens if we need to select it, or the sea? Again, our trusty magic wand fails us. Do not be fooled - the magic wand is evil! Simply ctrl+click a layer to select all of the pixels (and their varying transparency) in that layer. Invert the selection (Select -> Invert or Shift+Ctrl+I) to... well, you know.



The technique of removing black lines off of a white background was one I found a long time ago while scouring deviantART for a way to turn my penciled pictures into transparent linearts without having to trace the entire picture onto another layer by hand (with a tablet or otherwise.) I'm still not sure a lot of digital artists know it exists (that, or it's a well-kept secret) - a lot of tutorials simply don't even cover it at all. Most of them either expect you to already know how or expect that you just drew it straight into Photoshop with a tablet. (That works for some people, but I like the feel of a piece of paper - the plastic against glass of my laptop's tablet screen just is not what I'm used to, and I can't seem to draw correctly with it. It has something to do with the way the stylus slides across it, whereas with pencil lead against paper there's some texture. There's a chance I might be a little picky.:roll:)

The ability to ctrl+click a layer to select all of the pixels on that layer was something I stumbled upon purely by accident and haven't seen it in many tutorials where it would be extremely useful, so I thought I'd throw that in there.

Hope it's useful! And come to think of it, I hope this is the right place to put it. D:

Dain
07-09-2009, 04:28 AM
Thanks for this man,
I was wandering how to do it with Photoshop. I usually do this with GIMP and it's a lot more easier.

- Change the mode of your picture into RGB mode
- Menu Color -Color to alpha then Ok
Done, the white background has disappeared. You can then add a another BG background color by creating a new layer.

It's a shame this function doesn't exist in PS :(

ravells
07-09-2009, 04:51 AM
Thanks Star Raven, will give this a try!

Ascension
07-09-2009, 08:47 AM
The ctrl-click works with CS and version 7 as I've been using that since I got 7 (also in my tuts). The quick mask thing I'll have to try out, I've never really liked quick mask but I'm open to second and third (and 50th) chances.

StarRaven
07-09-2009, 03:26 PM
Thanks for this man,
I was wandering how to do it with Photoshop. I usually do this with GIMP and it's a lot more easier.

- Change the mode of your picture into RGB mode
- Menu Color -Color to alpha then Ok
Done, the white background has disappeared. You can then add a another BG background color by creating a new layer.

It's a shame this function doesn't exist in PS :(

No kidding! That sounds a lot easier. Still, the quick mask thing is pretty simple, takes no time at all, and becomes second nature after you've done it once or twice. (I should probably make some sort of... what'sitcalled... action? to do it for me, but I have no idea how those things work.... D: )


The ctrl-click works with CS and version 7 as I've been using that since I got 7 (also in my tuts). The quick mask thing I'll have to try out, I've never really liked quick mask but I'm open to second and third (and 50th) chances.

Quick mask does stuff other than that? :O Haha, kidding. I never use it for anything else, though. :D

altasilvapuer
07-09-2009, 10:21 PM
Wow, great find in that first trick! I can see easily why and how it works, and I can't believe I never thought of that. Duly repped; keep it up!

-asp

Larb
07-10-2009, 11:35 AM
Oh wow, I've been trying to figure out how to do that outline copying with transparency for ages. Thanks!

Midgardsormr
07-12-2009, 01:09 AM
Good tips. You can also ctrl-click on a channel to make a selection on the white in that channel (and fuzzy-selecting the grey).

Depending on how you're using your scanned line art, you may not even need to delete the white pixels. Set the line art layer to the multiply blendmode. The white will vanish, leaving nice, clean lines with no aliasing problems. It won't always be the solution you need, but it works a lot of the time, and it's non-destructive, so you can still apply a curves adjustment to modify the amount of detail in your lines.

I like the Quick Mask for making gradient selections. It's handy for adding haze to an environmental image or for simulating a pool of light.

StarRaven
07-19-2009, 02:08 AM
Good tips. You can also ctrl-click on a channel to make a selection on the white in that channel (and fuzzy-selecting the grey).

Depending on how you're using your scanned line art, you may not even need to delete the white pixels. Set the line art layer to the multiply blendmode. The white will vanish, leaving nice, clean lines with no aliasing problems. It won't always be the solution you need, but it works a lot of the time, and it's non-destructive, so you can still apply a curves adjustment to modify the amount of detail in your lines.

I like the Quick Mask for making gradient selections. It's handy for adding haze to an environmental image or for simulating a pool of light.

:O I've never used channels (they cofuse me... XD), so I didn't know about that.

Yes, Multiply usually works, unless you want to color your lines. That doesn't work so well, unfortunately. D: These days I've pretty much given up on coloring scanned artwork. Now that I've learned how to use the pen tool I usually just ink it in Photoshop. I still really like working by hand though... D:

Haha... honestly, I don't know whow to do anything else with Quick Mask... D:

Midgardsormr
07-19-2009, 11:43 AM
Well, then, a quick primer on channels.

The most obvious use for the channels is to save a selection you anticipate wanting to use more than once. Your land mask, for instance. Create your continent shape, select it, then Select > Save Selection... and give it a name, like "Land Mask." Your selection will appear in the channels list as a black-and-white image. You can then quickly load it from the Channels list by ctrl-click or through Select > Load Selection...

Once you have selection saved, you can also perform operations on it. Suppose, for instance, that you want to do something with the surf a few pixels away from your coastline, and you want the effect to fade out from the edge. You could do that with Select > Modify > Feather, or you could get more control by copying the selection channel (just drag it to the "new" button at the bottom of the channels list) and doing, say, a Gaussian Blur on the channel, or using the smudge tool on its edges, or any number of other applications. I like to use the spatter filter to roughen the edges of my forest masks.

Then you load the selection and do your fill, or apply it as a mask, or whatever.

In addition, if you have a layer mask selected and you switch to the channels list, the mask shows up as an additional channel, and you can drag that mask to the "new channel" button as though it were a normal channel.

I'll stop there, but there are also lots of things you can do with photomanipulation by using the channels. If you can find a copy, the book Channel Chops by David Bieny is an extremely valuable resource. It was written in the days of Photoshop 4, but it's just as valuable now as it was then. It's difficult to locate now, being so old, but you can probably find it through an interlibrary loan.

StarRaven
07-22-2009, 02:46 PM
Too cool. :O Thanks so much for taking the time to explain all that. I guess what always confused me was the "RGB, Red, Green, Blue" channels that are on there by default, so I always thought it had something to do with color....

Midgardsormr
07-23-2009, 12:01 PM
Strictly speaking, that's true. When you have a RGB image, the channels simpy describe how much of each is in a particular pixel. If a pixel is at 0,0,0, it's black. When you view the channels, each one will also show a black pixel (0) at that location. If you have 0,0,255 the pixel is pure blue. The red and green channels will each have a black pixel, and the blue one will have a white pixel. If you have, 255,255,0 the red and green channels will each have a white pixel and the blue will have a black pixel. The composite image, though, will show a yellow pixel.

How is that useful? Well remember that you can copy a channel. Suppose you're trying to cut an object off its background. You could do it with quick mask, or the magic wand, or the pen tool, but if you've got a lot of detail in the edges, none of those things are likely to give you good results.

Instead, take a look at each of those color channels. It's fairly likely that at least one of them has pretty good contrast between background and foreground (assuming it was a decent photo to start with). If you copy that one and can find a way to somehow enhance that contrast until you have a black-and-white channel, you can use that channel as your mask.

Useful tools for achieving this are, of course, Levels and Brightness & Contrast under the Image > Adjustments menu.

You can also use the Burn and Dodge tools to enhance the edges. Set the burn tool's Range to "Shadows" and the dodge tool's Range to "Highlights" and brush them lightly across the contrasty edges. With a little finesse, you can even get a decent mask on frizzy hair or other difficult-to-mask objects.

If you can't find a single channel with enough contrast, check out Image > Calculations. This bizarre dialog allows you to combine two color channels into a new channel with different properties. Just experiment with different combinations and different blending modes until you see something that looks like a good starting point.