All right, gang! Now we are going to actually get into the underlying arithmetic formulas thatare associated with the blending operations here inside Photoshop.And we're going to take it pretty easy because there's an awful lot of stuffgoing on, even if you like math, by the way.The file I have open is called Blend mode math.psd, it's found inside the02_math folder and you can see that we've got the blending functions listed overhere on the left hand side, the pixel formulas are listed here in the middle andthen I've also provided a description of each one of the formulas, because it'svery possible that you might look at A+ B-1 and think, all right, but I don'thave any idea what in the world that would possibly mean.

So we'll walk through all of them here.Now I have tried to document every one of the blend modes, with the exception of four.Normal and Dissolve, because they don't use any special math, and then LighterColor and Darker Color which are composite modes that are based on Lighten andDarken respectively and we'll see how they work later.And then finally, despite a lot of research, I was not able to verify theformula for Soft Light.None of the formulas that I found out there actually worked the way the SoftLight blend mode does.

Anyway, with that in mind here's what's going on with every single one of these formulas.They are based on the letters A and B . A represents a pixel on the activelayer, B represents that same pixel on the underlying layers that is to say in the background.So A is active, B is background and that's really all there is to that.Notice also over here where the descriptions are concerned, I have thislittle caution icon.Any of the blend modes that include those caution icons may and probably willresult in some degree of clipping;either you'll be clipping to black or to white.

Any of the blend modes that do not include caution icons can not clip.They will not introduce any form of clipping, so they turn out to be the safestand typically the most useful modes.We'll start off here with the basic Opacity formula.I've re-showed you this one at the beginning of Chapter 2 of my masking andcompositing fundamentals course, but let's go ahead and review.You may recall that Opacity is represented by the Greek letter alpha which iswhere the alpha channel gets its name.

And so to calculate Opacity, you multiply that Opacity value and you wouldstandardize it as well.So 100% Opacity would be 1, 0% opacity would be 0, 50% opacity would be 0.5, and so forth.So you multiply the active pixel by the Opacity value and then you take 1 minusthat Opacity value, 1-a, which is the inverse of the Opacity value.Any time you see 1 minus anything in these pixel formulas that means you'refinding the inverse and in this case, we're multiplying the inverse of theOpacity value by B that is that background pixel.

So if the Opacity was 70% it'd be 0.7 times A and then 1-0.7 would be 0.3 for30% B. So it'd be 70% of the active layer with 30% of the background layer;pretty easy to figure that one out.And all it is, is a percentage based pixel mix.It's as if we are mixing a beverage, let's say;it's 70% one ingredient and 30% of another. All right!Now let's take a look at the first darkening mode which is Darken.All it does is locate the darkest pixels.

So in other words, where any single pixel is concerned, it tries to find the minimum.So if A is darker then A wins and if B is darker B wins.Whichever pixel is darker is the pixel that you end up seeing after you blendthe images together, which means, you end up getting a lot of harsh transitions,not one you'll be using on a regular basis, but still, there it is.Multiply as I was saying totally great mode incapable of clipping as you can seeover here, no warning.And all it does is multiply the two pixels together.

We saw how that worked in a previous exercise, the product of that equationevenly darkens the composite image.Now I'm also including just one mode as it relates to interacting with theOpacity value, because I want to give you a sense of how that works.So let's say, we're multiplying the active layer and we're setting it to say 70% Opacity.In that case, we would start things off by taking the product of the two images,so we would multiply them together, and then Photoshop would treat that as acomposite version of the various layers and it would multiply alpha times thatcomposite and then mix it in with 1-a of the background.

Notice there is nothing special going on here.That (1-a)B is the same as it was when we're working with the Normal Mode, let's say.So as a result, we would have, in our case, 70% of the multiplied image blendedin with 30% of the background image and so we get a translucent product andthat's the way it works across the board.So any time that you're mixing in Opacity along with a blend mode, you weremultiplying the Opacity value times the blended image and mixing it with theopposite of the Opacity value assigned to the background.

That gives you at least an introductory sense of how the math works whereblending is concerned with Photoshop.In the next exercise, I'll show you more.

Resume Transcript Auto-Scroll

Author

Released

11/28/2011

Advanced Blending is the second installment in Deke McClelland's series on making photorealistic compositions in Photoshop. The course explores blending options and shows how to use them to create sophisticated effects and seamless compositions, often without masking. Beginning with the basics of blending layered images, the course sheds light on the formulas behind the Photoshop blend modes and shows how to comp scanned line art, create double-exposure effects, correct skin tones, and work with the luminance sliders.