Combine by Blend Mode?

I have a tedious production task I'd love help automating.
I receive layouts with mutliple layers of product shots (with transparency) in Normal blend mode. Most of those layers also have separate shadow layers in Multiply blend mode. (Sometimes these layers have masks, othertimes not.) Depending on how the file was built, product layers might be in proximity of their shadow layers, or they may not, making organization and contraction challenging.
(In case it matters, sometimes all layers (products and shadows) are housed inside a single group, sometimes there are no groups at all.)
Ultimately, I'd like to merge all the Product layers into one Normal mode layer, and all the Shadow layers into one Multiply mode layer (with masks applied), with the two layers linked to each other.
Can layers be identified and merged according to blend modes?

This might work.
But this disregards possible masks on groups and just moves the Multiply artLayers into one group and all others into another.
// move all artlayers set to multiply and all other artlayers into two layersets and then merge those;
// 2011; use it at your own risk;
#target photoshop;
if (app.documents.length > 0) {
var myDocument = app.activeDocument;
var artLayers = collectLayers(myDocument);
var multiplyGroup = myDocument.layerSets.add();
multiplyGroup.name = "multiply";
multiplyGroup.blendMode = BlendMode.MULTIPLY;
var normalGroup = myDocument.layerSets.add();
normalGroup.name = "normal";
for (var m = 0; m < artLayers.length; m++) {
     var thisLayer = artLayers[m];
     if (thisLayer.blendMode == BlendMode.MULTIPLY) {
          thisLayer.move(multiplyGroup, ElementPlacement.PLACEATBEGINNING)
     else {
          thisLayer.move(normalGroup, ElementPlacement.PLACEATBEGINNING)
normalGroup.merge();
multiplyGroup.merge();
////// function collect all layers //////
function collectLayers (theParent) {
     if (!allLayers) {
          var allLayers = new Array}
     else {};
     for (var m = theParent.layers.length - 1; m >= 0;m--) {
          var theLayer = theParent.layers[m];
// apply the function to layersets;
          if (theLayer.typename == "ArtLayer") {
// exclude background layer;
               if (theLayer.isBackgroundLayer == false) {
                    allLayers.push(theLayer)
          else {
               allLayers = allLayers.concat(collectLayers(theLayer))
// this line includes the layer groups;
//               allLayers.push(theLayer);
     return allLayers

Similar Messages

  • Hue Blend Mode Confusion

    Hello,
      In reading about the Hue blend mode, I have come to understand (perhaps erroneously) that given two layers (T)op and (B)ottom, that if the Blend Mode of T is set to Hue, then the hue information in T will be blended with the saturation and luminosity in B, which essentially means that the hue information in B is replaced by the hue information in T. However, in running some experiments, I've noticed that when dealing with a very simple document comprised of two layers only, that setting the Blend Mode to Hue also changes the saturation and brightness.
    Here are the steps to duplicate the observed phenomena using two regular layers:
    Create a new blank document.
    Fill with the color that corresponds to the HSB values (0, 70, 50).
    Add a new layer above the existing layer (blend mode Normal).
    Fill the topmost layer with the color that corresponds to the HSB values (230, 70, 50).
    Using the Info panel, the HSB values for the document should read as (230, 70, 50).
    Change the Blend Mode of the topmost layer to Hue.
    Using the Info panel, the HSB values for the document should read as (230, 70, 50), but instead read as (230, 66, 53).
    And here are the steps to duplicate the observed phenomena using a regular layer and an adjustment layer:
    Create a new blank document.
    Fill with the color that corresponds to the HSB values (0, 70, 50).
    Add a Hue/Saturation adjustment layer (blend mode Normal).
    Adjust the Hue value in the Properties panel for the Hue/Saturation adjustment layer to be -130.
    Using the Info panel, the HSB values for the document should read as (230, 70, 50).
    Change the Blend Mode for the Hue/Saturation layer to be Hue.
    Using the Info panel, the HSB values for the document should read as (230, 70, 50), but instead read as (230, 66, 53).
    The results in both (for me) are identical. Am I misunderstanding the Hue blend mode?
    Thanks,
    Matt
    Photoshop Info:     13.0.1 x64 Extended
    OS:                        Windows 7 64-bit
    CPU:                      Dual Xeon E5440
    RAM:                     16 GB
    Video:                    Nvidia GeForce GTX-580

    Hi Chris,
      Thanks very much for your straightforward and helpful answer. So, it would appear that my simplistic understanding of the Hue blend mode as 'replacing' the hue of the underlying layer(s) is incorrect. Would a fair rendering of what the Hue blend mode actually does be as follows?
    "The Hue blend mode will perform a direct replacement of the hue in the underlying layer(s). The brightness and saturation of the underlying layer(s) will not be affected *unless* the resultant hue, saturation, and brightness 3-tuple would result in an illegal HSL combination, in which case the saturation and brightness of the resultant pixels will be altered to bring the HSL values into compliance."
    Also, is there a way for the Info panel to display HSL values?
    Thanks again,
    Matt

  • How do I mask a path with a blending mode so that if only effects the groups below?

    I am working on a logo but have run into what seems like a simple problem but nothing about masks that I have found seems to work. I have
    two groups and in one of them I have a path with an overlay blending mode. Above both groups I have the same path with the same blending mode. (I have used two as I wanted a stronger effect on the lower group)
    Here is the project against white:
    As you can see the logo itself looks fine and I thought it was ready to use.
    However upon exporting it I noticed that the layers with opacity that where invisable agaist the white where now visable. I ussumed this would eb a simple fix as I am used to this problem with After Effects. Illistrator is not my forte and I am not used to how the masks work.
    After two hours of messing around and searching on the internet for answers I have given up. This must be a common thing to pop up but I couldn't find the answer so here I am. Please can someone help me remove the unwanted white circles.
    Thanks,
    Ben.

    Thank you for replying Monika,
    I have copied the Paths but dont understand what you mean by expand the 3D effect. With the text I was able to click ungroup and edit the individual sides. I am unable to do this with the logo, I dont know exactly why. Also when I combine all my paths they just go into one group. You will have to excuse me, I still have a lot to learn.
    Thanks,
    Ben.

  • BUG: Channel-based blend modes in FW CS5 & CS6

    I've observed problems with some of the blend modes in Fireworks CS5 and CS6. Several are definitely broken—most likely a by-product of changes introduced in CS5, which attempted to match some of Photoshop's blend mode behaviors (for Hue, Saturation, Color and Luminosity).
    http://www.adobe.com/devnet/logged_in/bbowman_fwcs5.html
    The broken blend modes are the channel-based blend modes: Red, Green, and Blue. These have no counterpart in Photoshop, and yet no longer function properly.
    To illustrate the problem, I've created a simple test graphic: three white squares, three black squares, three bitmaps, and three colored squares (red, green, and blue).
    Now I'll add a black background to the canvas and apply a different channel-based blend mode—Red, Green, and Blue—to each object in its respective group. Here's the correct result, in Fireworks 8:
    As you can see, each object appears to be the same color as its applied blend mode. A white rectangle with a Red blend mode becomes red, with a Green blend mode becomes green, and with a Blue blend mode becomes blue.
    The way it works is this: The composite image adopts the selected channel of the object and combines it with the remaining channels of the canvas (or objects) below. For example, consider the white rectangle with a Red blend mode. The rectangle's Red channel (R:255) should be combined with the remaining channels of the canvas below (G:0,B:0) to create a composite with the appearance of red (R:255,G:0,B:0).
    Now here's the same graphic as it appears in both Fireworks CS5 and CS6:
    As you can see, there's no sense to this result. The Red blend mode produces Green, the Green blend mode produces Red, and the Blue blend mode produces invisibility. I simply cannot explain the outcome. These blend modes have been rendered useless and unintelligible in CS5 and CS6.
    The reason for my concern here is that, just over a year ago, I wrote a series of command scripts based on these blend modes as they existed Fireworks 8. Without these blend modes, my scripts cannot function.
    Assuming there are updates forthcoming for Fireworks CS6, I'm hoping there's a chance that this might still be fixed (if not for CS5, as well). Here's the bug report I've submitted regarding this issue:
    Product name: Fireworks
    Product Version: 11.1.0.205 (CS5.1)/12.0.0.236 (CS6)
    Product Language: English
    Your operating system: OS 10.6.8
    ******BUG******
    Concise problem statement: Channel-based blend modes (Red, Green, and Blue) are broken in Fireworks CS6 and CS5.
    Steps to reproduce bug:
    1. Set canvas to black.
    2. Draw 3 white rectangles of any size.
    3. Set blend mode of 1st rectangle to Red, 2nd rectangle to Green, 3rd rectangle to Blue.
    Results: 1st rectangle appears Green (instead of Red). 2nd rectangle appears Red (instead of Green). 3rd rectangle becomes invisible (instead of Blue).
    Expected results: Each rectangle should appear to be the same color as its applied blend mode, as the composite adopts the selected channel of the object and combines it with the remaining channels of the canvas (or objects) below.
    In the preceding example, the black canvas contains no channel information (R:0,G:0,B:0) while the white rectangles contain information in all 3 channels (R:255,G:255,B:255). When a Red blend mode is applied to a white rectangle, the object's Red channel (R:255) should be combined with the remaining channels of the canvas below (G:0,B:0) to create a composite with the appearance of red (R:255,G:0,B:0).
    Most likely, this bug was introduced in CS5, which included modifications to Hue, Saturation, Color and Luminosity blend modes (to match Photoshop). For comparison, proper RGB blend mode behavior was observed in Fireworks 8.
    For more information about this bug, please see the following post: http://forums.adobe.com/thread/1209542

    I haven't noticed changes in the way the blend modes work.
    It's possible you have a specific problem on your system, or you have an image with a color space that uses a different gamma than you're used to working in.  In the latter case, the math could be the same but if the representation of the colors is changed (which is what the color profile defines) you could get a radically different looking result.
    Maybe it would be useful to post some screen grabs, and ideally it would be great if you could post a copy of a PSD file that demonstrates the problem (i.e., looks different when opened in an older version of Photoshop than in Photoshop CS6).
    EDIT:  Looks like I was too late in answering; I was distracted after typing and before posting.
    -Noel

  • Blend Mode Options

    Hi. I've recently downloaded Photoshop CS6 trial version and i've tried to add a flare to a transparent background image and turn the blend option to colour dodge or screen but when i do so the black bg does no go. It stays there but i have seen in many other exampls video and i've even done it myself at school computers and at my home computer once but this time it just wont do it?
    Example:
    I open a signature for a forum i made with a transparent background.
    I import a flare. It has a black bg.
    Turn blend mode option to screen and the flare goes above the text but the black bg is still actually there.
    Help please?

    It's never worked as you think.  It has to do with how the various blending modes mix layers over pixels that have transparency, and that hasn't changed in recent history.
    But that's neither here nor there.  In order to save a PNG that has the ability to combine with page data below it, you're going to have to prepare your flare to use Normal blending, and use layer transparency to combine it.
    One way is to use the luminosity of the flare itself as a layer mask, which will have the effect of eliminating the black surroundings.  However, that will end up dark and leave some black in the pixels that do show, and that could conceivably combine in an unnatural looking way with light surroundings (i.e., darkening them).  You'll want to use such a PNG over the top of a dark background.  You can mitigate this some by doing things to the pixels of the flare layer while leaving the mask alone, such as pulling up the curves and increasing color saturation.
    -Noel

  • Blend mode settings

    hello photoshopers.
    id like to know if possible from what the blend modes are composited by,i tend to like mostly the overlay or soft ligh blend mode,is the a seeting for this?the reason i as for this is that if i tend to lower the opacity i wont get the exact result lik ethe overlay or soflight blend offers.and the major reason im trying to figyre out the settings is that when ever i have a layer with a blend mode,when i merge it with some other layer,i loose the blend,it goes back to normal,so im thinking
    that if i know where ot see the blend mode settings maybe i dont use the blend modes and use the light,contrast,colors etc etc etc to get a blend mode Emulation
    thank you.

    hello k-pxl
    thank you for the information.i did try what you suggested.but to tell you the truth it didnt work for the particular technique im after,cos
    there is a purpose why im trying to achieve this.Thats exaclty whats frustrating me,the fact that i use the blending modes on 2 layers
    to get the result im after devastates me when i merge them and go back on 0 again,i use this technique to achieve great shines and shades
    something lowering the opacity wont do on its own,so my A-Z question is how to find a way to merge 2 layers that have a blend mode and ps not
    to  combines them into a new layer and get rid of the blend.
    i hope i find an answer to my solution.

  • Merging/Flattening Layers with different blending modes and maintaining the visual appearance

    Hello,
    I see there are many others that are having the same problem as me. And alas, it doesn't seem like the problem has been solved or very understood for that matter.
    I want to be able to take a document, that has multiple layers, inside of multiple groups with various layers having various blending modes applied to them and from within that document, select simply two of those layers, one with a Divide blending mode and the other layer Normal, merge those two layers, but have the visual appearance of the merged layer maintain the visual appearance of what the layers looked like before I merged them.
    Everytime I attempt this, Ps takes my Divide layer, reverts it back to Normal and then merges the layers, thus changing the appearance of what it was before the merge. This is not the desired result.
    I understand that when you flatten an entire series of layers, it applies all the blending modes and maintains the visual appearance. Is there a way to do this with just two layers instead of all the layers? If so, that would be great information. If not, why not?
    Thank you
    Jake

    Short answer:  No. 
    A "layer" with a specific blending mode implies a sequence of math operations on a given pixel.  Think of the visible pixel R, G, and B values as the result of a potentially complex math formula that combines numbers from each layer in complex ways (those ways being defined by the blending mode you've chosen).  You can't always simplify particular factors of your choosing in a given math formula.
    The next step is to examine why you would want to do so.  Perhaps there's a more direct way to achieve your goal that would avert the need entirely.
    Another possibility, if the effect of several layers together is something you'd like to manipulate as a unit, is to Group the layers.
    -Noel

  • Blend modes and semi-transparent gradients?

    Hi all.
    I don't do a lot of print, so whenever I have the need I find
    myself a little disoriented in my design approach. I know AI has
    blend modes, does FH have any sort of blend mode ability?
    I also need - and this is my main hurdle - the ability to
    fade a gradient to transparent. So a gradient that goes from a
    solid color, to a transparent color. I never found a way to do this
    in AI, except to mask the object with an opacity mask. Is there any
    way in FreeHand?
    TIA

    > I don't do a lot of print, so whenever I have the need I
    find myself a little
    > disoriented in my design approach. I know AI has blend
    modes, does FH have any
    > sort of blend mode ability?
    No, FreeHand can make 'simulated' transparency effect from
    solid colors by creating third vector object to overalapping area.
    There is "true" transparency and effects like drop shadows
    which create a bitmap objet like Illustrator but they work ONLY as
    rgb. In high resolution output there may be significant blurring,
    color sifts and misalignement.
    > I also need - and this is my main hurdle - the ability
    to fade a gradient to
    > transparent. So a gradient that goes from a solid color,
    to a transparent
    > color. I never found a way to do this in AI, except to
    mask the object with an
    > opacity mask. Is there any way in FreeHand?
    It depends what you have beneath the gradient. I assume that
    you have several objects, images, etc. because making a gradient
    from color to background color is very simple. In FreeHand this
    kind of effects (for print) require a lot of masking (with paste
    inside) and even creating parts of the artwork in Photoshop.
    In general all the effects and masking work much better in
    Illustrator. For example layer vector mask saved me a working day
    or two when I made about 150 butterfly distribution maps. However
    FreeHand's Paste Inside is superior compared to Iluustrator's
    object masking. Especially because selecting objects in Illustrator
    is exteremely difficult and masked object is selectable outside
    mask area.
    I'll repeat myself but I'd like to have some Illustrator
    features like raster effects, color management and layer masks
    moved into FreeHand. Combined FreeHand and Illustrator would make
    truly great product If I get to choose the features that is. ;)
    Jukka

  • Video track luminosity blend mode weirdness

    Applied sharpening to a video track and set the blend mode to luminosity (so that I could put a blurry multiplied layer in between)
    Now wherever the luminosity layer finds an overexposed highlight it renders as black.  If I turn down the opacity of luminoisty layer it stays black, if I switch it off it dissappears. !

    Hi Chris,
      Thanks very much for your straightforward and helpful answer. So, it would appear that my simplistic understanding of the Hue blend mode as 'replacing' the hue of the underlying layer(s) is incorrect. Would a fair rendering of what the Hue blend mode actually does be as follows?
    "The Hue blend mode will perform a direct replacement of the hue in the underlying layer(s). The brightness and saturation of the underlying layer(s) will not be affected *unless* the resultant hue, saturation, and brightness 3-tuple would result in an illegal HSL combination, in which case the saturation and brightness of the resultant pixels will be altered to bring the HSL values into compliance."
    Also, is there a way for the Info panel to display HSL values?
    Thanks again,
    Matt

  • Smart Object and blend mode issue

    I have an object that I moved from another image and needed to resize. The object is an image of a bottle and glass, with both the bottle and glass having reflections from their base. They both also have some layer masks with the reflections. I grouped the glass and bottle and created a smat object before the move to the new file). Anyway everything worked fine, except the reflections are much stonger in the new file (they are sitting over the same colored backgrond as in the original. If I open up the smart object and put a background behind the images  and the reflections (background is transparent)everthing looks as they should. The reflections have a blend mode of multiply).
    So why does the smart object not render the reflections properly (without lowering the opacity more within the smart object group) they appear almost at 100% in the new file. Any suggestions?
    Can't post the files as this happened at work.
    Thanks
    Jeff

    Anything to do with soft proofing?  Does the new document have the same colour space as the original?

  • How to change blending mode on multiple layers at the same time

    I'm using CS5. I have a document with about 70 layers. I would like to change the blending mode to "lighten" for each layer. Is there an easy way to do this?

    Photoshop doesn't allow multiple layer editing. That's why the styles are grayed out. Only 1 layer at a time.
    What version are you talking about?
    CS5 definitely let’s one apply a Style to multiple Layers.
    rfcommagere, I don’t know how to make it much clearer:
    • set the Blending Mode on one Layer
    • with that Layer selected create a Style with »Include Layer Blending Options« checked
    • select all other Layers that should have that Blending Mode
    • click the Style in the Styles Panel

  • Is there a way to get the result of using multiple blending modes in one object?

    Hello,
    I wonder if there's a way to merge multiple objects with blending modes to one object. Here is the example:
    On the left rhere are three objects with the same appearence but different blending modes(color dodge, normal, overlay), on the right they are overlapped, which are still three object. I'm looking for the way to have the same result as the right overlapped one, but as one object. Having the same multiple objects only for the result of color blending mode uses too much memory for my computer.
    Thank you for your help in advance.

    create one object: then in your appearance panel, duplicate the fill twice. Select the top fill and expand the sub menu, click on opacity, choose blending mode. repeat.
    G

  • CS4 bringing photoshop layered files into illustrator - blending modes

    Hello.
    I have a layered photoshop file that is being brought into illustrator. One layer is a drop shadow and is set to multiply within photoshop. The drop shadow is NOT an effect. It's just a plain layer of a drop shadow. When I bring it into illustrator it doesn't act as if it is set to multiply when placed over my illustrator object. I know it's easy enough to make the shadow within illustrator and set the blending mode there but I would like to know why this is not working.
    Thanks in advance for the help.
    -PB

    Illustrator's blending math is not the same as Photoshop's -- there will be differences if you import/export layered data between the apps.

  • Has anyone ever encountered layer blend modes behaving strangely?

    I use photoshop quite a bit for retouching and photo compositing. Tonight I encountered a strange problem. I was trying to create a vintage look on a photo and had a number of adjustment layers including a curves, levels, color fill and there were also a few texture/noise layers all set to varying opacities. Near the top of all this I had a vignette layer that was black around the edges and white in the center set to blend mode of multiply. Well, when I was clicking on and off I realize that that vignette layer was definitely lightening the center part of the overall image quite a bit (the part that is white on the vignette layer), almost like a screen. So I flipped the vignette layer through different opacity modes and saw that there was no change in its behavior, every mode was screening the white, even darker color and multiply. I thought maybe it was interacting in a weird way with one of the other layers so I turned all the others off except the back ground-- still no change. Then I dropped the layer down one at time until it was below the background. When I started to move it up again, it was behaving normally for a moment until I moved it up a couple levels in the stacking order and then it went back to the screen behavior. Anyway I shuffled it around a bit but there was no consitency to when it would display the correct opacity and when it wouldn't, so it did not seem to be an interaction with any specific layer. I don't know, but I can't really think of any case where white set to multiply should produce a lighter result even if it were interacting with another opacity. In any case it does seem to me that there is something going on with the overall computation of opacities. I tried creating a new black and white layer and it was also doing the same thing, behaving strange and not displaying the correct opacity.
    I'm tired, so I'm going to bed. I'm going to shut off the computer and hope this goes away when I reboot, but if it does not, does this sound familiar to anyone? I'm not a regular visitor to this forum, but I thought I'd put it out there in case anyone else has experienced anything like this. I've only got 5 gigs of ram on this computer and I've been working away for a while... maybe photoshop just couldn't keep up(?) I'm using Photoshop CS5, RGB Adobe 1998 colorspace.  I've never had anything like this happen in the last 11 years I've been using photoshop. Hmmm.... hope I don't have to reinstall or call support or worse. fingers crossed.

    Nevermind. It is still having the problem. I have to think that this file is just corrupt somehow because I just opened another file and can't seem to cause the same problem. Basically, I can fill a layer with white, put it to a blend mode of multiply or darker color and it will block out everything of the image below, ie totally opaque. The opaqueness varies depending on the if there are other layers also on blend modes, but it does not seem to correspond to normal blend mode interaction. If I put it right on top of a regular layer with an image on it, it totally blocks it out on a blend mode of multiply... weird. I am going to scrap this file and see if the problem recurs in other files. My 2006 Mac Pro is getting some years on it and has been running pretty slow. I'm not a hardware expert but I've done everything I know how to do to maintain it. Was thinking of upping the ram to see if I can hold out a bit longer before I upgrade the computer. Wouldn't surprise me if this problem is related to the computer.

  • Blending Modes

    Hi All,
    I am creating a flyer in InDesign, I've got a logo to put at the bottom of the flyer, the logo is white with a black background, I've used the Screen blend mode to remove the black but I can now see a faint white space behind the logo... see attached image. I have Proof Colours, Overprint Preview & High Quality Display to show the neareat possible match to print.
    I've tried Googling and reading up about the Blend modes, it says something about changing the option in Edit > Transparency Blend Space
    I changed it to RGB and now the white space has gone but the article I found did not explain too much about what this means changing it and how it works when printing the finished artwork.
    Can anyone give me advice on this?
    Always appreciated
    Regards
    James

    I've tried Googling and reading up about the Blend modes, it says something about changing the option in Edit > Transparency Blend Space
    When you use Screen for the blend mode your black background has to be absolute black for to be completely transparent. If you want to keep your Transparency Blend Space as CMYK and your logo is a CMYK object, the black background has to be absolute CMYK black (100|100|100|100 and not 0|0|0|100):

Maybe you are looking for