Creating cleanplates is a common task in the VFX world.
When dealing with crowded/busy plates such as a intersection with pedestrians and cars, fireworks,snow, rain etc, its nice to use some form of automation, at least to get a good base.
Rich Frazer wrote a excellent example on how this process also can be automated by using the motion estimation plugins in NukeX to clean based on motion.
This method works well for larger moving objects but can however be somewhat time consuming and won’t work well on heavy plates such as this: Original
There is also the execelnt plugin by keller.oi called Superpose that seem to be the ultimate “off the self” solution to the problem.

But if we don’t have NukeX and the boss won’t spend money on plugins we can try the automation on our own.
The first thing to come to mind, is to stabilize the plate and use FrameBlend, but that usually ends up causing a lot of streaking and changes in the luminance and or chrominance:


One of the better ways is to use the TemporalMedian node, however this only works across 3 frames. You could make a custom gizmo that combines a ton of TemporalMedian nodes, but its rather limited what you can get from 3 samples in a median.

This is where BlinkScript is super handy, as it comes with a build in median function.
So with nothing more than a few lines of code (1 line of process code), you can create a tool that allows you to do fine automated cleanplates in regular nuke.


FrameMedian is a BlinkScript that will allow you to do a TemporalMedian over up to 20 frames.




Using the “Frame Range” process method you can specify a Start and End frame, and how many samples you want.
Then FrameMedian distributes samples evenly across that range.

You can also use the “Specified Frames” method, that allows you to specify what frames you want to sample.


For the best result the input plate must be stabilized and not have too much chroma/luma alteration. So in case of Day-to-Night timelapses pick frames/frame range within same light.
Due to the nature of the median function more samples is not always better, so its good to try out different frame ranges and sample count.

The node in action:

FrameMedian for Nuke from Hagbarth on Vimeo.


Available on Nukepedia.