Page 1 of 6 12345 ... LastLast
Results 1 to 10 of 53

Thread: [Award Winner] Explanation of Layer Masks in GIMP(and PS)

  1. #1
    Community Leader jfrazierjr's Avatar
    Join Date
    Oct 2007
    Location
    Apex, NC USA
    Posts
    3,057

    Info [Award Winner] Explanation of Layer Masks in GIMP(and PS)

    There have been a few people who have stated that they don't really know or understand layer masks and thus never use them. I have to say, layer masks are an incredible technique to add to your mapping arsenal.

    I hope with this short tutorial to provide at least one person with a new respect for layer masks. If you get something useful from this tutorial, please remember to rate the thread. Likewise, if anyone has any additional tips or tricks I did not include, please feel free to include them in this thread for others to learn from.

    Now, on with the tutorial.

    The first question is "what is a layer mask": Layer masks are adjustments which are attached to a layer that affect the visibility or the layer.

    Second question is: "why would I use a layer mask": To maintain flexibility!

    Third question is "how do layer masks work": A layer mask is a gray scale image in which white indicates 0% opacity and black indicates 100% opacity. Any shade of gray in between black and white is the amount of the image that will show though.

    So, let's start with a few exercises. First, we will begin with the typical background image and use a layer mask to show a section of a different color.
    Click image for larger version. 

Name:	10-11-2008 9-31-01 PM.png 
Views:	1362 
Size:	156.6 KB 
ID:	7028 (yea, not to terribly exciting).

    The typical way someone who does not use masks would do this would be to make a selection with the circle section tool and fill with the secondary color. Now, this works, but, if you need to edit either color, you have a lot of extra work to do and unneeded extra work is bad.

    So, what about using layers:

    Click image for larger version. 

Name:	10-11-2008 9-36-44 PM.png 
Views:	1119 
Size:	154.6 KB 
ID:	7029

    This is better as you have made a second layer transparent and then used the circle selection tool and filled the selection with the second color. This gets the job done and maintains more flexibility than the previous technique, so is much better. But, since this is a tutorial about layer masks, we will be going further AND providing ourselves with more flexibility if we need to change the second color in the future.

    So, with the base layer, add a new layer. Now create your selection. In order to create our layer mask, we will first save your selection to a channel.
    Click image for larger version. 

Name:	10-11-2008 9-44-48 PM.png 
Views:	1320 
Size:	64.9 KB 
ID:	7030

    A channel is a special type of layer which is in grayscale that can be used to create a layer mask. Creating channels is a way to apply the exact same layer mask to multiple layers quickly. Once you have created the channel remove the selection, fill the new layer entirely with your secondary color. Now, in order to get our image to look like the original reference, we will add the layer mask by right clicking the top layer and selecting add layer mask from the menu.
    Click image for larger version. 

Name:	10-11-2008 9-58-10 PM.png 
Views:	987 
Size:	48.3 KB 
ID:	7031


    From the popup window, select the Channel radio button and select the channel you just created.
    Click image for larger version. 

Name:	10-11-2008 9-59-51 PM.png 
Views:	954 
Size:	174.0 KB 
ID:	7032

    So why are we going to all this work? Because now, we can change either color simply by selecting the layer and using the paint bucket tool. Likewise, you could fill with a texture also. With the first technique(direct painting) you have TONS of work to do a simple color change. With the second technique(two layers) you would have to select the painted image on the second (top) layer and then fill with the new color. Not hard by any means, but not as flexible as if using masks, which you will see shortly.

    I have reached the posting limit of 5 images, so I will briefly explain why using masks is better, before I explain how in the next post. Imagine using the above two layers but with some type of irregular selection, AND in addition to wanting to change the color, you want to expand or contract the size. Not hard if you want to maintain the exact same shape/diminsions, but what if you want to change the shape. Then you have some annoying tedious work to do. This is where layer masks will save the day, as we will see in the next post.
    Last edited by jfrazierjr; 10-12-2008 at 01:25 AM.
    My Finished Maps
    Works in Progress(or abandoned tests)
    My Tutorials:
    Explanation of Layer Masks in GIMP
    How to create ISO Mountains in GIMP/PS using the Smudge tool
    ----------------------------------------------------------
    Unless otherwise stated by me in the post, all work is licensed under a Creative Commons Attribution-Noncommercial 3.0 United States License.

  2. #2
    Community Leader jfrazierjr's Avatar
    Join Date
    Oct 2007
    Location
    Apex, NC USA
    Posts
    3,057

    Post

    The final image result now looks like the first attached image(which looks like the first image in the original post).
    Click image for larger version. 

