You are here: User Guide > Nuke > Organizing Scripts > Using the Precomp Node

Using the Precomp Node

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 .nk script, render the output of this saved script, and read the rendered output back into the main comp as a single image input.

NOTE:  Precomp nodes are unsupported in Nuke Assist. You cannot create a Precomp in Nuke Assist; however, if one already exists in the script, you can view, but not modify its output. To indicate this, Precomp nodes are outlined in red in the Node Graph, and their controls are grayed out. See Flavors of Nuke in the Getting Started Guide for more information.

Precomp nodes can be useful in at least two ways. Firstly, 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.

Secondly, Precomp nodes 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. For example, say you have a comp that involves a complex, multi-layered CG render. A 3D artist can produce this as a separate script that the compositor finishing the shot then reads in using a Precomp node. This way, the 3D artist can modify and re-render the CG element portion of the comp without having to share the main comp with the compositor.

 

Creating Precomp Nodes

Using a Precomp Node to Speed-up Rendering

Precomp Revisions

Collaborative Work Flow Example