Photoshop - 蒙板 (Layer Mask )

懒得解说。。唯有转。。多多包涵

转:

众多初学PHOTOSHOP的朋友在学习PHOTOSHOP中常常对PHOTOSHP中通道(channal)迷惑不解, 所以有很少朋友使用图层蒙板(layer mask)来进行创作。其实,图层蒙板是PHOTOSHOP中一项很重要的功能, 也是通道的一种运用之一,在这里,我向广大初学者讲解一下图层蒙板的使用方法和具体应用。
图层蒙板实际上就是对某一图层起遮盖效果的在实际中并不显示的一个遮罩,它在PHOTOSHP中表示为一 个通道,用来控制图层的显示区域与不显示区域及透明区域,蒙板中出现的黑色就表现在被操作图层中 的这块区域不显示,白色就表示在图层中这块区域显示,介于黑白之间的灰色则决定图象中的这一部分 以一种半透明的方式显示,透明的程序则由灰度来决定,灰度为百分之多少,这块区域将以百分之多少 的透明度来显示。

如图所示,在蒙板中黑色部分在应用后将图层的这部分给隐藏,白色部分则显示了出来。

下面我们来看看使用图层蒙板的具体操作过程:
1、为图层添加图层蒙板:

先选定我们要添回图层蒙板的图层,然后点击“图层”菜单下的“添加图层蒙板”子菜单,在这个菜单下面有两个命令,一个是“显示全部”,一个是“隐藏全部”,显示全部指的是当使用这个时系统会直接把整个图层显示出来,即把图层蒙板全部填上白色,隐藏全部则相反,他会先把图层蒙板填上黑色,这个选择根据自己的需要确定,我们先选则“显示全部”。

2、描绘图层蒙板:

如图所示,layer1已经被添加上了一个图层蒙板,在眼睛右边的图标变成了一个方块中间有个圆型,表示现在正在对图层蒙板进行操作,现在你可以用各种工具描绘图层蒙板了。

下面我们使用黑到白色的渐变工具在图像上做一个垂直的渐变,因为目前正在对图层蒙板操作,所以图象本身不会受到影响,只是在图层蒙板上出现了一个渐变。

现在你看到的图象就是按这个渐变的颜色的蒙板来显示的,蒙板上方从黑色变到下方的白色,使图象从不显示到慢慢透明显示再到显示。

3、图层蒙板的其它操作:

右键单击图层蒙板,会出现一个快捷菜单,其中最下面一块是关于图层蒙板的操作。
“图层蒙板选项”用来控制图层蒙板以什么颜色和透明度来显示,
“移去图层蒙板”表示将图层蒙板去掉,在使用时会询问是否应用,应用后图像将就按图层蒙板的效果生成,不应用就是删掉该图层蒙板,“停用图层蒙板”指暂时关闭图层蒙板,但并不删除

Photoshop蒙版原理:
Photoshop蒙板是将不同灰度色值转化为不同的透明度,并作用到它所在的图层,使图层不同部位透明度产生相应的变化。黑色为完全透明,白色为完全不透明。

Photoshop蒙版的优点:

1.修改方便,不会因为使用橡皮擦或剪切删除而造成不可返回的遗憾;
2.可运用不同滤镜,以产生一些意想不到的特效;
3.任何一张灰度图都可用来用为蒙板。

Photoshop蒙版的主要作用:

  1. 抠图;
  2. 做图的边缘淡化效果;
  3. 图层间的溶合。

本文我们介绍如何运用Photoshop蒙版抠图。请参阅《视频演示:使用图层蒙版》。

1.在Photoshop中打开一张图片;

2.先选出需抠出的部分。由于时间关系,我这是用一张较简单的车,用钢笔(pen、路径)工具勾选;

3.按ctrl+Enter键(或者在路径面板,按ctrl+点击该路径;或点击面板下面一“虚线圆”按钮),将路径转为选区,适当羽化(我羽化1象素);

4.双击背景层,确定(或者按Alt+鼠标双击),将其转为普通图层;

在前面的步骤中,羽化是为了使抠出的图边缘更平滑,大小自己把握,不能太大,一般在3像表以下,视你的图大小而定。将背景层转为普通图层是因为背景层不能应用蒙板。接着,关键的一步到了:

5.保持选区浮动,在图层面板下点击"添加图层蒙板"(Add layer mask)按钮;

大致轮廓便抠出来了。现在发现有些部分还没完全抠好,没事,此时模板的优点便可以体现出来了。

点蒙板(注意,选中蒙板时图层前的符号与选中图层时不同,所以在修改前一定要先确定你是在图层不是在蒙板上工作),将不需要的地方选出来,在蒙板上填充黑色,该部分便被摭住了;

