CompStart

ProLessonsCoursesElementsSoftware

CompStart

Master visual effects with cutting-edge techniques.

Learning

CoursesLessonsPro FeaturesAssetsSoftware

Tools

Tech CheckDisplay CheckMotion BlurCIE 1931PhysLightNuke Tools

Company

InstructorMissionImpressumPrivacyTerms

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
stmap
alpha
blur
warp
utility
View on GitHub

Smears RGB edges by building a blurred UV map from the alpha and re-sampling the image with STMap.

Edge Smear warps RGB using a UV map derived from the alpha. It gammas the alpha, dilates or erodes it, copies that matte onto normalized screen UVs, premultiplies, blurs, then unpremultiplies so only the soft edge carries displacement. STMap applies the result to the original colour.

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