Open Photography Forums  
HOME FORUMS NEWS FAQ SEARCH

Go Back   Open Photography Forums > Digital Darkroom > Image Processing and Workflow

Image Processing and Workflow RAW, DNG , TIFF and JPG. From Capture to Ready for Publish/Display. All software and techniques used within an image workflow, (except extensive retouching and repair or DAM).

Reply
 
Thread Tools Display Modes
  #1  
Old May 22nd, 2011, 08:48 PM
Doug Kerr Doug Kerr is offline
Senior Member
 
Join Date: May 2006
Location: Alamogordo, New Mexico, USA
Posts: 8,194
Default Photoshop - the clipping mask

A very useful functionality of Photoshop is the clipping mask. But it took me a while to figure out exactly how it works. The Photoshop Help for it just makes my head hurt.

How it works and what it does
Note that in the basic story here, no layer masks are involved.
A clipping mask is a "normal" (content) layer that has been given a special power. Its own pixel content is not normally seen, and does not normally ever enter into the image buildup.

But the opacity of this layer, pixel-by-pixel, is conferred on the content layer above.
Assume for simplicity's sake in the following that the basic opacity of the content layer above, and of the pixels of its content, is 100%.
Wherever the special layer is 100% opaque, the layer above acts as if it is 100% opaque. Thus, its pixels participate in the image buildup; they will "cover up" the pixels of a layer below the special layer.

Wherever the special layer is 0% opaque, the layer above acts as if it is 0% opaque. Thus, its pixels do not participate in the image buildup; they will "cover up" the pixels of a content layer below the special layer.

