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.

Merge Alt

ToolSets / Merge
Merge

2026-09-07

ToolSets/merge/mergeAlt.nk

merge
lch
color
luminance
saturation
hue
utility
grade
View on GitHub

Merge A over B with CIE-LCH color, luminance, saturation, or hue operations, plus mix, mask, bbox, and metadata controls.

Merge Alt combines two inputs using Photoshop-style Color, Luminance, Saturation, and Hue blends. It converts A and B to CIE-LCH, swaps the selected component(s), then converts back to the working space so you can regrade or restyle without a full RGB mix.

Use it when you need the chroma or lightness of one layer on another—matching grade, transferring hue, or locking luminance—while keeping a standard A/B merge workflow. A mix control dissolves against B, and a mask input limits where the blend applies.

Set bbox and metadata from A or B so downstream crop, format, and shot data stay predictable in the tree.

Script code

set cut_paste_input [stack 0]
version 13.2 v9
push $cut_paste_input
push 0
Group {
 inputs 2
 name mergeAlt
 tile_color 0x421010ff
 selected true
 xpos -169
 ypos -2
 addUserKnob {20 mergeAlt}
 addUserKnob {4 operation M {color luminance saturation hue ""}}
 operation luminance
 addUserKnob {4 bboxinput l "set bbox to" M {B A "" ""}}
 addUserKnob {4 metainput l "metadata input" -STARTLINE M {B A "" "" "" "" ""}}
 addUserKnob {41 which l mix T Dissolve1.which}
 addUserKnob {26 ""}
 addUserKnob {26 lbl l "" +STARTLINE T "Merge Alt v1.1"}
 addUserKnob {22 btn l DerekVFX.ca T "nuke.tcl('start', 'https://derekvfx.ca')" +STARTLINE}
}
 Input {
  inputs 0
  name A
  xpos 93
  ypos -575
  number 1
 }
set Ncbd6400 [stack 0]
 Input {
  inputs 0
  name B
  xpos 725
  ypos -573
 }
set Ncbd7200 [stack 0]
 Switch {
  inputs 2
  which {{bboxinput}}
  name Switch3
  xpos 1301
  ypos -461
 }
push $Ncbd6400
push $Ncbd7200
 Switch {
  inputs 2
  which {{metainput}}
  name Switch2
  xpos 1094
  ypos -474
 }
 Input {
  inputs 0
  name mask
  xpos 386
  ypos -161
  number 2
 }
push $Ncbd7200
 Colorspace {
  colorspace_out CIE-LCH
  name Colorspace8
  xpos 725
  ypos -461
 }
set Ncbd6b00 [stack 0]
push $Ncbd6400
 Colorspace {
  colorspace_out CIE-LCH
  name Colorspace9
  xpos 93
  ypos -464
 }
set Ncbd5d00 [stack 0]
 ShuffleCopy {
  inputs 2
  red red
  blue blue
  name ShuffleCopy2
  xpos 93
  ypos -314
 }
 Colorspace {
  colorspace_in CIE-LCH
  name Colorspace3
  xpos 93
  ypos -263
 }
push $Ncbd6b00
push $Ncbd5d00
 ShuffleCopy {
  inputs 2
  red red
  green green
  name ShuffleCopy4
  xpos 287
  ypos -320
 }
 Colorspace {
  colorspace_in CIE-LCH
  name Colorspace2
  xpos 287
  ypos -269
 }
push $Ncbd6b00
push $Ncbd5d00
 ShuffleCopy {
  inputs 2
  green green
  blue blue
  name ShuffleCopy1
  xpos 488
  ypos -308
 }
 Colorspace {
  colorspace_in CIE-LCH
  name Colorspace1
  xpos 488
  ypos -257
 }
push $Ncbd6b00
push $Ncbd5d00
 ShuffleCopy {
  inputs 2
  red red
  name ShuffleCopy3
  xpos 725
  ypos -310
 }
 Colorspace {
  colorspace_in CIE-LCH
  name Colorspace10
  xpos 725
  ypos -253
 }
 Switch {
  inputs 4
  which {{operation}}
  name Switch1
  xpos 725
  ypos -199
 }
push $Ncbd7200
 Dot {
  name Dot1
  xpos 906
  ypos -321
 }
 Dissolve {
  inputs 2+1
  channels rgb
  which 1
  name Dissolve1
  xpos 725
  ypos -140
 }
 CopyMetaData {
  inputs 2
  name CopyMetaData1
  xpos 725
  ypos -13
 }
 CopyBBox {
  inputs 2
  name CopyBBox1
  xpos 725
  ypos 50
 }
 Output {
  name Output1
  xpos 725
  ypos 113
 }
end_group