Tuesday, May 14, 2013

Adding Metadata


To add metadata, select the node whose metadata you need to add and then choose the ModifyMetaData node from the MetaData menu; the ModifyMetaData# node will be connected with the selected node and its properties panel will be displayed. In this properties panel, choose the + button from the ModifyMetaData tab; a placeholder will be created in the metadata box, refer to Figure 1.

Next, double-click on the first cell under the key column header; the Pick metadata key dialog box will be displayed, refer to Figure 2. Enter a new name in the field located at the bottom of the dialog box and then choose the OK button. Now, double-click on the first cell under the value column header and then enter the value in it; the new key and its value will now flow downstream.
The ModifyMetaData1 node properties panel
Figure 1 The ModifyMetaData1 node properties panel
The Pick metadata key dialog box
Figure 2 The Pick metadata key dialog box

Comparing Metadata

To compare metadata between the two inputs, add the CompareMetaData node from the MetaData menu and then connect the nodes that you need to compare with the A and B inputs of the CompareMetaData# node, refer to Figure art16-1. On doing so, the CompareMetaData node will display a list of keys where there is difference in the metadata of the two input images, refer to Figure 2.
Figure art16-1 The Read1 and Read2 nodes connected to the CompareMetaData1 node
Figure 1 The Read1 and Read2 nodes connected to the CompareMetaData1 node
The CompareMetaData1 node displaying  difference in the keys of the two input images
Figure 2 The CompareMetaData1 node displaying
difference in the keys of the two input images

Viewing Metadata

Metadata is data within the data. It is information such as original bit depth, width, height, and so on of an image which is embedded in it. NukeX reads the embedded metadata information and passes it down to the process tree. You can change the metadata information in NukeX and also embed the new metadata to an image. You can access metadata nodes from the Metadata menu which is displayed on choosing the MetaData button from the Nodes toolbar. In this section, you will learn how to view, edit, and render the metadata.

To view the metadata embedded to an image, select the node whose metadata you want to view and then choose the MetaData button from the Nodes toolbar; the MetaData menu will be displayed. Next, choose ViewMetaData from the menu; the ViewMetaData# node will be inserted in the Node Graph panel. You can view the metadata information in the ViewMetaData tab of the ViewMetaData# properties panel, as shown in Figure 1.
The metadata information displayed in the  ViewMetaData1 node properties panel
Figure 1 The metadata information displayed in the
ViewMetaData1 node properties panel
To filter the metadata list, you can use the search metadata for field in the ViewMetaData# node properties panel. To do so, enter a filter criteria in this field; the filtered information will be displayed in the ViewMetaData tab of the properties panel of the node. Fox example, if you enter input in the search metadata for field and then press ENTER; the keys and values having the word input will be displayed in the properties panel, refer to Figure 2. By default, filtering is done for both keys and values. However, you can limit it to keys or values by selecting the keys only or values only option from the within drop-down of the ViewMetaData# properties panel.
The filtered metadata list displayed for key input
Figure 2 The filtered metadata list displayed for key input
Tip: The keys can be referenced while writing expressions.
Note: 1. While viewing the metadata information of a QuickTime file, the ViewMetaData node does not display the gamma or bit depth, refer to Figure 3.
2. If you add the ViewMetaData node after the Merge node having two inputs A and B, you can specify the input whose metadata will flow downstream. To do so, select A or B option in the metadata from drop-down from the Merge tab of the Merge node properties panel.
The metadata of a QuickTime file displayed in  the ViewMetaData# node properties panel
Figure 3 The metadata of a QuickTime file displayed in
the ViewMetaData# node properties panel

Working with Properties Panel Controls

NukeX gives you various types of controls to edit values in the properties panel, refer to Figure 1. These controls are discussed next.

Figure 1 The parameter controls in the ColorCorrect1 node properties panel
FIELDS
You can enter values directly in the input fields or use arrow keys (UP and DOWN) to increase or decrease the values. When arrow keys are used, the change in the value of the field depends on the initial position of the cursor. For example, if the current value of the field is 125.25 and you need to change it to 126.25; place your cursor after 2 and press UP ARROW once. Now, if you press DOWN ARROW twice, new field value will be 124.25. You can also enter expressions into the fields. Additionally, you can enter formulae in the input fields for quick calculations. For example, if you enter 1280/2 in a field and then press ENTER, NukeX will return a value of 640.
Tip: You can also increase or decrease field values using the mouse wheel. To do so, place the cursor in the field and then scroll mouse wheel. If the mouse wheel is not available then press and hold ALT and drag the field values.
SLIDERS
To set a value with the slider, drag the slider knob as required or click on the scale located beneath the slider. To reset a slider to its default value press and hold CTRL and click on the slider.