Wherever the special layer is (for example) 30% opaque, the layer above acts as if it is 30% opaque. Thus, its pixels participate in the image buildup at "30% of par"; they will "30% cover up" the pixels of a content layer below the special layer (such that they participate in the image buildup at 70% of par.

Note that the pixel colors in the special layer have no effect on this, only their transparency.

Setting this up

To put this deal into effect, we can:

Right click on the control bar for the layer above the one to be made a clipping layer (the layer whose content is to be affected by the clipping mask); click on Create Clipping Mask.

or

Alt-click on the boundary between the "layer to be governed" and "the layer to be made a clipping mask".

Once we have done this, the layer to be governed shows a "left then down" bent arrow. That says, "look down there: that is my boss".

An alternate description

There is an alternate way to describe what happens here:

The pixels on the layer above the special layer never appear in the image buildup.

The pixels of the special layer are replaced by the pixels of the layer above with respect to pixel color, but retain the opacity of the original inhabitants of the special layer. Those immigrant pixels then participate in the layer buildup in the usual way.

Thus, only where those immigrant pixels have an opacity greater than 0% (which is where the original content of the special layer had an opacity greater than 0%) will they be seen.

Best regards,

Doug
Reply With Quote
  #2  
Old May 23rd, 2011, 06:13 AM
Jonas Wendorf Jonas Wendorf is offline
New Member
 
Join Date: Apr 2011
Location: Germany | Willich
Posts: 14
Default

Another interesting thing about the use of clipping masks is that they by default blend as a group.

That means if your base layer (the special layer as you call it) is set to any blending mode different to normal, the two clipped layers will first of all interact with each other in the according way and afterwards the result will blend with the special layer's blending mode.

If for some reason you want to change this behavior (if for example you've got a layer with a mask attached and need this mask on another layer, but with a different blending mode), you can just go to the special layer's advanced blending options and uncheck the "Blend clipped layers as Group" checkbox.
__________________
Yours,
Jonas
Reply With Quote
  #3  
Old May 23rd, 2011, 10:45 AM
Asher Kelman Asher Kelman is online now
OPF Owner/Editor-in-Chief
 
Join Date: Apr 2006
Posts: 32,719
Default

Doug,

An example would be really helpful. Looking at an actual photograph that has changed as a picture result of a clipping mask, (screen capture of the layers dialog box), would be a nice reinforcement of your text.

Asher
__________________
Follow us on Twitter at @opfweb

Our purpose is getting to an impressive photograph. So we encourage browsing and then feedback. Consider a link to your galleries annotated, C&C welcomed. Images posted within OPF are assumed to be for Comment & Critique, unless otherwise designated.
Reply With Quote
  #4  
Old May 23rd, 2011, 11:46 AM
Doug Kerr Doug Kerr is offline
Senior Member
 
Join Date: May 2006
Location: Alamogordo, New Mexico, USA
Posts: 8,194
Default

Hi, Asher,

Quote:
Originally Posted by Asher Kelman View Post
An example would be really helpful. Looking at an actual photograph that has changed as a picture result of a clipping mask, (screen capture of the layers dialog box), would be a nice reinforcement of your text.
Yes, indeed. I hope to be able to add that soon.

Thanks.

Best regards,

Doug
Reply With Quote
  #5  
Old May 23rd, 2011, 04:22 PM
Doug Kerr Doug Kerr is offline
Senior Member
 
Join Date: May 2006
Location: Alamogordo, New Mexico, USA
Posts: 8,194
Default

Here we see an example of the operation of a basic Photoshop clipping mask. It is not a realistic example of something we might do. It is a didactic example, intended to most clearly show what does what.

The setup has three layers. The top (3) and bottom (1) have content (trivial, but easily recognized for this example). The center one (2) also has content, but it is the layer that will be made a clipping mask (called the "base layer" of a clipping mask setup.

There are no layer masks in effect.

Here we see layer 3 with the clipping mask not yet activated:


Layer 3 with no clipping mask in effect

Here we see layer 2 before it has been made a clipping mask:


Layer 2 before it is made a clipping mask

It is important to note that the various colors in the cross have normal opacity (100%), while the surrounding area has opacity 0% (and so there we can see right through to "the great empty beyond", indicated by the symbolic gray checkerboard).

Here we see layer 1:


Layer 1

Here we see layer 3 as modified by the effect of layer 2 once it has been made a clipping mask:


Layer 3 as clipped by layer 2

We see that wherever layer 2 has opacity 100%, the pixels of layer 3 retain their original opacity, 100%. Where layer 2 has opacity 0%, the pixels of layer 3 are given opacity 0% (and are thus invisible, since we see right through them to the great empty beyond). But all the pixels on layer 3 retain their original colors.

Note that the particular colors of the pixels in layer 2 do not matter, just their opacity.

[continued]
Reply With Quote
  #6  
Old May 23rd, 2011, 04:30 PM
Doug Kerr Doug Kerr is offline
Senior Member
 
Join Date: May 2006
Location: Alamogordo, New Mexico, USA
Posts: 8,194
Default

[continued]

Here we see the composite image:


Composite image

As we might expect, the pixels in layer 3 that have opacity 100% (conferred on them by layer 2) are seen; they "cover up" the pixels of layer 1. The pixels of layer 3 that have opacity 0% (conferred on them by layer 2) are not seen; we see right through them to the pixels of layer 1.

Here we see the Layers panel with this setup in effect:


Layers panel

The hooked arrow on the layer 3 control bar indicates that there is a clipping mask below that influences this layer. The underlined title of layer 2 shows that it is a clipping layer.

Best regards,

Doug
Reply With Quote
  #7  
Old May 25th, 2011, 07:23 AM
Joachim Bolte Joachim Bolte is offline
Member
 
Join Date: Aug 2010
Posts: 151
Default

If I am correct, another nice thing about a clipping mask is that it, though not showing the pixels of the object, does supports layer styles on the clipping mask itself. So when making (for example) a photo-collage in a single document, you could use square clipping masks to frame your pictures, and a 'stroke' and 'drop shadow' layer style to give every picture a white edge and a bit of depth. You could position the originals behind the clipping mask, shove them around at your liking, without having to bother about resizing and reframing.

An example for this that I did can be found here:
Reply With Quote
  #8  
Old May 25th, 2011, 07:37 AM
Doug Kerr Doug Kerr is offline
Senior Member
 
Join Date: May 2006
Location: Alamogordo, New Mexico, USA
Posts: 8,194
Default

Hi, Joachim,

Quote:
Originally Posted by Joachim Bolte View Post
If I am correct, another nice thing about a clipping mask is that it, though not showing the pixels of the object, does supports layer styles on the clipping mask itself. So when making (for example) a photo-collage in a single document, you could use square clipping masks to frame your pictures, and a 'stroke' and 'drop shadow' layer style to give every picture a white edge and a bit of depth. You could position the originals behind the clipping mask, shove them around at your liking, without having to bother about resizing and reframing.
That is a great tip, and your example is wonderful.

Thanks so much.

Best regards,

Doug
Reply With Quote
  #9  
Old May 25th, 2011, 10:50 AM
Doug Kerr Doug Kerr is offline
Senior Member
 
Join Date: May 2006
Location: Alamogordo, New Mexico, USA
Posts: 8,194
Default

Hi, Joachim,

Quote:
Originally Posted by Joachim Bolte View Post
An example for this that I did can be found here:
I would very much appreciate it if you could describe for me the layer setup you used to do this. I still do not think fluently in terms of clipping masks or many other "layer" things.

Thanks.

Best regards,

Doug
Reply With Quote
  #10  
Old May 25th, 2011, 11:29 AM
Asher Kelman Asher Kelman is online now
OPF Owner/Editor-in-Chief
 
Join Date: Apr 2006
Posts: 32,719
Default

Quote:
Originally Posted by Joachim Bolte View Post
If I am correct, another nice thing about a clipping mask is that it, though not showing the pixels of the object, does supports layer styles on the clipping mask itself. So when making (for example) a photo-collage in a single document, you could use square clipping masks to frame your pictures, and a 'stroke' and 'drop shadow' layer style to give every picture a white edge and a bit of depth. You could position the originals behind the clipping mask, shove them around at your liking, without having to bother about resizing and reframing.

An example for this that I did can be found here:
Joachim,

I love this! What a short cut to expensive, hard to get, Polaroid's! This is is so artistic. Who does this as a style? I've seen total collages like this but not as you've shown/

Asher
__________________
Follow us on Twitter at @opfweb

Our purpose is getting to an impressive photograph. So we encourage browsing and then feedback. Consider a link to your galleries annotated, C&C welcomed. Images posted within OPF are assumed to be for Comment & Critique, unless otherwise designated.
Reply With Quote
  #11  
Old May 25th, 2011, 05:50 PM
Doug Kerr Doug Kerr is offline
Senior Member
 
Join Date: May 2006
Location: Alamogordo, New Mexico, USA
Posts: 8,194
Default

Hi, Joachim,

Well, I think I got it.

I made a (full-color) copy of the background image for each "framed picture". I gave each one a clipping mask, made a rectangular block in each clipping layer, and then applied a layer Stroke (inside - white) and a bevel.

Are we on the same page?

Thanks.

Best regards,

Doug
Reply With Quote
  #12  
Old May 25th, 2011, 08:21 PM
Jonas Wendorf Jonas Wendorf is offline
New Member
 
Join Date: Apr 2011
Location: Germany | Willich
Posts: 14
Default

If I may throw in my opinion once again ;-).
Images like this are probably easier to create with a knockout layer, rather than clipping masks.

First place your desaturation layer above your background layer.
Then create a new rectangular layer filled with any color you like and apply the layer stiles to create the polaroid look.
The next step is pretty easy.
Go to the advanced blending modes (inside the layer styles dialog), set the knockout to "Deep" and the fill opacity to 0%.
Now this layer will knockout every layer underneath it down to the background layer and therefore reveal the original color image.

The benefit of using this technique is that you just have to copy and paste the knockout layers, not the whole image over and over again :-).

If you want an example, I can upload a layered PSD-file for you.

Sorry for the hijack btw!
__________________
Yours,
Jonas
Reply With Quote
  #13  
Old May 25th, 2011, 09:25 PM
Doug Kerr Doug Kerr is offline
Senior Member
 
Join Date: May 2006
Location: Alamogordo, New Mexico, USA
Posts: 8,194
Default

Hi, Jonas,

Quote:
Originally Posted by Jonas Wendorf View Post
If I may throw in my opinion once again ;-).
Images like this are probably easier to create with a knockout layer, rather than clipping masks.

