Oink
Defocus Defocus

Defocus

Blurs the image with a lens disc (bokeh): defocus is the disc's radius in pixels, aspect ratio squeezes it.

raw .md

Blurs the image with a lens disc (bokeh): defocus is the disc's radius in pixels, aspect ratio squeezes it. Highlights bloom into soft-edged discs.

NodeDefocus
MenuFilter › Defocus
Names in each format
.oink comp (JSON)"type": "OC_N_defocus"
.nk scriptDefocus (how .nk import works)
Pythonnuke.createNode("Defocus")
Assistant (MCP)create_node(type="Defocus")
Tab searchdefocus

Defocus properties

Inputs and outputs

PortNameType
input 0Imageimage
input 1maskimage
output 0Imageimage

Knobs

Panel tab Defocus, 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>
defocusdefocusfloat10 to 100defocus
ratioaspect ratiofloat10 to 3ratio
scalescalingwh ×21, 10 to 4scale
qualityqualityfloat201 to 100 (integer)quality
methodmethodmenuacceleratedaccelerated, fullprecision (full precision)method
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

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

Examples

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

  • Defocus on bright highlights (examples/filter/defocus_hdr.oink): Defocus spreads each pixel into a disc, so bright values over 1 turn into bokeh. BrightRings.exr has rings above 1000: a Blur would smear them, Defocus keeps hard-edged discs.

On this page