Process compositing
This process is used to render 2D and 3D compositing. The calculations are delegated to Nuke.
Attribute creationGroup
|
creationGroupId
|
optional
Param reset
|
Boolean
|
optional
This param is used to reset the 3d scene.
Param root <knob>
|
any
|
optional
This param is used to set a Root Knob value. The Root Node is used to set the Nuke project properties.
Attribute creationId
|
creationId
|
mandatory
Attribute creationId
|
creationId
|
mandatory
Attribute name
|
String
|
mandatory
Attribute create
|
String
|
optional
Attribute link
|
String List
|
optional
Attribute pos
|
Point
|
optional
Param <knob>
|
any
|
optional
This param is used to set a Knob value. See example II
Param creationId
|
String
|
optional
This param is used to set the file Knob value with the creation absolute filename. See Creation Overview
Attribute prefix
|
String
|
optional
Attribute processId
|
creationId
|
mandatory
Attribute nodeName
|
String
|
mandatory
Param creationId
|
creationId
|
optional
This param is used to set the rendering output creation. The creation must be a video or a frameset.
Param frames
|
Render Frames
|
optional
Begin and end frames for a sequence rendering. Optionnaly, a frame count can be set.
Attribute creationId
|
creationId
|
mandatory
Param frames
|
Frames
|
optional
Begin and end frames export. Optionnaly, a frame count can be set.
Features
The features are:
- Create Nuke Node: Read, Write, Transform, etc. See Create Node Use Case
- Set Nuke Knob: file, first_frame, etc. See Create Node Use Case Animate Knob Use Case
- Get Nuke Knob: update the process param values from the graph-node. See Update Use Case
- Animate Nuke Knob: translate, scale, etc. See Animate Knob Use Case
- Import Node Group: import a graph-node into a main graph-node. See Node Group Use Case
- Rendering: execute a Write Node. See Render Use Case
- Motion: apply a simple or complex motion on a Nuke Knob. See Motion Use Case
- Template: apply a data template on a Nuke Node. See Template Use Case
- Export: export animated Knobs into a text file. See Export Use Case
- Script: execute a Python script. See Script Use Case
Nuke Definitions
Graph Node
Nuke is built around nodes. A node is defined by its knobs. Nodes are used to transform images, framsets and videos through a graph-node
See more details Nuke Features
Python
Python is the interpeted programming language used in Nuke.
See more details NUKE Python Developer's Guide
How the process works
The process consists essentially on creating node, linking node and setting node knobs. To do that, Assembler converts the process XML definition into Python commands.
Python command examples:
- Create a Read Node: obj = nuke.nodes.Read(name="read")
- Link two Nodes: nuke.toNode("transform").setInput(0, nuke.toNode("read"))
- Set a Knob value: nuke.toNode("transform").knob("center").setValue(10, 0)
Examples
example
<Process id="renderCompositing" type="compositing">
<Param name="reset">true</Param>
<Node name="read" create="Read" pos="0;0">
<Param name="creationId">mapAnim</Param>
<Param name="frame.range">true</Param>
</Node>
<Node name="transform" create="Transform" link="read" pos="0;100">
<FuncParam name="translate" type="linear" frames="1-75/2">
<Param name="begin">-500;0</Param>
<Param name="end">0;0</Param>
</FuncParam>
<FuncParam name="scale" type="linear" frames="1-75/2">
<Param name="begin">1.5</Param>
<Param name="end">1</Param>
</FuncParam>
</Node>
<Node name="write" create="Write" link="transform" pos="0;150"/>
<Render nodeName="write">
<Param name="creationId">outputComp1</Param>
<Param name="frames">1-75</Param>
</Render>
</Process>
Params:
reset root <knob>
Attributes
Attribute creationGroup
|
creationGroupId
|
optional
Creation group identifier used by the process. See details Creation Group. If this attribute is defined, creations identifiers declared in the process must be included in the creation group.
Params
Param reset
|
Boolean
|
optional
This param is used to reset the 3d scene. example
<Param name="reset">1</Param>
Param root <knob>
|
any
|
optional
This param is used to set a Root Knob value. The Root Node is used to set the Nuke project properties.
See Root Knob List
example: set the timeline first frame
<Param name="first_frame">1</Param>
Nodes
Node Input | optional
This node is used to open a graph-node.
Node Attributes
Attribute creationId
|
creationId
|
mandatory
Node Output | optional
This node is used to save the graph-node at the end of the process execution
Node Attributes
Attribute creationId
|
creationId
|
mandatory
Node Node | optional
This node is used to create or update a Nuke node.
example I: create a Read node
<Node name="read" create="Read" pos="0;0">
<Param name="creationId">input1</Param>
</Node>
example II: create a Transform node
<Node name="transform" create="transform" link="read" pos="200;0">
<Param name="center.x">100</Param>
<Param name="center.y">-10</Param>
</Node>
example III: create a Write node
<Node name="write" create="Write" link="transform" pos="200;0" />
Params:
<knob> creationId
Node Attributes
Attribute name
|
String
|
mandatory
The Nuke node name
Attribute create
|
String
|
optional
This attribute is used to create a Nuke node. The value is the Nuke Node Class name. Example: Read, Write, Transform, Blur, etc.
See Class examples Nuke Node Knobs
Attribute link
|
String List
|
optional
This attribute is used to set input links between the Nuke node and another Nuke nodes. Several links can be setted.
Example: cardA;CardB
Attribute pos
|
Point
|
optional
The Nuke node position in the graph-node
Node Params
Param <knob>
|
any
|
optional
This param is used to set a Knob value. See example II
According to the Knob Type, a Knob attribute can be set like this: <knob name> . <attribute name>
The Knob Types accepting attributes setting are:
- XY_Knob: x, y
- XYZ_Knob: x, y, z
- BBox_Knob: x, y, r, t
- Keyer_Knob: a, b, c, d
See Nuke Node Knobs
Param creationId
|
String
|
optional
This param is used to set the file Knob value with the creation absolute filename. See Creation Overview
This param is used with Nodes like Read or Write Nodes.
Node NodeGroup | optional
This node is used to import a graph-node into the main graph-node.
example I: import the nukeBranch graph-node
<NodeGroup prefix="branch2_" processId="nukeBranch" pos="colorCorrect;0;200"/>
example II: analyse nukeGraph graph-node and import it
<NodeGroup prefix="branch1_" processId="analyse(groupGraph, processGraph, graph)"/>
the Node Group process generated by the analyse function
<Process id="nukeGraph" type="compositing" subtype="analysis">
<Input creationId="nukeGraph"/>
<Node name="colorCorrect" create="ColorCorrect" link="transform;" pos="500;0" knob="layer:Obsolete_Knob;invert_mask:Boolean_Knob;help:EvalString_Knob;dope_sheet:Boolean_Knob;midtones.gamma:AColor_Knob;hide_input:Boolean_Knob;maskChannelMask:Channel_Knob;channels:ChannelMask_Knob;highlights.contrast:AColor_Knob;note_font_color:ColorChip_Knob;highlights.gamma:AColor_Knob;onCreate:PythonKnob;updateUI:PythonKnob;panel:Obsolete_Knob;highlights.offset:AColor_Knob;midtones.saturation:AColor_Knob;knobChanged:PythonKnob;shadows.offset:AColor_Knob;note_font:Font_Knob;tile_color:ColorChip_Knob;unpremult:Channel_Knob;highlights:Tab_Knob;selected:Boolean_Knob;autolabel:PythonKnob;midtones.gain:AColor_Knob;process_mask:Boolean_Knob;label:Multiline_Eval_String_Knob;mix:Array_Knob;onDestroy:PythonKnob;highlights.gain:AColor_Knob;inject:Boolean_Knob;master:Tab_Knob;test:Boolean_Knob;midtones:Tab_Knob;midtones.offset:AColor_Knob;contrast:AColor_Knob;maskFrom:Obsolete_Knob;shadows.gain:AColor_Knob;enable:Obsolete_Knob;shadows.contrast:AColor_Knob;highlights.saturation:AColor_Knob;maskChannelInput:Channel_Knob;Mask:Obsolete_Knob;shadows.saturation:AColor_Knob;postage_stamp_frame:Array_Knob;lookup:LookupCurves_Knob;indicators:Array_Knob;postage_stamp:Boolean_Knob;disable:Boolean_Knob;gain:AColor_Knob;offset:AColor_Knob;maskChannel:Obsolete_Knob;icon:File_Knob;shadows:Tab_Knob;invert_unpremult:Boolean_Knob;name:String_Knob;ypos:Array_Knob;maskFromFlag:Boolean_Knob;fringe:Boolean_Knob;xpos:Array_Knob;note_font_size:Array_Knob;shadows.gamma:AColor_Knob;cached:Boolean_Knob;saturation:AColor_Knob;channel:Obsolete_Knob;gl_color:ColorChip_Knob;midtones.contrast:AColor_Knob;mask:Obsolete_Knob;gamma:AColor_Knob;"/>
<Node name="transform" create="Transform" link="crop;" pos="400;0" knob="clamp:Boolean_Knob;motionblur:Array_Knob;help:EvalString_Knob;clip:Obsolete_Knob;dope_sheet:Boolean_Knob;hide_input:Boolean_Knob;crop:Obsolete_Knob;note_font_color:ColorChip_Knob;onCreate:PythonKnob;updateUI:PythonKnob;invert_matrix:Boolean_Knob;shutter:Array_Knob;scale:WH_Knob;matrix:Transform2d_Knob;tile_color:ColorChip_Knob;skew:Double_Knob;selected:Boolean_Knob;autolabel:PythonKnob;shutter_offset:Obsolete_Knob;label:Multiline_Eval_String_Knob;shuttercustomoffset:Array_Knob;onDestroy:PythonKnob;shutteroffset:Enumeration_Knob;indicators:Array_Knob;icon:File_Knob;xpos:Array_Knob;center:XY_Knob;ypos:Array_Knob;postage_stamp_frame:Array_Knob;postage_stamp:Boolean_Knob;knobChanged:PythonKnob;panel:Obsolete_Knob;note_font:Font_Knob;translate:XY_Knob;name:String_Knob;cached:Boolean_Knob;note_font_size:Array_Knob;filter:Enumeration_Knob;disable:Boolean_Knob;gl_color:ColorChip_Knob;black_outside:Boolean_Knob;rotate:Double_Knob;"/>
<Node name="crop" create="Crop" link="blur;" pos="300;0" knob="help:EvalString_Knob;dope_sheet:Boolean_Knob;hide_input:Boolean_Knob;crop:Boolean_Knob;note_font_color:ColorChip_Knob;onCreate:PythonKnob;updateUI:PythonKnob;knobChanged:PythonKnob;note_font:Font_Knob;tile_color:ColorChip_Knob;selected:Boolean_Knob;autolabel:PythonKnob;label:Multiline_Eval_String_Knob;onDestroy:PythonKnob;intersect:Boolean_Knob;indicators:Array_Knob;reformat:Boolean_Knob;panel:Obsolete_Knob;box:BBox_Knob;xpos:Array_Knob;ypos:Array_Knob;postage_stamp_frame:Array_Knob;postage_stamp:Boolean_Knob;disable:Boolean_Knob;gl_color:ColorChip_Knob;icon:File_Knob;reposition:Obsolete_Knob;name:String_Knob;cached:Boolean_Knob;note_font_size:Array_Knob;softness:WH_Knob;"/>
<Node name="blur" create="Blur" link="timeOffset;" pos="200;0" knob="layer:Obsolete_Knob;invert_mask:Boolean_Knob;help:EvalString_Knob;dope_sheet:Boolean_Knob;hide_input:Boolean_Knob;maskChannelMask:Channel_Knob;crop:Boolean_Knob;channels:ChannelMask_Knob;note_font_color:ColorChip_Knob;onCreate:PythonKnob;quality:Array_Knob;updateUI:PythonKnob;size:WH_Knob;knobChanged:PythonKnob;note_font:Font_Knob;tile_color:ColorChip_Knob;selected:Boolean_Knob;autolabel:PythonKnob;process_mask:Boolean_Knob;label:Multiline_Eval_String_Knob;mix:Array_Knob;onDestroy:PythonKnob;inject:Boolean_Knob;indicators:Array_Knob;panel:Obsolete_Knob;channel:Obsolete_Knob;maskFrom:Obsolete_Knob;xpos:Array_Knob;enable:Obsolete_Knob;maskChannelInput:Channel_Knob;Mask:Obsolete_Knob;ypos:Array_Knob;postage_stamp_frame:Array_Knob;postage_stamp:Boolean_Knob;disable:Boolean_Knob;maskChannel:Obsolete_Knob;icon:File_Knob;maskFromFlag:Boolean_Knob;name:String_Knob;cached:Boolean_Knob;fringe:Boolean_Knob;mask:Obsolete_Knob;note_font_size:Array_Knob;filter:Enumeration_Knob;gl_color:ColorChip_Knob;"/>
<Node name="timeOffset" create="TimeOffset" link="read;" pos="100;0" knob="help:EvalString_Knob;dope_sheet:Boolean_Knob;hide_input:Boolean_Knob;reverse_from:Obsolete_Knob;note_font_color:ColorChip_Knob;onCreate:PythonKnob;updateUI:PythonKnob;knobChanged:PythonKnob;note_font:Font_Knob;tile_color:ColorChip_Knob;selected:Boolean_Knob;autolabel:PythonKnob;label:Multiline_Eval_String_Knob;onDestroy:PythonKnob;indicators:Array_Knob;panel:Obsolete_Knob;xpos:Array_Knob;ypos:Array_Knob;postage_stamp_frame:Array_Knob;postage_stamp:Boolean_Knob;disable:Boolean_Knob;icon:File_Knob;name:String_Knob;time offset (frames):Obsolete_Knob;cached:Boolean_Knob;note_font_size:Array_Knob;reverse input:Obsolete_Knob;gl_color:ColorChip_Knob;time_offset:Array_Knob;reverse_input:Boolean_Knob;"/>
<Node name="read" create="Read" pos="0;0" knob="help:EvalString_Knob;sequence:Multiline_Eval_String_Knob;autolabel:PythonKnob;frame:String_Knob;raw:Boolean_Knob;note_font_color:ColorChip_Knob;frame_mode:Enumeration_Knob;file:File_Knob;edge_code:EvalString_Knob;onCreate:PythonKnob;updateUI:PythonKnob;before:Enumeration_Knob;import sequence:Script_Knob;knobChanged:PythonKnob;note_font:Font_Knob;tile_color:ColorChip_Knob;transfer:Obsolete_Knob;selected:Boolean_Knob;dope_sheet:Boolean_Knob;origfirst:Int_Knob;label:Multiline_Eval_String_Knob;cacheLocal:Enumeration_Knob;onDestroy:PythonKnob;version:Array_Knob;auto_alpha:Boolean_Knob;premultiplied:Boolean_Knob;indicators:Array_Knob;panel:Obsolete_Knob;edit_num:Array_Knob;xpos:Array_Knob;linear:Obsolete_Knob;format:Format_Knob;after:Enumeration_Knob;ypos:Array_Knob;postage_stamp_frame:Array_Knob;postage_stamp:Boolean_Knob;disable:Boolean_Knob;on_error:Enumeration_Knob;proxy:File_Knob;timecode:EvalString_Knob;icon:File_Knob;last:Int_Knob;name:String_Knob;cached:Boolean_Knob;colorspace:Enumeration_Knob;note_font_size:Array_Knob;origlast:Int_Knob;reload:Script_Knob;proxy_format:Format_Knob;gl_color:ColorChip_Knob;origset:Boolean_Knob;first:Int_Knob;"/>
</Process>
Node Attributes
Attribute prefix
|
String
|
optional
This attribute is used to prefix all the Nuke Node names of the sub grah-node.
Attribute processId
|
creationId
|
mandatory
The graph-node proc identifier. This kind of process is a compositing process, generated from a graph-node.
Containing informations about the graph-node to import (Node position, Knob type, etc.), this process is required to make the import.
The analyse function can be used inline to generate this proc. The arguments are:
- groupId: the group identifier where the grah-node process will be generate
- processId: the generated process identifier
- creationId: the creation identifier refering to the graph-node file ".nk".
Node Render | optional
This node is used to render the compositing, by executing a Write Node.
example
<Render nodeName="write">
<Param name="creationId">output1</Param>
<Param name="frames">1-250</Param>
</Render>
Attributes:
nodeName
Params:
creationId frames
Node Attributes
Attribute nodeName
|
String
|
mandatory
The Write Node name. This Write Nuke node will render the compositing
Node Params
Param creationId
|
creationId
|
optional
This param is used to set the rendering output creation. The creation must be a video or a frameset.
Param frames
|
Render Frames
|
optional
Begin and end frames for a sequence rendering. Optionnaly, a frame count can be set.
Example: 1-250 251 frames will be rendered
Example: 1-250/6 only 6 frames will be rendered: 1, 50, 100, 150, 200, 250
Node Export | optional
This node is used to export animated Maya node attributes into a file.
example
<Export creationId="transformExport">
<Param name="frames">1-100/11</Param>
<Param name="transform/translate.x">x</Param>
<Param name="transform/translate.y">y</Param>
</Export>
Attributes:
creationId
Params:
frames Nuke Node Knob
Node Attributes
Attribute creationId
|
creationId
|
mandatory
Node Params
Param frames
|
Frames
|
optional
Begin and end frames export. Optionnaly, a frame count can be set.
Example: 1-250 251 frames will be rendered
Example: 1-250/6 only 6 frames will be rendered: 1, 50, 100, 150, 200, 250