CHANNELS
By default, NukeX uses single value for the R, G, B, and A channels. For example, if in the ColorCorrect1 node properties panel you set the gain field value to 1.2, this value will simultaneously affect the R, G, B and A channels, refer to Figure 2. You can choose the field’s Channel chooser button to switch between single and multiple values. As a result, an array of input fields will be displayed for editing channel values individually. The number on the button indicates the number of input fields available when you choose this button, refer to Figure 3.
Figure 2 The value 1.2 applied to all channels in the gain field of
the ColorCorrect1 properties panel
Figure 3 Separate r, g, b, and a channels displayed for the
gain field of the ColorCorrect1 properties panel
COLOR WHEEL
On choosing the field’s Color wheel button, the color picker window will be displayed along with the color sliders and color wheel. The color sliders and color wheel in this window are used to set the precise color values. To make sliders horizontal in this window, resize the dialog box. When the size of the window is wide enough, sliders are placed horizontally, refer to Figure 4.
Figure 4 The color picker window displayed on choosing the Color wheel button
 from the properties panel of the Grade1 node
To change the slider set displayed in the color picker window, choose TMI (Temperature, Magenta/Green, Intensity), HSV (Hue, Saturation, Value), or RGB (Red, Green, Blue) button from the color picker window, refer to Figure 4. To enable dynamic colors for the sliders background, choose the Dyn button. Choose the Show the color wheel button to cycle through color wheel states, the color wheel, and square, refer to Figure 5. Choose the color swatch button to show or hide the color swatches in the color picker window, refer to Figure 6.

Figure 13-5 The color wheel states
Figure 6 Color swatches displayed in the color picker
window on choosing the color swatch button

Drag the white triangle located at the edge of the color wheel to adjust the hue, refer to Figure 7. Drag the white circle located inside the color wheel to adjust the saturation, refer to Figure 7.
Figure 7 Controls on the color wheel
To affect only the hue of the selected color, press and hold CTRL and then drag the white triangle of the color wheel. Similarly, press and hold the SHIFT key and drag the white circle to change only the saturation, refer to Figures 8 and 9.
Figure 8 Changing only the hue values
Figure 13-9 Changing only the saturation values
You can also zoom and pan inside the color wheel. To zoom in or out in the color wheel, press and hold ALT and then drag the cursor up or down using the middle mouse button. To pan in the color wheel, press and hold ALT and then drag the cursor on it. To reset the zoom or pan operation, middle mouse click on the color wheel. The slider labels on the color wheel window are used to increment color values precisely. To increase the value by 0.01, right click on the label. To decrease the value by 0.01, left-click on the label. If you want to change the value by 0.1 or 0.001, use SHIFT or ALT. To open another color picker window while keeping the previously opened color picker window open, CTRL+click on the another parameter’s color picker button.
Figure 10 The slider labels

Node Tab

This tab is found on the properties panel of every node, refer to Figure 1. The parameters in this tab are discussed next.

Figure 1 Parameters on the Node tab
label
This field is used to add comments about the node. You can use basic HTML markup in this field.

font
The options in this drop-down are used to change the font of the text displayed on the node. The bold and italic buttons are used to bold or italicize text displayed on the node.

note_font_size
This field is used to change the size of the text displayed on the node.

color
This button is used to change the color of text displayed on the node in the Node Graph panel.

hide input
This check box is used to hide the incoming pipe of the node.

cached
This check box is used to keep the output data of the node in the memory so that it can be read quickly.

disable
This check box is used to disable or re-enable the node.

always in dope sheet
By default, the node will be displayed in the Dope Sheet panel when its properties panel is open. On selecting this check box, the node always opens in the Dope Sheet panel.

bookmark
When this check box is selected, the node is shown in the bookmark list.

postage stamp
This check box is used to display a thumbnail render of node’s output on its tile in the Node Graph panel.

static frame

This field is used to specify the frame number to be used for generating the postage stamp.

Saturday, May 11, 2013

Enhancing Workflow

