How do Gmasks work in Action?

For me Action gmasks changed my workflow in a very positive way. But the weirdness with the invert/non-invert compared to Batch, and all of the strange “Over 1 Minus 2” modes or whatever is bizarre. And of course the gradient spline behavior is wacky.

3 Likes

Yeah, it’s bullshit, but that ship sailed in 2012, well before the Gmask Tracer showed up. It should never have been the way it is, but protests fell on deaf ears.

It became extra frustrating when the Gmask Tracer arrived a few years later and did what we all wanted.

Kind of funny really, given that Garbage Masks were immediately used as not-the-garbage masks as soon as the tool was made but there was no word for it beyond “matte”, so everyone just inverted the term’s meaning, at least until 2012 when Flame took a stand (sort of).

1 Like

I blame Francis. Since he left, current management has tried to undo the poorly designed and implemented features that guy made, this is another that should be on the list. The last time I talked to them about this, they didn’t want to fix it because it would break backward compatibility. I suggested they make Gmask2 as a new node that would act sanely.

1 Like

In the early days of Logik Pro Grant actually had a really good session that provided more context on the ‘1 Minus 2’, etc. This could benefit from a more widely available learning channel video.

There are actually two separate operations that are happening.

One is based over geometric boolean operations (subtracting or adding entire shapes), while the other one are the standard pixel based blend modes.

To a degree you can use either one and get the result you’re looking for (subtract blend mode vs. 1 minus 2). And that makes it confusing.

In general you should use the shape booleans whenever you are combining mask shapes. You should use the blend modes for actual compositing.

2 Likes

Funny. I didn’t ever notice these masks in Action before the Gmask Tracer. I thought it arrived the other way round.

I don’t find inverting the mask to be the problem. It’s just one button click. The problem is that when you move beyond one mask, inverting both doesn’t give you the behaviour from the Gmask Tracer. I like the idea of a preference tick box that makes the action behaviour identical to the Tracer.

The answer is simple as to why it works the way it does. The thing to remember is that each action surface already has a mask attached to it. If you don’t supply a layer mask a default alpha is applied to that layer that’s all white by default.

So when you use action gmasks you’re cutting holes in the action layer alpha—gmasks are subtractive. So left say you want a circle of your full frame image that you’ve piped into action. Well you draw your circle which defaults to filling white over an alpha that is already all white and you get a hole cut in the center. The circle is white, it masks the white alpha of the layer, a circular hole is cut in the image. Invert the mask and you’re masking the outside.

I’m not saying it’s smart. One thing that could really help would be adding the color attribute to action gmasks a control over the alpha value. Then at least you could do some smarter shit with all the transfer modes instead of mental gymnastics required just to do the simplest of options.

:+1: :+1: :+1: :+1: :+1:

This or a preference to change it

1 Like

I’m pretty sure the default output of a Gmask Tracer is white until you draw a mask.

Which means it’s black when you use the node. The second you draw a mask it turns everything else black other than the mask but yes, before you draw anything, the output is white.

I should add that is the case if you don’t already have a mask input.

That’s exactly what I want action to do

GMask Tracer is a child of Action. It has the same interface and logic, just different defaults. The ‘primary output’ is set to Matte. And some of the output settings are disabled.

Take an Action, change the primary output to ‘Matte’ and in Output options set the background to Black, and change it to GMask only and you get identical behavior.

Of course that may interfere with some of the other things you might want to do in action.

I hear you. Not saying it’s a good choice. Just saying that’s the logic behind it.

I use action gmasks all the time and I find them infuriating as well. Add to the equation selective gmask parenting and it gets bananas.

This is 100% correct, which is why it’s so crazy that with these exact same settings, Gmask linking that same mask to an image cuts a hole in it rather than keeping the bit inside the mask. :rofl:

Here’s the second part to fix this:

In Action under Rendering / Comp there is a ‘GMask’ option which the tooltip describes as enabling the ‘Garbage Mask’ behavior. It’s on by default, turn it off.

Now (with note above about changing bg to black and ‘only gmask’ - but leave comp output on) you get the expected behavior of the matte acting as a matte, not inverse. But it doesn’t premult.

So simply stick a comp node with default setting at the end, and bingo…

Screenshot 2024-04-18 at 1.34.22 PM

Screenshot 2024-04-18 at 1.34.09 PM

1 Like

And yet, backward compatibility has been tossed out the window on several major updates. Remember the bilinear offsets for 4 point tracking? Out the window with 2014. i had to rebuild a shots on multiple jobs when they came back for updates and revisions for a year. Yet the new vertices offsets were far superior. Sometimes you just need to bite the bullet and fix the shit rather than take 3 left turns to make a right.

5 Likes

I stick to my point about the the fill color needing to be present in action gmasks to control alpha intensity.

Adding that plus a preference to invert gmask behavior would solve all the issues. And wouldn’t kill backwards compatibility.

2 Likes

Totally. But important to note that “inverting gmask behaviour” isn’t the same as pushing the invert button.

Even though that behaves the same with one mask, it falls apart with multiple masks.

1 Like

By invert I mean inverting the base math from being subtractive to being additive in nature.

So maybe name the toggle subtractive vs additive.

Yes I was just clarifying as somebody else suggested changing the default of the invert button to being selected by default.

1 Like