现在我们发现车的挡风玻璃没有透明(当你抠下的图与其他图屋合并时会很不真实), 根据蒙板原理,蒙板不同的灰度影响图层不同的透明度,我们可在蒙板上用画笔或其他工具绘制不同层次的灰来调整。

完成如下:

另,抠比较复杂的图,比喻人的头发,植物的枝叶等时,可将图片转为CMYK或LAB等不同颜色模式,找出一个对比最强,边缘轮廓最清晰的通道,调整其色阶,然后应用到蒙板,再作进一步修整。

转:秘境仙人
看到有些网友总是弄不明白图层蒙板的应用,图层蒙板在照片处理中应当是一个应用比较广泛的手段,为使一些新手更快地掌握这一方法(因为我也是新手,呵呵!)做一些比较通俗的介绍,不知对大家有没有帮助。
也请高手多多指正!






最后的效果,做的糙了一点,只是看一下效果。

from:爱你不要你

开一新图,用套索画出一不规划区域,(你需要显示的部分应该大部份在此区域内,且注意不要超出图片大小。)
然后羽化,此时羽化值此应适当大一些,我的是15象素。

按前面所提到的方法建立蒙板,此时我们便看到一个不规划的边缘淡化效果,为了看得清楚,我在该层下建立了两个图层,一个全白,一个全黑,看看不同的效果。

在蒙板上应用不同的滤镜,便会使淡化的边缘出现不同的效果。我随便做了几个,大家可以多试试:)
另外,在蒙板和图层之间的空处有一个链接符号,默认是链接着的,点击可解开蒙板与图层的链接。此时如果移动图层或蒙板,只会移动你选择的相应图层或蒙板,这点与图层间的链接是一回事。
例:不同的效果…………(共五张)





好了,多试几次你就会有新的发现。
蒙板的某些属性与通道类似,按Ctrl然后左击蒙板,可载入蒙板的选区,此时你选中的不仅仅是一个轮廓,它包含了所有灰度信息。可利用这种方法来复制蒙板。
现在应该说到如何做图层的溶合了。
1.重开一张新图,将该图层复制为图层1;
2.按Ctrl+U将它变为单色或灰度;
3.点击添加图层蒙板,在蒙板上用不同的渐变来填充。
得到你想要的效果了吗?

由于是边做边想,难免漏洞百出,希望各位见谅:(
下面我来总结一下关于蒙板的重、难点:

1、蒙板影响的是图层的透明度,这是我们在要不要做蒙板前首先考虑的问题;
2、蒙板只有256级灰度(CMYK100级),通过不同的灰度影响图层不同的透明度;
3、蒙板可以应用大部分滤镜;(如在蒙板上做云彩,而图层只填淡兰色,便可做出效果逼真的云雾,而且修改特方便)
4、蒙板可以删除。删除时需要确认。应用:表示将当前蒙板作用到层;不应用,不起作用,还可重新来过;
5、在你大干之前一定要先确定你是否在蒙板上工作;(方法是看图层面板上的符号)
6、蒙板是个好东东:)
7、蒙板很好掌握;
8、不懂的请举手,呵呵;

这个这个蛮难的~要认真认真消化,斋看真的有点不明白,得空要去试试画。。。

引用第4楼lingyik于2007-06-22 02:50 PM发表的 :
这个这个蛮难的~要认真认真消化,斋看真的有点不明白,得空要去试试画。。。

之前你问的: 另一个难题是,我只是局部要画上pattern呢?可以分享下怎样弄吗?~

我是用layer mask 把不要的局部在layer mask上涂黑

time to diving… =x

你是说,你画了一整片的pattern但是你要局部,然后你就会用这个程序涂黑你不要的部分??

waaa

慢慢来消化。。。。
谢谢你先~ [s:22]

credit goes to lunacore

Layer Masks are a very powerful part of Photoshop and that is for a couple of reasons:

  • Layer Masks are editable selections that play an important role in non destructive editing
  • Layer Masks offer flexibility because they can be almost completely treated as a full gray scale image, which allows the use of filters, selection tools, adjustment tools, etc.
  • They have a visual strength, meaning that with a short look on the layers you can see how they affect the image
  • They offer extra flexibility by being part of vector masks, layer sets, adjustment layers, etc.
  • Layer masks allow you to save selections

Layer Masks are always saved when you save your document.

Layer Mask are quite often used to hide pixels, but can also be used to mask the result of an adjustment layer.
In this introduction we’re only going to focus on hiding pixels. later on we’ll see how layer masks can be used in combination with adjustment layers and layer sets.

So how do layer masks work? A layer mask is actually telling photoshop how to deal with the layer it’s attached to and does this by using shades of gray. Let’s focus for now only on black & white masks.

To understand layer masks you have to remember the following:

  • The color black in a layer mask hides the corresponding pixels in the linked layer (actually makes those pixels transparent).
  • The color white leaves the corresponding in the linked layer intact; it doesn’t do anything with them

