From RMIT Visual Effects
Jump to: navigation, search

The read node is responsible for bringing movies or still images into the script. When you call it from the menu (or press its shortcut key R) a file browser will appear. This can be a bit confusing for newbies, as it presents folders and files 'unix style', showing all the invisible system files and starting at the top-most level of the computor. You will need to navigate to the 'Users' folder and look for your user identity in the list.

It might be easier to just drag your files onto the Node Graph where they will automatically be assigned a Read node. Image sequences need to be placed inside a folder, and the folder dropped into place. Read-in paths can be tidied up later. See here for how.

However, if you are serious about workflow then sooner or later you will have to learn how to use the file browser, and how to bookmark locations in it.


The read node can change the timing attributes of a movie file or image sequence.

The 'frame range' parameters in the Read node properties.
  • By default the 'frame range' and 'original range' parameter are the same. They reflect the number of frames in the sequence, and the value of the beginning and end frames. Hence the 'frame range' and 'original range' values of an image sequence that begins at frame 200 and ends at 300 will be 200 to 300.
  • In such a case, the sequence can be moved backwards in time by pulling down the drop down menu of the 'frame' parameters, and selecting 'offset'. Inputing -100 into this will shift the sequence back in time by 100 frames.
  • If the beginning or end of the clip needs to be shortened, then the first and last values of the 'frame range' can be changed. One use for this is for making loops. This brings us to the...
  • 'after' and 'before' values. These drop down menus are at either side of the 'frame range' values, and define what happens before the first frame and after the last. The default is 'hold', but by selecting 'loop' or 'bounce', looped animations can be made. An example use of this is to loop the swaing of a tree in a background plate. The value 'black' in these menus denotes transparency in the Nuke world.

There is an example of time edits within the Read node in the Assets page.

Color management

  • Nuke makes all sorts of assumptions about what kind of color space the image is in by simply looking at its filetype. Occasionally it makes the wrong choice, and the values in the colorspace parameters will need to be edited (for example, it assumes that an .exr file is always in linear color space). This excellent video explains it well.
  • Nuke also assumes whether of not the image has been premultiplied. Its guesses are often wrong and the 'premultiplication' box will need ticking or unticking.
The 'color space' parameters in the Read node properties.

Donʼt use absolute file paths

An absolute path is one that specifies the location of the file with respect to the computor e.g. My_Computer/school/lesson_one/asset.JPG. A relative path is one that defines the location relative to a file or a folder.

When reading and writing files, this course expects you to (as much as possible) use paths that are relative to the Nuke file. An absolute path 'breaks' when the project folder is moved to a new computor, and each filepath will then have to be manually repaired. A relative path, on the other hand, is far more durable.

There are two flavours of relative paths: those that look 'downstream' (i.e. into the same folder in which the Nuke file is located, or other folders within it) or 'upstream' (i.e. in the parent folders of the folders in which the Nuke file is located).

Upstream and downstream, defined as relative to the Nuke file.

For downstream, the following relative filepath is recommend. This writes or reads into a folder called 'sources', which is located in the same folder as the Nuke file. The image below illustrates this relationship.

[file dirname [value]]/sources/Asset_Name.JPG.
The destination folder of the downstream relative path.

For upstream, the following relative filepath is recommend. This writes or reads into a folder called 'comp-out', which is located 'upstream' to the Nuke file. The image below illustrates this relationship. To go further upstream, the value end-n needs to be increased.

[join [lrange [split [file dirname [knob]] "/"] 0 end-1] "/"]/comp-out/01_01_qua_v1.jpg
The destination folder of the upstream relative path.

If by chance, you are keeping the footage on a network drive far away from your Nuke script, then the relative path method won't work as there will be a 'breakage' between the Nuke file and the source/write file. Instead of manually changing each node, you can configure a NoOp node so that it is referenced by the Read and Write nodes. The snippet below explains how this is done.

Press 'Expand' and select and copy everything below this line, then paste into the Nuke node graph.

set cut_paste_input [stack 0]
version 9.0 v7
StickyNote {
 inputs 0
 name StickyNote7
 label "<pre><b><-- This Read node refferences the filepath value in the node 'Project_Path' (which is an adapted NoOp node) \n\nInstructions for use: \n\n1)  Paste 'Project_Path' into your script.                   \n\n1)  In all your Read and Write nodes, substitute \\\[value Project_Path.filepath] for everything that preceds the filename.\n\n2)  In 'file path' of 'Project_Path', navigate to your sources folder\n\nAll Read and Write nodes will now call upon 'file path' of 'Project_Path' when looking for the 'sources' folder."
 selected true
 xpos -4012
 ypos 65
push $cut_paste_input
NoOp {
 name Project_Path
 label "\nPlace in this node the file\npath of your project.   "
 note_font "Verdana Bold Bold Bold Bold Bold Bold Bold Bold Bold Bold Bold Bold Bold Bold Bold Bold Bold"
 note_font_size 9
 note_font_color 0xff
 selected true
 xpos -4111
 ypos -92
 addUserKnob {20 User}
 addUserKnob {2 filepath l "file path"}
 filepath /Volumes/Internal_02/School/RMIT_VFX/lessons/lesson_01/01_01_qua/comp/_setup/sources/
 addUserKnob {26 ""}
 addUserKnob {26 directions l Directions: -STARTLINE T "Place here the path of 'top level' folder of your \nproject. If you don't know it drop the folder \ninto the node script and copy it from there \n(it will be in the file parameter of one the \nresulting read nodes)"}
Read {
 inputs 0
 file "\[value Project_Path.filepath]file_name.jpg"
 format "1920 1080 0 0 1920 1080 1 HD_1080"
 origset true
 version 1
 name Read3
 selected true
 xpos -4112
 ypos 55

For a fuller and more comprehensive look at file paths, have a look at this excellent pdf from the excellent Benjamin Seide.

Image sequence

A rendered movie is like a sealed package that forbids us from looking inside of it. For day to day use, this is not a problem, but compositors normally preffer to read-in movies as image sequences. An image sequence is simply a bunch of images, read after each other. QuickTime can export from a movie an image sequence: Export / Movie to Image Sequence. In the options ensure that the FPS is the same as the movie's (QuickTime's Movie Inspector will tell you this value). It is also wise to place a dash after the export file name, especially if the name ends in a number. If this isn't done then the sequence could begin with a value higher than 1. Nuke itself can also render out a file seqeunce with a simple Read followed by a Write.