Set Matte with Grade layer

bugmanfilms Posts: 12 Just Starting Out

Greetings and happy New Year..almost!

I’ve been looking through the forum for answers but I can’t seem to find an answer that works for me on a Set Matte effect in Hitfilm Pro.

Here's a link to a screenshot.

I was doing some test footage of demonic eyes with black sockets and a flame within. This test footage is very rough but I just wanted to get the concept down. I am doing this by using a grade layer with curves and two masks for the eyes, easy enough. Then I added a flame asset as it's own layer and added the Set Matte effect on that layer and pointed it to the Grade layer, which sits below the flame layer. I was expecting the flame to be contained with mask of the eyes but nothing seems to happen.

I have tried to bring all of the other layers, Grade, Footage, Point layer into their own comp then point the Set Matte at that but that didn’t work either, plus I lost the tracking data for the remaining Flame layer.

I’ve tried moving the Grade layer below the Flame layer but then the Grade layer isn’t an option for the Source Layer on the Set Matte effect.

I’m probably misunderstanding the Set Matte effect itself as I was able to get the desired look by adding a mask to the Flame layer and then the flame was contained within the eye socket. If anyone has time to take a look and help educate me, I’d appreciate it.



  • CleverTagline
    CleverTagline Posts: 3,316 Ambassador

    Your Google link is protected. I requested access, but after some testing, I don't really need it. First, though, here's how Set Matte works.

    Targeting a grade layer with Set Matte only works when that grade doesn't contain any masks on it. Set Matte looks at a layer's content before masks and effects have been applied, which is why you need a grade above another layer if that layer has its own masks/effects on it, and you want to use those masks/effects to drive Set Matte.


    In theory, you could stack another grade above your existing grade to bake its effects, but that would only work if there was some kind of alpha change in your existing grade layer, which there isn't.  Unlike masks on plane, image, and video layers, masks on grades don't make the surrounding space transparent, they just restrict the influence area of effects on that grade.  The sum of the alpha data of all the layers below it is still a fully opaque image, so you still wouldn't end up with any useful alpha information to restrict your flames.


    The best way I can think of to create your eye masks once and have them drive several other things is to do it like this (quick outline of the layer stack, with a description to follow):


    1. Flames

    2. Black Eyes

    3. Base Footage

    4. Grade Layer

    5. Masked footage (visibility off)


    The bottom layer is your base footage with masks around the eyes. Above that is a grade, followed by your unmodified base footage. The layer above that is another copy of your base footage, with Set Matte targeting the grade, and then Curves to make the eyes black. Above that is the flame footage, also with Set Matte targeting the grade.


    The other advantage to this setup is that even if you make the masking on your lowest layer very sharp (no feathering), you can still independently tweak that mask on the other layers that target its grade by adding the Matte Cleaner effect after Set Matte, which would let you feather and/or choke the matte as desired.
  • bugmanfilms
    bugmanfilms Posts: 12 Just Starting Out

    My apologies about the link, I have corrected it  here in case others want the visual.

    This makes more sense, thank you for explaining it so thoroughly.  I really liked the tip about the Matte Cleaner effect!  Thanks again!

This discussion has been closed.