Search

CN-122023615-A - Animation data processing method, device, electronic equipment and readable storage medium

CN122023615ACN 122023615 ACN122023615 ACN 122023615ACN-122023615-A

Abstract

The application discloses an animation data processing method, an animation data processing device, electronic equipment and a readable storage medium, wherein the method comprises the steps of obtaining animation data, traversing the layers to obtain layer data corresponding to the layers and animation transformation data corresponding to a first layer, wherein the first layer is a layer with an animation effect in the layers, the layer data is used for representing the attribute of the layers, the animation transformation data is used for representing the state of the first layer at different time points, and the layer data and the animation transformation data are transformed into an animation description file in a first data format based on a first file transformation strategy, and the first file transformation strategy is any one of a plurality of preset file transformation strategies. The method can convert the animation data into the animation description file without manually writing codes by a developer, thereby improving the man-machine interaction efficiency and the animation re-engraving efficiency.

Inventors

  • KONG JIAHUI
  • ZHANG ZHIMING
  • ZHANG DI
  • YUAN XINYI
  • XIA YAN
  • ZHANG ZIQING
  • Ke Shuran
  • GUO CHENG
  • XU LI

Assignees

  • 网易(杭州)网络有限公司

Dates

Publication Date
20260512
Application Date
20241112

Claims (10)

  1. 1. A method of processing animation data, the method comprising: obtaining animation data, wherein the animation data comprises a plurality of layers, and the layers are used for representing information content contained in the animation data; Traversing the layers to obtain layer data corresponding to each layer and animation transformation data corresponding to a first layer, wherein the first layer is a layer with an animation effect in the layers, the layer data is used for representing the attribute of each layer, and the animation transformation data is used for representing the state of the first layer at different time points; And converting the layer data and the animation transformation data into an animation description file in a first data format based on a first file conversion strategy, wherein the first file conversion strategy is any one of a plurality of preset file conversion strategies.
  2. 2. The method according to claim 1, wherein after the step of traversing the plurality of layers to obtain layer data corresponding to each layer and animation transformation data corresponding to a first layer, the method further comprises: determining frame sequence data corresponding to the first layer based on the animation transformation data, wherein the frame sequence data comprises frame indexes of image frames corresponding to the first layer; The converting the layer data and the animation transformation data into an animation description file in a first data format based on a first file conversion strategy comprises the following steps: And converting the frame sequence data into an animation description file in a first data format based on a first file conversion strategy.
  3. 3. The method according to claim 2, wherein after the step of determining frame sequence data corresponding to the first layer based on the animation transformation data, the method further comprises: determining the display time corresponding to each image frame corresponding to the first image layer based on the frame rate and the display time of the animation effect in the animation data; And replacing the frame index of each image frame corresponding to the first image layer with the display time of each image frame corresponding to the first image layer to obtain the attribute information of the animation effect corresponding to the specific time.
  4. 4. The method of processing animation data according to claim 1, characterized in that the method further comprises: Extracting mask data in the animation data; the mask data is converted into a mask description export file in a first data format based on a first file conversion policy.
  5. 5. The method of processing animation data according to claim 1, characterized in that the method further comprises: Constructing a file structure corresponding to the animation description file based on the hierarchical structure of the layers, wherein the file structure comprises a plurality of file nodes, and one file node corresponds to one layer; Converting sub-picture layer data corresponding to each picture layer and sub-animation transformation data corresponding to each first picture layer into sub-animation description files in a first data format based on the first file conversion strategy; each sub-animation description file is stored in a corresponding file node.
  6. 6. The method of processing animation data according to claim 1, characterized in that the method further comprises: And generating warning information corresponding to the error information according to the error information in the conversion process.
  7. 7. The method of processing animation data according to claim 1, characterized in that the method further comprises: And merging the same source materials according to the same source materials of different layers.
  8. 8. An animation data processing device, characterized in that the device comprises: The system comprises an acquisition module, a storage module and a display module, wherein the acquisition module is used for acquiring animation data, the animation data comprises a plurality of layers, and the layers are used for representing information content contained in the animation data; The traversing module is used for traversing the layers to obtain layer data corresponding to each layer and animation transformation data corresponding to a first layer, wherein the first layer is a layer with an animation effect in the layers, the layer data is used for representing the attribute of each layer, and the animation transformation data is used for representing the state of the first layer at different time points; The conversion module is used for converting the layer data and the animation transformation data into animation description files in a first data format based on a first file conversion strategy, wherein the first file conversion strategy is any one of a plurality of preset file conversion strategies.
  9. 9. An electronic device, comprising: Processor, and A memory for storing an animation data processing program, the electronic device being powered on and executing the program by the processor, to perform the method of any of claims 1-7.
  10. 10. A computer-readable storage medium, in which an animation data processing program is stored, the program being executed by a processor to perform the method of any one of claims 1-7.

