Oink
Nodes

Merge

Layers the A input with the B input using the chosen operation (30 operations, over by default).

raw .md

Layers the A input with the B input using the chosen operation (30 operations, over by default). Connect A to the spare input to add A2, A3 and more; each one is merged onto the result in order. Video colorspace does the maths in sRGB. alpha masking only applies to the blend operations. set bbox to picks the size of the result; range from and metadata from are kept for .nk files only.

NodeMerge
Type idOC_N_merge
MenuMerge › Merge
Nuke classMerge2 (also imports Merge)
Codeopencomp_core/nodes/merge/merge.py

Merge properties

Inputs and outputs

PortNameType
input 0Bimage
input 1Aimage
input 2maskimage
output 0Imageimage

Knobs

Panel tab Merge, in panel order.

KnobLabelTypeDefaultRange / valuesNuke knobDescription
operationoperationmenuoveratop, average, color-burn, color-dodge, conjoint-over, copy, difference, disjoint-over, divide, exclusion, from, geometric, hard-light, hypot, in, mask, matte, max, min, minus, multiply, out, over, overlay, plus, screen, soft-light, sten...operation
sRGBVideo colorspaceboolfalsesRGBMerge in sRGB (the 8-bit colorspace), then back to linear
alpha_maskingalpha maskingboolfalsescreen_alpha
bboxset bbox tomenuunionunion, intersection, A, Bbbox
metadata_frommetadata frommenuBB, A, Allmetainput
range_fromrange frommenuBB, A, Allrangeinput
a_channelsA channelstextrgbaAchannelsLayer taken from A ('none' = black); its alpha is a
b_channelsB channelstextrgbaBchannelsLayer taken from B ('none' = black); its alpha is b
outputoutputtextrgbaoutputLayer written: rgba, rgb, alpha or any layer name
also_mergealso mergetextnonealso_mergeExtra layer merged with the same operation
mask_channelmaskmenunonenone, rgba.alpha, rgba.red, rgba.green, rgba.blueMask channel, e.g. rgba.alpha (none = no mask; a linked mask input then uses rgba.alpha)
invert_maskinvertboolfalseinvert_mask
mixmixfloat10 to 1mix

Other knobs (Python, .nk and the assistant; not on the panel)

KnobLabelTypeDefaultRange / valuesNuke knobDescription
gl_colorViewer Controls Colorfloat ×30, 0, 00 to 1
postage_stamp_frameStatic Frameint1-2147483648 to 2147483647
lifetimeStartLifetime Startint0-2147483648 to 2147483647
lifetimeEndLifetime Endint100-2147483648 to 2147483647
useLifetimeUse Lifetimebooleanfalse
cachedCachedbooleanfalse
bookmarkBookmarkbooleanfalse
dope_sheetDope Sheetbooleanfalse
clone_groupClone Groupstring
link_sourceLink Sourcestring
link_overridesLink Overridesstring
split_viewsSplit Viewsstring
modeModeenumNONENONE, PLUS, MULTIPLY, SCREEN

Nuke equivalent

Imports from and exports to Nuke's Merge2 (Merge also import to it).

Knobs with a different name here:

Nuke knobKnob here
Achannelsa_channels
Bchannelsb_channels
metainputmetadata_from
rangeinputrange_from
screen_alphaalpha_masking

Nuke knobs not in this list import as a knob of the same name, or are kept unchanged for export. See .nk import.

Examples

Open these from Help › Examples…, or from the ? menu in this node's Properties panel.

  • Greenscreen: ScreenKey, Despill, comp over a sky (examples/keying/greenscreen_key_despill.oink): Tears of Steel plate 08_3a (CC BY 3.0, Blender Foundation, mango.blender.org): an actor on a green screen that falls off towards the frame edges. ScreenKey pulls the key from a screen colour picked over the open screen (Ctrl+click or Ctrl+Shift+drag in the Viewer with its panel open), with screen gain 1.1 and clip black / white 0.1 / 0.9 for the uneven screen; its own despill is off so the Despill node (average) does it. The premultiplied result goes over a Poly Haven sky (CC0) reformatted to the plate. The same chain ships as the Keying ToolSet.
  • Merge operations: multiply, screen, plus (examples/merge/merge_operations.oink): Three Merges on the same A and B: multiply (darkens), screen (lightens), plus (adds light). The Switch picks which one the Viewer sees; change its "which" knob to compare.
  • Merge over (examples/merge/merge_over.oink): A premultiplied CG render (CandleGlass, alpha 0 with non-zero rgb in places) scaled down and merged over a photo with Merge (over): A over B = A + B * (1 - A.alpha).
  • CornerPin a photo onto a plate (examples/transform/cornerpin.oink): CornerPin maps the four corners of the source (from1-4) to four points (to1-4). The pinned photo is merged over another plate, like a screen replacement.

On this page