CompStart

ProLessonsCoursesElementsSoftware

CompStart

Learn visual effects with cutting-edge techniques.

Learning

CoursesLessonsPro FeaturesAssetsSoftware

Tools

Tech CheckDisplay CheckMotion BlurPhysLightNuke Tools

Company

InstructorMissionSitemapPrivacyTerms

Projects

Moray RenderEXR ConverterOCIO.ccNuke ToolsDerekVFX

Follow

YouTubeInstagramTikTokThreadsContact

© 2026 CompStart. All rights reserved.

Edge Smear

ToolSets / Filter
Filter

2026-09-07

ToolSets/filter/edgeSmear.nk

filter
edge
smear
matte
stmap
blur
utility
View on GitHub

Smears RGB along matte edges with gamma, erode, and blur driving an STMap displacement for softer or bled edge transitions in Nuke.

Edge Smear pushes RGB along the edge of a matte using an STMap built from the alpha. It gammas the alpha, dilates or erodes it, blurs the edge region, then uses that field as UV so color from one side of the edge pulls into the other.

Use it when a key or roto needs a slight bleed, soft fringe, or directional smear instead of a plain blur. Typical cases include hair edges, contact shadows, and plates where a hard matte reads too cut-out against the background.

Exposed controls are gamma on the alpha, blur size, and erode (dilate size). The node expects a useful alpha; it adds an alpha channel if needed, builds the UV from the processed edge, and maps the original RGB through STMap so the smear follows the matte boundary.

Script code

set cut_paste_input [stack 0]
version 12.1 v4
push $cut_paste_input
Group {
 name edgeSmear
 tile_color 0x421010ff
 selected true
 xpos -1101
 ypos 149
 addUserKnob {20 User l edgeSmear}
 addUserKnob {7 gamma R 0 2}
 gamma 0.99
 addUserKnob {41 size T Blur1.size}
 addUserKnob {41 size_1 l erode T Dilate1.size}
 addUserKnob {26 ""}
 addUserKnob {26 lbl l "" +STARTLINE T "EdgeSmear v1.0"}
 addUserKnob {22 btn l DerekVFX.ca T "nuke.tcl('start', 'https://derekvfx.ca')" +STARTLINE}
}
 Input {
  inputs 0
  name Input
  xpos 447
  ypos 61
 }
set Nd7fe000 [stack 0]
 Dot {
  name Dot2
  note_font_size 40
  xpos 717
  ypos 65
 }
 AddChannels {
  channels alpha
  name AddChannels1
  xpos 683
  ypos 95
 }
set Nd831800 [stack 0]
 Gamma {
  channels alpha
  value {{parent.gamma}}
  name Gamma1
  xpos 683
  ypos 168
 }
 Dilate {
  channels rgba
  name Dilate1
  label "\[value size] px"
  xpos 683
  ypos 206
 }
push $Nd831800
 Multiply {
  value 0
  name Multiply1
  xpos 583
  ypos 146
 }
 Expression {
  expr0 "(x+.5) / input.width"
  expr1 "(y+.5) / input.height"
  name Expression1
  xpos 583
  ypos 212
 }
set Nd830800 [stack 0]
 Copy {
  inputs 2
  from0 rgba.alpha
  to0 rgba.alpha
  name Copy1
  xpos 683
  ypos 254
 }
 Premult {
  name Premult1
  xpos 683
  ypos 317
 }
 Blur {
  channels rgba
  size 8.4
  name Blur1
  label "\[value size] px"
  xpos 683
  ypos 354
 }
 Unpremult {
  name Unpremult1
  xpos 683
  ypos 440
 }
 Expression {
  expr3 "(r+g+b) != 0"
  name Expression2
  xpos 683
  ypos 466
 }
push $Nd830800
 Merge2 {
  inputs 2
  bbox B
  name Merge1
  xpos 583
  ypos 522
 }
 Dot {
  name Dot3
  note_font_size 40
  xpos 617
  ypos 598
 }
push $Nd7fe000
 Dot {
  name Dot1
  note_font_size 40
  xpos 481
  ypos 261
 }
 STMap {
  inputs 2
  channels rgb
  uv rgb
  name STMap1
  xpos 447
  ypos 594
 }
 Output {
  name Output1
  xpos 447
  ypos 668
 }
end_group