Highlighted

Question about Subtract Masks with 0% opacity

Engaged ,
Nov 01, 2017

Copy link to clipboard

Copied

Maybe it's a silly question but to me the way AE works with "Subtract" masks doesn't seem correct:

If I have a Mask set to "Subtract" and set the mask opacity to 0%, it removes the whole layer (and shows the layer(s) underneath. Shouldn't a "Subtract" mask with 0% opacity subtract nothing from the layer (like if the Mask was set to "None" it would do nothing). ie. what if at some point in the video you no longer want to use that mask (one option could be to split the layer and delete the mask at that point) but surely you should be able to set the subtract mask's opacity to 0 and have it subtract nothing (as if that mask didn't exist on that layer. Just like if the mask was set to "None").

Or maybe it is right the way it currently works, but either way what's the easiest way of being able to keyframe a subtract mask so that sometimes it has no effect on the layer (ie. so that sometimes it acts like the mask is set to "None" whereas other times it acts normally (fully subtracts that mask shape from the layer), and maybe sometimes in-between (like 50% subtracts)?

Adobe Community Professional
Correct answer by Rick Gerard | Adobe Community Professional

Mask opacity controls the alpha channel created by the mask. When you make a mask in the ADD mode the alpha inside the closed mask is white and the alpha outside the mask id Black. When you set the mode to subtract the alpha outside is white and the alpha inside is black. Black is transparent.

Changing the opacity of a mask changes the white to black. The mask mode does not matter. When adjusting mask opacity, just like regular opacity 0% is always black (transparent), 100% is always white (opaque). That is the way it has always worked. There is no bug. 

If you set the mask mode to subtract and mask opacity is set to 100% then all alpha pixels outside the mask path would be white leaving a hole in the layer (black pixels). When you set mask opacity to 0% the alpha outside the mask becomes white but inside the mask is already white so the entire alpha becomes white. This is normal behavior.

If you want to make a hole in a layer and then close the hole the proper procedure is to create a mask that covers the whole layer and a mask that makes the hole. Set both masks to Difference and then animate the opacity of the mask that makes the hole. You can have the mask that covers the whole layer set to add if it is on top of the mask that creates the hole.

So, sorry, this is no bug, it's user error caused by not understanding how masks work. It is how they have worked since AE had modes for masks.

Views

1.7K

Likes

Translate

Translate

Report

Report
This conversation has been locked.

Question about Subtract Masks with 0% opacity

Engaged ,
Nov 01, 2017

Copy link to clipboard

Copied

Maybe it's a silly question but to me the way AE works with "Subtract" masks doesn't seem correct:

If I have a Mask set to "Subtract" and set the mask opacity to 0%, it removes the whole layer (and shows the layer(s) underneath. Shouldn't a "Subtract" mask with 0% opacity subtract nothing from the layer (like if the Mask was set to "None" it would do nothing). ie. what if at some point in the video you no longer want to use that mask (one option could be to split the layer and delete the mask at that point) but surely you should be able to set the subtract mask's opacity to 0 and have it subtract nothing (as if that mask didn't exist on that layer. Just like if the mask was set to "None").

Or maybe it is right the way it currently works, but either way what's the easiest way of being able to keyframe a subtract mask so that sometimes it has no effect on the layer (ie. so that sometimes it acts like the mask is set to "None" whereas other times it acts normally (fully subtracts that mask shape from the layer), and maybe sometimes in-between (like 50% subtracts)?

Adobe Community Professional
Correct answer by Rick Gerard | Adobe Community Professional

Mask opacity controls the alpha channel created by the mask. When you make a mask in the ADD mode the alpha inside the closed mask is white and the alpha outside the mask id Black. When you set the mode to subtract the alpha outside is white and the alpha inside is black. Black is transparent.

Changing the opacity of a mask changes the white to black. The mask mode does not matter. When adjusting mask opacity, just like regular opacity 0% is always black (transparent), 100% is always white (opaque). That is the way it has always worked. There is no bug. 

If you set the mask mode to subtract and mask opacity is set to 100% then all alpha pixels outside the mask path would be white leaving a hole in the layer (black pixels). When you set mask opacity to 0% the alpha outside the mask becomes white but inside the mask is already white so the entire alpha becomes white. This is normal behavior.

If you want to make a hole in a layer and then close the hole the proper procedure is to create a mask that covers the whole layer and a mask that makes the hole. Set both masks to Difference and then animate the opacity of the mask that makes the hole. You can have the mask that covers the whole layer set to add if it is on top of the mask that creates the hole.

So, sorry, this is no bug, it's user error caused by not understanding how masks work. It is how they have worked since AE had modes for masks.

Views

1.7K

Likes

Translate

Translate

Report

Report
Nov 01, 2017 0
Most Valuable Participant ,
Nov 01, 2017

Copy link to clipboard

Copied

Definitely not how it should work, so let's call it a bug. To rule out any other issues, though, You would have to check if this is not an issue with hardware accelerated display functions, so turn them off. also check any effects and things like layer styles. Some of that stuff goes bonkers if a layer's transparency is set to zero, which then is not a bug, but a limitation in the inner workings of these things.

Mylenium

Likes

Translate

Translate

Report

Report
Nov 01, 2017 1
Engaged ,
Nov 01, 2017

Copy link to clipboard

Copied

Thanks. I've just tried turning off "hardware accelerate composition, layer and footage panels" and it looks the same (unless I need to close the program then re-open it).

Previous to that, in the "project settings" in "video rendering and effects tried changing between "Mercury GPU acceleration" and "Mercury software only" but that looked the same (though that I assume is for renders while I haven't tried rendering, what I seeing is in the composition. But I assume it will render in a similar way).

There's no strange layer styles applied (modes set to "Normal"). I've just got 3 layers (1 is a copy of the first and the "eye" is set to off so it isn't displayed), with the bottom layer being the background footage. And just a simple mask shape was applied with the pen tool. When change opacity from 100% to 0% (as at that point I didn't want the mask to subtract anything from the layer) it removed the whole layer - so showing just the background footage. This is as seen in the composition window, though I assume rendering it will look about the same.

Layer 1: 4096x2160@23.976 fps. Photo-Jpeg compressed.

Layer 2: same as above (visible: off)

Layer 3: 384x2160@29.97 (background footage). H264.

(frame rates are different. Comp is set to 23.976 fps and same res as layer 1 currently).

Likes

Translate

Translate

Report

Report
Nov 01, 2017 0
Adobe Community Professional ,
Nov 01, 2017

Copy link to clipboard

Copied

Mask opacity controls the alpha channel created by the mask. When you make a mask in the ADD mode the alpha inside the closed mask is white and the alpha outside the mask id Black. When you set the mode to subtract the alpha outside is white and the alpha inside is black. Black is transparent.

Changing the opacity of a mask changes the white to black. The mask mode does not matter. When adjusting mask opacity, just like regular opacity 0% is always black (transparent), 100% is always white (opaque). That is the way it has always worked. There is no bug. 

If you set the mask mode to subtract and mask opacity is set to 100% then all alpha pixels outside the mask path would be white leaving a hole in the layer (black pixels). When you set mask opacity to 0% the alpha outside the mask becomes white but inside the mask is already white so the entire alpha becomes white. This is normal behavior.

If you want to make a hole in a layer and then close the hole the proper procedure is to create a mask that covers the whole layer and a mask that makes the hole. Set both masks to Difference and then animate the opacity of the mask that makes the hole. You can have the mask that covers the whole layer set to add if it is on top of the mask that creates the hole.

So, sorry, this is no bug, it's user error caused by not understanding how masks work. It is how they have worked since AE had modes for masks.

Likes

Translate

Translate

Report

Report
Nov 01, 2017 2
Most Valuable Participant ,
Nov 01, 2017

Copy link to clipboard

Copied

I'm not sure I agree with Rick, but perhaps I'm misunderastanding something in the original post.

Mylenium

Likes

Translate

Translate

Report

Report
Nov 01, 2017 1
Engaged ,
Nov 01, 2017

Copy link to clipboard

Copied

Thanks. Though to me AE could make add/subtract masks (especially subtract masks) work a lot simpler by just having a value for how much of an affect that mask will have on the layer (like mask strength or something - ie. how much to want it to add (if Add mask) or how much you want it to subtract (if Subtract mask)). Then you wouldn't need multiple masks with them set to difference etc. to just turn down or turn off the amount it subtracted from a layer. Such a variable/property could work equally well with Add masks as well as Subtract masks. For Add masks it would work the same way as the opacity property currently does for Add masks.

Likes

Translate

Translate

Report

Report
Nov 01, 2017 1
Explorer ,
Sep 07, 2018

Copy link to clipboard

Copied

Fine work, Rick Gerard. You provided not only a thorough explanation but also a simple solution to the posters problem. I came here and because I too had the same issue, and you solved it issue quickly.

This was no bug... it was a simple lack of knowledge about how AE works.

Best Regards

Likes

Translate

Translate

Report

Report
Sep 07, 2018 0
Advisor ,
Sep 08, 2018

Copy link to clipboard

Copied

Just to add another little tip to Rick's excellent description: if you want to see the 'mask logic' in action you can always select 'alpha' from the red / green / blue circle menu at the bottom of the comp window to view the alpha channel directly - and see the effect of mask opacity as you modify it. That can sometimes help - avoiding the distraction of looking at the content itself.

Likes

Translate

Translate

Report

Report
Sep 08, 2018 0
New Here ,
May 12, 2020

Copy link to clipboard

Copied

This is not the way masks should work. just because this is the way they have always worked does not make it the right way for them to behave. Nor is it user error, it is a lack of understanding of the way subtraction masks were designed, yes, but it is an error based on the counterintuitive and abstract way aftereffects handles this process. It should be considered a bug, because this is behavior which is caused entirely by how "the mask mode does not matter" with mask opacity, and it objectively should matter. your solution is a workaround for the fact that the way masking treats alphas when in subtract mode is wrong. 

Likes

Translate

Translate

Report

Report
May 12, 2020 0