About How Node Caching Works and Its Caveats
Node caching can save a significant amount of time. However, before attempting to use node caching, it is important to understand how it works as well as its caveats.
Enabling Node Caching
Caching can be enabled on individual nodes. It can be enabled on any node that outputs an image. When caching is enabled on a node, its output image is cached, and this cache is only regenerated when needed.
More importantly, caching can be enabled on a Composite node. In this case, the Composite node will not cache its output image. It will cache each of its input images separately.
This exception is meant to simplify the use of node caching. Essentially, all you need to do to create a separate cache for each character rig in a scene is to enable caching on the Composite node to which your character rigs are connected. The Composite node will take care of creating a cache for each of them, and of enabling, disabling and refreshing these caches when needed.
Caching cannot be enabled on nodes that do not output an image, such as Peg, Quadmap, Deformation nodes, Constraint nodes as well as Write and Display nodes. Furthermore, caching cannot be enabled on a group, as a group does not actually output an image, it merely stores nodes and allows cables to go in and out of it. To cache the output image of a group, you can add a Composite node below the group and enable caching on it.
Posing and Animating with Node Caching
Project collaborators who have to work on scenes in which nodes and rigs are cached will need to learn how to temporarily disable caching on a node or rig so that they can edit and manipulate it. The process is fairly simple. For more information, see Working with Node Caching.
Effects on the OpenGL Preview
The most important hing to understand about node caching is that, when a node's output image is cached, what is cached, and what is displayed in the OpenGL preview of the Camera view, is a flat bitmap image. This means that a cached node has a limited display resolution, that all its layers are flattened together and that it does not carry any vector, colour palette or depth information.
In most cases, this will have very little visible effects. There are two exceptions to this: Layers that are offset on the z-axis, and effects that can be previewed in the OpenGL preview of the Camera view. Both exceptions are explained below.
Depth, Z-Ordering and Compositing Order
The first effect that node caching can have on the OpenGL preview occurs when layers in different rigs have been offset on the z-axis. It is common, in cut-out animation, to nudge specific elements of a character rig on the z-axis so as to allow cut-out characters to interact with each other or with objects, and have each element in each respective rig render in the proper order, regardless of the order in which elements are connected in the node system, such as in the following example:
This technique only works in Harmony when using composites in Pass Through or 3D Bitmap mode. These composite modes pass on the data required for composites further down in the node network to composite elements according to their individual position on the z-axis.
However, when the output of a Composite node is cached, its cached output is always a flat bitmap image, with no information about the position of individual elements on the z-axis. Hence, when characters and objects in your scenes are cached separately, the OpenGL preview will display each character as a single flat image. Individual elements that make up their rigs will not display in their specific position on the z-axis.
Effect Preview
Some effects in Harmony are rendered in the OpenGL preview of the Camera view. One of the most commonly used of those effects is the Colour-Override.
The Colour-Override effect works by finding colours and textures by their colour ID in the vector artwork in their input image and processing them as configured. For example, they can replace a colour with another one or with a texture, hide a coulour, or hide all but a specific colour, etc.
If a Colour-Override node is connected under a composite that is cached, since that composite will output a flat bitmap image to the Colour-Override node, the latter will not be able to find colour IDs in this image. The effect of the Colour-Override node will not be visible in the OpenGL preview of the Camera view.
Another example of how node caching affects the preview of effects is with the Apply-Peg-Transformation node. Normally, the Apply-Peg-Transformation node travels up the node network to apply the transformation of its peg to every visual element it comes across. However, if the Apply-Peg-Transformation node reaches a cached node, it will not travel up this node's parents. It will simply take the cached image of the node, and apply its transformation to it. Since a cached image is a bitmap image, if the Apply-Peg-Transformation node is set up to scale-up the image, it may appear pixelated in the OpenGL preview.