15 Replies Latest reply: Dec 17, 2011 10:10 AM by Astara_ RSS

    Why doesn't masking with gradient layer work when regular gradient does?

    Astara_ Community Member

      If I make a regular gradient over a layer, and make it's opacity 0, and have it on 'shallow knockout', it will knockout the layer below along the 'lines' of the gradient.

       

      However, when I make a gradient layer to do the same, and set opacity down to zero, it doesn't seem to work.  Why?

        • 1. Re: Why doesn't masking with gradient layer work when regular gradient does?
          R_Kelly Community Member

          I really don't know the technical answer to your question, but one way to achieve the same effect with a gradient fill layer is to put the gradient fill layer below the layer

          and clip the top layer to the gradient fill layer.

           

           

           

          Untitled-1.jpg

          • 2. Re: Why doesn't masking with gradient layer work when regular gradient does?
            Astara_ Community Member

            Problem with that, is that the clipping mask also cuts off my effects effects....

             

            I put the object and shadow against white and gave the object a slight outline so it would be visible against the bckgnd (the outline isn't

            in the drawing, but the shadow is supposed to be):

            arm0.jpg

            With the vector layer under the arm and using it as a clipping mask, I get:

            arm.jpg

            I get the effect of fading at the bottom, but the drop shadow is blocked out completely as well.

             

            The above is with the same vector mask around the arm and the clipping layer.

             

            if I remove the vectormask, then the fill'ed in part of the clipping mask (black) fills in the shadow area completely as

            black.. again. not the desired effect.

             

             

            So -- that would normally be helpful (or at  least a workaround), it doesn't quite fit the need at hand...

             

            Any other ideas ????

            • 3. Re: Why doesn't masking with gradient layer work when regular gradient does?
              Noel Carboni Community Member

              Astara_ wrote:

               

              If I make a regular gradient over a layer, and make it's opacity 0, and have it on 'shallow knockout', it will knockout the layer below along the 'lines' of the gradient.

               

              Have you considered just using a gradient in the Layer Mask for the layer you want to be partially transparent?

               

              -Noel

              • 4. Re: Why doesn't masking with gradient layer work when regular gradient does?
                R_Kelly Community Member

                I think i see what your talking about, but maybe if you can post a screenshot of your layers panel we could better understand.

                • 5. Re: Why doesn't masking with gradient layer work when regular gradient does?
                  Astara_ Community Member

                  Isn't a layer mask a bitmask?

                   

                  I'm trying to use a gradient which is maybe 1k in size, at MOST, (it's a formula), vs. a bitmap image takes up an

                  additional 20MB AFTER compression in the final file!....  

                   

                  I don't know how to make a layer mask a 'gradient layer' that isn't a bit mask...

                   

                  ???

                  As for the panel, I'm only talking 2 layers (3 if you count the attempt w/the layer for clipping to):

                   

                  arm-panel.png

                  • 6. Re: Why doesn't masking with gradient layer work when regular gradient does?
                    R_Kelly Community Member

                    You might try putting the gradient fill above the upper arm layer, drawing a path around the area to be transparent, set the blending options to Knockout-Shallow and using the feather control in the masks panel

                    and the size of the vector mask to control the transparency.

                     

                     

                    Untitled-2.png

                    • 7. Re: Why doesn't masking with gradient layer work when regular gradient does?
                      Astara_ Community Member

                      That was my first attempt in the original questino -- that works for a regular later, but as soon as I converted a regular later to a gradient and used the same bit mask -- that didn't work.

                       

                      That brought about this question. 

                       

                      Circles?  or are am I misundertanding you?

                      • 8. Re: Why doesn't masking with gradient layer work when regular gradient does?
                        Noel Carboni Community Member

                        Astara_ wrote:

                         

                        Isn't a layer mask a bitmask?

                         

                        Yes, I answered overly simplistically, didn't I?  Sorry about that.  I don't have any other specific suggestions, though I might experiment some later today to see if I can discover anything more.

                         

                        I guess, reading between the lines, what you're trying to accomplish is to reduce the unwieldy size of your PSD compositions by using vector masks in place of raster masks.  Would you be interested in discussing why you need/want to do this in more detail?  Perhaps that could lead to a solution at a different level that you haven't thought of.

                         

                        -Noel

                        • 9. Re: Why doesn't masking with gradient layer work when regular gradient does?
                          Astara_ Community Member

                          Well I'm up to around 400-500 layers and at 20MB each,  my file would be 8-10GB, which most file formats don't like.

                           

                          Instead because I've been going back and tryting to reconvert them to gradients/vectors/ where possible and using

                          bit images where things aren't simple forumula, my file is about 1.2GB  (largest size was about 2.GB)... I've had to go back and try to convert layers with single shades and or a single gradient into shade or graidient layer -- each time I do that I gain back at least 20MB, sometimes more.  Here's a file size history:

                          -----

                          Aug 18 10:50 843K image.jpg

                          Aug 21 21:59 89M image.tif

                          Aug 22 03:01 91M image.tif

                          Aug 22 18:07 90M image.tif

                          Aug 25 00:39 124M image.tif

                          Aug 25 04:49 124M image.tif

                          Aug 26 05:18 157M image.tif

                          Aug 27 04:59 158M image.tif

                          Aug 28 17:52 158M image.tif

                          Sep 01 11:56 158M image.tif

                          Sep 02 19:13 163M image.tif

                          Sep 04 02:14 163M image.tif

                          Sep 04 22:22 163M image.tif

                          Sep 04 23:13 163M image.tif

                          Sep 05 21:17 168M image.tif

                          Sep 06 04:18 226M image.tif

                          Sep 06 16:22 226M image.tif

                          Sep 07 02:34 224M image.tif

                          Sep 07 06:19 224M image.tif

                          Sep 08 03:37 244M image.tif

                          Sep 08 19:55 243M image.tif

                          Sep 09 05:08 261M image.tif

                          Sep 09 11:38 264M image.tif

                          Sep 09 19:01 272M image.tif

                          Sep 10 02:40 277M image.tif

                          Sep 10 04:40 274M image.tif

                          Sep 10 16:06 270M image.tif

                          Sep 10 21:57 272M image.tif

                          Sep 11 20:39 276M image.tif

                          Sep 13 00:31 874M image.tif

                          Sep 14 09:29 876M image.tif

                          Sep 14 18:04 878M image.tif

                          Sep 14 19:36 474M image.tif

                          Sep 15 04:12 485M image.tif

                          Sep 16 15:54 490M image.tif

                          Sep 17 11:28 542M image.tif

                          Sep 19 01:46 544M image.tif

                          Sep 19 22:40 547M image.tif

                          Sep 20 23:53 489M image.tif

                          Sep 21 07:49 494M image.tif

                          Sep 22 08:48 505M image.tif

                          Sep 23 08:23 536M image.tif

                          Sep 24 02:39 1.3G image.tif

                          Sep 24 08:30 1.2G image.tif

                          Sep 24 17:41 1.3G image.tif

                          Sep 25 02:50 1.3G image.tif

                          Sep 26 01:48 1.8G image.tif

                          Sep 26 04:54 1.8G image.tif

                          Sep 27 02:24 1.8G image.tif

                          Sep 27 03:30 1.8G image.tif

                          Sep 29 09:55 1.8G image.tif

                          Sep 29 10:39 1.8G image.tif

                          Sep 30 00:20 1.8G image.tif

                          Sep 30 22:58 1.7G image.tif

                          Oct 01 02:47 1.7G image.tif

                          Oct 01 08:30 1.7G image.tif

                          Oct 01 21:27 1.7G image.tif

                          Oct 01 23:24 1.7G image.tif

                          Oct 02 00:54 1.7G image.tif

                          Oct 02 09:51 1.8G image.tif

                          Oct 02 20:17 1.8G image.tif

                          Oct 03 09:26 1.8G image.tif

                          Oct 03 09:26 1.8G image.tif

                          Oct 04 00:40 1.8G image.tif

                          Oct 06 04:16 1.8G image.tif

                          Oct 07 02:17 1.8G image.tif

                          Oct 07 12:05 1.7G image.tif

                          Oct 08 03:10 1.7G image.tif

                          Oct 09 07:43 2.4G image.tif

                          Oct 10 05:39 2.4G image.tif

                          Oct 10 11:21 2.4G image.tif

                          Oct 11 00:25 2.2G image.tif

                          Oct 11 02:45 2.2G image.tif

                          Oct 12 01:03 2.2G image.tif

                          Oct 12 10:26 2.2G image.tif

                          Oct 12 19:03 2.2G image.tif

                          Oct 14 16:00 2.2G image.tif

                          Oct 14 16:01 2.2G image.tif

                          Oct 15 03:44 1.5G image.tif

                          Oct 15 11:05 1.5G image.tif

                          Oct 16 19:11 1.6G image.tif

                          Oct 17 20:20 1.5G image.tif

                          Oct 19 01:45 1.4G image.tif

                          Oct 20 20:24 1.4G image.tif

                          Oct 21 02:35 1.4G image.tif

                          Oct 24 09:19 1.4G image.tif

                          Oct 25 09:01 1.4G image.tif

                          Oct 28 07:54 1.4G image.tif

                          Oct 30 05:54 1.4G image.tif

                          Nov 04 00:02 1.4G image.tif

                          Nov 06 00:19 1.4G image.tif

                          Nov 08 22:59 1.4G image.tif

                          Nov 12 05:35 1.4G image.tif

                          Nov 13 15:33 1.4G image.tif

                          Nov 14 03:54 1.4G image.tif

                          Nov 14 16:25 1.4G image.tif

                          Nov 15 08:19 1.4G image.tif

                          Nov 16 01:20 1.5G image.tif

                          Nov 16 08:21 1.5G image.tif

                          Nov 16 08:21 1.5G image.tif

                          Nov 16 22:51 1.5G image.tif

                          Nov 16 22:51 1.5G image.tif

                          Nov 17 22:01 2.6G image.tif

                          Nov 17 22:01 2.6G image.tif

                          Nov 17 23:25 1.5G image.tif

                          Nov 17 23:25 1.5G image.tif

                          Nov 18 08:09 1.5G image.tif

                          Nov 18 08:09 1.5G image.tif

                          Nov 18 14:03 1.4G image.tif

                          Nov 18 14:03 1.4G image.tif

                          Nov 20 06:32 1.3G image.tif

                          Nov 20 06:32 1.3G image.tif

                          Nov 20 16:41 1.3G image.tif

                          Nov 20 16:41 1.3G image.tif

                          Nov 20 21:19 1.2G image.tif

                          Nov 21 19:45 1.2G image.tif

                          Nov 22 19:07 1.2G image.tif

                          Nov 23 00:08 1.2G image.tif

                          Nov 23 02:54 1.2G image.tif

                          Nov 24 09:16 1.2G image.tif

                          Nov 25 08:12 1.2G image.tif

                          Nov 30 06:24 1.2G image.tif

                          Dec 02 13:06 1.2G image.tif

                          Dec 04 16:51 1.1G image.tif

                          Dec 05 08:28 1.1G image.tif

                          Dec 05 08:44 1.1G image.tif

                          Dec 05 21:09 1.1G image.tif

                          Dec 08 03:35 1.1G image.tif

                          Dec 10 01:40 1.1G image.tif

                          Dec 12 22:56 1.2G image.tif

                          ----

                           

                          Neeedless to say, if I hadn't   gone back and started converting, the would be beyond workable size...

                          (Not to mentionall the memory it would take expanded in memory)...

                          • 10. Re: Why doesn't masking with gradient layer work when regular gradient does?
                            Noel Carboni Community Member

                            That makes it clearer - thanks.  First thing that comes to mind is that of course the PSB format can easily handle such large files, but multi-gigabyte documents get to be pretty unwieldy, so it's quite clear you want to try to make them smaller.

                             

                            Myself, I have only had a multilayer document reach something less than 100 layers, usually MUCH less (e.g., just a few layers for a touched-up photo, maybe just a few tens of layers for a complex made-up composition).

                             

                            No doubt Photoshop having to manage up to 500 layers takes its toll on performance as well...  I wonder if you could benefit from agglomerating some of the parts of the document as you go along...  Do you keep everything separated because you have to go back and adjust the atomic elements of every part of the document?

                             

                            -Noel

                            • 11. Re: Why doesn't masking with gradient layer work when regular gradient does?
                              R_Kelly Community Member

                              You'll have to excuse my very rough mockup of your example, but here's the results i get when doing what i described.

                               

                               

                              before:

                               

                               

                              Untitled-1.jpg

                               

                               

                               

                              after:

                               

                              Untitled-2.jpg

                               

                               

                               

                               

                              with white background

                               

                               

                               

                              Untitled-3.jpg

                               

                              Message was edited by: R_Kelly

                              • 12. Re: Why doesn't masking with gradient layer work when regular gradient does?
                                Astara_ Community Member

                                If I was a more advanced artist, then I might know better when I can merge things and not, but right now, I'm a wanna be artist coming from an engineering background, where when I can't grok a whole picture, I break it down in to parts and combine them.

                                 

                                Like when then hand didn't look right or I needed fingers to be relocated, I brok apart the hand and fingers so could relocate them

                                separately then reshade them after they were in place.

                                 

                                Another set of things i've kept separate (are about 50-80 'hair strands'  most of which have a unique color, then have a another

                                layer for texturing -- painting the texture onto the color made it impossible to change the look of the texture when it was wrong -- and I've changed it several times, because it didn't look right or came up with a better process/way of doing it.  Then there's usually an effect layer on top of that to apply shadowing to the strand, give it a bit of 3-dimensionality, and sometimes multiple or add or something with the layers below for emphasis.

                                 

                                On change I made -- which helped, I started with all 3 layers in a group.  and 'N' groups... (still have manny like that.. but a new section I started putting base strands in 1, group , then a copy of those layers, blanked and then painted with texture (that's usually brushed on )..., And it seem the only way to apply an effect to one set or the other (or both) is to convert them to smart objects, which still allows editing (but, unfortunately, also stores them in the same file)...

                                 

                                My eye's, have grown.. ll starting out in a few things, then they got more complex... as I didn't know how to really make an eye look good, so I started w/parts...and ended up with 15 layers/eye (not counting groups... things likke eyebase white, irsibase base, iris color, (base is back to pupil layer somewhere above can punch through to a black layer -- at one point (but backed off that approach, even tried to put some nerves and veins on the iris base...)..... then there's the circles of fibers that make up the iris pattern, various

                                tints for various fluids and transparent structures, .. YIEKS...

                                 

                                Not making any claims about this being a best or even good way, but when you are learning, and especially whern you come from

                                an engineering background where you are usd to building thigns up out of parts, .. you don't want to weld your parts together before you are at the final product...and even then, ..... what if you want to make a change?!...

                                 

                                Again, newbie-problem more than likely...with too much software engineering background...

                                 

                                Adobe should really have doing part-time work doing product usability/abusability/stability evals... I've pressed it over the limites more than once, and had to redo the way I do things to stay with in its relavtively easy (for me) to hit limits...

                                 

                                Like the one I posted about the layers slowing things down... trivial to rproduce...yet sounds like Adobe never heard of it.

                                 

                                Another parallel problem I ran into/noticed the other day -- when I MOVED, 90% of the layers (somehow they got out of alignment with 10% that were still in the origninal... could be related to a move/cancel bug I run into too often as well, which, fortunately, has a not too difficult workaround).  But I moved 90% of those layers, and it only used 2 cpu's out of 6 (and no GPU usage).... took about 45 -60 seconds .. it was a *simple* +/- xy, (no rotations).. so it was something that could have been done in parallel, easily and wouldn't have been compute bound...

                                 

                                The other bug I've run into WAAY too often, is when trying to move an object, if I don't caefully try to nudge it with rotate, or move a

                                side, 1st, but instead, just put my pen in the middle of the object, to try to drag it -- it almost ALL the time, selects some base layer and moves some large percentage of the layers -- in a visually corrupting way... since when you hit escape to break out of the 'free movement)., the parts don't go back to where they belong and stay offset and random places...

                                 

                                But it's a visual problem only...I think (not sure how my 90% got moved),  -- if you SAVE the file, then make a slight change, and then revert to the just saved copy, it cleans all up.  so it's just the display that's messed up.

                                 

                                Anyway, slowly over time, all the layers that I originally had a paint or gradient layers surrounded with a vector, I slowly (interspersed with other stuff) converting them to fill/gradient layers which take up comparatively no space.  Really speeds up manipulation of those

                                objects as well...

                                 

                                But it's slowgoing and the interface for creating a gradient to match an existing one is very awkward to use...It's too bad when you

                                create a gradient or paint layer to BEGIN with, that it's not automatically created as a vector  Then, when you start to paint on it,

                                it creates a layers sized to your painting applied on top of the existing fill layer...would save all the space take by the pixels that were formula driven...   Would be so much more powerful -- only storing as bits the things you need to store as bits, rather than defaulting

                                to 'bits' for everything (which really consumes resources!)...

                                 

                                Personally, Another feature but this might be specialty, or not..... but as I designed my things with parts, it would be nice to be

                                able to specify XY coordinate tie points between layers -- so if I moved a layer shaped like a stick, attached to another stick,

                                by 1 point at each end, changing the angle of the first would change the angle of the 2nd like a 'joint' -- not like a solid rod.... that

                                would be VERY cool!..but not holding my breath on that.

                                 

                                Just getting the current features to work would be nice...like the gradient masking layer... no reason that shouldn't work, but there ya go. 

                                 

                                Maybe you know this one (unrelated...)... But I've more than once run out of temporary space (even with usually 130-150GB on my temp store.  The thing is, is that adoe doesn't use any of the extra 56GB I have in my Pagefile -- I can't tell it to use more than 100%

                                of physical memory -- (i.e. so it would use part of the page file).  I have 48GB mem, and 56GB pagefile, that's on an SSD., I'd

                                rather have it page to the SSD before writing temp files to disk...

                                 

                                If it could force pages out, to the pagefile, before resorting to a spill file, would save on space and possible speed depending on

                                the config...  But , eh, C'est la vie.

                                 

                                Meanwhile, I's still ike to figure out how to solve the orignal problem, but I'm beginning to think it looks like a core bug...so it maybe hard to get around.

                                 

                                Thanks for your comments!  As usually, appreciated!...

                                • 13. Re: Why doesn't masking with gradient layer work when regular gradient does?
                                  Astara_ Community Member

                                  ... Well 2 things...

                                   

                                  In your example the 'shadow' isn't fading out like the content is .. that, by itself would seem to be problematic.

                                   

                                  2nd, Note in my panel I have vecors around the object, and .. you can't tell maybe  from the panel, but the mask above it is 'mostly' the size of the vectore underneath, EXCEPT where I wanted shadow, external to the arm to show.   I wanted a drop shadow on to the surface below, but without the mask above it, the effects of shadowing were seen all around the outline of the arm... not good.

                                   

                                  2nd thing, in your picture, if the gradient is constrained by the vector, then why is an area above the line of the vectore

                                  partly transparent?

                                   

                                  I.e. your gradient isn't being constrained properly... so something isn't right in your example either, though it doesn't look  exactly like what I got...

                                   

                                  For the blockout part, I used the same vectore (from the arm)  for the blocking part, and adjusted the gradient to only fade out the last part (being lazy, why draw another vector that might not match up with what I need  -- If I change the outline of the arm, I can just

                                  copy over the new vector (and possibly have to adjust the gradient if the arm moves too much)...

                                   

                                  Anyway, will see if I can reproduce your effect, though I'm not sure how helpful it will be...but mabe (just like

                                  your first suggest of the binding layer -- not exactly useful in this case, but another tool to be able to try to use in other cases!...

                                  So I considered it still 'helful', overall, even if not specifically to this problem (thus marked it as helpful)...

                                   

                                  I want the answer, but just because I want the answer doesn't mean I can't learn useful stuff along the way! ;-)

                                  • 14. Re: Why doesn't masking with gradient layer work when regular gradient does?
                                    Astara_ Community Member

                                    Here's what I got when I tried what I think you had above -- included panel at large so you could see things better...

                                     

                                    arm-panel1.png

                                    Aw, just realized I covered up the opacity/fill... opacity was @100, fill @50% on the white part... I put black at the end of

                                    the gradiend so you could see where the top layer ended, and how it overlapped the forearm layer underneath

                                    it..

                                     

                                    the skin colored areas you see are from the forearm ... the part that was 'white' in the gradient at

                                    100% fill is 100% white, (blocks the arm -- @ 0% fill still blocks the arm!  ) ..

                                     

                                    I set it to 50% fill so you can see it lightens up any background, it's over, but isn't skin shaded at all...

                                    i.e. the grae from the bottom is brighted, and the part where the lower layer starts on the bottom is mostly

                                    whitened.. until it turns transparent.  then the bottom shows through.

                                     

                                    The problem is the part at the top, which is opaqe (or it clears the layer under it, if is 0fill), ..

                                    Usually, if I am not horribly misremembring this, I set the top layer to 0 fill and use the opacity to guide the fade of the

                                    layer underneath it... but normally, I  think I would have the gradient reversed...

                                    i.e. the parts of the lower drawing I want to blockout would be solid above, and the parts I didn't want to block out would be

                                    allow the layer underneath to peak through...  But in the above neither is showing through...

                                     

                                    *fiddle*

                                    • 15. Re: Why doesn't masking with gradient layer work when regular gradient does?
                                      Astara_ Community Member

                                      R_Kelly -- FWIW, I was able to use your clipping layer technique in another area, where I wasn't using an effect, BUT, I had to disable the remove the vector mask from the gradient layer complete (disabling it didn't really disable it..!).

                                       

                                      Still didn't work as a mask on top, but did work to clip a layer below and fade it out. 

                                       

                                      But to get it to work with effects, I'd have to likely dup the layer with the effects, and use nested groups...and even then it might

                                      take a while to get it to work -- assume the product is not buggy down that path as well...

                                       

                                      Just thought you might like to know I was able to make use of a gradient layer but only as a clipping mask and only with no vector mask attached(disabling doesn't work). 

                                       

                                      Sigh...

                                       

                                       

                                      (Edit)... BTW... The layer I got rid of (1 layer + 1 vector mask) was replaced by

                                      3 layers, 2 vector masks and 2 groups -- (think it's a bad trade off..?).. the layers are all gradients, vs. 1 bitmask layer.

                                      The *compressed tiff*, shrunk by 47MB.

                                       

                                      (This was one that required a 2 extra gradients 1 for clipping, and 1 for the cross-gradient (i.e. a 2-D gradient -- something that should be trivial, but is inanely difficult in Photoshop, needing 3 layers and 2 vector masks and at least 1 group (I put the whole thing in a group for encapsulation, but that wasn't necessary for the the

                                      effect)...just my peace of mind...)...

                                       

                                      Most of the bitmap layers I'm replacing can be replaced by 1 gradient layer, which is decidedly easier...

                                       

                                      (Current file size is 946M and dropping.... and that's down from a max of 2.6G -- and that's all the junk space that's in there by default -- and people

                                      wonder why photoshop takes so many resources?   It's designed to!  You have to work against the defaults to shrink a file down ...

                                       

                                      Yeah, the original file size was < 1M, but it was jpg and < 1/65th the number of pixels...  the 1st Tiff of 89MB was probably the right size for the base image.

                                       

                                      but having it grow to a default size of 4.6GB, (which is where it would have been if you subtract out work I did to undo adobe's default storage format, and explicitly put in vectors/solid layers for bitmapped layers with the same on them), means that content to overhead ratio is 1:12.  That's a 1100% overhead!  *ouch*...

                                       

                                      --- (late update...)

                                       

                                      with about 20-30 more layers converted, that file size has shed about 200MB, or about 20% of it's file size....in the past day, alone...  This isn't the first time, I've gone through a spurt of reduction/optimizations...