Natron Tutorials

@Artsito, @magdesign Compositor here! I think I have the solution to your masking woes.

Typically in Nuke I like to make a toolset (I don’t think Natron has this feature) which I call HW_Roto. To be clear I’m absolutely not the inventor of this method or anything (it’s a very standard way of working with masks) but that’s what I call most of my toolsets which are just workflow tweaks.

In any case, here’s what it looks like recreated in Natron.

What’s going on here is the proper way of working with masks from a workflow standpoint, we separate our process into two pipes, one where we create our mask in the alpha channel and then we bring that alpha back over to our RGB pipe and premult it. The first shuffle node takes away any alphas that may already exist (note that you shouldn’t have any to begin with and if you are already working on a pre-multiplied image you should work on your masks further up in your comp to avoid double-premulting), then we have our roto node where we create our rotos, I also like to include a blur with this as most of the time I like to soften masks with a 2px blur instead of fiddling around in the roto node, then the alpha goes back into our RGB pipe where we pre-multiply it so things actually become transparent.

In this example we have a yellow constant that is fed through HW_Roto, a masked out shape and a stroke in our roto node which is then blurred, and we are left with the result in the viewer, neat!

Here’s the script for the toolset, copy and paste it into your Natron window and it should work as expected. You can use this to mask out the kids and then merge the pre-multiplied output of this toolset overtop a defocused background. Keep in mind that results may vary… defocusing things in post is tricky to make look good.

hwroto.txt (22.0 KB)

1 Like