GrainCheck for NukeStudio & Hiero

November 30, 2015

It was quite fun to see that 2 days after publishing the CubeKeyer post Nuke 10 was announced with a keyer for NukeStudio. And since Nuke 10 is so close, i don’t see a reason to release mine.

It is nice to see that they added BlinkScript support under Nuke Studio, meaning that we can create our own timeline effects as we please, and i hope that the GLSL path means that we can get GPU acceleration  from non-supported GPU’s. So i am really looking forward to that.

However we still have the Blink limitation in that we can only access 1 layer at a time, so i still hope to see a RV level GLSL like support in the future. At launch, NukeStudio 10 and Hiero 10 will also not support random access, meaning that there are still a few things we can’t do, unlike the Nuke counterpart. Like doing grain check and edge detection that are vital for QC. So i am going to release my NukeStudio GrainCheck QC tool.

GrainCheck for NukeStudio & Hiero is a SoftEffect that gives you 3 options.

  1. Grain Check (Laplacian)
  2. Edge Detection (Sobel)
  3. Saturation Check


As Theodor Groeneboom have already written a clean convolution matrix some years ago, i used his code as a base (i guess i owe you a beer Theo!), but its pretty self explanatory. As the GLSL syntax was changed in Nuke 9.0v7 i have added a pulldown menu to select the Nuke version range you use.

Download it here


  1. Put the “GrainCheck.gizmo” in your /.nuke folder (ie \.nuke\GrainCheck.gizmo)
  2. in “\.nuke\Python\Startup\” add the following:
    from hiero.ui import registerAction
    from PySide.QtGui import QAction, QIcon
    import nuke
    nuke.load ("GrainCheck")
    action = QAction(QIcon("icons:LUT.png"), "GrainCheck", None)
    action.setToolTip("GrainCheck for Nuke Studio")
  3. Now the GrainCheck SoftEffect should be available in the softeffect list.
  4. (note that as this node uses the gpuOP node, it will not render but only display in the viewport)

CUBE Keyer for Nuke Studio & Hiero

November 13, 2015

CUBE Keyer for NUKE STUDIO and HIERO from Hagbarth on Vimeo.

Two weeks ago i finished a small feature film project, with 50% of the VFX work being greenscreen shots. And there I realised that it is a bit of a shame that Nuke Studio does not have a keyer. Sitting in the timeline environment trying to figure if the shot is going to work or not. This usually ends up in having to go from real-time land, into comp land, which can be a bit tricky when dealing with 8 minute plates. And just the convinience of being able to get a rough idea of how its going to look and aid clients who can’t abstract from greenscreen temps.

Next week we have another project with alot of keying shots, and I thought it would be a great idea to spend some time up front, to get a proper solution to the problem. Speaking of solutions.. this appear to be the current “best pratice:

The new blend layers (introduced in Nuke 9.0v7) in Nuke Studio and Hiero enables use of masking and alpha channels. And while cropping like above seem like a desperate move, it does open up for just the right stuff we need.

If you want to create custom “Soft Effects”, you can only use the predefined GPU accalerated notes that allready appear in the softeffects tab. You cannot use merges, shuffels, expressions, blinkcript or other nodes you would typically use for this. So a traditional node based keyer is out of the question. Well… There is one node that is not in the Soft Effects tab, that works in Nuke Studio. It is the “GPUOp” node.


The GPUOp node is a unique node that only renders to the viewport (not to the node tree). Using openGL shading langaue it works nearly identically to the blinkscript node, giving you a script editor and executes in runtime. This gives us great power to add (view only) tools that is not possible with any combination of the other supported nodes.


So to solve my problem i decided to re-purpose a old keyer that i originally designed for beauty work.
The essence of the keyer is to basic steps:

To get a good chroma seperation i turn the input from RGB into YCbCr

float CY = IN[0]*0.299+IN[1]*0.587+IN[2]*0.144;
float CB = (IN[0]*-0.159+IN[1]*-0.332+IN[2]*0.05)+0.5;
float CR = (IN[0]*0.5+IN[1]*-0.419+IN[2]*-0.081)+0.5;

I then use basic linear keying (could be optimized a bit)

float CYKey = min(min(1.0,(1.0/(CYLowMax-CYLowMin))*CY-((1.0/(CYLowMax-CYLowMin))*CYLowMin)),min(1.0,(1.0/(CYHighMin-CYHighMax))*CY-((1.0/(CYHighMin-CYHighMax))*CYHighMax)));
float CBKey = min(min(1.0,(1.0/(CBLowMax-CBLowMin))*CB-((1.0/(CBLowMax-CBLowMin))*CBLowMin)),min(1.0,(1.0/(CBHighMin-CBHighMax))*CB-((1.0/(CBHighMin-CBHighMax))*CBHighMax)));
CBKey = smoothstep(0.0,1.0,CBKey); //removing this improves performence of keyer!
float CRKey = min(min(1.0,(1.0/(CRLowMax-CRLowMin))*CR-((1.0/(CRLowMax-CRLowMin))*CRLowMin)),min(1.0,(1.0/(CRHighMin-CRHighMax))*CR-((1.0/(CRHighMin-CRHighMax))*CRHighMax)));
CRKey = smoothstep(0.0,1.0,CRKey); //removing this improves performence of keyer!

I can then take the keys and multiply them with eachother, and add other controls like basic lift-gamma-gain, clamp, invert, spill supression and what not.


(i know its Y and not CY)

Comming soon!

Spotflare V3 development

October 26, 2015

(Image copyright Richard Gale)

I am a huge fan of Dog Schidt Optiks. The strange optical artifacts and unique flaring gives these lenses character. And most of these artifacts are incredibly hard to replicate in post which makes them just that more interesting. If you look at a video like Richard Gale’s festival of 50mm lenses you get a good sense of what this is all about.

Earlier this year, during the RnD period for a project im wokring on right now, I updated my Spotflare toolset to add some of these unique characteristics. Most of this will eventually go into a public release of Spotflare V3. Everything is done procedurally using expression nodes.
Here are some videos of the RnD progress:

Flat shimmer:

Deep shimmer:

Stay tuned for more about Spotflare V3.

LUE for Nuke available.

October 18, 2015

Due to a exiting new project (you are going to hear more about very soon), i have not had the time to fully finish LUE. But quite a few of you have been asking for a long time and i don’t know exactly when i get the time to fully finish it, so i decided to release it in its current state.

What is missing is a few bugs, mainly some few adjustments to the UI thanks to the beta testers, some minor missing expression links, PyQt warning messages and the preset loader.

Here is a introduction to the release version:

LUE Grading Toolset for Nuke – Introduction from Hagbarth on Vimeo.

You can download it from

More info about lue:

SplineBlur for Nuke

September 8, 2015

Splineblur is a simple nodeset to create a “warpblur” based on the SplineWarp node. The advantage with this effect is that it is super easy to artdirect, and easy to add constraints and animate.

You can download it here: