Caching and Background Rendering
Depending on the complexity of the images and the number of composing elements (2D layers, 3D scenes, lighting, shadows, etc.), calculation time can vary. Each time Autograph calculates an image, it's stored so that it can be replayed in the fastest way possible in order to comply with the composition’s frame rate. This operation is called Caching.
Autograph uses both RAM and physical storage to keep these images in memory through the concept of "virtual memory", which is managed by the operating system. When you want to play a composition that lasts several minutes, you’re not limited by your computer’s available RAM. Autograph optimizes its cache by only storing the images that really need to be stored.
If the engine can calculate an image faster than the requested frame rate and play a composition in real time, this image won't be saved. In many cases, the storage process could take longer than the calculation itself.
Rendering Indicators
At the very top of the Viewer, next to the Panel Menu icon on the right, represented by three horizontal bars, is the option to switch a Panel to Fullscreen.
A little to the left, we find:
- A green area
- A blue area
- A button to activate Background Rendering
When playback starts, Autograph computes the images and stores them in the cache. This state is represented by the animated green zone.
If an image is in the cache, it's marked in green at the top of the Timeline, forming a long green line as it goes.
|||IMAGE DE LA BARRE
Note
Any modification will invalidate the cache of several images, causing holes to appear in this green line and requiring these images to be recalculated.
Background Rendering
Une deuxième zone bleu se également en haut du Viewer, accompagné d'un bouton désactivé par défaut. Celui-ci permet d'activer le Background Rendering.
When no change is made to the composition for one second, Autograph computes images in the background in the same way as playback does.
In order to focus on the area you're working on, the calculated images will be those around, before and after the Playhead. The green line will therefore run on both sides.
During this calculation, the blue zone becomes animated, indicating that the Background Rendering is in progress.
|||IMAGE DE LA BARRE
Warning
For people working on a laptop battery, Background Rendering can have a major impact on your computer's autonomy. Constantly computing, high power consumption can greatly reduce it. This is why this option is disabled by default.
General Cache
To access the cache settings, click on the gear icon at the top right of the interface to access the software preferences, and go to the Caching section.
The Max General Cache Size is set to 8 GB by default. This value defines the maximum storage space used by the cache, split into several files and subdirectories. You don't have to worry about the file content. The most important thing is to define the cache location and the maximum space it can take up on your storage.
To change this value, just click and drag the slider or enter a new value by clicking on it.
The cache is divided into two groups:
General Cache
The General cache path allows you to define a custom directory in which the cache files will be stored.
Note
Because physical storage is used, it is highly recommended to store the cache on the fastest unit of your computer, like an SSD or NVMe. This will speed up data exchange, both when storing images and reloading them.
Media Conform Cache
Playing an image or a video can require a lot of resources depending on the algorithm used to encode it. For example, videos encoded with h.264, h.265, or AV1 codecs sometimes need to decode dozens of frames to show a specific image. If several layers in a composition use the same video source, it would be a shame not to share the decoding so that it could be reused. For each image Autograph decodes, a second decoding cache is written in a dedicated folder.
The cache will retain the file’s original bit depth. An 8bpc media file will produce a cache of the same type, but will also produce variations of this image, at different resolutions. These variations, called Mipmaps, divide the size of the image by two recursively.
For example, an image sized 512×512 will result in this list of mipmaps:
- 256×256
- 128×128
- 64×64
- 32×32
- 16×16
- 8×8
- 4×4
- 2×2
If the viewer displays a composition at less than 50%, or if a layer reduces its scale below 0.5, or more generally if an image needs to be processed at a smaller size than its original, the mipmaps are used to speed up the reading, to transfer to the GPU, and to reduce the amount of memory used by Autograph.
Once this data is read, color conversion is applied, if the Colorspace correction option of the reader is active, and converted on the go to 32bpc (float). Autograph’s engine works entirely in 32bpc linear and can therefore directly reuse them and send them to the graphics card in this form. This ensures maximum quality without any data loss.
The Max Media Conform Cache Size is set to 8 GB by default. This value defines the maximum storage space used by this cache.
To change this value, just click and drag the slider or enter a new value by clicking it.
The Media Conform Cache Path allows you to define a custom directory where the cache files will be stored.
Composition Caching
A good way to optimize performance:
Autograph always optimizes performance to speed up image calculation and reuses duplicated elements as much as possible; this should not be done at the expense of quality. When using a composition as a layer Source (Sub-comp), you should be able to scale and rotate it or apply extreme distortions without losing any detail, especially if the layers inside of it are procedurally-generated.
That's why Autograph doesn’t cache Sub-composition rendering by default. For a better understanding, take a look at the following example:
- Imagine you create a 256×256 composition with a single animated circle in it, popping up from the void and made with the procedural Circle Generator.
- In another Full HD comp, you instantiate this comp on two layers, using this Source as Sub-comps.
- Now, you decide to set the Scale value of the right layer to 3.0.
By default, Sub-comp rasterization is set to None. As a result, this scaled-up circle, contained in the composition, is not pixelated at all. That's because all transform information has been passed to all of the layers inside, and the rendering of these elements has taken this scale into account.
To know more about Rasterization, please refer to the desicated section.
Autograph can't predict what kind of distortion you will apply to Sub-comps. In this example, caching the result to reuse it should rasterize the comp, but to which definition?
- The original comp size (256×256): the layer on the right will be pixelated/blurry because of its 3X scale.
- The size of the comp multiplied by 3: but what happens if you change the Scale value? The whole cache would be flushed, recomputed, and would take up more and more storage in your cache folder when the scale grows.
Since it is always better to prioritize quality first, it's up to the user to define whether a comp should be cached or not. The cache is turned off by default but you can choose to activate it only for compositions that really need it.
In the previous example, it you decide to scale the right layer to 0.5 instead of 3.0, the layer’s filter will accumulate all pixels on a smaller area and the quality of the result will be great. Reducing the size of a Sub-comp is never an issue because you have less information after scaling; but, when you scale up, you have to ask Autograph for more information.
Caching bit depth:
When caching a comp on your storage, you can choose between three precision levels for the bit depth:
- 8-bit (Gamma Compressed): lighter in terms of storage and fast to read/write
- 16-bit Float: half the precision of the bit depth used for all calculations in Autograph's engine
- 32-bit Float: similar to the bit depth used for all calculations in Autograph's engine
Preview Quantization
Once images are calculated by Autograph, they are stored in a folder defined by the General Cache section. It’s guaranteed that when you play an animation, the display frame rate in the viewer will be identical to the frame rate defined by the composition thanks to the cache which Autograph reads and displays on the fly. The cache can be stored in RAM but also on the disk; so it must be as light as possible, to avoid a bottleneck.
Most screens works in 8bpc. The Cache Previews After Quantization option is active by default, which indicates that the images contained in the cache will be stored with this bit depth. If you have a screen running on 12bpc or more, unchecking this option will produce a 32bpc cache. This is much heavier to read and therefore requires a more responsive device, especially in terms of storage, and it can offer higher accuracy in this type of colorimetric configuration.
Note that this cache is not reused by the render manager, which will produce all of its calculations in 32bpc regardless. Maximum quality will be preserved during the whole process, until final encoding in the bit depth defined by the format and the chosen codec.
Keeping this option enabled will not affect the final quality of your renders. Only the viewer will be affected and in most cases the user will not see any difference if their screen is not specifically designed for high-end color grading tasks. Keeping this option enabled also provides much better performance when reading the cache.