OpenGL-Cache-Lock Node

The OpenGL Cache Lock node can significantly increase the performance of Harmony when working in heavy scenes with many characters, very complex rigs or an otherwise heavy node system.

Without the OpenGL-Cache-Lock node, Harmony must regenerate the OpenGL preview displayed in the Camera view every time an element is changed or manipulated from scratch. This means it has to process every node in the scene's node system all over again. Although the OpenGL preview is optimized for quick real-time rendering, a complex enough node system can make this process slow enough that each action done on the scene causes a delay, ultimately making working on heavy scenes excessively time-consuming.

A typical way to circumvent this is to temporarily disable elements in the scene that are not being worked on. For example, an animator working on a scene with several characters can disable the characters they are not working on at the time, and can also temporarily disable the scene's background and props, so that only the elements they need to manipulate are visible which reduces the load on OpenGL previewing.

The purpose of the OpenGL-Cache-Lock is to obtain virtually the same benefit in performance without having to hide any element in the scene. When connected under a node system, this node creates a cache of the OpenGL preview of the elements it is connected to. Every time a change is made to any element in the scene and the OpenGL preview must be refreshed, the OpenGL-Cache-Lock node checks if the change affects one of the elements it is connected to. If it does not, it will simply output the cached image for the preview, saving Harmony the burden of regenerating the preview for these elements.

Hence, in the previous example, an OpenGL-Cache-Lock node could be connected under the main composite of each character. Harmony would then cache the preview of each character separately, and would only regenerate the preview of a character when one of its parts is manipulated or modified. The animator would not need to disable any characters as Harmony will keep re-using the cached previews of the characters they are not currently working on.

NOTE The OpenGL Cache Lock node only affects the way the OpenGL preview is generated and has no effect on the actual rendered image.

Connection

The OpenGL-Cache-Lock node must be connected under elements or composites that should be cached separately for the OpenGL preview. Typically, this means adding an OpenGL-Cache-Lock node under elements that will be animated individually. In the example below, an OpenGL-Cache-Lock node can be connected under the main composite of each character. But for a scene with very complex character rigs, an OpenGL-Cache-Lock node could also be connected under composites for each limb of the character, for their torso, for their head, etc.

An OpenGL-Cache-Lock node can also be connected between the scene's main composite and its main display. This can help with performance when zooming in, panning and rotating the scene. Harmony will use the cached preview while zooming in, panning or rotating, and will only regenerate the preview half a second after the operation is done.

IMPORTANT

The OpenGL-Cache-Lock node must be used with some caution:

  • If the user begins zooming in, rotating or panning the Camera view, the preview will not regenerate immediately. Rather, it will regenerate half a second after the user releases is done. During that short delay, because the preview cached by the OpenGL-Cache-Lock is a bitmap image and that it does not extend the borders of the Camera view, zoomed-in areas will appear pixelated, and areas that are brought from outside of the Camera view's borders by zooming out or panning will appear blank until the preview is regenerated.
  • It is important not to add too many OpenGL-Cache-Lock nodes, and to only use them for complex node systems. If a scene has too many OpenGL-Cache-Lock nodes and that they are used on node systems that are too simple, the caching overhead as well as the need to composite all the different caches is liable to cause more load on Harmony than it would save.
  • Likewise, whether adding an OpenGL-Cache-Lock node under layout elements such as backgrounds, underlays and overlays will enhance performance depends on how complex they are. For example, a single vector drawing layer might benefit from an OpenGL-Cache-Lock if it has an exceptionally high amount of detail. Otherwise, the performance gain for a few drawing layers is unlikely to surpass the incurred caching overhead. You should use them with discretion with such elements, and test whether they cause a noticeable improvement or decrease in performance.

Properties

Parameter Description
Name The name of the node as it appears in the Node View and the Timeline view. Each node must have a name that is unique to its containing group.
Input Ordering

Determines the way the elements connected to the OpenGL-Cache-Lock node are ordered in the preview:

  • 2D: Elements connected to the node will appear flattened together. Their apparent position on the Z axis relative to other elements in the scene will be the one of the foremost element.
  • 3D: Elements will appear in their appropriate order based on their position on the Z axis relative to other elements in the scene.
NOTE This only affects the way elements are displayed in the OpenGL preview. The OpenGL-Cache-Lock node does not affect the way elements are rendered in the final render.