Alpha and Luma masks

General Moho topics.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
ggoblin
Posts: 266
Joined: Wed Jan 19, 2022 2:09 pm

Alpha and Luma masks

Post by ggoblin »

Alpha channel video masks work surprisingly well in Moho. But I don't think Moho supports Luma masks, which is a pity as very often there is no alpha channel available (especially in videos).

As a work around I've converted 'Luma videos' to 'Alpha videos' so I can use them in Moho.

1. My question is what is the best format for a video with an alpha channel to use in Moho running Windows. I might be wrong but I think quicktime alpha videos seem to under perform on the Windows platform, including in Moho?

Even if we are stuck with using a quicktime Mov under windows if we want an alpha channel, which format? I've tried Apple ProRes 4444 with alpha. It works but isn't smooth to work with. Also the file size grows by nearly 5x compared to the original mov file (with no alpha).

For example, is there a video wrapper for png with alpha (I prefer to keep it as a video rather than a sequence of 4000+ pngs)?

2. When using a video mask I want to be able to control the speed of transition. Is there a way to speed up / slow down video in Moho?

Failing that I suppose I could convert the video to a sequence of 1000s pngs with alpha.. is there a simple way to change the speed at which the sequence plays?

Thank you
User avatar
slowtiger
Posts: 6244
Joined: Thu Feb 16, 2006 6:53 pm
Location: Berlin, Germany
Contact:

Re: Alpha and Luma masks

Post by slowtiger »

1. PNG is slow compared to other codecs.

2. You can use the PNG codec in Quicktime, be sure to select "Millions+ of colours" to save the alpha channel.

3. You can determine the FPS rate of a video in its image tab settings. I rarely do that, and only with stuff that's slow anyway so there's no visible hiccups, but it works.

(Note: the day has come that my OS 10.6 Mac gets too old to play nicely with my OS 10.15 Mac - the new one will not play/import PNG codec videos, I have to convert them first on my OS 10.11 machine ...)
AS 9.5 MacPro Quadcore 3GHz 16GB OS 10.6.8 Quicktime 7.6.6
AS 11 MacPro 12core 3GHz 32GB OS 10.11 Quicktime 10.7.3
Moho 13.5 iMac Quadcore 2,9GHz 16GB OS 10.15

Moho 14.1 Mac Mini Plus OS 13.5
ggoblin
Posts: 266
Joined: Wed Jan 19, 2022 2:09 pm

Re: Alpha and Luma masks

Post by ggoblin »

Thank you slowtiger, for some great information.

1. In that case perhaps I should just stick to MOV Apple ProRes, as I don't think there are any other supported video formats that have an alpha channel.

Do you know what the difference between the different alpha options are:

ProRes 4444 XQ with Alpha HLQ
ProRes 4444 XQ with Alpha PQ
ProRes 4444 XQ with Alpha

ProRes 4444 with Alpha HLQ
ProRes 4444 with Alpha PQ
ProRes 4444 with Alpha

2. I don't think Quicktime as a product is supported on the windows platform anymore (maybe for last 5-6 years), but its formats are still supported by applications like adobe. Unfortunately when selecting quicktime via the third party applications we don't get the option for using PNG codec with quicktime.

3. Must admit I dont remember seeing these wonderful video settings in the image panel, knowing I can change the speed of the video alpha matte really helps - thank you. Also some of the other video setting in that panel like 'persist last frame' are very useful.

I see it also has a very useful 'premultiplied alpha' option, I'm guessing that means by default its set to Straight Alpha? Normally with the option to 'premultipy alpha' we should get the option to select which colour we are matting with? (though often this tends to be black).

I'm still very new to playing around with alpha channels and luma mattes and have already hit many problems when trying to convert between them. For example when adding an alpha channel from a luma matte the masked video is often darker and when I up the brightness of the alpha using curves I have to be very careful it doesn't destroy the soft edges of the alpha channel. And sometimes I have to invert the luma before making it an alpha and that seems to cause issues.. I have a video of shaded black ink moving on a white background with no alpha channel.. I want to have the ink alphaed to act as mask and the white background transparent to reveal a background layer. Converting from inverse luma to alpha technically achieves it but the results are not really useable due to issues with edges etc.. ah the joys of learning lol

