NUKE PLUGIN: PIXELSORT
Scroll down for a download button, or go to:
The Nuke NDK and BlinkScript make it possible to do heavy image processing tasks within Nuke.
A good example of such a task is pixel sorting - there is a cool subreddit for this effect, and Kim Asendorf (who popularized this effect with his many amazing examples) wrote a script you can download and use in Processing.
I decided to write a simple pixel sort node for Nuke as a practice in Nuke NDK -
the compiled PixelSortCore node currently works on Windows and Linux, and for the next update I will also release the code so you can compile it yourself!
PixelSort will sort the pixels per channel for each horizontal row (per channel) based on their values.
To rotate the sorting, simply rotate and counter-rotate the image before and after the sorting. All kinds of distortion effects can be applied this way.
All pixel sorted images and video on this page are made entirely in Nuke using this plugin.
1. Find the right Nuke version in the 'Versions' folder, and copy the found 'PixelSort' shared library file into the 'PixelSort' folder (which is next to this readme file).
2. Copy the PixelSort folder to your .nuke folder. You can find the .nuke folder here:
3. Append the following text to the end of the init.py file in the .nuke folder (or create the init.py file there, if it does not exist yet): nuke.pluginAddPath('./PixelSort')
If you don't like installing plugins manually, try my automatic plugin loader for Nuke (called NukeShared)!
To install PixelSort using NukeShared, simply follow step 1 from the list above and place the 'PixelSort' folder in 'Repository/_AutoInstaller'.
Pixel sorting example comp
From a short film by Koen Olijerhoek, Alrik Wiggers and Juriaan Wolters - shot by Dionne Cats
More often than not, adding small-scale noise to the sort matte input alpha will greatly improve the pixel sorting result.
When doing this, don't forget to disable 'auto sort matte' and place a Keyer node instead.
The 'add' slider extends the alpha, which can be used to stylize the sorting a little by bringing back detail in the image.
The first image is the original, the second is sorted, and the third is sorted with the 'add' at '1000'.
The 'threshold'-input (alpha) prioritizes the sorting for certain regions:
The sorting channel can be painted on as well (which is a little more 'aggressive' than the threshold channel, as it is a mask instead of a reduced priority in sorting):
Differences between the gizmo and the plugin
The included gizmo has some tricks built-in, so you can easily create a properly working template and have instant results.
The UI you saw earlier was the gizmo's, this is the 'PixelSortCore'-plugin:
I will not go further in-depth on the workings of the embedded 'PixelSortCore' plugin, as using the 'PixelSort' gizmo makes everything a lot easier.
'PixelSortCore' should be invisible in the UI (so you cannot find it using the Tab menu) - this is the case when installed correctly.
Examples of Pixel Sorting using this plugin
The following pictures were shot by Suleiman Alaoui