background
Resources //

// Available

NUKE SCRIPT: Camera Projection Set

NUKE SCRIPT: Camera Projection Set

Posted by Dave W. - > Nuke 6.3v8 | 09/15/2012

Custom scripts for quickly creating camera projections. Set contains two Python scripts for creating a new camera based off of a selected source camera at the current Viewer frame. The scripts work based on the current selection in the DAG: 1 'Camera' node (required) and 1 'img' input node (optional).

The 'Camera Project Current Frame' command creates a new 'ProjCamS' node that has baked the values of the selected source camera at the current frame. A 'Project3D' node is created and automatically receives the 'cam' input from the new 'ProjCamS' node. In addition, if a texture input node that the 'Project3D' node accepts (i.e. Read, Roto, Blur, etc) is selected as well as the source camera, the texture input node will be connected as well. This command is a lightweight version for quick camera projection creation and use.

The 'Camera Project Source' command is much like the previous command with some extra options available. Instead of immediately baking the source camera values, the new 'ProjCamM' node expression links back to the source camera in case the source camera is known to be modified or changed. A new tab called 'Frame_Settings' is made available in the 'ProjCamM' node which allows the user to specify an frame to reference from the source camera, allowing quick adjustments after creation. A 'SET CURRENT FRAME' button will set the projection frame to the current Viewer frame along with a 'LOCK/UNLOCK FRAME' button enables/disables the user from updating the projection frame, allowing one to not accidentaly change the projection frame value. Finally, a 'BAKE FRAME' button mimcs the 'ProjCamS' node by breaking the expression links with the source camera and storing the values as keyframe animation, reducing processing time.

Some useful/interesting expressions for the 'projected frame' knob are given here:

Type: frame

Type: frame > # & frame < ## ? frame : 0

Type: frame > # & frame < ## ? frame : frame <= # ? # : ##

...where # and ## are two different frame numbers that specifiy a range: range( #, ## ).

NOTE: There are some limitations in regards to what node types the 'Project3D' node can use as 'img' inputs - in this case (or if no 'img' input node is specified at all), the scripts will still create the 'ProjCam' and 'Project3D' nodes; however the selected 'img' input node will not be connected.

DOWNLOAD (ZIP)

DIRECT LINK (HD) : DW// Tutorial 03: Nuke - Camera Projection (Custom Scripts)

NUKE SCRIPT: Global Directory - Read Setup (Pack)

NUKE SCRIPT: Global Directory - Read Setup (Pack)

Posted by Dave W. - > Nuke 6.3v8 | 08/27/2012

Python script pack including 3 new commands/nodes: GLOBAL_DIRECTORY node, Associate GD-Read Node Selected, and GD-Read Node Setup. Also includes custom 'DW Tools' menu to store these commands and future ones to a menu on the 'Nodes' panel menu in Nuke for easy access.

Used to make relative Read nodes. The GD node contains the root directory used to point to where the Read nodes associated to it are contained. If the script and Read files are moved to another workstation or directory, the user only needs to update the GD node to the new location. GD nodes can be nested manually (associate one GD to another) in order to mimic more complex folder/sub-folder structures within Nuke.

NOTE: Some limitations due to the variability of OS structures may lead to these scripts not working/creating unexpected results. They have been tested in Nuke 6.3v8 running on Windows 7 (64-bit) OS.

DOWNLOAD (ZIP)

DIRECT LINK (HD) : DW// Tutorial 02: Nuke - GD-Read Setup Scripts (Relative Read Nodes)

DIRECT LINK (HD) : DW// Tutorial 01: Nuke - Insall Scripts/Custom Menus

NUKE GIZMO: DW_Offset_v1_0

NUKE GIZMO: DW_Offset_v1_0

Posted by Dave W. - > Nuke 6.3v8 | 08/16/2012

Offsets source using width and height sliders. Created to mimc the Offset tool found in Photoshop. Must provide the input format and width and height offsets which are percentage based (0-1 => 0-100%).

UPDATE: To add this gizmo to your DW_Tools menu toolbar inside of Nuke, include this code in your 'menu.py' file:

dwMenu.addCommand("Transforms/Offset", "nuke.createNode('DW_Offset_v1_0')", "", "dw_Offset_v1_0.png")

DOWNLOAD (ZIP)