fast erode / dilate filter
ExpandDT
Updated: 4 May 2022
Author: Eyal
Compatible Nuke versions: 11.3 or later
Compatibility: Linux 64
Nothing fancy but a plugin of erode / dilate fliter on the alpha channel.
This tool uses distance transform map and it is part of set, build to show the usage of this approach.
In this case there are two benifits:
-The first is constant computation time, no matter the dilation/erosion size (which is quite fast).
-The second is a natual round expansion, unlike the blocky/squary usual look.
Installation:
Place it inside the '.nuke' folder, Nuke will load it on startup.
In addtion, add those lines to the menu.py for a unique toolbar:
toolbar = nuke.toolbar('Nodes')
MyPluging = toolbar.addMenu('MyPlugins')
MyPluging.addCommand( 'ExpandDT', 'nuke.createNode('ExpandDT')', '' )
The tool usage is at the user's risk.