Jump to content

Alpha Mask help please


Recommended Posts

So I did find multiple threads about the topic of Alpha Masks in the forums, but they are all really old. When I posted in one, it was immediately locked.

 

So I understand the concept of alpha masks after reading the old threads.

You take some image, and the image is in-one-way-or-another converted to grayscale, and the degree of gray translates into the alpha level to apply over a new image as an alpha mask.

The benefit of using an alpha mask is that it maintains anti-aliasing, as opposed to using the magic wand tool which creates hard clunky edges.

 

But I don't understand it enough to make it work for me.

What I'm TRYING to do is to cut out text from an object in a layer. However, using the magic wand to do this gives very hard and ugly edges. It seems that an alpha mask would do exactly what I want... to remove the text from the object, but maintaining anti-aliasing. But I guess I'm not doing it right.

 

What I did was to take the text in my image in its own layer, and created a new layer that was just a white background. With just those two layers shown, I flattened the image and copied that flattened layer--which was just the black text on a white background.

I then pulled open the Effects>Object>Paste Alpha plugin from BoltBait's package, and tried to apply this copied image as a mask to the layer with the object in it. But this made everything that was white in the mask appear black in my target layer, which is NOT what I expected. I thought white would equate to transparent. I dunno. It didn't turn out right.

Any pointers?

Thanks again!

Link to comment
Share on other sites

Could it be that you left the text layer visible below the layer to which you applied Paste Alpha, so when the text area became transparent, the black text was visible through it? That's the only explanation that occurs to me.

 

If you have black text on a white background as the alpha mask, you need to check Paste Alpha's Invert calculation checkbox if you want to make the text opaque and the background transparent. Otherwise, the white areas in the alpha mask will be made opaque, and the black areas transparent. Invert calculation reverses that.

 

Also, if you have text on a transparent background, you can use that directly as the alpha mask (without blending to a white background) by selecting the "Alpha channel on clipboard" option in Paste Alpha's second drop-down list. In that mode the text color doesn't matter: the alpha values are simply copied from the clipboard to the canvas.  More often than not, that's how I use Paste Alpha.

Link to comment
Share on other sites

Well, see, i want there to be no background, it needs to be transparent and let the actual rest of the image show. And then I want the text to be transparent too i guess, effectively removing it from, or carving it out of, the image.

so both need to be transparent. I guess what this means is that the object that i want to carve the text out of also needs to be included in the mask, and be opaque. yeah, i think thatll be the solution!

Link to comment
Share on other sites

I don't really understand what you mean by saying you want both to be transparent. Perhaps it would be clear if you explained what you wish to accomplish.

 

I'll give an example of a common use for Paste Alpha that may help.

 

Suppose I want text over a background image, but instead of single-colored text I want it as a color gradient. Here's what I would do:

 

1) Add a new transparent layer over the background image.

2) Use the Text Tool to type the text into this layer in the position I want it in the final image.

3) Copy the text layer to the clipboard (for later use by Paste Alpha).

4) Add a new layer between the background layer and the text layer.

5) Use the Gradient Tool to create a color gradient in the new layer. (Since the text layer is on top, it can be used to best position the gradient)

6) Make the text layer invisible.

7) Run Paste Alpha on the gradient layer, with the alpha source set to "Alpha channel on clipboard". (Now the gradient text will be over the background).

8 ) Flatten the image if a single layer image is desired.

 

I suggest you try the steps I just listed in order to better understand how to use Paste Alpha.

 

 

 

 

Link to comment
Share on other sites

@Mervil

 

I have a couple of tutorials, links below my signature, that shows you how to use Alpha Mask. Even though the masking technique involve a person, the technique is still the same involving text.

 

The basic rule is very simple: Black erase and white keep. That rule has made it easier for me to remember the order of what to keep and delete when it comes to masking.

 

Edit: I had a chance to reread your first post and it looks like you missed a step. After flattening to make a mask, ALWAYS undo (Ctrl + z, or click the Undo button) to keep the layers intact. I suspect that is what was giving you fits.

Edited by TrevorOutlaw
Link to comment
Share on other sites

@Mervil,

On 1/25/2022 at 2:14 AM, Mervil said:

...

What I did was to take the text in my image in its own layer, and created a new layer that was just a white background. With just those two layers shown, I flattened the image and copied that flattened layer--which was just the black text on a white background.

...

I think you understood the concept of Alpha masks correctly: keep white, discard black, variable transparency for all shades in between.

However, this is not how @BoltBait's Paste Alpha plugin works. Paste alpha copies alpha values from one image to another, regardless of colour or shade. In this case, only transparency / opacity counts. So, when you merge your black text on a white background, the plugin reads the whole "mask" as fully opaque and has no effect on the target image.

 

The right way to use @BoltBait's plugin is to type text (or place an image), on a transparent layer and use that as it is. For example: 

 

1. Mask layer on a transparent layer. Object on a separate layer.

2. Copy the mask layer (to the clipboard) and make it invisible.

yVRQv3l.png

3. Use Paste Alpha with "Minimum of current Alpha & Alpha channel on clipboard" setting.

PRBwkGs.png

MdaXjTj.png

Result:

cRJiV8R.png

 

  • You're a Smart Cookie! 1

Xkds4Lh.png

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...