First place your desaturation layer above your background layer.
Then create a new rectangular layer filled with any color you like and apply the layer stiles to create the polaroid look.
Where and how do we define the sizes, shapes, and locations of the "Polaroid" prints?

Is that done with something working on the arbitrary color layer (a mask, for example)?

Can we have the Polaroids overlapping, as in the original example? How does the style engine know where to put individual the white borders?

Oh - there are multiple "knockout" layers.

Quote:
The next step is pretty easy.
Go to the advanced blending modes (inside the layer styles dialog), set the knockout to "Deep" and the fill opacity to 0%.
Now this layer will knockout every layer underneath it down to the background layer and therefore reveal the original color image.
Ah, another new thing for me to learn about - knockout!

Quote:
The benefit of using this technique is that you just have to copy and paste the knockout layers, not the whole image over and over again.
Oh, there are several knockout layers. That clears up my question above. Makes sense of course, but you didn't say!

Well, you don't actually have to Copy and Paste the image layers, just use Duplicate Layer. But I know what you mean.

Quote:
If you want an example, I can upload a layered PSD-file for you.
That would be wonderful. Let me know where it is when you get it up.

Thanks.

Best regards,

Doug
Reply With Quote
  #14  
Old May 25th, 2011, 09:41 PM
Doug Kerr Doug Kerr is offline
Senior Member
 
