Oink
CornerPin2D CornerPin2D

CornerPin2D

Warps the image so the from1-4 corners land on to1-4.

raw .md

Warps the image so the from1-4 corners land on to1-4. Drag the to handles in the Viewer. Use fewer corners (enable1-4) for a simpler move. Extra matrix, invert, filter, motion blur and bounding box work as on Transform, and it joins a Transform chain into one filter. Copy "from" to "to", Copy "to" to "from" and Set "to" to input are buttons.

NodeCornerPin2D
MenuTransform › CornerPin2D
Names in each format
.oink comp (JSON)"type": "OC_N_cornerpin"
.nk scriptCornerPin2D (how .nk import works)
Pythonnuke.createNode("CornerPin2D")
Assistant (MCP)create_node(type="CornerPin2D")
Tab searchcornerpin2d, or its initials cp2d

CornerPin2D properties

Inputs and outputs

PortNameType
input 0Imageimage
input 1maskimage
output 0Imageimage

Knobs

Panel tab CornerPin2D, in panel order.

KnobLabelTypeDefaultRange / values.nk knobDescription
channelschannelsmenuallrgba, rgb, alpha, all, noneLayer the op applies to: rgb, rgba, alpha, all, none, <layer> or <layer>.<ch>
to1to1vector ×20, 0-2000 to 6000to1
enable1enable1booltrueenable1
to2to2vector ×21920, 0-2000 to 6000to2
enable2enable2booltrueenable2
to3to3vector ×21920, 1080-2000 to 6000to3
enable3enable3booltrueenable3
to4to4vector ×20, 1080-2000 to 6000to4
enable4enable4booltrueenable4
copy_fromCopy 'from'button (panel only)
transform_matrixextra matrixmatrix ×161, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1transform_matrix
invertinvertboolfalseinvert
filterfiltermenuCUBICIMPULSE (Impulse), CUBIC (Cubic), KEYS (Keys), SIMON (Simon), RIFMAN (Rifman), MITCHELL (Mitchell), PARZEN (Parzen), NOTCH (Notch), LANCZOS4 (Lanczos4), LANCZOS6 (Lanczos6), SINC4 (Sinc4)filter
clampclampboolfalseclamp
black_outsideblack outsidebooltrueblack_outside
motionblurmotionblurfloat00 to 4motionblur
shuttershutterfloat0.50 to 2shutter
shutter_offsetshutter offsetmenuSTARTCENTRED (centred), START (start), END (end), CUSTOM (custom)shutteroffset
shutter_custom_offsetcustom offsetfloat0-1 to 1shuttercustomoffset
mask_channelmaskmenunonenone, rgba.alpha, rgba.red, rgba.green, rgba.blueMask channel, e.g. rgba.alpha (none = no mask)
injectinjectboolfalseCopy the mask into mask.a for nodes downstream
invert_maskinvertboolfalseinvert_mask
fringefringeboolfalseOnly apply the effect at the edges of the mask
mixmixfloat10 to 1mix
from1from1vector ×20, 0-2000 to 6000from1
from2from2vector ×21920, 0-2000 to 6000from2
from3from3vector ×21920, 1080-2000 to 6000from3
from4from4vector ×20, 1080-2000 to 6000from4
set_to_inputSet to inputbutton (panel only)
copy_toCopy 'to'button (panel only)

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

KnobLabelTypeDefaultRange / values.nk 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
unpremult(Un)premult byenumnonenone, rgba.alpha
invert_unpremultinvertbooleanfalse(Un)premultiply by 1 - alpha

Knob names in .nk scripts

.nk knobKnob here
shutteroffsetshutter_offset
shuttercustomoffsetshutter_custom_offset

Other .nk knobs use the same name here. See .nk import.

Examples

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

  • 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.
  • Tracker to CornerPin (examples/transform/tracker_cornerpin.oink): Four points tracked on a moving plate, exported as an animated CornerPin that carries a text patch along with the move.

On this page