Skip to content

Composition caching

Picture

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 loosing 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:

  • 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, the rasterization of sub-comps 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 this section.

Autograph can't predict what kind of distortion you will applied 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 it's 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 and 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