It would be great if a future version of Moho supported luma mattes for masking and options to invert the alpha channel and luma matte.

Thank you
User avatar
slowtiger
Posts: 6244
Joined: Thu Feb 16, 2006 6:53 pm
Location: Berlin, Germany
Contact:

Re: Alpha and Luma masks

Post by slowtiger »

I can't remember if I ever used a luma matte, I stick to alpha - that's a whole 8bit channel just for transparency values. I use both PNG images and PNG codec video in Moho, to match with defined colours there. To avoid those dreaded thin lines I take care not to have any straight lines in the material, instead I create a fuzzy outline in TVPaint with brushes. Also I see that I export as "no premultiplied" because otherwise there's shady dark lines around the artwork instead of a seamless blend.

Moho has only a few blend modes, of which I use multiply and screen. Just last week I had a video (no alpha) of some flames on black, in Moho I set that layer to screen and voilà.

The 4444 in ProRes already means there's an alpha channel.

The different quality settings of the various ProRes flavours remain a mystery to me. And they're different from program to program even on the same machine! See:
Image

As you see, FinalCut offers more options than Moho on the same machine on OS 10.11. I don't use them anyway though.

The option naming of Moho 13.5 on OS 10.15 is a bit misleading. "MOV (ProRes alpha-ALAC)" creates a .mov file which is Appple ProRes 4444, as it reveals in the Finder info.
AS 9.5 MacPro Quadcore 3GHz 16GB OS 10.6.8 Quicktime 7.6.6
AS 11 MacPro 12core 3GHz 32GB OS 10.11 Quicktime 10.7.3
Moho 13.5 iMac Quadcore 2,9GHz 16GB OS 10.15

Moho 14.1 Mac Mini Plus OS 13.5
ggoblin
Posts: 266
Joined: Wed Jan 19, 2022 2:09 pm

Re: Alpha and Luma masks

Post by ggoblin »

Apologies for the delayed repy, I had a deadline approaching.

Ended up doing the animation in After Effects as I couldn't get the conversion from luma to alpha to work satisfactory to use in Moho, and it was central to the animation.

BTW Its my first proper animation in AE - finally took the advice so many experienced animators in this forum have been telling me .. horses for courses.. motion graphic animations are better suited for AE than Moho. Its a pity in many ways, as I wanted Moho to be my main animation software, but at the moment its just not flexible enough to do that. I have to reevaluate it as tool for character animation only. This project didn't have any character animation so I guess made more sense to do it in AE.

One thing that surprised me about AE, that I assumed wouldn't be a problem, was stability. I am used to photoshop being rock solid, hardly ever crashing, not so with AE. And unlike Moho, where despite the crashes I have hardly ever lost anything due to its excellent backup system, in AE every time it crashed I lost work (even though I set it to auto-save every 5 minutes). This might be because I only have 16Gb of RAM - plenty for Moho, but perhaps not enough for Ae? Also, as an absolute beginner, I am sure I'm fiddling with keyframes far more that I should so even though technically I only loose 5 minutes work, in reality to work out where I was before the crash - starring at hundreds of keyframes - it costs me a lot more.

Yes I also prefer using alpha, as you said it gives us a whole channel for transparency. But unfortunately quite often there is no alpha channel available, whilst there is always a luma available. Thats a good tip to avoid the 'dreaded thin lines', but sometimes even in fuzzy work like animated ink blobs you can still see the edges of an imperfect alpha. I ended up blurring the edges a little bit, not a great solution but I had to live with that.

I think if you select 'premultiplied' then it mattes (multiplies) the edge transparency with a colour (black by default) so yes you will get shady dark lines around the edges.

These are the ProRes option available in AE:

Image

I have no idea what the different alpha options mean.
Post Reply