Name:	10-11-2008 10-29-47 PM.png 
Views:	715 
Size:	196.8 KB 
ID:	7033

    Not that sexy eh? Rather boring right? True dat.

    Now, let's begin to play with our existing layer mask to see what we can do with it. The good thing about layer masks is that you can edit them by "painting" either white or black to edit how the underlying layer shows up. Remember white shows through and black does not with anything in between being partially shown. So... let's get some variable color to show through and get rid of the hard line transition between the two colors.

    Click image for larger version. 

Name:	10-11-2008 10-36-41 PM.png 
Views:	640 
Size:	237.2 KB 
ID:	7034


    In order to do this, Select the layer mask on the layer in question:

    Click image for larger version. 

Name:	10-11-2008 10-39-16 PM.png 
Views:	814 
Size:	37.4 KB 
ID:	7035

    Note than when selected the thumbnail, either the layer OR the layer mask will have a slight white outline. In this case, we have the layer mask selected, so any operation we do will affect the mask, NOT the layer. What we now want to do here is apply some Gaussian Blur to get the two colors to blend. I used around 300 px blur to get to the final image.

    Now, remember since we are not affecting the layer itself, this is a totally non destructive technique. Had we used the same technique as in the original post's second example, and blurred the color/alpha layer, then that layer would be permanently altered, and thus we would loose a lot of flexibility. However, since we just modified the layer mask and not the original layer, we have the blur but with no changes to the underlying layer.

    You could do all sorts of other things such as directly painting white onto the layer mask, which would allow the layer to show though.

    ONE THING THAT IS VERY IMPORTANT: When you want to modify actual layer the make SURE you have clicked on the layer thumbnail icon, or your will be modifying the mask. Likewise when you want to modify the layer mask itself.


    You could also use a layer mask to create a gradient, again, without using any destructive techniques. In order to do this, I am going to delete the existing layer mask and add a new one. However, this time, I will select the "Black" radio button. Now, select the layer mask and change the foreground/background colors back to black/white. Click on the layer mask in the Layers dialog and select the Gradient tool. Now, apply the gradient to the layer mask. Note how the layer mask

    Click image for larger version. 

Name:	10-11-2008 11-01-40 PM.png 
Views:	855 
Size:	252.6 KB 
ID:	7036

    is not a gradient and how the base image follows that gradient to merge the two color layers? This is the effect we are after. Now, again, we can change either color layer directly and the gradient effect would remain exactly as it is now, just with different colors, and that is the power of layer masks.
    Last edited by jfrazierjr; 10-12-2008 at 01:27 AM.
    My Finished Maps
    Works in Progress(or abandoned tests)
    My Tutorials:
    Explanation of Layer Masks in GIMP
    How to create ISO Mountains in GIMP/PS using the Smudge tool
    ----------------------------------------------------------
    Unless otherwise stated by me in the post, all work is licensed under a Creative Commons Attribution-Noncommercial 3.0 United States License.

  3. #3
    Community Leader Facebook Connected delgondahntelius's Avatar
    Join Date
    Feb 2008
    Location
    Morton, TX
    Posts
    1,457

    Default

    getting five stars from me !!

  4. #4
    Community Leader jfrazierjr's Avatar
    Join Date
    Oct 2007
    Location
    Apex, NC USA
    Posts
    3,057

    Post

    Now, what if you want to get some more control over the actual layer mask? How can I see the actual layer mask? WE CAN DO THAT.
    Click image for larger version. 

Name:	10-11-2008 11-16-15 PM.png 
Views:	906 
Size:	52.9 KB 
ID:	7037

    On the layer, right click and select show layer mask. This shows the actual layer mask as seen in image two. Now, any changes you make here will show up in the layers, just like before.
    Click image for larger version. 

Name:	10-11-2008 11-17-29 PM.png 
Views:	817 
Size:	295.8 KB 
ID:	7038

    What if you want to see the image without the layer mask? You can temporarily disable a layer mask if you like.
    Click image for larger version. 

Name:	10-11-2008 11-21-40 PM.png 
Views:	652 
Size:	45.5 KB 
ID:	7039

    Likewise, if for whatever reason, you no longer need the layer mask, you can delete it also from the right click menu. There is also a menu option called "Apply Layer Mask".
    Click image for larger version. 

Name:	10-11-2008 11-27-36 PM.png 
Views:	326 
Size:	46.5 KB 
ID:	7040

    What this does is merges the layer mask directly into the layer.
    Click image for larger version. 

