Oink
Nodes

Grade

Adjusts the colour range: blackpoint/whitepoint set the input range, lift/gain the output range, then multiply, offset and gamma.

raw .md

Adjusts the colour range: blackpoint/whitepoint set the input range, lift/gain the output range, then multiply, offset and gamma. reverse undoes a grade. black clamp (on by default) and white clamp limit the result. The channels, mask, inject, fringe, (un)premult by and mix knobs work as on other Nuke colour nodes, all in one pass.

NodeGrade
Type idOC_N_grade
MenuColor › Grade
Nuke classGrade
Codeopencomp_core/nodes/color/grade.py

Grade properties

Inputs and outputs

PortNameType
input 0Imageimage
input 1maskimage
output 0Imageimage

Knobs

Panel tab Grade, in panel order.

KnobLabelTypeDefaultRange / valuesNuke knobDescription
channelschannelsmenurgbrgba, rgb, alpha, all, noneLayer the op applies to: rgb, rgba, alpha, all, none, <layer> or <layer>.<ch>
blackpointblackpointcolour ×40, 0, 0, 0-1 to 1blackpoint
whitepointwhitepointcolour ×41, 1, 1, 10 to 4whitepoint
liftliftcolour ×40, 0, 0, 0-1 to 1black
gaingaincolour ×41, 1, 1, 10 to 4white
multiplymultiplycolour ×41, 1, 1, 10 to 4multiply
offsetoffsetcolour ×40, 0, 0, 0-1 to 1add
gammagammacolour ×41, 1, 1, 10.2 to 5gamma
reversereverseboolfalsereverse
black_clampblack clampbooltrueblack_clamp
white_clampwhite clampboolfalsewhite_clamp
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 Grade. The standard Nuke mask knobs (channels, mask, invert, (un)premult, mix) are mapped too.

Knobs with a different name here:

Nuke knobKnob here
blacklift
whitegain
addoffset

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.

  • Shuffle a depth layer (examples/channel/shuffle_depth.oink): The Beachball single-part file holds rgba, Z, disparity, motion and masks in one part. The Shuffle puts depth (Z) in rgb and the Grade maps the depth range to something you can see.
  • Grade: blackpoint, lift, gain, gamma (examples/color/grade_basics.oink): A warm grade on the Mt Tamalpais photo: lift the blacks a little, gain the reds, add a touch of gamma. Grade works in scene-linear; values above 1 stay above 1 (white clamp off).
  • Premultiplied colour: Unpremult, grade, Premult (examples/merge/premult_handling.oink): Colour corrections on a premultiplied render go between Unpremult and Premult, so edges keep their colour. PrismsLenses.exr is premultiplied with alpha 0 but rgb above 0 in places (glows); those pixels are left alone by Unpremult (alpha 0).

On this page