One of the most frequent tasks in our profession is chroma keying.
Usually, this task is fragmented into several processes where the main ones are the alpha/matte and the despill branch.
For many reasons, despilling is sometimes an annoying task where we will face a very intense and hard blue or green line in our edges that will be even more difficult to deal with if it is completly out of focus.
This tool will help us with this problem in a very simple and fast way and it could be an alternative that could help someone someday.
The idea for this despill comes from trying to optimize time and get the best result as soon as possible. With just 3 clicks and a couple of sliders we will get the despill we need.
To create this tool, I have combined two very useful techniques that I have learned from what I consider my mentors: Pedro Andrade and Alex Hanneman.
Thanks to both for contributing to the community with free content and with more advanced paid courses.
How to make more effective DESPILL in compositing inside NUKE -
NK505 - Advanced Keying, Despill, and Plate Integration -https://www.compositingacademy.com/nukeonlinecourse-keying-despill-color-integration
I have also added a couple of inputs that allow us to connect some source that helps us, which will our BG itself or an Edge Extend/Color Dilate/PxF_Distort.
It will always be optimal to have a core despill to preserve our plate.
You can download it for free on nukepedia:
ALL pickers must be used by pressing Ctrl + Alt + Click and also Ctrl + Alt + Shift + Click to pick an area (pick an area is very useful, especially for the Magic picker)
Screen Colour: Chroma Colour
Colour: Colour desired
Input: Background, Edge_Extend or any RGB input we want to use
Colour + Input: It is a dissolve between the previous
Magic: Colour we want to protect
Magic_Input: Protects an RGB input instead of a single colour. In simple low-movement shots it could work by connecting a previous despill with pxf_distort o extend.
Luma Restore: Returns the original luma.
Force Luma: In some cases, the BG will have a higher luminance than what we can see in the plate. This knob will allow us to force that luminance beyond the original regardless of the Luma Restore.
Here are some examples:
A common and simple situation where we use Magic to fix the hard line of the character on the right and also introduce a CheckerBoard background instead of a colour pick.
In the following examples, we will see 2 extreme cases where the FG will contain the screen colour, but using Magic, we can protect it and have a smoother despill.
In this example, we take the screen colour to an opposite (yellow) and we can see how it mostly preserves the initial contamination.
Of course, we could reduce the amount it preserves, but this was an example to show you the maximum we can achieve.
In this last example, we have a character of the same colour as the screen, and we can mostly preserve her tones, in addition to transform the screen to her skin colour.
But, How it works Magic?
In one of the many tips that Alex Hanneman proposes in his courses, he explains how to use the alpha bias of keylight to protect an area. After that, he takes the other channels to negative values to manually adjust the luminance value and tone we need.
The combination of this tip and the automatic adjustment by luminance proposed by Pedro in the video were a perfect balance in my head. But then I wanted to understand what the bias did exactly.
After several attempts, I managed to understand it. Basically, it is isolating colour information to protect it.
Once it is extracted, keylight can apply a more aggressive despill and break those infernal edges because it later restores the extracted information.
In other words, we will divide the plate between a desired color or an RGB input (Magic_src), execute a despill with keylight, and then multiply what was previously extracted to return the protected information. After this, we can already restore the luma by calculating the difference between the result and the beginning and returning it with plus as we normally do.
By understanding how it works, I was able to add an input for Magic that will be used mainly in simple shots. Where we can connect a PxF_Distort or Edge Extend with a previous despill done to have the information we want to extract in the main despill.
Now, we could protect the information for each color of our FG, but unfortunately, there are few cases where this will serve us.
In everyday life, it is faster and more comfortable to use Magic of a single color and to build our main despill through Keymixes of them.
Finally, this is the script I made for the examples where it can be seen that I only used the gizmo for the project.
And that's it! I hope the tool is useful for someone.
Thanks a lot!
joserralastras.com - Joserra Lastras