DespillAP is a native CPU-based plugin for Nuke, currently available for Windows and Linux. It is built using the original algorithms developed by Adrian Pueyo for the apDespill gizmo. You can explore more of his tools at the following link.
DespillAP allows you to remove the spill of a specific color from the input image, set a limit to control the amount of despill applied, inject the overall color to perform a proper despill, and apply a respill based on the desired background.
- Select a default color (
Red,Green,Blue, orPick), or choose a custom color from the image to remove the spill from the input. Absolute Modenormalizes the spill relative to the intensity of the selected color. Mostly like a chroma keying algorithm.- Despill algorithms include
Average,Max,Min, andCustomweight. - Hue
offsetadjusts the hue (in degrees) of the precomputed despill, if needed. - Hue
limitcontrols the intensity of the despill effect on the image. If an alpha is connected to theLimitinput, the despill strength will be driven by the opacity of that alpha. - Hue
maskselects the desired channel from theLimitinput to apply the limit. Protect Tonesexcludes a specific color in the image from being affected by the despill.- Protect
Previewdisplays a preview of the area that will be excluded from the despill. - Protect
colorselects the reference color to be protected from the despill. - Protect
tolerance, similar to a threshold, expands or narrows the color range to include similar tones. - Protect
effectcontrols how strongly the selected color is being protected. - Respill
mathincludesRec 709,Ccir 601,Rec 2020,Average, andMaxfor calculating the luminance of spill and respill colors. - Respill
coloris the color used to replace the selected spill. If theRespillinput is connected, it will be multiplied by the selected color. - Respill
blackpointandwhitepointwere added to control the areas where the calculated luminance matte is affecting the respill. - Output
output_despillallows you to choose between the despilled image (Despill) or the calculated spill (Spill) as the output. - Output
Output Spill Alphagenerates an alpha channel based on the calculated spill amount; if disabled, the incoming alpha is passed through unchanged. - Output
Invertinverts the calculated spill alpha. - Output
channelselects the channel where the calculated spill will be output.
To download the plugin, go to the Releases section and download the latest version. To use it, the simplest way to get started is by dragging the plugin to your .nuke folder and when opening Nuke, select Other (box icon) > All plugins > Update and search for 'DespillAP', happy comping!
The more complete way (recommended): once you have the plugin downloaded, go to your .nuke folder and create a folder called DespillAP. Inside it, create only one file called menu.py. Add the following lines:
import nuke
toolbar = nuke.toolbar("Nodes")
plugin_menu = toolbar.addMenu("DespillAP")
plugin_menu.addCommand("Keyer/DespillAP", "nuke.createNode('DespillAP')")Your Linux folder structure should look like this:
.nuke/
└── DespillAP/
├── menu.py
└── DespillAP.so
or in the case of Windows:
.nuke/
└── DespillAP/
├── menu.py
└── DespillAP.dll
To finish, open your .nuke/init.py file (if you don't have it, you can create it) and add the following lines:
nuke.pluginAddPath('DespillAP')In case you have different versions installed on your system (i.e., Nuke12.1, Nuke12.2), you can add an exception in your menu.py so it doesn't interfere with other versions:
if nuke.NUKE_VERSION_STRING=="12.1v2":
nuke.pluginAddPath('DespillAP')And that's it! Nuke should load the plugin from the moment you open the program without needing to always press Update.
All builds were created locally using Docker, thanks to the open-source project NukeDockerBuild by Gilles Vink.
GitHub – NukeDockerBuild.
Once you have the image locally—either for Windows or Linux (nukedockerbuild:12.1-windows or nukedockerbuild:12.1-linux .. )—you can run all builds sequentially using Taskfile (Taskfile.yml).
task build-allOr run builds by platform and Nuke version using the format build-PLATFORM:NUKE_VERSION:
task build-linux:12.1task build-windows:12.1Or build for both platforms using a specific Nuke version with the format build-single:NUKE_VERSION:
task build-single:12.1To clean your output directory after building, use this if a directory named artifacts has been created:
task cleanTo clean only the build folders created during the build process—while keeping the artifacts directory, which stores the compiled libraries or binaries—use the following:
task clean-buildsTo display a list of all compiled artifacts or binaries, simply run:
task show-artifactsTo create .zip packages for release, this will generate a separate zip file for each .so and .dll created, following the naming structure PluginName-NukeVersion-Platform.zip.
Note: This requires the zip utility to be installed. On Linux, you can install it using: sudo apt install zip.
task packageDespillAP is distributed under the MIT License with some restrictions. See the License for details.
DespillAP plugin is maintained by Gonzalo Rojas.

