NUKE PIXELSORT PLUGIN

December 2017

Download down below!

Nuke pixel sorting explained

Differences between the gizmo and the plugin

Examples of pixel sorting using this plugin

The C++ code

 

 

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 you can download the C++ code down below if you want to compile it yourself!

All pixel sorted images and video on this page were made entirely in Nuke, using this plugin.

pixel sort node nuke
nuke pixel sorting gizmo

Or get the C++ code to compile it yourself at the bottom of this page.

Normal installation

 

1. Place the PixelSort folder in your .nuke folder (or somewhere else on your computer)

Linux: /home/username/.nuke
Windows: C:\Users\username\.nuke

2. Go to your .nuke folder, and create a file called ‘init.py’. If such a file already exists, open it.

3. In the init.py file, add this line of text to the end and save it:

nuke.pluginAddPath(‘./PixelSort’)

 

 

 

Installation using NukeShared

 

1. Place the PixelSort folder in the ‘_AutoInstaller’ repository.

 

NukeShared is a way of installing plugins by dragging/dropping them in folders, see this page for more information.

 

 

 

When compiling your own PixelSortCore

 

Follow the same installation instructions, and place the compiled PixelSortCore-file in a folder with the name of the version you compiled it for (in the same fashion as the other ones that are already there).
The menu.py will automatically find it!

Nuke pixel sorting explained

All this plugin does, is ordering all pixels based on their luminance. Or, if you want to, based on a second input.

pixel sorting
nuke pixelsort example comp

From a short film by Koen Olijerhoek, Alrik Wiggers and Juriaan Wolters – shot by Dionne Cats

The Alpha channel of the ‘sort’ input is, if enabled in the gizmo, used to prioritise regions.
This input determines in what order the pixels will be sorted – RotoPaint over it to control the intensities:

live pixelsort painting
paint pixel sorting customize

This is a simple setup to control the sorting intensity using a ramp:

nuke pixelsorting example

To make it look a bit more interesting, you could multiply some noise in there:

pixelsort example nuke

Differences between the gizmo and the plugin

The included gizmo has some tricks like rotation built-in, so you can easily create a properly working template and have instant results.
The PixelSortCore plugin is not that interesting, it only has one slider for threshold:

Nuke PixelSort node c++ NDK
Nuke cpp pixelsort core

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

pixel sorting in nuke
pixel sorting in nuke

The following pictures were shot by Suleiman Alaoui.

pixel sorting building skyline
pixel sorting
pixel sorting
pixel sorting
pixel sorting
pixel sorting
pixel sorting
pixel sorting

The C++ code

If you have any questions/suggestions, let me know!