Oink
Nodes

ZDefocus

ZDefocus: depth of field from a depth channel — the image is cut into depth layers, each blurred by its distance from the focus plane and laid back over the others from the back to the front.

raw .md

ZDefocus: depth of field from a depth channel — the image is cut into depth layers, each blurred by its distance from the focus plane and laid back over the others from the back to the front. Drag the focal point in the Viewer to focus on what is under it. Disc, bladed (iris) or image bokeh; focal plane / layer / filter shape setup views. fill foreground keeps the background continuous behind a blurred front layer, so its edge does not leave a step. Layer spacing is automatic unless you turn it off.

NodeZDefocus
Type idOC_N_zdefocus
MenuFilter › ZDefocus
Nuke classZDefocus2 (also imports ZDefocus)
Codeopencomp_core/nodes/filter/zdefocus.py

ZDefocus properties

Inputs and outputs

PortNameType
input 0Imageimage
input 1filterimage
input 2maskimage
output 0Imageimage

Knobs

Panel tab ZDefocus, in panel order.

KnobLabelTypeDefaultRange / valuesNuke knobDescription
channelschannelsmenuallrgba, rgb, alpha, all, noneLayer the op applies to: rgb, rgba, alpha, all, none, <layer> or <layer>.<ch>
useGPUIfAvailableUse GPU if availablebooltrueuseGPUIfAvailable
z_channeldepth channeltextdepth.Zz_channel
mathmathmenudepthdirect, depth, far0 (far = 0), far1 (far = 1), ndirect (-direct), ndepth (-depth), nfar0 (far = -0), nfar1 (far = -1)math
outputoutputmenuresultresult, focal_plane_setup (focal plane setup), layer_setup (layer setup), filter_shape_setup (filter shape setup)output
show_imageshow imagebooltrueshow_image
fill_foregroundfill foregroundbooltruefill_foreground
centerfocus plane (C)float0-100 to 100center
focal_pointfocal pointvector ×2200, 200-10000 to 10000focal_point
dofdepth of fieldfloat00 to 100dof
blur_dofblur insidebooltrueblur_dof
sizesizefloat250 to 100size
max_sizemaximumfloat500 to 200max_size
autoLayerSpacingautomatic layer spacingbooltrueautoLayerSpacing
nLayersdepth layersfloat201 to 256 (integer)nLayers
layerCurvelayer curvefloat1-5 to 5layerCurve
filter_typefilter typemenudiscdisc, bladed, imagefilter_type
shapefilter shapefloat10 to 1shape
aspectaspect ratiofloat10 to 2aspect
bladesbladesfloat52 to 16 (integer)blades
roundnessroundnessfloat0.2-1 to 1roundness
rotationrotationfloat0-180 to 180rotation
inner_sizeinner sizefloat0.80 to 1inner_size
inner_featherinner featherfloat10 to 1inner_feather
inner_brightnessinner brightnessfloat0.80 to 1inner_brightness
catadioptric_sizecatadioptric sizefloat0.30 to 1catadioptric_size
catadioptriccatadioptricboolfalsecatadioptric
filter_channelfilter channeltextrgba.alphafilter_channel
use_input_channelsuse input channelsboolfalseuse_input_channels
filter_boundsfilter boundsmenushapeshape, formatfilter_bounds
image_filterimage filtermenuCUBICIMPULSE (Impulse), CUBIC (Cubic), KEYS (Keys), SIMON (Simon), RIFMAN (Rifman), MITCHELL (Mitchell), PARZEN (Parzen), NOTCH (Notch), LANCZOS4 (Lanczos4), LANCZOS6 (Lanczos6), SINC4 (Sinc4)image_filter
clamp_image_filterclamp image filterboolfalseclamp_image_filter
bloom_gammagamma correctionboolfalsebloom_gamma
bloombloomboolfalsebloom
bloom_thresholdbloom thresholdfloat0.80 to 10bloom_threshold
bloom_gainbloom gainfloat20 to 10bloom_gain
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 / 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
unpremult(Un)premult byenumnonenone, rgba.alpha
invert_unpremultinvertbooleanfalse(Un)premultiply by 1 - alpha
legacy_resize_modelegacy resize modebooleanfalselegacy_resize_mode

Nuke equivalent

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

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

On this page