Some nodes in the Other category of the Nodes toolbar are used to enhance the workflow. The StickyNote node is used to add notes to the Node bpanel. The notes can be text or HTML markup. Generally, they are used as annotations to other nodes in the Node Graph panel. You can use the Dot node to make bends in the connecting pipes. It helps you in organizing your script better. The PostageStamp node is used to display a thumbnail render of the output at the current frame. This node does not alter the data stream. The nodes used to enhance the workflow are discussed next.

Using the StickyNote Node
The StickyNote node is used to add annotation to nodes in the Node Graph panel. To add a note to the Node Graph panel, click on the area of the Node Graph panel where you need to add a note. Next, choose the Other button from the Nodes toolbar; the Other menu will be displayed. Now, choose StickyNote from the menu; the note will be displayed in the Node Graph panel. To change the note text, enter new text in the label field of the StickyNote# node properties panel. You can also enter HTML markup such as <b> your_note_text_here </b> for note to appear in bold or <i> your_note_text_here </i> for note to appear in italics in the Node Graph panel. You can also add an image to your note. To do so, use <img src=”your_logo.png”/> HTML markup.
Note: The commonly used image formats can be used for the logo but using the png format is highly recommended. Also, you need to save the image files in the plug-in path directory (C:\Program Files\Nuke7.0v4\plugins) in order to make images appear on the notes.
The Precomp node is also used to enhance the workflow. To know more about this node, click here. The Dot node is used to create bend in the pipes that connects two nodes. This node helps in organizing the node network in the Node Graph panel. To know the use of this node, click here.

This article is taken from the Nuke Book: The Foundry Nuke 7 for Compositors.

Grouping Nodes

You can group (visually organize) nodes in the Node Graph panel using the Backdrop node or the Group node. The Backdrop node is used to visually organize areas of the Node Graph panel. The Group node is used to group several nodes into a single node, and the group node thus created acts as a container for these nodes. The Backdrop and Group nodes are discussed next.

Grouping Nodes Using the Backdrop Node
To group nodes using the Backdrop node in the Node Graph panel, choose the Other button from the toolbar; the Other menu will be displayed. Next, choose Backdrop from the menu; the BackdropNode# will be inserted in the Node properties panel, refer to Figure 1. In the Node Graph panel, drag the triangle on the lower right corner of the Backdrop node to increase its size, as required. Next, press and hold the left mouse button over the title of the box and then drag the node and slip it under the nodes that you need to visually organize, refer to Figure 2. Next, click on the empty area of the Node Graph panel and then drag the title of the Backdrop# node. You will notice that nodes grouped using it move together with it.
Figure 1 The BackdropNode1 node inserted in the Node Graph panel

Figure 2 The Grade1, Blur2, and ColorCorrect2 nodes visually grouped using the BackdropNode1 node
To display the properties panel of the Backdrop node, double-click on it in the Node Graph panel. To change the color of the Backdrop node, choose the tile_color button from the BackdropNode# properties panel; the BackdropNode#.title_color window will be displayed. Next, select the color as required. To change the name of the Backdrop node, enter the new name in the name field of the Backdrop node properties panel. To delete the Backdrop node and the nodes it contains, click once on the title of the node and then press DELETE. To delete only the Backdrop node, CTRL+click on the title of the node and then press DELETE.

Grouping Nodes Using a Group Node
To group nodes using the Group node, select the nodes that you need to group. If you want to replace the original nodes with the Group node, choose Edit > Node > Group > Collapse to Group from the menu bar or press CTRL+G; the Group# node will be inserted in the Node Graph panel. Also, a new panel will be displayed with the name Group# Node Graph.

To expand (ungroup) a group, select the Group# node in the Node Graph panel and then choose Edit > Node > Group > Expand Group from the menu bar or press CTRL+ALT+G. To open the Node Graph panel for the group, select the Group# node in the Node Graph panel and then choose Edit > Node > Group > Open Group Node Graph from the menu bar or press CTRL+ENTER. Alternatively, you can press the show button in the Group# node properties panel.

To keep the selected nodes in the Node Graph panel, choose Edit > Node > Group > Copy Node To Group from the menu bar or press CTRL+ALT+SHIFT+G; a free floating Group# node will be created in the Node Graph panel along with a separate Group# Node Graph panel.

This article is taken from the Nuke Book: The Foundry Nuke 7 for Compositors.