Description

Animation data processing method, device, electronic equipment and readable storage medium Technical Field The present application relates to the field of multimedia technologies, and in particular, to a method and apparatus for processing animation data, an electronic device, and a readable storage medium. Background In dynamic web page design and web page animation, dynamic effects are typically created for websites and applications by Adobe AFTER EFFECTS (AE) video special effect production tools. And after the dynamic effect is established, carrying out animation demonstration, and after the animation demonstration is completed, delivering the dynamic effect to a front-end development engineer, wherein the front-end development engineer is used for carrying out repeated engraving in the webpage to realize the animation effect. The dynamic effects after the AE video special effect creation tool is usually in a video format, and cannot be directly used for interactive triggering or advanced feedback effects of dynamic web page design and web page animation. When the animation effect is re-carved in the webpage, a front-end development engineer usually converts the animation effect into web codes, so that the re-carving of the animation effect is realized. When front-end development engineers convert complex animation effects into web code, the front-end developers need to repeatedly view the animation and handwriting the code to achieve the effects. This process is not only time consuming and laborious, but also difficult to ensure the quality of the animation effect. Disclosure of Invention The application provides an animation data processing method, an animation data processing device, electronic equipment and a readable storage medium, which solve the problem of low animation effect reproduction efficiency. In a first aspect, an embodiment of the present application provides an animation data processing method, including: obtaining animation data, wherein the animation data comprises a plurality of layers, and the layers are used for representing information content contained in the animation data; Traversing the layers to obtain layer data corresponding to each layer and animation transformation data corresponding to a first layer, wherein the first layer is a layer with an animation effect in the layers, the layer data is used for representing the attribute of each layer, and the animation transformation data is used for representing the state of the first layer at different time points; And converting the layer data and the animation transformation data into an animation description file in a first data format based on a first file conversion strategy, wherein the first file conversion strategy is any one of a plurality of preset file conversion strategies. In a second aspect, an embodiment of the present application further provides an animation data processing device, including: The system comprises an acquisition module, a storage module and a display module, wherein the acquisition module is used for acquiring animation data, the animation data comprises a plurality of layers, and the layers are used for representing information content contained in the animation data; The traversing module is used for traversing the layers to obtain layer data corresponding to each layer and animation transformation data corresponding to a first layer, wherein the first layer is a layer with an animation effect in the layers, the layer data is used for representing the attribute of each layer, and the animation transformation data is used for representing the state of the first layer at different time points; The conversion module is used for converting the layer data and the animation transformation data into animation description files in a first data format based on a first file conversion strategy, wherein the first file conversion strategy is any one of a plurality of preset file conversion strategies. In a third aspect, an embodiment of the present application further provides an electronic device, including: Processor, and A memory for storing an animation data processing program, the electronic device being powered on and executing the program by the processor, and executing the steps of: obtaining animation data, wherein the animation data comprises a plurality of layers, and the layers are used for representing information content contained in the animation data; Traversing the layers to obtain layer data corresponding to each layer and animation transformation data corresponding to a first layer, wherein the first layer is a layer with an animation effect in the layers, the layer data is used for representing the attribute of each layer, and the animation transformation data is used for representing the state of the first layer at different time points; And converting the layer data and the animation transformation data into an animation description file in a first data format based on a first file