Oink
Nodes

LensDistortion

LensDistortion (NukeX): undistort / redistort with radial k1, k2 (same model as the CameraTracker solve).

raw .md

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

NodeLensDistortion
Type idOC_N_lensdistortion
MenuTransform › LensDistortion
Nuke classLensDistortion2 (also imports LensDistortion)
Codeopencomp_core/nodes/transform/lens_distortion.py

LensDistortion properties

Inputs and outputs

PortNameType
input 0Imageimage
input 1maskimage
output 0Imageimage

Knobs

Panel tab Lensdistortion, in panel order.

KnobLabelTypeDefaultRange / valuesNuke 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 / 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

Nuke equivalent

Imports from and exports to Nuke's LensDistortion2 (LensDistortion also import to it). The standard Nuke mask knobs (channels, mask, invert, (un)premult, mix) are mapped too.

Knobs with a different name here:

Nuke knobKnob here
distortion1k1
distortion2k2
outputmode
outputTypeoutput

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.

  • 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