Oink
LensDistortion LensDistortion

LensDistortion

Undistort / redistort with radial k1, k2 (same model as the CameraTracker solve).

raw .md

Undistort / redistort with radial k1, k2 (same model as the CameraTracker solve). Output STMap for the STMap node.

NodeLensDistortion
MenuTransform › LensDistortion
Names in each format
.oink comp (JSON)"type": "OC_N_lensdistortion"
.nk scriptLensDistortion2, also imports LensDistortion (how .nk import works)
Pythonnuke.createNode("LensDistortion2")
Assistant (MCP)create_node(type="LensDistortion")
Tab searchlensdistortion, or its initials ld

LensDistortion properties

Inputs and outputs

PortNameType
input 0Imageimage
input 1maskimage
output 0Imageimage

Knobs

Panel tab Lensdistortion, 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>
modemodemenuundistortundistort, redistortoutput
outputoutputmenuimageimage (Image), stmap (STMap)outputType
k1k1float0-0.5 to 0.5k1
k2k2float0-0.5 to 0.5k2
center_offsetcentre offsetvector ×20, 0-500 to 500center_offset
filterfiltermenucubiccubic (Cubic), bilinear (Bilinear)filter
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
unpremult(un)premult bymenunonenone, rgba.alpha
invert_unpremultinvertboolfalse(Un)premultiply by 1 - alpha
mixmixfloat10 to 1mix

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

Knob names in .nk scripts

.nk knobKnob here
distortion1k1
distortion2k2
outputmode
outputTypeoutput

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.

  • LensDistortion: undistort and STMap (examples/transform/lens_distortion.oink): LensDistortion with a barrel k1 undistorts the Golden Gate photo. A second LensDistortion writes the same warp as an STMap (uv in red/green), and the STMap node applies it: that is how distortion is handed between packages.

On this page