Name:	10-11-2008 11-30-12 PM.png 
Views:	478 
Size:	43.7 KB 
ID:	7041
    See how the layer mask is gone, BUT the effect is blended into the underlying image on that layer?

    I tend to NOT like this since it is a permanent change to the underlying layer and thus we loose our flexibility which is the reason for using the layer masks in the first place.
    Last edited by jfrazierjr; 10-12-2008 at 01:29 AM.
    My Finished Maps
    Works in Progress(or abandoned tests)
    My Tutorials:
    Explanation of Layer Masks in GIMP
    How to create ISO Mountains in GIMP/PS using the Smudge tool
    ----------------------------------------------------------
    Unless otherwise stated by me in the post, all work is licensed under a Creative Commons Attribution-Noncommercial 3.0 United States License.

  5. #5
    Community Leader jfrazierjr's Avatar
    Join Date
    Oct 2007
    Location
    Apex, NC USA
    Posts
    3,057

    Default

    There will be a bit more to come over the next day or so, but I hope this is more than enough to get anyone started with using layer masks. What I have presented the real "meat" of using layer masks and why they are so darn useful.

    If anyone wants to ask any questions or if there is anything you don't understand(or want to add) please feel free.
    My Finished Maps
    Works in Progress(or abandoned tests)
    My Tutorials:
    Explanation of Layer Masks in GIMP
    How to create ISO Mountains in GIMP/PS using the Smudge tool
    ----------------------------------------------------------
    Unless otherwise stated by me in the post, all work is licensed under a Creative Commons Attribution-Noncommercial 3.0 United States License.

  6. #6
    Guild Adept bryguy's Avatar
    Join Date
    Jul 2008
    Location
    In my own little world =D
    Posts
    289

    Post

    Whoah dude, this is awesome. Ive always wondered how to use layer masks, and so hopefully Ill be able to now (well, after I actually read it. Right now I just skimmed cause Im tired and off to bed)


    5 stars!
    "When I use a word," Humpty Dumpty said in a rather scornful tone," it means just what I choose it to mean -- neither more nor less."
    "The question is," said Alice, "whether you can make words mean so many things."

    "The question is," said Humpty Dumpty, "which is to be master -- that's all."


    -Lewis Carrol: Through the Looking Glass

  7. #7
    Community Leader jfrazierjr's Avatar
    Join Date
    Oct 2007
    Location
    Apex, NC USA
    Posts
    3,057

    Post

    Quote Originally Posted by bryguy View Post
    Whoah dude, this is awesome. Ive always wondered how to use layer masks, and so hopefully Ill be able to now (well, after I actually read it. Right now I just skimmed cause Im tired and off to bed)
    Thanks, that's exactly why I wrote it, for people who have so far been intimidated or just have not taken the time to learn how layer masks work. I hope this really helps you, and remember, ask questions if you need to. One thing I have found that this technique is really good for is blending various types of photo realistic texture fills. Check out my Some Creek thing for a very simple example. http://www.cartographersguild.com/sh...ighlight=creek
    My Finished Maps
    Works in Progress(or abandoned tests)
    My Tutorials:
    Explanation of Layer Masks in GIMP
    How to create ISO Mountains in GIMP/PS using the Smudge tool
    ----------------------------------------------------------
    Unless otherwise stated by me in the post, all work is licensed under a Creative Commons Attribution-Noncommercial 3.0 United States License.

  8. #8
    Guild Apprentice
    Join Date
    Sep 2008
    Posts
    38

    Post

    This is good, thank you.

  9. #9
    Community Leader jfrazierjr's Avatar
    Join Date
    Oct 2007
    Location
    Apex, NC USA
    Posts
    3,057

    Default

    Hmmm... I am kind of surprised with the lack of response on this. Is this because people already know this information, no one is looking at this(in which case, I can understand the lack of answering!), it's non understandable yet or you don't see any application in your mapping technique, or is everyone just using PS and don't think this applies to you? (it does, but in a slightly different way).
    My Finished Maps
    Works in Progress(or abandoned tests)
    My Tutorials:
    Explanation of Layer Masks in GIMP
    How to create ISO Mountains in GIMP/PS using the Smudge tool
    ----------------------------------------------------------
    Unless otherwise stated by me in the post, all work is licensed under a Creative Commons Attribution-Noncommercial 3.0 United States License.

  10. #10
    Professional Artist mmmmmpig's Avatar
    Join Date
    Dec 2007
    Location
    Columbus, Ohio
    Posts
    463

    Default

    well, I for one did not respond because all it would have been was a response that said "Huzzah and kudos." That is why I did not respond.

    The application of this is sooo amazingly powerful and versitile. One could easily use this with landform textures and blending them. Find a nice pattern fill for rolling hills and a pattern texture for mountains and a pattern fill for mountains and have at it.

    ummm.... Huzzah and Kudos, by the way
    Something witty and pithy

Page 1 of 6 12345 ... LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •