Custom matte cleaner, spill removal?

JacobBrooks
JacobBrooks Website User Posts: 128

Hello.  Is there a tool that lets you clean up the matte after a key in the spots that you want?  

Also, is there a tool to do spill removal to certain parts of a person in front of a green screen?  

«1

Comments

  • CleverTagline
    CleverTagline Moderator Las Vegas, NVModerator, Website User, Ambassador, HitFilm Beta Tester Posts: 3,307 Ambassador

    HitFilm has a general Matte Cleaner tool in the effects list.  And while I don't have any experience with the chroma key effect, I believe it has tools/properties to control spill removal.

  • Triem23
    Triem23 Moderator Moderator, Website User, Ambassador, Imerge Beta Tester, HitFilm Beta Tester Posts: 19,933 Ambassador

    @jsbarrett the "Chroma Key" isn't in base Express. That particular filter is an add-on.

    That said, yes, there's the Matte Cleaner you mentioned, plus a Spill Removal effect. 

    Both are in Keying>Matte Enhancement in the Effects list. 

  • CleverTagline
    CleverTagline Moderator Las Vegas, NVModerator, Website User, Ambassador, HitFilm Beta Tester Posts: 3,307 Ambassador

    @Triem23Thanks for the correction. I somehow remembered the spill removal as being part of the base chroma key effect, not a separate effect of its own.

  • Triem23
    Triem23 Moderator Moderator, Website User, Ambassador, Imerge Beta Tester, HitFilm Beta Tester Posts: 19,933 Ambassador

    @jsbarrett well, you're correct. The add-on/Pro Chroma Key integrates the matte cleaner and spill removal into the same interface as the keyer for faster adjustment. Chroma Key is more convenient than chaining RGB Key, Matte Cleaner and Spill Removal together (Kinda like how the updated Lightsword integrates distortion effects so you don't have to chain a Displacement to the original Lightsword). 

    And, of course as you've shown, it's good to have the single-function effects, because those can be used creatively, like to create outlines! 

  • Palacono
    Palacono Website User, HitFilm Beta Tester Posts: 3,422 Enthusiast

    Spill Removal can be awkward when you have a lot of colours in the subject that can be affected by it, i.e yellow, as it doesn't seem to have any notion of 'edges' to the shape, so 'degreens' the whole thing.

    One solution is to duplicate the layer, use Matte Cleaner to erode the margin that contains the green spill on that layer and place it over the original layer where you've removed the spill from the edges. Slows editing/rendering down a bit though.

  • JacobBrooks
    JacobBrooks Website User Posts: 128

    Thanks for all the suggestions.  I know these effects exist, but is there a way to for example take the mouse and highlight areas you want fixed-up?

    @Palacono

    For your solution, would that improve the overall keying quality?  In one recent video of mine, you could see some of the background behind my hair!

  • Palacono
    Palacono Website User, HitFilm Beta Tester Posts: 3,422 Enthusiast

    No, there is no 'wand' mode, even in Pro.

    No, my solution was to stop the Spill Removal tinting everything, as it has no concept of 'edge', which is where the spill occurs, so you need to overlay a slightly smaller version on top of a "spill removed" version to keep the proper colours in the centre portion. The Pro version does have an 'edge' feature, but it does some weird noisy mangling and duplicating of the edge pixels, which makes them look like they've been nibbled by a small rodent, so is utterly useless.

    Your biggest problem is going to be that Matte Cleaner has quite strange ranges. Values from 0.00 to 0.01 effects the mask about the same as from 0.01 to 10. There is a big drop off in the first 0.01 then it's very gentle. Usually that first 0.01 removes way too much wispy hair and needs to be spread out by an order of magnitude, but it won't be.  You can try combining the green screen removal with multiple Hue & RGB Keys, all set at slightly different greens to hit specific green pixels. Slows things down even further though, so if/when you get a good result, you'd want to put it in a separate comp and Proxy it.

  • NormanPCN
    NormanPCN Website User Posts: 4,065 Enthusiast

    The Chroma key effect, which Pro has and is an add-on for Express, does have an edge color correction feature in the color correction property group of the effect.

  • Palacono
    Palacono Website User, HitFilm Beta Tester Posts: 3,422 Enthusiast

    @NormanPCN Yep, it's called Edge Color>Recover Edge Color. :(

    Have you tried it? Because it does not recover the edge color. It mangles the edge pixels - with the wrong color - by randomly replacing them with pixels approximately the same colour as those further in from the edge, plus some random noise. It should be called  Edge Mangler>Mangle Edge Pixels.

    It should be taking only the Chroma values of the Colour you chose with the pipette and removing that from the edge pixels by interpolating the chroma from further in from the edge out towards the edge. Like Spill Remover is doing, only more so. Nothing else in all the other parameters appears to be doing that, despite being able to choose what colour you'd like the Spill Replacement to use.

    So you have a red coat with green spill on it, look in from the edge, see the red and make the green into red. A purple coat? Make the green into purple. Flesh? Flesh. So basically: make the edge B&W and then tint it with the colour further in from the edge. If it's good enough for colorising B&W movies, it should work here too.

    What it does now is no use to man nor beast. Turn the values up  and very quickly you get rainbow pixels that come from absolutely nowhere and disintegration of the object.

    Even the example image use on the PhotoKey 8 page https://fxhome.com/photokey-pro gives the girl a haircut in all the example backgrounds. Take that image, turn up the Edge Color>Recover Edge Color past about 2.00 and watch her eyes dissolve.

  • NormanPCN
    NormanPCN Website User Posts: 4,065 Enthusiast
    edited July 2018

    @Palacono "Yep, it's called Edge Color>Recover Edge Color.... Have you tried it?"

    I have not tried that option. I did not know it existed until you just mentioned it. I was talking about different option(s) as described in the Color correction property group of the chroma key effect.

    I had a key and I did not like the look on the edge of the head/hair. I looked for something in Chroma key and found the options I mentioned and they worked for that example on the edge of the subject only. I make no other claims.

    The recover edge color is realistically just making an educated guess as to what the edge color is supposed to be. A single slider control is easy but I would not hold my breath about such features working on a reasonable percentage of subjects. 

  • JacobBrooks
    JacobBrooks Website User Posts: 128

    @NormanPCN

     Is all that stuff in that last picture you posted from Pro?  I am using Express.

  • NormanPCN
    NormanPCN Website User Posts: 4,065 Enthusiast
    edited July 2018

    @JacobBrooks That is from the Chroma Key effect previously mentioned this thread. To repeat, it is in Pro and is an add-on for Express.

  • JacobBrooks
    JacobBrooks Website User Posts: 128
    edited July 2018

    @NormanPCN

    For the add on, is it a one time cost or monthly?  Is it the Chroma-key add on?  Is it really broadcast quality like they say it is?

  • NormanPCN
    NormanPCN Website User Posts: 4,065 Enthusiast

    @JacobBrooks

    "For the add on, is it a one time cost or monthly?"

    That's a little bit of a curious question. Nothing FxHome is subscription. The website is pretty clear.

    Also, if you think about it, buying a few of packs would quickly cost more than a license to Pro which is a no subscription purchase and has absolutely all effects. That also answers the question.

    "Is it the Chroma-key add on?"

    Yes. Composite: Pro-Keying Pack

    "Is it really broadcast quality like they say it is?"

    I am in no position to comment on that.

    Expansion packs do have a 14 day refund policy. Or just install the Pro demo and try out the key effect all you want for as long as you want. The demo cannot export but you don't need to export to test the ability of the effect(s).

    Pro and Express can exist side by side on a machine. The last one you install will be registered to the HLP project files in case you do any double clicking of those in the file browser. That is easily changed if that is a concern.

     

  • JacobBrooks
    JacobBrooks Website User Posts: 128

    @NormanPCN

    Thanks for the explanations!

  • Triem23
    Triem23 Moderator Moderator, Website User, Ambassador, Imerge Beta Tester, HitFilm Beta Tester Posts: 19,933 Ambassador

    Jacob, bear in mind that you've got a lot of other issues going on besides the quality of Hitfilm's keying. You're using non-chroma green paper, you've got some lighting issues, you're getting reflections off walls, you're closer to your green panels than you should be... All of these set issues need to be resolved before any keyer can get you a clean image.

    Something else we've not discussed in any of your threads is your camera. I won't go too into technical details here, but I'll give strong odds you're shooting on a camera recording to h.264/mp4 or to h.264 wrapped in MOV. And that brings up more issues. Technically you're recording 8-bit/channel footage and h.264 is a lossy codec that - and this is key - processes video in 8x8 pixel blocks. The bottom line is this also makes it harder to get a clean key since edges are going to be prone to pixelization. There's a video I've been trying to find (but it's not titled what I think it's titled) that illustrates this by comparing footage shot on a GH4 vs a Blackmagic Cinema Camera vs a Canon Cinema Camera. Spoiler alert, the GH5 has the worse issues with pixelized edges and fringing. 

    I'd say follow Norman's advice on the Pro demo before spending money on the add-on pack for now, but you really have to eliminate the on-set issues before blaming the software. 

    I'm going to drop a video here from commercial videographer Matthew Rosen. This video discusses a lot of on-set techniques for setting up a clean key. The video I'm trying to find comparing cameras is on this same channel and he just, in general, has a lot of great advice, so I recommend you subscribe to the channel (he doesn't post often, but then you can find it) and work your way through the rest of his videos. 

  • JacobBrooks
    JacobBrooks Website User Posts: 128

    @Triem23

    Thanks for your input.  The green I have been using has been keying out fine.  It is the cleaning up of the shot I have had issues with.  I will see what I can do with the lighting, but I try to get the shot as evenly lit as possible.  The light I use is very big and bright and keep in mind, I am shooting in a small space.  I can fix the reflections in that corner and I can be further away from the walls.  I think I will stick with the camera I have because I have gotten very smooth keys from it.  So, most of this stuff you mentioned can be fixed easily.

  • NormanPCN
    NormanPCN Website User Posts: 4,065 Enthusiast
    edited July 2018

    @Triem23 "Technically you're recording 8-bit/channel footage and h.264 is a lossy codec that - and this is key - processes video in 8x8 pixel blocks."

    8x8 is MPEG-2. AVC/H.264 allows 4x4 transform blocks.

    Realistically the bane of keying edge quality is 4:2:0 chroma subsampled video. Meaning the chroma info is half resolution in of the luma (in X & Y coordinates). 4:2:2 is half res in only the Y/vertical coordinate. 4:2:0 is the most common output for average cameras. Then you add the transform block onto the half res and it just compounds.

  • Triem23
    Triem23 Moderator Moderator, Website User, Ambassador, Imerge Beta Tester, HitFilm Beta Tester Posts: 19,933 Ambassador

    @NormanPCN thanks for the correction. Also, I was prepping for work and this was me coming back to talk 4:2:0, so you beat me to it. :D

  • WhiteCranePhoto
    WhiteCranePhoto Website User Posts: 924 Enthusiast

    @JacobBrooks

    "Thanks for all the suggestions.  I know these effects exist, but is there a way to for example take the mouse and highlight areas you want fixed-up?"

    There IS a way to do this... sort of. You can use the chroma key effect to select the parts of the image you want to alter, and then apply an appropriate effect (e.g. color wheels) to the selected region. It's nowhere near as elegant or efficient as qualifiers in Scratch or Resolve or Fusion, but it CAN be made to work, though it is a little bit of a hack.

    You could always clean up that one clip in Fusion and then pull it back into HitFilm for editing + finishing. :)

     

  • JacobBrooks
    JacobBrooks Website User Posts: 128

    @WhiteCranePhoto

    What tool do I use for cleaning up single spots?

  • CleverTagline
    CleverTagline Moderator Las Vegas, NVModerator, Website User, Ambassador, HitFilm Beta Tester Posts: 3,307 Ambassador

    @JacobBrooks He already mentioned the tool: chroma key.

    To elaborate on what I think @WhiteCranePhoto is describing, you first duplicate your footage layer. On the top copy, you add the chroma key effect. However, instead of keying out areas based on a certain color, you invert the resulting matte so that areas of the selected color are kept. Then you add further effects to the stack for that layer, and those effects will only operate where the key has kept things intact.

    The down side to that process is that it assumes that you want to apply certain affects to areas of a certain color. If that's not the case, the luminance key effect is another alternative, but it has similar drawbacks to the chroma-key selection method: you're isolating areas of your footage based on calculations performed on the footage itself, not on specific areas that you've chosen.

    The only way to fully manually control where effects are applied in HitFilm is by using masks. And if anything changes with the size/shape/position of the area(s) you want to receive these effects, then you need to animate the masks, which takes you into the joyful land of rotoscoping.

  • JacobBrooks
    JacobBrooks Website User Posts: 128

    @jsbarrett

    What were to happen if I have some slight (semi-transparent) spill onto some darker parts of the set, but I don't have anything keyed in there?  What would that look like after the export?

  • WhiteCranePhoto
    WhiteCranePhoto Website User Posts: 924 Enthusiast

    They'll be partially transparent. You can combine the approaches; use a combination of a luma or chroma key along with a mask to isolate what parts of the image you're affecting.

  • CleverTagline
    CleverTagline Moderator Las Vegas, NVModerator, Website User, Ambassador, HitFilm Beta Tester Posts: 3,307 Ambassador

    @JacobBrooks I really don't mean to be a jerk by saying this, but you can answer your own question fairly easily. If you want to know how something looks after export, export it and see.  If it's part of a much longer piece and you don't want to export the whole thing, mark in and out points around a small section and export that marked area.

  • JacobBrooks
    JacobBrooks Website User Posts: 128

    @jsbarrett

    I would export it, but I was trying out the chroma key effect in the Pro demo so I couldn't export it.

  • CleverTagline
    CleverTagline Moderator Las Vegas, NVModerator, Website User, Ambassador, HitFilm Beta Tester Posts: 3,307 Ambassador

    @JacobBrooks Ah. Gotcha. Will the Pro demo let you make RAM previews? If so, do that. RAM previews are full renders, just like exports, only they're temporary and only viewable inside of HitFilm.  However, RAM previews only work in comps, not in the main Editor timeline, but if you're keying you're already in a comp, so that should work.

  • NormanPCN
    NormanPCN Website User Posts: 4,065 Enthusiast

    I am a little confused. The Export will look like the viewer. At least as good, aka lossless, and maybe worse depending on all the variations of compression and bitrates and all that guff. Lets not go crazy and just assume you are doing a good quality export, whatever that is, and it will really look like the viewer.

    Now the viewer does have the a transparency grid display feature that exporting does not have. This assuming your project has transparency in the final result. Most export formats don't support transparency so transparent areas basically default to mixing with black in those area(s).

    All this should not be an issue since we really don't want videos with transparency.  Transparency is fine for intermediates but not for final results. You key something to get transparency and then composite that with other stuff and all pixels result to opaque. Here the export, any format, should look like your viewer.

  • JacobBrooks
    JacobBrooks Website User Posts: 128

    @WhiteCranePhoto

    What is so special about a luma key?  What is it exactly?  I'd do the mask thing but I would have to rotoscope them.

  • WhiteCranePhoto
    WhiteCranePhoto Website User Posts: 924 Enthusiast

    Luma keys are selections based on luminosity, aka brightness rather than on color. 

This discussion has been closed.