Will it blend?
April 11, 2013 10:26 AM   Subscribe

Photoshop Blend Modes Explained: When you use Photoshop, do you just fiddle with opacity, multiply, and overlay until your image is sort of close to the effect you're going for? Did you figure out two or three blend combinations and then never use any others? Robert Thomas explains the logic behind blend modes, so you can blend more purposefully.
posted by ocherdraco (17 comments total) 99 users marked this as a favorite
My favorite trick for perfectly aligning two similar-but-not-the-same images: Put the upper layer in Difference mode, shuffle it around until the screen goes black, then turn back to normal mode.
posted by ardgedee at 10:38 AM on April 11, 2013 [14 favorites]

Awesome reference -- thanks! I just started using blend modes embarrassingly recently, and found this 8 minute video on the basic logic behind just three modes -- multiply, screen and overlay -- to be epiphanical (if that's a word).
posted by maudlin at 10:39 AM on April 11, 2013 [2 favorites]

As I was reading that, the "Will it Blend?" theme became lodged in my brain. Great... My office productivity for the next 30 minutes is shot.
posted by mystyk at 10:45 AM on April 11, 2013 [1 favorite]

Paging dbiedny to this thread!
posted by higginba at 10:51 AM on April 11, 2013 [1 favorite]

I make iron-on tee shirt designs for my kids and nieces/nephews every christmas.
It took me a while but i discovered if i used Darken on the final image and put a approx shirt color as a background I could tell if the design would work on that color shirt or not.

Thats what *I* use Blend Modes for...
posted by ShawnString at 11:09 AM on April 11, 2013 [1 favorite]

I use threshold at different levels and multiply at different levels of opacity to get a pretty good grain/noise effect. I also use threshold to darken lines of my sketches rather than inking them, it preserves the spontaneity of the lines. Can we post stuff? Here's one example of mine.

I've been messing with color burn/dodge but haven't quite figured it out. I think this guide is going to be exactly what I need, so thanks for posting!
posted by hellojed at 11:29 AM on April 11, 2013

Blend modes can get pretty tricky. Channel operations are a whole other level of magic.
posted by Brandon Blatcher at 11:42 AM on April 11, 2013

Do you have any good sources on using channels, Brandon?
posted by maudlin at 11:44 AM on April 11, 2013

The Photoshop Chops book is old but still relevant.
I don't think the channel operations have been updated in while.

The power of chops works great for masking, especially hair.
posted by Brandon Blatcher at 11:52 AM on April 11, 2013

Thanks! (And oh, yeah -- dbiedny! Did not make the connection at first.)
posted by maudlin at 12:05 PM on April 11, 2013

Oddly enough, I've implemented most of these in code for my company's product. There are basically two sub-modes that get handled: 100% of the effect of one layer on the other or blended. This is because the blending operation is far more expensive than no blending, so it makes sense to special case those operations.

Because of the nature of my work, I did all of these in F#, which worked out tremendously well for performance.

For example, the code for doing Dodge looks like this:
    let inline Dodge bottom top maxT =
        if top <> maxT then
            let c = (bottom * maxT) / (maxT - top)
            min c maxT
        else maxT

Where bottom and top are channel values for a given pixel and T is the maximum value for that channel (255 for 8-bits per channel, 65535 for 16 bits per channel). What this means is that you scale up the bottom value by the channel max, then scale it back by how far the top value is away from that. The end result is the lesser of the scaled value and the maximum for the channel. In theory, all you'd have to do is loop over each pixel in top and bottom and apply Dodge to the pixel's channels and you're done with it, but the amount of overhead in reading and writing memory is crazy high.

Instead, we operate on rows (or subrows, really) of pixels and the for 8 bit implementation of Dodge with blending, you get this:
    let rec mergeDodgeBlend (blender:opacityLut) (bottomRow:byte[]) (topRow:byte[]) bottomX topX count =
        if count <= 0 then ()
            let top = (int topRow.[topX])
            let bottom = (int bottomRow.[bottomX])
            let c = Dodge bottom top 255
            bottomRow.[bottomX] <- blender.blend bottom c
            mergeDodgeBlend blender bottomRow topRow (bottomX + 1) (topX + 1) (count - 1)

And anyone who is code savvy is going to look at this and say, "WTF, dude, you're talking about performance back there and you're implementing row-wise blending recursively?" To which I say, tail recursively - the compiler optimizes this into a nice, tight while loop and it runs nearly as fast as the equivalent C++ without the usual C/C++ headaches.

All in all, the code strikes a nice balance between performant and elegant.
posted by plinth at 12:14 PM on April 11, 2013 [2 favorites]

Maudlin, this is a tutorial that helped me finally "get" channels. It shows you how to use channels and create complex masks for tough to mask objects. It's a pretty involved tutorial but well worth the learning.
posted by azpenguin at 12:57 PM on April 11, 2013 [7 favorites]

Dude, one of the main reasons I'm a graphic designer is so I can use math in only its most basic and tangible ways (simple decimals and fractions, maybe some Fibonacci Sequence typeface sizes if I'm feeling excitable) ...and now there's Photoshop equations for blending modes?

No, but this was awesome. Thanks for sharing.
posted by redsparkler at 1:39 PM on April 11, 2013 [1 favorite]

Yeah, channels blowed my mind once I figured them out.

Also, even if you don't have a postscript printer, you can still load the fanciest postscript printer drivers you can find and do all kinds of pre-flight magic, such as checking your spot colors, splitting files across the CMYK channels and printing individual mylar screens for each channel. . Oh yeah, set marks too! All kinds of fun...
posted by roboton666 at 2:49 PM on April 11, 2013 [1 favorite]

Thanks, ocherdraco. This very under-the-bonnet page is a great complement to another long blend modes tutorial I saved some time back that shows the same graphic laid over the same texture 25 times and cycles the blend mode through all of them to show the differing effects. Saving the photoblogstop page locally also.

(Small tangent, the page in the fpp is the most extreme example I've seen yet of the style of page with one narrow strip of content down the middle and acres and acres of whitespace on either side. The FF HackTheWeb plugin's dewidthify function doesn't touch it, either. Designers win again!)
posted by jfuller at 5:56 PM on April 11, 2013

Thanks for this. I spend a lot of time blending. I haven't read the whole article, but I always wondered why there wasn't a feature that allowed you to see your image affected by all blending options at once ( as thumbnail versions in window) so you could compare and choose.
posted by Liquidwolf at 6:52 PM on April 11, 2013

This is one of those posts where I'm going to learn a bunch of awesome stuff from the post link and as much, if not more, from the comments.
posted by immlass at 11:31 PM on April 11, 2013 [1 favorite]

« Older Dom's laptop is in Iran.   |   "You don't need that many guitars. Bout two's... Newer »

This thread has been archived and is closed to new comments