In our example we have two layers in our layers palette;

  • A background layer that is green
  • A layer named Layer 1 that is on top and is color yellow

We also notice a black & white image on the right side of our Layer 1; that’s the famous layer mask.

Masks explainedSo what does that mean in our example? It means that the black ellipse is hiding the the corresponding pixels in the yellow layer (Layer 1).
What we see in our document window is always the result of looking down on the layers in the layers palette, starting at the top layer and in most cases ending with a background layer. All these are stacked on top of each other like playing-cards. Our yellow ‘card’ has a hole in it and that’s why it’s the only area where we can see the layer underneath, in our case the green layer. The result is a yellow square with in the middle a green ellipse.

So remember; black hides pixels (or hides the result of an adjustment layer)

Create a Layer Mask (all visible)
click

Create a Layer Mask (all hidden)
alt +

Use a brush to paint on the layer mask

Active Layer Mask
An active Layer Mask can be recognized by:

  • a Layer Mask icon Layer Mask in front of the layer (marked with red circle)
  • a double border surrounding the Layer Mask (marked with red arrow)

Inactive Layer Mask (layer is active instead)
An inactive Layer Mask can be recognized by:

  • a brush icon front of the layer (marked with red circle)
  • a double border surrounding the layer in the layers palette (red arrow)

Unlinked Layer Mask
By default a layer and its masked are linked, meaning that moving the layer will also move the mask or moving the mask will also move the layer. We can unlink the layer and its mask by clicking on the link icon . Both layer and mask can then be moved independently. The red ellipse shows where we have removed the link.

Disable a Layer Mask
You can disable a layer mask by holding down the shift key while clicking on the mask. The layer mask will then be marked with a large red cross.

Delete a Layer Mask
You can delete a layer mask by clicking on it and while holding down the mouse button dropping it on the trash icon. A new window will opem with 3 options:

Apply: Apply the mask to the layer first, before removing it. Read more about this in the section "Apply Layer Mask’.
Cancel: Cancel this action
Discard: Remove the layer mask but keep the layer itself intact.

Edit a Layer Mask in the document window
We can edit the mask in the document windows by holding down the Alt key while double clicking on the mask.

Right click on Layer Mask (context menu)
You can right click on a mask and a context menu will pop up.

Several options deal with a Selection. We’ll talk about this later.
Earlier you’ve learned how to disable a mask, how to apply or discard it. You’ll notice that all these 3 options are available in the context menu.
The Layer Mask Options gives you the opportunity to change the color of the opacity mask. You’ll read more about that later.

Apply Layer Mask
You can get rid of a masks by deleting it or by applying it to the layer.

This is the result of applying the layer mask to the layer:

We can apply a layer mask to a layer by:

  • Clicking on apply when we want to delete a layer mask and getting the message “Apply mask to layer before removing?”
  • Merging the layer with its mask with the layer underneath (Ctrl + E / Command + E on the Mac).
  • Right clicking on the Layer Mask and selecting in the context menu ‘Apply Layer Mask’.
  • In the menu: Layer / Remove Layer Mask / Apply

Layer Mask with gray
A layer mask doesn’t need to be either black or white but it can be any gray scale image:

It’s easy to understand that white makes part of a layer visible and that black makes things invisible. Look at everything in between as changing the opacity of the layer. The opacity is the transparency of a layer.

In this example we have a gray mask and it has the same effect as changing the opacity, so the green looks lighter and that’s because part of the bottom layer (white) is shining through.
If the bottom layer would have been black, then the result would have been a darker green.
You can see what kind of effect gray scale masks have by enabling/disabling them a few times (see ‘Disabling a Layer Mask’)…

Layer Masks and gradients
The nice thing about layer masks is that they are flexible. In this example we have used a linear Black & White gradient to fill our mask:

The result is an image that’s green on top (white pixels in a mask don’t affect the layer), white at the bottom (black makes the green pixels invisible, so you can see the white background) and everything in between is a transparent green with the white background shining through.

Layer Styles in combination with Layer Masks
You can add Layer Styles to any layer that contains a mask. The layer style will take the mask in account.

In this example the layer style wasn’t affecting only the layer, but the result of the layer and its mask (a green circle):

Vector Mask
We’ve seen earlier that our regular masks are always grayscale. Photoshop however also allows us to use vectors to mask a layer. These vectors are not drawn on the normal grayscale masks but on a dedicated Vector Mask.

A Vector Mask can be created by going to the menu and selecting: Layer / Add Vector Masks / Reveal(hide) All

Now look at this example:

If we add a shape, in this case with the Ellipse Tool with the Shape Layers icon selected in the options bar, we’re actually creating a Fill Layer in combination with a Vector Mask.

There are many way to create Vector Masks and these are just two examples.

