PAG File Optimization
Background
The animation effect in AE can be achieved in various ways, but once exported as a PAG file, the rendering effect in the terminal remains the same across all methods. However, the performance of each way can vastly differ.
The purpose of this article is to provide guidance on designing PAG materials for use in AE and to highlight the design features that result in optimal performance in the end product.
PAGViewer
PAGViewer is a tool that allows you to preview PAG material on your desktop. In addition, it also has a performance panel which provides basic information about the PAG file material and can evaluate its performance.
For the use of the PAGViewer performance panel, please refer to Use Performance Analyzing Panel
Basic Principles of PAG Material Design
vector export
1. Compared to BMP composition export, try to usePAG does offer compatibility for numerous AE features, but it doesn't support all third-party plugin effects and features. However, in case certain effects or features can't be exported directly, PAG enables users to use a BMP composition option. This solution involves taking a screenshot of a particular layer during AE rendering and encoding each frame as either a video sequence frame or a bitmap sequence frame.
Advantages of the BMP Composition:
- All AE features are supported.
Disadvantages of the BMP composition:
- Large export file
- The performance of rendering on the terminal is slightly worse, and using the hardware decoder resources of the terminal consumes more resources
- Secondary editing is not supported
2. Vector File Optimization Strategies
- Implify the layers and their total number by reusing the same layer via composition instead of direct copying.
- Masks and track mattes are relatively time-consuming in the drawing process. Please avoid using masks and track mattes for effects that can be produced with ordinary graphics. Only use them when they are necessary for achieving the desired effect. If possible, try to mask or mat a complex layer using simple graphics or simple content layers, and avoid the reverse operation.
- To keep the content of the layer as static as possible and utilize the Transform tool to adjust position, size, rotation, and scaling. The shape layer is an example of avoiding the use of keyframes.
3. BMP Composition File Optimization Strategies
- Try to reduce the number of BMP composition and combine multiple BMP compositions into one
- If a BMP composition already exists, you can add the adjacent layer that does not need to be edited to it. As screenshots have already been taken, including more content will result in the same performance overhead.
(1) Adjacent multiple different BMP compositions can be merged.
(2) BMP compositions of different BlendMode cannot be merged.
(3) Layer content that does not need to be edited can be merged into similar BMP composition.
(4) Cross-layer BMP composition can be merged.
As shown in the figure below, there are two BMP compositions, which are in different layers
After the BMP compositions are merged across layers, there is only one BMP composition left.
(5) BMP composition reverse use case
As shown in the figure below, two compositions with the same content and name are made.
Correct approach: A composition is referenced twice
(6) BMP composition optimization in overlapping intervals
As shown above, although they are the same content, but there are overlapping time periods. They cannot be made into a composition for reuse, otherwise seek decoding will continue during the overlapping time periods.
Optimization suggestion: merge them into one BMP composition
Satisfy the minimum requirements and reduce the resolution of image materials
Choose a image material with a relatively large resolution and reduce the resolution
Similar to the BMP composition material, the size of the BMP composition should not be larger than the size of the layer where it is located.
Meanwhile, reducing the resolution of BMP composition materials can also improve performance
When exporting PAG material preview, there is a red warning message. You can optimize PAG materials by combining the warning message. Regarding the interpretations, please refer to Use Performance Panel and Auto Detection Rules