Join Date: May 2006
Location: Alamogordo, New Mexico, USA
Posts: 8,194
Default

Hi, Jonas,

I did it. Fabulous!

Thanks.

Best regards,

Doug
Reply With Quote
  #15  
Old May 26th, 2011, 08:46 AM
Jonas Wendorf Jonas Wendorf is offline
New Member
 
Join Date: Apr 2011
Location: Germany | Willich
Posts: 14
Default

Here's an example of using the knockout layers to create this kind of effect.

The real magic is inside the layer stiles (esp. the advanced blending options) :-).

http://dl.dropbox.com/u/7124285/Knockout.psd

The knockout can also be helpful for dynamic tonal range masks if combined with the luminance blending (blend if) sliders.

</hijack>
__________________
Yours,
Jonas
Reply With Quote
  #16  
Old May 26th, 2011, 09:07 AM
Doug Kerr Doug Kerr is offline
Senior Member
 
Join Date: May 2006
Location: Alamogordo, New Mexico, USA
Posts: 8,194
Default

Quote:
Originally Posted by Jonas Wendorf View Post
Here's an example of using the knockout layers to create this kind of effect.

The real magic is inside the layer stiles (esp. the advanced blending options) :-).

http://dl.dropbox.com/u/7124285/Knockout.psd
Fabulous, and what a cute kid.

I'm gratified to see that this is so like what I did myself late last night (based on your description).

See my discussion of that here:

http://www.openphotographyforums.com...ad.php?t=14114

Thanks.

Best regards,

Doug
Reply With Quote
  #17  
Old May 26th, 2011, 02:56 PM
Joachim Bolte Joachim Bolte is offline
Member
 
Join Date: Aug 2010
Posts: 151
Default

@Jonas,

Thanks for the tip! indeed a method that requires much less layering and copying of the pictures.

What you might do to make it easier to rescale and rotate the frames without losing quality, is using vector shapes instead of filled pixels. That way you could also make odd shapes like arrows, hearts and so on...
Reply With Quote
  #18  
Old May 26th, 2011, 03:09 PM
Joachim Bolte Joachim Bolte is offline
Member
 
Join Date: Aug 2010
Posts: 151
Default

something like this I suppose...


Uploaded with ImageShack.us
Reply With Quote
  #19  
Old May 26th, 2011, 04:37 PM
Jonas Wendorf Jonas Wendorf is offline
New Member
 
Join Date: Apr 2011
Location: Germany | Willich
Posts: 14
Default

Nice idea, Joachim :-)!

Yes, vectors could be of benefit if you want a more different look. And it takes up less disk space as well!
__________________
Yours,
Jonas
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Photoshop - mask transparency math Doug Kerr Image Processing and Workflow 16 May 20th, 2011 03:18 PM
Photoshop - drawing pixel masks Doug Kerr Image Processing and Workflow 22 May 18th, 2011 12:19 PM
Holliday snap challenge Ivan Garcia Retouching & Repairing 35 August 27th, 2008 12:09 PM
IMPORTANT NEWS: Photoshop CS4 to support 64bit on windows only Ivan Garcia Breaking News 1 May 17th, 2008 11:42 AM
CS3 is expected to ship by end of April 2007 Nicolas Claris Breaking News 6 March 28th, 2007 04:22 PM


All times are GMT -7. The time now is 01:36 PM.


Posting images or text grants license to OPF, yet of such remain with its creator. Still, all assembled discussion 2006-2017 Asher Kelman (all rights reserved) Posts with new theme or unusual image might be moved/copied to a new thread!