Precomp

The Precomp node is like a Group node, but its content is stored in an independent .nk file. This allows you to save a subset of the node tree as a separate Nuke script, render the output of this saved script, and read the rendered output back into the main comp as a single image input. Precomp nodes can be useful in at least two ways:

They can be used to reduce portions of the node tree to pre-rendered image inputs. This speeds up render time, as Nuke only has to process the single image input instead of all the nodes that were used to create it. Because the original nodes are saved in a separate .nk script, you also maintain access to them and can adjust them later if necessary.

They enable a collaborative workflow. While one artist works on the main comp, others can work on the sections that have been exported using the Precomp node. These sections can be edited, versioned, and managed independent of the main comp.

You can also create this node by pressing Ctrl/Cmd+Shift+P on the Node Graph.

See also Group.

Inputs and Controls

Control (UI)

Knob (Scripting)

Default Value

Function

Precomp Tab

file

file

N/A

Sets the .nk script to use as the contents of the precomp.

Reload

reload_script

N/A

Click to reload the .nk script specified in the file control.

Open

open

N/A

Click to open the .nk script specified in the file control in a new Nuke session.

Render

render

N/A

Click to render the .nk script specified in the file control and output the results from the Precomp node.

read file for output

reading

disabled

When enabled, the Precomp node reads in the rendered precomp image rather than calculating the output of the precomp script.

When disabled, Nuke calculates the output of the precomp script.

missing frames

on_error

error

Sets the behavior when there is an error opening the output file:

error - display an error message on any missing frames.

black - replace any missing frames with black.

checkerboard - replace any missing frames with a checkerboard image.

read input - display the result of the input tree rather than the rendered file on any missing frames.

Reload

reload_write

N/A

Click to re-read the image from disk.

advanced

output node

output

N/A

Sets the name of the Write node to use instead of the Output node in the precomp.

You can use this control to override what is set as the Output node in the precomp script.

enable

use_output

disabled

When enabled, the Write node specified in the output node control is used instead of the Output node in the precomp.

Step-by-Step Guides

Using the Precomp Node

Video Tutorials