PAG官网 | PAG动效

PAG官网 | PAG动效

  • 首页
  • 产品
  • 功能
  • 文档
  • 案例
  • CN
  • GitHub
  • 论坛交流
  • 免费下载
  • Languages iconEN
    • CN

›性能优化

了解 PAG

  • Introduction
  • FAQs

快速开始

  • Install PAGViewer
  • Install PAGExporter
  • Export PAG Files
  • SDK Integration

导出插件

  • Use Configuration Panel
  • Use Exporting Panel
  • Export BMP Compositions
  • Config Fill Modes
  • Config Time Stretch Modes
  • Exporting Shortcut Keys
  • Error Code
  • Auto Detection Rules
  • Text Editing Rules
  • Add Text Background
  • Export Audio
  • Manually Install PAGExporter

预览工具

  • Preview Replacements
  • View File Structure
  • Preview Shortcut Keys
  • Export Image Sequence
  • File Encryption
  • Add Watermark
  • Upgrade to Beta Version

性能优化

  • Use Performance Panel
  • PAG File Optimization

移动端进阶

  • Common API Overview
  • Use PAGImageView
  • Video Replacement
  • Play Audio
  • Text Layer Description
  • Use Encripted File
  • Export To Video
  • SDK Authentication

Web 进阶

  • SDK Installation
  • Load PAG File
  • Play PAG File
  • Platform Capabilities
  • Use WebWorker

API 参考

  • API Document

视频教程

  • PAG Workflow
  • File Optimization Best Practices
  • Use PAGExporter Panel
  • PAG Online Q&A

资源下载

  • PAGViewer Installer
  • PAG Test Files
  • PAG Demo Projects
  • China LiveVideoStackCon2022
  • PAG Conversion Tool
  • PAG File Format Spec

TAVMedia

  • Introduction to TAVMedia
  • TAVMedia Quick access
  • Common API Overview

其他

  • From Lottie To PAG
  • PAG Dictionary

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

1. Compared to BMP composition export, try to usevector export

PAG 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.

BMP Composition Optimization Cases:

(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

4. UI Image Materials Optimization

  • 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

5. Performance Analyzing Panel Warnings

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


← Use Performance PanelCommon API Overview →
  • Background
  • PAGViewer
  • Basic Principles of PAG Material Design
    • 1. Compared to BMP composition export, try to usevector export
    • 2. Vector File Optimization Strategies
    • 3. BMP Composition File Optimization Strategies
    • 4. UI Image Materials Optimization
    • 5. Performance Analyzing Panel Warnings
Address: Tencent Binhai Building, No. 33 Haitian Second Road, Nanshan District, Shenzhen, Guangdong Province, China.
TEL: 0755-86013388
QQ Group: 893379574
Copyright © 2018 - 2025 Tencent. All Rights Reserved.
Privacy Policy
公司地址:广东省深圳市南山区海天二路33号腾讯滨海大厦
联系电话:0755-86013388
QQ群:893379574
Copyright © 2018 - 2025 Tencent. All Rights Reserved.
隐私政策
Copyright © 2018 - 2025 Tencent. All Rights Reserved.
Address: Tencent Binhai Building, No. 33 Haitian Second Road, Nanshan District, Shenzhen, Guangdong Province, China.
TEL: 0755-86013388
QQ Group: 893379574
Privacy Policy
Copyright © 2018 - 2025 Tencent. All Rights Reserved.
公司地址:广东省深圳市南山区海天二路33号腾讯滨海大厦
联系电话:0755-86013388
QQ群:893379574
隐私政策