Combine a Layer Mask with a Vector Mask
The great thing about Photoshop is that we can even combine a grayscale layer mask with a vector mask:

There is something about the above example that is important to know and that is that vector masks have a higher priority than layer masks. Look at this image:

With the regular layer mask active and the vector mask disabled you’ll notice that the black line in the layer mask affects the complete layer. With the vector mask enabled and the layer mask disabled you’ll see a green circle.

With both masks active you’ll see in the previous image that the layer mask is restricted to the vector mask; the black line only affects the green circle.

You’ll also notice that we now have a link symbol the fill layer and the layer mask (you can move the mask independently of the layer by turning this off) and a link symbol the layer mask and vector mask (you can move the vector mask independently of the layer by turning this off).

It’s important to know that the masks are linked to the layer and not each other, meaning that both masks can be moved independently of each other, even if all link symbols are visible.

Combine Layer Masks
You can also add a mask to a layer set.
This makes it for example possible to combine layer masks as shown in the next screenshot.
This layer set mask will also effect all layers that are inside nested layers.

Use clipping layers with Layer Masks
A clipping layer is nothing but a layer that is restricted by the layer beneath it. A layer can easily turned into a clipping layer by pressing Ctrl+G (command + G on the Mac) or Ctrl + Alt + G (command + option + G on the Mac) if you’re using Photoshop CS2. The clipping layer will only affect all non-transparent pixels. In this example the gradient only affected the circle:

Masks and filters
One of the best things of layer masks is that we can apply a effect to them.
In this example the effect distort / glass was applied:

Masks and adjustment layers
Masks can be used with adjustment layers. Have you ever added a new adjustment layer and did you notice a white square on the right of it in the layers palette; well, that’s a mask. By default Photoshop adds a white mask (all visible) to every new adjustment layer.

Look at this example:

We have a background filled with a gradient and on top of that we have a box that has a layer mask attached to it. The layer mask has made the white background of the box layer invisible and that’s why we’re now looking at the background gradient of the background layer.

In the next example we’ve activated the Hue & Saturation adjustment layer that is clipped to the box layer(Ctrl+G ( Command + G on the Mac) or Ctrl + Alt + G ( Command + Option + G on the Mac) if you’re using Photoshop CS2), so that it will only affect that particular layer:

Notice how we used the Hue & Saturation adjustment layer to change the color of the box to blue. Its mask was disabled.

In the next example we’ve activated the mask that contains a linear gradient going from white (top) to black (bottom). Remember what I said earlier; lighter grays decrease the transparency, darker grays increase the transparency. The mask has used this to affect the result of the original Hue & Saturation adjustment layer.

Masks and selections
One way to create a mask is by using a selection. In this example I’ve selected a paper box:

When we now click on the New Mask icon , Photoshop will add a mask that is based on this selection:

Important to know is that you can also invert a mask. In the next image I’ve selected the mask (notice the double border) and pressed Ctrl + i (Command + i on the Mac):

You can also invert an image using the menu: Image / Adjustments / Invert.

If we don’t change the mask after we’ve created it, then we can use this mask to return to our original selection. This is done by a Ctrl + left mouse click on the layer mask (Ctrl is command key on the Mac). The layer doesn’t need to be active for this.
Being able to convert a mask to a selection is a great advantage, because it allows us to save a selection without the need to save it in a channel. It’s also an advantage to see what is selected and masks allow us to do this.

If you have created a mask based on a selection and want to save this mask because you’re planning to make adjustments to it, then either save it as a channel or duplicate the layer and make it invisible.

Shortcuts

为什么那么难,ufo~我英文很水皮,看不懂~ [s:18]

i dun un this step wor…
how come my background stil square square…no color de??? [s:19]

ufo~你自己开个程序好吗?这些都教得不仔细~~我全部都不明白了,跟着step都做不到。。。

ooooo

now i know this step jor !!!
wakakka

no need to buy SLR liao…i can blur it myself jor~

ps : 高斯模糊= box blur

fliter = blur = box blur

foreground = black
background = white

[s:19]
pic0001 copy.jpg

第3 ,可以把它换成英文吗?
我不知道他要用什么tool =。。。。=

第8 楼,在消化当中 [s:19] [s:19]

is it like tat ??
275.jpg
275s.jpg
275x.jpg
275c.jpg

lingyik: 刚开始是会觉得难的。 慢慢来。。。
(小小声说。。vins好像明白了,你可以请教他。。LoL)

llw:
slr and photoshop is different things… 如果前期摄的不好,后期怎样用PS也无法挽救T.T
gaussian blur=高斯模糊…
default foreground color= black
default background color= white
(hotkey ‘D’ will reset ur foreground/background color to black and white)

llw: wor… how come my background stil square square…no color de???
try go to channel palette visible the layer mask

vins: ya ya… u make it
(小小声说。。你可以教她吗?)