PixelSort – Nuke Plugin

December 2017, updated July 2020

(Made using a combination of PixelSort and PixelRepeat, a similar gizmo)

Download down below!

Nuke pixel sorting explained

Examples of pixel sorting using this plugin

 

 

BlinkScript makes 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 practice in Blinkscript, and it has some extra features!
All pixel sorted images and video on this page were made entirely in Nuke, using this plugin.
I left the Blinkscript node unlocked and commented for those who want to learn the basics of it using practical examples. Hope it helps!

 

Update: this page used to be about a Pixelsort plugin written in the NDK, but since I don’t want to compile it for every new Nuke version I’ve decided to rewrite it using Blinkscript.
You can download a compiled v1.6 of the NDK version and its source code here, just in case! (Sadly, this one doesn’t work in Nuke 12 and up.)

pixelsort node gizmo
pixelsort gizmo nuke

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.

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

Photo by Rudi Nieuwenhuis

nuke pixelsort example comp

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

The “sort” input is used, if enabled in the gizmo, to ‘prioritize’ regions.
This input determines in what order the pixels will be sorted. For example, paint over it to control the intensities like so:

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

Examples of pixel sorting using this plugin

Photography by Suleiman Alaoui

pixel sorting in nuke
pixel sorting in nuke
pixel sorting building skyline
pixel sorting
pixel sorting
pixel sorting
pixel sorting
pixel sorting
pixel sorting
pixel sorting