Image rendering method, device, equipment and storage medium

By rendering the image file structure and generating an editable image rendering structure, the problem of the image rendering structure being unable to be edited is solved and the diversity of image rendering effects is improved.

CN113706672BActive Publication Date: 2025-05-09TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010389046.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-05-09
Publication Date
2025-05-09
Estimated Expiration
2040-05-09

AI Technical Summary

Technical Problem

In the prior art, the image rendering structure cannot be edited, resulting in a single image rendering effect.

Method used

By obtaining the image prototype file, decode the image file structure, and rendering each file node, the rendering node, rendering reference information and rendering effect information in the image rendering structure. Then, the image rendering structure is traversed, and each rendering node is drawn using this information to obtain an image frame sequence.

Benefits of technology

It realizes the editability of the image rendering structure and improves the diversity of image rendering effects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113706672B_ABST
    Figure CN113706672B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides an image rendering method, device, equipment and storage medium; the method includes: obtaining an image prototype file, and decoding an image file structure from the image prototype file; rendering each file node in the image file structure to obtain at least one rendering node corresponding to each file node in the image rendering structure, and rendering reference information and rendering effect information corresponding to each rendering node in the at least one rendering node; wherein the rendering reference information is a reference relationship between each rendering node and the file node, and the rendering effect information is modifiable rendering attribute data corresponding to each rendering node; traversing the image rendering structure, using the rendering reference information and the rendering effect information, drawing each rendering node, and obtaining an image frame sequence. Through the embodiment of the present invention, the diversity of image rendering effects can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to animation information processing technology in the computer field, and in particular to an image rendering method, device, equipment and storage medium. Background Art

[0002] Animation is a comprehensive art form that combines many art categories such as painting, film, digital media, photography, music and literature. With the development of information technology, animation applications are becoming more and more important. When implementing animation applications, how to achieve image rendering is the most important part.

[0003] Generally speaking, when performing image rendering, the process usually adopted is: first decode the generated image prototype file to obtain the image file structure, then render the image file structure to obtain the image rendering structure, and finally output the image rendering structure to complete the image rendering. However, in the above-mentioned process of implementing image rendering, the image rendering structure cannot be edited; therefore, when performing image rendering based on the image rendering structure, the image rendering effect is single. Summary of the invention

[0004] Embodiments of the present invention provide an image rendering method, apparatus, device and storage medium, which can improve the diversity of image rendering effects.

[0005] The technical solution of the embodiment of the present invention is achieved as follows:

[0006] An embodiment of the present invention provides an image rendering method, comprising:

[0007] Obtain an image prototype file, and decode an image file structure from the image prototype file; the image prototype file is information corresponding to the image prototype, the image file structure is information to be rendered, and the image file structure includes at least one file node;

[0008] Rendering each file node in the image file structure to obtain at least one rendering node corresponding to each file node in the image rendering structure, and rendering reference information and rendering effect information corresponding to each rendering node in the at least one rendering node;

[0009] The rendering reference information is the reference relationship between each rendering node and the file node, and the rendering effect information is the modifiable rendering attribute data corresponding to each rendering node;

[0010] The image rendering structure is traversed, and each rendering node is rendered using the rendering reference information and the rendering effect information to obtain an image frame sequence.

[0011] An embodiment of the present invention provides an image rendering device, comprising:

[0012] An information acquisition module is used to acquire an image prototype file and decode an image file structure from the image prototype file; the image prototype file is information corresponding to the image prototype, the image file structure is information to be rendered, and the image file structure includes at least one file node;

[0013] A rendering module, used to render each file node in the image file structure, and obtain at least one rendering node corresponding to each file node in the image rendering structure, and rendering reference information and rendering effect information corresponding to each rendering node in the at least one rendering node; wherein the rendering reference information is a reference relationship between each rendering node and the file node, and the rendering effect information is modifiable rendering attribute data corresponding to each rendering node;

[0014] A rendering module is used to traverse the image rendering structure, use the rendering reference information and the rendering effect information to render each rendering node, and obtain an image frame sequence.

[0015] An embodiment of the present invention provides an image rendering device, including:

[0016] A memory for storing executable instructions;

[0017] The processor is used to implement the image rendering method provided by the embodiment of the present invention when executing the executable instructions stored in the memory.

[0018] An embodiment of the present invention provides a computer-readable storage medium storing executable instructions for causing a processor to execute the instructions to implement the image rendering method provided by the embodiment of the present invention.

[0019] The embodiment of the present invention has the following beneficial effects: when rendering the obtained image file structure, the obtained modifiable rendering attribute data are all stored on the rendering nodes of the image rendering structure, and the corresponding relationship between the rendering nodes and the file nodes is one-to-many; therefore, the rendering nodes that reference the same file node are independent of each other, so that each rendering node can be edited independently, so that when drawing and obtaining an image frame sequence based on the image rendering structure, the diversity of image rendering effects can be improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 is an optional architecture diagram of an image rendering system provided by an embodiment of the present invention;

[0021] Figure 2 This embodiment of the present invention provides a Figure 1A schematic diagram of the structure of the terminal 400;

[0022] Figure 3 is an optional flowchart of the image rendering method provided by an embodiment of the present invention;

[0023] Figure 4 is a schematic diagram of an exemplary image file structure and a rendering file structure provided by an embodiment of the present invention;

[0024] Figure 5 is a schematic diagram of another exemplary image file structure and rendering file structure provided by an embodiment of the present invention;

[0025] Figure 6 It is an optional flowchart for implementing layer editing provided by an embodiment of the present invention;

[0026] Figure 7 It is an optional flow chart of implementing structure editing provided by an embodiment of the present invention;

[0027] Figure 8 is an exemplary locked image rendering structure provided by an embodiment of the present invention;

[0028] Fig. 9 is a schematic diagram of an exemplary application of an image rendering method provided by an embodiment of the present invention;

[0029] Fig.10 is a schematic diagram of an exemplary target image rendering structure provided by an embodiment of the present invention;

[0030] Fig.11 is a schematic diagram of another exemplary target image rendering structure provided by an embodiment of the present invention;

[0031] Fig.12 It is a schematic diagram of another exemplary target image rendering structure provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0032] In order to make the purpose, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present invention. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present invention.

[0033] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it can be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0034] In the following description, the terms "first\second\third\fourth" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third\fourth" can be interchanged in a specific order or sequence where permitted, so that the embodiments of the present invention described herein can be implemented in an order other than that illustrated or described herein.

[0035] Unless otherwise defined, all technical and scientific terms used in the embodiments of the present invention have the same meanings as those commonly understood by those skilled in the art of the present invention. The terms used in the embodiments of the present invention are only for the purpose of describing the embodiments of the present invention and are not intended to limit the present invention.

[0036] Before further describing the embodiments of the present invention in detail, the nouns and terms involved in the embodiments of the present invention are described. The nouns and terms involved in the embodiments of the present invention are subject to the following interpretations.

[0037] 1) Graphics and video processing software, which is used to design animation prototypes and export image prototypes to generate image physical files, such as AE (After Effects) software.

[0038] 2) Lottie (animation display tool) animation refers to the animation that is rendered and output by Lottie on the "json" format animation file exported from AE.

[0039] 3) PAG (Portable Animated Graphics) animation refers to animation that is exported from AE in binary format and rendered. Here, the binary format animation physics file is often named with the suffix ".pag" and is often called a PAG animation physics file. In addition, Lottie animation and PAG animation both belong to the image frame sequence of the embodiment of the present invention.

[0040] Generally speaking, in order to perform image rendering, the process usually adopted is: first decode the generated image prototype file (for example, PAG animation physics file) to obtain the image file structure, then render the image file structure to obtain the image rendering structure, and finally output the image rendering structure to complete the image rendering. However, in the above-mentioned process of implementing image rendering, since the rendering attribute data (for example, scaling value and replacement information, etc.) obtained by rendering the image file structure is stored in the node of the image file structure, and the image file structure and the image rendering structure are one-to-one corresponding; when a file node in the image file structure is drawn in multiple places of the image through the corresponding rendering node in the image rendering structure, when the drawing effect of one place is changed by modifying the rendering attribute data, the effects of other drawing places will also change accordingly; therefore, the image rendering structure cannot be edited, and the display effect of the animation information is single.

[0041] It should be noted that the image file structure is a tree structure including container file nodes (Composition) and layer file nodes (Layer), and the container file node includes several layer file nodes; the graph rendering structure is a tree structure of container rendering nodes (PAGComposition) and layer rendering nodes (PAGLayer), and the container rendering node includes several layer rendering nodes; when the image file structure corresponds to the image rendering structure one by one, if the same layer file node is referenced in multiple places of the rendered image frame sequence, it is also the same layer rendering node, that is, the reference of the same layer file node is achieved in multiple places of the image frame sequence by drawing the same layer rendering node; at this time, if one of the layer rendering nodes is edited, then all places that reference the same layer file node will change. Similarly, when a container file node is referenced multiple times and is also the same container rendering node, editing the structure of one of the container rendering nodes will cause editing in all places. In summary, the image rendering structure cannot be edited.

[0042] Based on this, the embodiments of the present invention provide an image rendering method, apparatus, device and storage medium, which can make the image rendering structure editable, and when image rendering is implemented based on the image rendering structure, the diversity of image rendering effects can be improved.

[0043] The following describes an exemplary application of the image rendering device provided by the embodiment of the present invention. The image rendering device provided by the embodiment of the present invention can be implemented as various types of user terminals such as smart phones, tablet computers, and laptop computers, and can also be implemented as a server. The following describes an exemplary application when the image rendering device is implemented as a terminal.

[0044] See also Figure 1 , Figure 1is an optional architecture diagram of an image rendering system provided by an embodiment of the present invention; Figure 1 As shown, to support an image rendering application, in the image rendering system 100, the terminal 400 is connected to the terminal 200 via the network 300. The network 300 may be a wide area network or a local area network, or a combination of the two.

[0045] The terminal 400 is used to obtain an image prototype file from the terminal 200 through the network 300, and decode an image file structure from the image prototype file; the image prototype file is information corresponding to the image prototype, and the image file structure is information to be rendered; each file node in the image file structure is rendered to obtain at least one rendering node corresponding to each file node in the image rendering structure, and rendering reference information and rendering effect information corresponding to each rendering node in the at least one rendering node; wherein the rendering reference information is a reference relationship between each rendering node and the file node, and the rendering effect information is modifiable rendering attribute data corresponding to each rendering node; the image rendering structure is traversed, and each rendering node is drawn using the rendering reference information and the rendering effect information to obtain an image frame sequence.

[0046] The terminal 200 is used to send an image prototype file to the terminal 400 through the network 300, so that the terminal 400 processes the image prototype file to realize image rendering.

[0047] See also Figure 2 , Figure 2 This embodiment of the present invention provides a Figure 1 A schematic diagram of the structure of the terminal 400 in FIG. Figure 2 The terminal 400 shown includes: at least one processor 410, a memory 450, at least one network interface 420 and a user interface 430. The various components in the terminal 400 are coupled together via a bus system 440. It is understood that the bus system 440 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 440 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, the bus system 440 is not shown in FIG. Figure 2 Various buses are labeled as bus system 440 .

[0048] Processor 410 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., where the general-purpose processor can be a microprocessor or any conventional processor, etc.

[0049] The user interface 430 includes one or more output devices 431 that enable presentation of media content, including one or more speakers and / or one or more visual display screens. The user interface 430 also includes one or more input devices 432, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.

[0050] The memory 450 includes a volatile memory or a non-volatile memory, and may also include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), and the volatile memory may be a random access memory (RAM). The memory 450 described in the embodiment of the present invention is intended to include any suitable type of memory. The memory 450 optionally includes one or more storage devices that are physically far away from the processor 410.

[0051] In some embodiments, memory 450 can store data to support various operations, examples of which include programs, modules, and data structures, or a subset or superset thereof, as exemplarily described below.

[0052] Operating system 451, including system programs for processing various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks;

[0053] A network communication module 452, for reaching other computing devices via one or more (wired or wireless) network interfaces 420, exemplary network interfaces 420 include: Bluetooth, Wireless Fidelity (Wi-Fi), and Universal Serial Bus (USB);

[0054] a display module 453 for enabling presentation of information via one or more output devices 431 (e.g., display screens, speakers, etc.) associated with the user interface 430 (e.g., a user interface for operating peripherals and displaying content and information);

[0055] The input processing module 454 is used to detect one or more user inputs or interactions from one of the one or more input devices 432 and translate the detected inputs or interactions.

[0056] In some embodiments, the image rendering device provided by the embodiments of the present invention can be implemented in a software manner. Figure 2An image rendering device 455 stored in a memory 450 is shown, which may be software in the form of a program and a plug-in, etc., including the following software modules: an information acquisition module 4551, a rendering module 4552, a drawing module 4553, an editing module 4554 and a locking module 4555. The functions of each module will be described below.

[0057] In other embodiments, the image rendering device provided by the embodiment of the present invention can be implemented in hardware. As an example, the image rendering device provided by the embodiment of the present invention can be a processor in the form of a hardware decoding processor, which is programmed to execute the image rendering method provided by the embodiment of the present invention. For example, the processor in the form of a hardware decoding processor can adopt one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field programmable gate arrays (FPGAs) or other electronic components.

[0058] The image rendering method provided by the embodiment of the present invention will be described below in conjunction with an exemplary application in which the image rendering device provided by the embodiment of the present invention is implemented as a terminal.

[0059] See also Figure 3 , Figure 3 is an optional flow chart of the image rendering method provided by the embodiment of the present invention, which is combined with Figure 3 The steps shown are explained.

[0060] S101, obtaining an image prototype file, and decoding an image file structure from the image prototype file.

[0061] In an embodiment of the present invention, when the image rendering device obtains the information corresponding to the image prototype, it also obtains the image prototype file, such as the PAG animation physics file; that is, the image prototype file is the information corresponding to the image prototype, and the image prototype refers to the animation information produced by graphics and video processing software, such as the animation effect designed by the designer on AE. Here, the PAG animation physics file is obtained by exporting the animation prototype from AE.

[0062] It should be noted that the image prototype file is not displayable on the image rendering device, so it is necessary to decode the image prototype file to obtain information that is displayable on the image rendering device, that is, the image file structure; in addition, the image file structure is the information to be rendered, that is, the image prototype file can be displayed on the image rendering device only by rendering the image file structure, and the image file structure includes at least one file node. For example, the PAG animation physics file is a binary format information that cannot be displayed on the terminal. Therefore, it is necessary to convert the PAG animation physics file into memory format information through decoding to display it on the terminal.

[0063] S102: Render each file node in the image file structure to obtain at least one rendering node corresponding to each file node in the image rendering structure, and rendering reference information and rendering effect information corresponding to each rendering node in the at least one rendering node.

[0064] In an embodiment of the present invention, after the image rendering device obtains the image file structure, when implementing image rendering based on the image file structure, it is necessary to first calculate the rendering data corresponding to the image file structure (for example, key frame data, paths and static intervals of vector graphics, etc.), that is, to render the image file structure, and the rendering result obtained is the image rendering structure.

[0065] It should be noted that, since the image file structure is composed of at least one file node, when the image rendering device renders the image file structure, it renders each file node (layer file node or container file node) in the image file structure respectively; here, the number of times the file node is referenced during image rendering is the number of times it is rendered, so that each file node can obtain at least one corresponding rendering node (corresponding layer rendering node or corresponding container rendering node) when the rendering is completed; that is, the correspondence between the file node and the rendering node is one-to-many. Moreover, each rendering node of at least one rendering node includes two kinds of information, namely, rendering reference information and rendering effect information, wherein the rendering reference information is the reference relationship between each rendering node and the file node, such as the layer file node referenced by the layer rendering node and the container file node referenced by the container rendering node; the rendering effect information is the modifiable rendering attribute data corresponding to each rendering node, such as the scaling value and the replacement image, etc. At this time, the image file structure and the rendering file structure are not in a one-to-one correspondence, nor are they shared at the file level, but are shared at the node level, realizing the separation of the image file structure and the image rendering structure. Therefore, the image rendering structure is a structure composed of at least one rendering node corresponding to each file node in the image file structure.

[0066] The image file structure corresponds to the rendering file structure one by one, which means that a file node in the image file structure corresponds to a rendering node in the rendering file structure, and when a file node is referenced in multiple places during drawing, they are also the same rendering node. Figure 4 As shown, each file node in the image file structure 4-1 corresponds one-to-one to each rendering node in the rendering file structure 4-2; that is, the container file node 4-11 corresponds to the container rendering node 4-21, the container file node 4-12 corresponds to the container rendering node 4-22, the layer file node 4-13 corresponds to the layer rendering node 4-23, the layer file node 4-14 corresponds to the layer rendering node 4-24, and the layer file node 4-15 corresponds to the layer rendering node 4-25.

[0067] The image file structure and the rendering file structure do not correspond one to one, which means that one file node in the image file structure corresponds to at least one rendering node. Figure 4 When the layer file node 4-14 is referenced three times during image rendering, it corresponds to three independent rendering nodes: 4-241, 4-242, and 4-243, and the rendering nodes 4-241, 4-242, and 4-243 jointly reference the layer file node 4-14, such as Figure 5 shown.

[0068] Here, the image rendering structure is often referred to as at least one rendering tree; illustratively, in a PAG animation, each rendering tree includes at least one rendering structure file (PAGFile), and the root node (PAGStage) of each rendering tree is used to start the drawing process of the rendering tree, which is a container rendering node, and each container rendering node includes multiple layer rendering nodes.

[0069] S103 , traversing the image rendering structure, using the rendering reference information and the rendering effect information, rendering each rendering node, and obtaining an image frame sequence.

[0070] In the embodiment of the present invention, after the image rendering device obtains the image rendering structure, it draws and outputs the image rendering structure, thereby realizing image rendering, and the obtained image rendering result is an image frame sequence (for example, the displayed animation effect).

[0071] It should be noted that the image rendering device traverses and draws each rendering node in the image rendering structure. When the drawing of each rendering node is completed, an image frame sequence is obtained. Here, the image rendering device uses two types of information, namely, rendering reference information and rendering effect information, to draw each rendering node. In addition, the process of obtaining an image frame sequence based on the image rendering structure is a recursive drawing process. Here, because the rendering node includes a container rendering node and a layer rendering node, and the container rendering node includes at least one layer rendering node and / or at least one container rendering node; therefore, when the traversed rendering node is a container rendering node, at least one layer rendering node contained in the container rendering node is drawn, and when the traversed rendering node is a layer rendering node, the layer rendering node is drawn.

[0072] It can be understood that, when rendering the obtained image file structure, the modifiable rendering attribute data obtained are all stored on the rendering node of the image rendering structure, and the corresponding relationship between the rendering node and the file node is one-to-many; therefore, the rendering nodes that reference the same file node are independent of each other, so that each rendering node can be edited independently, so that when drawing and obtaining an image frame sequence based on the image rendering structure, the diversity of image rendering effects can be improved. In addition, image rendering is refined from file-level sharing to node-level sharing.

[0073] Furthermore, in an embodiment of the present invention, after S102 and before S103, S104 and S105 are also included; that is, the image rendering device traverses the image rendering structure, uses the rendering reference information and the rendering effect information, draws each rendering node, and before obtaining the image frame sequence, the image rendering method also includes S104 and S105, and each step is described below.

[0074] S104: Obtain editing information for the image rendering structure.

[0075] In the embodiment of the present invention, after the image rendering device obtains the image rendering structure, in order to improve the diversity of image rendering effects, the image rendering structure can also be edited; when it is determined to edit the image rendering structure, the editing information is received. Here, the editing information is information for editing the image rendering structure.

[0076] S105 . Edit the image rendering structure according to the editing information to obtain a target image rendering structure.

[0077] It should be noted that since the editing information is information for editing the image rendering structure, after the image rendering device obtains the editing information, it can edit the image rendering structure according to the editing information, and the editing result obtained is the target image rendering structure; it is easy to know that the target image rendering structure is the edited image rendering structure.

[0078] Here, the editing information includes layer editing information and / or structure editing information. The layer editing information is information for editing the rendering attribute data corresponding to the rendering node in the image rendering structure, that is, information for editing the corresponding information of the rendering node itself; the structure editing information is information for editing the structure of the image rendering structure.

[0079] Accordingly, in an embodiment of the present invention, S103 can be implemented through S1031; that is, the image rendering device traverses the image rendering structure, uses the rendering reference information and the rendering effect information, draws each rendering node, and obtains an image frame sequence, including S1031. This step is described below.

[0080] S1031, traversing the target image rendering structure, using the target rendering reference information and the target rendering effect information, rendering each target rendering node in the target image rendering structure to obtain an image frame sequence; the target rendering reference information and the target rendering effect information correspond to each target rendering node.

[0081] It should be noted that, in the target image rendering structure obtained by the image rendering device editing the image rendering structure based on the editing information, there is at least one target rendering node corresponding to each file node, and each target rendering node corresponds to two types of information, namely, target rendering reference information and target rendering effect information; the process of traversing the target image rendering structure to obtain an image frame sequence is actually a process of drawing each target rendering node in the target image rendering structure based on the two types of information, namely, target rendering reference information and target rendering effect information.

[0082] Further, see Figure 6 , Figure 6 is an optional flow chart of implementing layer editing provided by an embodiment of the present invention; Figure 6 As shown, in an embodiment of the present invention, when the editing information is layer editing information, S105 can be implemented through S1051-S1053; that is, the image rendering device edits the image rendering structure according to the editing information to obtain the target image rendering structure, including S1051-S1053, and each step is described below.

[0083] S1051. Obtain a target rendering node and rendering effect information to be modified from the layer editing information.

[0084] In the embodiment of the present invention, since the layer editing information is to edit the information corresponding to the rendering node itself, the layer editing information includes the rendering node to be edited, i.e., the target rendering node, and the rendering attribute data to be modified in the rendering node to be edited, i.e., the rendering effect information to be modified, so that the image rendering device can obtain the target rendering node and the rendering effect information to be modified from the layer editing information. It is easy to know that the target rendering node is the rendering node whose rendering attribute data is to be modified in the image rendering structure, and the rendering effect information to be modified is the rendering attribute data to be modified in the target rendering node.

[0085] S1052: Obtain target rendering effect information corresponding to the target rendering node.

[0086] In the embodiment of the present invention, since each rendering node corresponds to rendering effect information, the target rendering node is a rendering node in the image rendering structure, and the corresponding rendering effect information is the target rendering effect information.

[0087] S1053. Modify the target rendering effect information according to the rendering effect information to be modified, thereby completing the editing of the image rendering structure and obtaining the target image rendering structure.

[0088] In an embodiment of the present invention, after the image rendering device obtains the target rendering effect information and the rendering effect information to be modified, the target rendering effect information is modified according to the rendering effect information to be modified, thereby completing the editing of the image rendering structure. The obtained modified image rendering structure is the target image rendering structure.

[0089] It can be understood that since the editing of layers in the image rendering structure is achieved by the image rendering device through modifying the rendering attribute data of the rendering node itself, it has nothing to do with other rendering nodes; therefore, the editing of layers in the image rendering structure is editable; furthermore, when performing image rendering based on the modified image rendering structure, the diversity of image rendering effects can be improved.

[0090] Further, in an embodiment of the present invention, when the editing information is structural editing information, S105 can be implemented through S1054; that is, the image rendering device edits the image rendering structure according to the editing information to obtain the target image rendering structure, including S1054, and this step is described below.

[0091] S1054: Edit the structure of the image rendering structure according to the structure editing information to obtain a target image rendering structure.

[0092] It should be noted that the target image rendering structure here is the image rendering structure after structure editing; and the structure editing performed by the image rendering device on the image rendering structure includes at least one of adding structure, deleting structure and exchanging structure, so that the structure editing information includes at least one of rendering node adding information, rendering node deleting information and rendering node exchanging information. Among them, the rendering node adding information is the information of adding rendering nodes to the image rendering structure, for example, the information of adding a rendering node in the image rendering structure to another rendering node in the image rendering structure, and for example, the information of adding rendering nodes in other rendering structures or other rendering structures to a rendering node in the image rendering structure; the rendering node deleting information is the information of deleting rendering nodes from the image rendering structure; the rendering node exchanging information is the information of exchanging rendering nodes in the image rendering structure, and when the image rendering structure includes at least one rendering tree, the rendering nodes to be exchanged can be in the same rendering tree or in different rendering trees.

[0093] Further, see Figure 7 , Figure 7 FIG. 1 is an optional flow chart of implementing structure editing provided by an embodiment of the present invention; Figure 7 As shown, in an embodiment of the present invention, when the structure editing information includes rendering node addition information, S1054 can be implemented through S10541-S10544; that is, the image rendering device edits the structure of the image rendering structure according to the structure editing information to obtain the target image rendering structure, including S10541-S10544, and each step is described below.

[0094] S10541. Obtain a first target rendering node and a rendering node to be added from rendering node addition information.

[0095] In the embodiment of the present invention, the rendering node adding information includes a rendering node to be added to the image rendering structure, namely, a first target rendering node, and an initial rendering node to be added to the first target rendering node, namely, a rendering node to be added; thus, the image rendering device can obtain the first target rendering node and the rendering node to be added from the rendering node adding information.

[0096] It should be noted that the first target rendering node is a rendering node to be added to the image rendering structure, which may be a container rendering node or a layer rendering node; the rendering node to be added is an initial rendering node to be added to the first target rendering node, wherein the initial rendering node is the rendering node on which the final rendering node to be added is based.

[0097] S10542. Determine the file node to be added according to the reference relationship between the rendering node to be added and the file node.

[0098] It should be noted that the rendering node to be added obtained by the image rendering device is not used to be directly added to the first target rendering node in the image rendering structure, but the referenced file node, i.e. the file node to be added, is determined according to the reference relationship of the file node corresponding to the file node to be added.

[0099] In an embodiment of the present invention, when the rendering node to be added is a container rendering node, reference relationships between the container rendering node and each child rendering node (layer rendering node and / or container rendering node) in the container rendering node and the file node are obtained to obtain the file node to be added; when the rendering node to be added is a layer rendering node, reference relationships between the layer rendering node and the file node are obtained to obtain the file node to be added.

[0100] S10543. Render the file node to be added to obtain a target rendering node to be added.

[0101] In the embodiment of the present invention, the image rendering device calculates rendering data according to the determined file node to be added, thereby obtaining the final rendering node to be added, that is, the target rendering node to be added.

[0102] S10544: Add the target rendering node to be added to the first target rendering node of the image rendering structure, complete the structural editing of the image rendering structure, and thereby obtain the target image rendering structure.

[0103] In the embodiment of the present invention, the target rendering node to be added is added to the image rendering structure as a brother node of the first target rendering node; or, the target rendering node to be added is added to the image rendering structure as a child node of the first target rendering node.

[0104] It should be noted that, after the image rendering device determines the target rendering node to be added and the first target rendering node, the target rendering node to be added is added to the first target rendering node of the image rendering structure, thereby completing the structural editing of the image rendering structure, and the image rendering structure obtained after the structural editing is the target image rendering structure.

[0105] It should also be noted that the first target rendering node and the target rendering node to be added are sibling nodes or parent-child nodes, and when the first target rendering node is a layer rendering node, and the first target rendering node and the target rendering node to be added are parent-child nodes, the type of the first target rendering node after editing is a container rendering node type.

[0106] It can be understood that, since the image rendering structure is separated from the file rendering structure, the structural editing of the first target rendering node will not cause other places that are the same as the file node referenced by the first target rendering node to follow the change; therefore, the structural editing of the first target rendering node is feasible, and thus, the structural addition of the image rendering structure is feasible.

[0107] Further, in an embodiment of the present invention, when the structure editing information includes rendering node deletion information, S1054 can be implemented through S10545 and S10546; that is, the image rendering device edits the structure of the image rendering structure according to the structure editing information to obtain the target image rendering structure, including S10545 and S10546. Each step is described below.

[0108] S10545. Obtain a second target rendering node from the rendering node deletion information.

[0109] In the embodiment of the present invention, the rendering node deletion information includes the rendering node to be deleted in the image rendering structure, that is, the second target rendering node, so that the image rendering device can obtain the second target rendering node from the rendering node deletion information.

[0110] It should be noted that the second target rendering node is a rendering node to be deleted in the image rendering structure, and may be a container rendering node or a layer rendering node.

[0111] S10546: Delete the second target rendering node from the image rendering structure, and complete the structural editing of the image rendering structure, thereby obtaining the target image rendering structure.

[0112] In the embodiment of the present invention, after the image rendering device obtains the second target rendering node, the rendering node to be deleted in the image rendering structure is clarified, and the second target rendering node is deleted from the image rendering structure, thereby completing the structural editing of the image rendering structure; at this time, the image rendering structure obtained after the structural editing is the target image rendering structure.

[0113] It can be understood that, since the image rendering structure is separated from the file rendering structure, editing the structure of the second target rendering node will not cause other places that are the same as the file node referenced by the second target rendering node to change accordingly; therefore, editing the structure of the second target rendering node is feasible, and thus, deleting the structure of the image rendering structure is feasible.

[0114] Further, in an embodiment of the present invention, when the structure editing information includes rendering node exchange information, S1054 can be implemented through S10547 and S10548; that is, the image rendering device edits the structure of the image rendering structure according to the structure editing information to obtain the target image rendering structure, including S10547 and S10548, and each step is described below.

[0115] S10547. Obtain a third target rendering node and a fourth target rendering node from the rendering node exchange information.

[0116] In the embodiment of the present invention, the rendering node exchange information includes the rendering nodes to be exchanged in the image rendering structure, that is, the third target rendering node and the fourth target rendering node, so that the image rendering device can obtain the third target rendering node and the fourth target rendering node from the rendering node interaction information.

[0117] It should be noted that the third target rendering node and the fourth target rendering node are rendering nodes that do not have an inheritance relationship in the image rendering structure. In addition, the third target rendering node can be a container rendering node or a layer rendering node; the fourth target rendering node can be a container rendering node or a layer rendering node. In addition, the third target rendering node and the fourth target rendering node are determined by the rendering area corresponding to the image rendering structure; that is, when the rendering structure is divided into different rendering trees according to the rendering area, the third target rendering node and the fourth target rendering node can come from the same rendering tree or from different rendering trees.

[0118] S10548. In the image rendering structure, exchange the third target rendering node and the fourth target rendering node to complete the structural editing of the image rendering structure, thereby obtaining a target image rendering structure.

[0119] In the embodiment of the present invention, after the image rendering device obtains the third target rendering node and the fourth target rendering node, the rendering node to be exchanged in the image rendering structure is clarified, and the third target rendering node and the fourth target rendering node are exchanged in the image rendering structure, thereby completing the structural editing of the image rendering structure; at this time, the obtained image rendering structure after structural editing is the target image rendering structure.

[0120] It can be understood that, since the image rendering structure is separated from the file rendering structure, the structural editing of the third target rendering node and the fourth target rendering node will not cause other places that are the same as the file nodes referenced by the third target rendering node and the fourth target rendering node to follow the changes; therefore, the structural editing of the third target rendering node and the fourth target rendering node is feasible, and thus, the structural exchange of the image rendering structure is feasible.

[0121] It should be noted that the above-mentioned layer editing, structure addition, structure deletion and structure exchange can be performed separately or in any combination to realize the editing of the image rendering structure, and the embodiment of the present invention does not make specific limitations on this.

[0122] Further, in the embodiment of the present invention, after S102, it also includes S106-S108; that is, after the image rendering device renders each file node in the image file structure, and obtains at least one rendering node corresponding to each file node in the image rendering structure, and rendering reference information and rendering effect information corresponding to each rendering node in the at least one rendering node, the image rendering method also includes S106-S108, and each step is described below.

[0123] S106: Obtain a root rendering node from the image rendering structure.

[0124] In the embodiment of the present invention, there is a rendering node for starting drawing in the image rendering structure, that is, a root rendering node; thus, the image rendering device can obtain the root rendering node from the image rendering structure.

[0125] It should be noted that the root rendering node is a rendering node used to start drawing in the image rendering structure, and is usually a container rendering node.

[0126] S107: Determine edit lock information according to the root rendering node.

[0127] In the embodiment of the present invention, the image rendering device uses the root rendering node to achieve consistency of the editing result of the image rendering structure; here, the image rendering node obtains the lock information of the root rendering node, and thus obtains the editing lock information.

[0128] S108: Add the edit lock information to each rendering node in the image rendering structure, thereby completing the locking of the image rendering structure and obtaining a locked image rendering structure.

[0129] In an embodiment of the present invention, after the image rendering device obtains the editing lock information, each rendering node in the image rendering structure is set to reference the editing lock information, that is, the editing lock information is added to each rendering node in the image rendering structure; at this time, the locking of the image rendering structure is completed, and the locked image rendering structure is obtained.

[0130] Accordingly, in the embodiment of the present invention, S105 can be implemented through S1055 and S1056; that is, the image rendering device edits the image rendering structure according to the editing information to obtain the target image rendering structure, including S1055 and S1056, and each step is described below.

[0131] S1055: When the edit lock information is in the released state, the locked image rendering structure is edited according to the edit information, and the edit lock information is set to the edit state.

[0132] It should be noted that when the rendering nodes under the root rendering node of the image rendering structure are not edited, that is, the editing lock information is in the released state, indicating that the rendering nodes under the root rendering node of the image rendering structure can be edited; therefore, at this time, the image rendering node edits the locked image rendering structure according to the editing information; at the same time, the editing lock information is set to the editing state to ensure that the rendering nodes under the root rendering node of the image rendering structure cannot be edited, to avoid the situation where two child nodes in the same rendering structure (the same rendering tree) are edited at the same time, the order of editing will affect the rendering result of the rendering structure; the consistency of the editing result is ensured.

[0133] S1056: When the editing of the locked image rendering structure is completed, the target image rendering structure is obtained, and the editing lock information is set to a released state.

[0134] In an embodiment of the present invention, when the image rendering device completes editing of the locked image rendering structure, the target image rendering structure is obtained; at this time, the image rendering device will also release the editing lock information, that is, set the editing lock information to a released state, so that the image rendering device can edit the locked image rendering structure again.

[0135] It should be noted that, after editing the locked image rendering structure, if the root rendering node is changed, the locking process needs to be performed again.

[0136] For example, see Figure 8 , Figure 8 is an exemplary locked image rendering structure provided by an embodiment of the present invention; Figure 8 As shown, the image rendering structure corresponds to a rendering tree 8-1, and the rendering tree 8-1 includes 7 rendering nodes: 8-11, 8-12, 8-13, 8-14, 8-15, 8-16 and 8-17, wherein each rendering node includes a lock 8-111 corresponding to the root rendering node 8-11; when editing any rendering node of the rendering tree 8-1, it is necessary to perform the editing when the lock 8-111 is in the released state.

[0137] It is understandable that after obtaining the image rendering structure, the image rendering device also references the lock of the root rendering node for each rendering node in the image rendering structure, thereby avoiding inconsistent results that may be caused by simultaneous editing; the accuracy of editing is achieved through locking.

[0138] Further, in an embodiment of the present invention, the file node in the image file structure includes information related to the original image, and the original image related information refers to the attribute information in the file node used for drawing when the image is rendered; at this time, S103 can be implemented through S1032-S1035; that is, the image rendering device traverses the image rendering structure, uses the rendering reference information and the rendering effect information, draws each rendering node, and obtains an image frame sequence, including S1032-S1035, and each step is explained below.

[0139] S1032: traverse the image rendering structure, use the rendering reference information in each rendering node, and determine the reference file node.

[0140] In the embodiment of the present invention, when the image rendering device obtains an image frame sequence by traversing the image rendering structure for rendering, for each rendering node traversed, the image rendering device obtains the referenced file node from the rendering reference information corresponding to each rendering node, thereby determining the referenced file node.

[0141] S1033. Obtain original image related information corresponding to the reference file node.

[0142] In the embodiment of the present invention, since the file node in the image file structure corresponds to the original image related information, the reference file node obtained by the image rendering device as the file node in the image file structure also corresponds to the original image related information.

[0143] S1034: Use the rendering effect information and the original image related information corresponding to the reference file node to draw the information corresponding to the current frame in each rendering node to obtain the current image frame.

[0144] In the embodiment of the present invention, after the image rendering device obtains the rendering effect information and the original image related information corresponding to the reference file node, it also obtains the data for drawing. The rendering effect information and the original image related information corresponding to the reference file node can be used to draw the information corresponding to the current frame in each rendering node; at this time, the current image frame corresponding to the current frame is obtained. It is easy to know that the current image frame belongs to the image frame sequence.

[0145] S1035 , continue traversing the image rendering structure, and draw the information corresponding to the next frame until the drawing of the information corresponding to each frame is completed, then end the drawing, and obtain an image frame sequence.

[0146] It should be noted that the image rendering device continuously traverses the image rendering structure according to the process of drawing the information corresponding to the current frame, and draws the information corresponding to the next frame. When the drawing of the information corresponding to all frames is completed, the drawing is completed; at this time, the individual image frames obtained by drawing are combined into an image frame sequence.

[0147] Further, in the embodiment of the present invention, S104 can be implemented through S1041 and S1042; that is, the image rendering device obtains the editing information for the image rendering structure, including S1041 and S1042, and each step is described below.

[0148] S1041. Draw an image rendering structure to obtain an initial image frame sequence.

[0149] In the embodiment of the present invention, the image rendering device determines an initial image frame sequence corresponding to the image rendering structure by drawing the image rendering structure, so as to determine the image rendering effect according to the initial image frame sequence.

[0150] S1042: Receive editing information for an image rendering structure for an initial image frame sequence.

[0151] It should be noted that when it is determined according to the initial image frame sequence that the image rendering effect does not meet the preset condition, it is determined to edit the image rendering structure. At this time, the image rendering device also receives the editing information for the image rendering structure.

[0152] The following describes an exemplary application of an embodiment of the present invention in a practical application scenario.

[0153] For example, see Fig. 9 , Fig. 9 is an exemplary application diagram of an image rendering method provided by an embodiment of the present invention; Fig. 9 As shown, first, when the image rendering is a rendering of a PAG animation, when the designer designs an animation prototype through the AE on the terminal 200, the terminal 400 obtains two PAG animation physical files (image prototype files) 9-11 and 9-12 by exporting the animation prototype; these two PAG animation physical files 9-11 and 9-12 are decoded to obtain two corresponding file structures File (image file structure) 9-21 and 9-22. Here, File is a data structure, which is the top-level abstraction of the decoded .pag file at the code level. One .pag file corresponds to one File after decoding; wherein, the layer node Layer (layer file node) refers to the smallest hierarchical unit in the File; the container node Composition (container file node) is a file node including multiple layer nodes Layer in the file structure File.

[0154] Secondly, the two file structures File9-21 and 9-22 are rendered respectively to obtain the corresponding two rendering structures PAGFile (image rendering structure) 9-31 and 9-32. In the rendering process, for the layer node Layer in the file structure File, the original material data in the layer node Layer is calculated to obtain the rendering data (rendering effect information), and the rendering data and the reference relationship to the layer node Layer are used as the layer rendering node PAGLayer corresponding to the layer node Layer; here, when the same layer node Layer is reused multiple times in the file structure File, the corresponding multiple layer rendering nodes PAGLayer are calculated for each use of the layer node Layer. For the container node Composition in the file structure File, the layer node Layer in the container node Composition is rendered, and when the container node Composition also includes a container node Composition, the child nodes of the included container node Composition are rendered to obtain the corresponding container rendering node PAGComposition.

[0155] Then, according to business needs, the rendering structure PAGFile9-31 needs to be edited, that is, Fig.10 The rendering file structure 10-1 shown (wherein 10-1 includes rendering nodes 10-11, 10-12, 10-13, 10-14 and 10-15, and Figure 4 Add one to 10-13 in the table 4-1 Fig.10 10-14 in , but with a scaling value of 0.5, and Fig.10 Add one to 10-15 Fig.10 10-14 in the above example, but when the scaling value is 2, the rendering node is based on the 10-14 referenced by Figure 4 File node 4-14 in the calculation obtains rendering data including a scaling value of 0.5 and PAGLayer10-16 that references 4-14, and calculates rendering data including a scaling value of 0.5 and PAGLayer10-17 that references 4-14, and adds 10-16 to 10-13, and adds 10-17 to 10-15, and obtains the following: Fig.10 Rendering structure 10-2 (target image rendering structure) shown. Or, when it is necessary to Fig.10 When 10-15 is deleted from 10-1 shown in FIG. 10-1, 10-15 is deleted to obtain Fig.11Alternatively, when 10-13 and 5-15 in 10-1 are exchanged according to business requirements, 10-13 and 10-15 are exchanged to obtain the following: Fig.12 Alternatively, when the picture corresponding to 10-15 in 10-1 shown in 10 is replaced with the user's picture according to business needs, the picture effect information (rendering effect information) in 10-15 is obtained, and the picture in the picture effect information is modified to the user's picture.

[0156] Finally, through the above-mentioned modification of 9-31 and combination with 9-32, the target image rendering structure 9-4 is obtained, and the target image rendering structure 9-4 is traversed and drawn to obtain the PAG animation 9-5 (image frame sequence).

[0157] The following is a description of an exemplary structure of an image rendering device 455 provided in an embodiment of the present invention implemented as a software module. In some embodiments, Figure 2 As shown, the software modules stored in the image rendering device 455 of the memory 450 may include:

[0158] The information acquisition module 4551 is used to acquire an image prototype file and decode an image file structure from the image prototype file; the image prototype file is information corresponding to the image prototype, the image file structure is information to be rendered, and the image file structure includes at least one file node;

[0159] The rendering module 4552 is used to render each file node in the image file structure, and obtain at least one rendering node corresponding to each file node in the image rendering structure, and rendering reference information and rendering effect information corresponding to each rendering node in the at least one rendering node; wherein the rendering reference information is a reference relationship between each rendering node and the file node, and the rendering effect information is modifiable rendering attribute data corresponding to each rendering node;

[0160] The rendering module 4553 is used to traverse the image rendering structure, use the rendering reference information and the rendering effect information to render each rendering node, and obtain an image frame sequence.

[0161] Furthermore, the image rendering device 455 further includes an editing module 4554, which is used to edit the image rendering structure according to the editing information to obtain a target image rendering structure;

[0162] Correspondingly, the drawing module 4553 is further used to traverse the target image rendering structure, and use the target rendering reference information and the target rendering effect information to draw each target rendering node in the target image rendering structure to obtain the image frame sequence; the target rendering reference information and the target rendering effect information correspond to each target rendering node.

[0163] Furthermore, the editing information is layer editing information; the layer editing information is information for editing rendering attribute data corresponding to a rendering node in the image rendering structure; the editing module 4554 is further used to obtain a target rendering node and rendering effect information to be modified from the layer editing information; the target rendering node is a rendering node in the image rendering structure whose rendering attribute data is to be modified; obtain target rendering effect information corresponding to the target rendering node; modify the target rendering effect information according to the rendering effect information to be modified, thereby completing the editing of the image rendering structure and obtaining the target image rendering structure.

[0164] Further, the editing information is structure editing information; the structure editing information is information for editing the structure of the image rendering structure;

[0165] The editing module 4554 is further used to edit the structure of the image rendering structure according to the structure editing information to obtain the target image rendering structure; the structure editing information includes at least one of rendering node addition information, rendering node deletion information and rendering node exchange information; wherein the rendering node addition information is information for adding a rendering node to the image rendering structure, the rendering node deletion information is information for deleting a rendering node from the image rendering structure, and the rendering node exchange information is information for exchanging rendering nodes in the image rendering structure.

[0166] Furthermore, when the structure editing information includes the rendering node adding information, the editing module 4554 is further used to obtain a first target rendering node and a to-be-added rendering node from the rendering node adding information; wherein the first target rendering node is a layer rendering node or a container rendering node to be added to the image rendering structure; the to-be-added rendering node is an initial rendering node to be added to the first target rendering node; when the to-be-added rendering node is a container rendering node, the file node reference relationship corresponding to the container rendering node and each sub-rendering node in the container rendering node is obtained to obtain the to-be-added file node; when the to-be-added rendering node is a layer rendering node , obtaining a reference relationship between the layer rendering node and the file node to obtain a file node to be added; rendering the file node to be added to obtain a target rendering node to be added; adding the target rendering node to be added to the first target rendering node of the image rendering structure to complete the structural editing of the image rendering structure, thereby obtaining the target image rendering structure; wherein the first target rendering node and the target rendering node to be added are brother nodes or parent-child nodes, and when the first target rendering node is a layer rendering node, and the first target rendering node and the target rendering node to be added are parent-child nodes, the type of the first target rendering node after editing is a container rendering node type.

[0167] Further, when the structure editing information includes the rendering node deletion information, the editing module 4554 is further used to obtain a second target rendering node from the rendering node deletion information; the second target rendering node is a rendering node to be deleted in the image rendering structure; and the second target rendering node is deleted from the image rendering structure to complete the structure editing of the image rendering structure, thereby obtaining the target image rendering structure.

[0168] Further, when the structure editing information includes the rendering node exchange information, the editing module 4554 is further used to obtain a third target rendering node and a fourth target rendering node from the rendering node exchange information; the third target rendering node and the fourth target rendering node are rendering nodes to be exchanged in the image rendering structure, and the third target rendering node and the fourth target rendering node are determined by the rendering area corresponding to the image rendering structure; in the image rendering structure, the third target rendering node and the fourth target rendering node are exchanged to complete the structure editing of the image rendering structure, thereby obtaining the target image rendering structure.

[0169] Furthermore, the image rendering device 455 also includes a locking module 4555, which is used to obtain a root rendering node from the image rendering structure; the root rendering node is a rendering node in the image rendering structure used to start drawing; determine editing lock information according to the root rendering node; add the editing lock information to each rendering node in the image rendering structure, thereby completing the locking of the image rendering structure and obtaining a locked image rendering structure.

[0170] Correspondingly, the drawing module 4553 is also used to edit the locked image rendering structure according to the editing information when the editing lock information is in the released state, and set the editing lock information to the editing state; when the editing of the locked image rendering structure is completed, the target image rendering structure is obtained, and the editing lock information is set to the released state.

[0171] Furthermore, the file node in the image file structure includes information related to the original image; the drawing module 4553 is also used to traverse the image rendering structure, use the rendering reference information in each rendering node to determine the reference file node; obtain the original image related information corresponding to the reference file node; use the rendering effect information and the original image related information corresponding to the reference file node to draw the information corresponding to the current frame in each rendering node to obtain the current image frame; the current image frame belongs to the image frame sequence; continue to traverse the image rendering structure, draw the information corresponding to the next frame, until the drawing of the information corresponding to each frame is completed, and then end the drawing to obtain the image frame sequence.

[0172] Furthermore, the editing module 4554 is further configured to draw the image rendering structure to obtain an initial image frame sequence; and receive the editing information for the image rendering structure for the initial image frame sequence.

[0173] An embodiment of the present invention provides a computer-readable storage medium storing executable instructions, wherein the executable instructions are stored. When the executable instructions are executed by a processor, the processor will execute the image rendering method provided by the embodiment of the present invention, for example, Figure 3 An image rendering method is shown.

[0174] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface storage, optical disk, or CD-ROM; or it may be various devices including one or any combination of the above memories.

[0175] In some embodiments, executable instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.

[0176] As an example, executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file that stores other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or code portions).

[0177] By way of example, executable instructions may be deployed to be executed on one computing device, or on multiple computing devices located at one site, or on multiple computing devices distributed across multiple sites and interconnected by a communication network.

[0178] In summary, through the embodiments of the present invention, when the obtained image file structure is rendered, the modifiable rendering attribute data obtained are all stored on the rendering nodes of the image rendering structure, and the corresponding relationship between the rendering nodes and the file nodes is one-to-many; therefore, the rendering nodes that reference the same file node are independent of each other, so that each rendering node can be edited independently. In this way, when drawing and obtaining an image frame sequence based on the image rendering structure, the diversity of image rendering effects can be improved.

[0179] The above description is only an embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement and improvement made within the spirit and scope of the present invention are included in the protection scope of the present invention.

Claims

1. An image rendering method, characterized in that: include: Obtaining an image prototype file, and decoding an image file structure from the image prototype file; The image prototype file is information corresponding to the image prototype, the image file structure is information to be rendered, and the image file structure includes at least one file node; Rendering each file node in the image file structure to obtain at least one rendering node corresponding to each file node in the image rendering structure, and rendering reference information and rendering effect information corresponding to each rendering node in the at least one rendering node; The rendering reference information is the reference relationship between each rendering node and the file node, and the rendering effect information is the modifiable rendering attribute data corresponding to each rendering node; The image rendering structure is traversed, and each rendering node is rendered using the rendering reference information and the rendering effect information to obtain an image frame sequence.

2. The method according to claim 1, characterized in that Before traversing the image rendering structure, using the rendering reference information and the rendering effect information to draw each rendering node to obtain an image frame sequence, the method further includes: Acquire editing information for the image rendering structure; the editing information is information for editing the image rendering structure; Editing the image rendering structure according to the editing information to obtain a target image rendering structure; Accordingly, traversing the image rendering structure, using the rendering reference information and the rendering effect information, rendering each rendering node, and obtaining an image frame sequence includes: The target image rendering structure is traversed, and each target rendering node in the target image rendering structure is rendered using the target rendering reference information and the target rendering effect information to obtain the image frame sequence; the target rendering reference information and the target rendering effect information correspond to each target rendering node.

3. The method according to claim 2, characterized in that The editing information is layer editing information; the layer editing information is information for editing rendering attribute data corresponding to a rendering node in the image rendering structure; The step of editing the image rendering structure according to the editing information to obtain a target image rendering structure includes: Acquire a target rendering node and rendering effect information to be modified from the layer editing information; the target rendering node is a rendering node in the image rendering structure whose rendering attribute data is to be modified; Obtain target rendering effect information corresponding to the target rendering node; The target rendering effect information is modified according to the rendering effect information to be modified, thereby completing the editing of the image rendering structure and obtaining the target image rendering structure.

4. The method according to claim 2, characterized in that: The editing information is structure editing information; the structure editing information is information for editing the structure of the image rendering structure; The step of editing the image rendering structure according to the editing information to obtain a target image rendering structure includes: According to the structure editing information, the structure of the image rendering structure is edited to obtain the target image rendering structure; the structure editing information includes at least one of rendering node addition information, rendering node deletion information and rendering node exchange information; The rendering node adding information is information for adding a rendering node to the image rendering structure, the rendering node deleting information is information for deleting a rendering node from the image rendering structure, and the rendering node exchanging information is information for exchanging rendering nodes in the image rendering structure.

5. The method according to claim 4, characterized in that When the structure editing information includes the rendering node addition information, editing the structure of the image rendering structure according to the structure editing information to obtain the target image rendering structure includes: Acquire a first target rendering node and a rendering node to be added from the rendering node addition information; The first target rendering node is a layer rendering node or a container rendering node to which a rendering node is to be added in the image rendering structure; the rendering node to be added is an initial rendering node to be added to the first target rendering node; Determine the file node to be added according to the reference relationship between the rendering node to be added and the file node; Rendering the file node to be added to obtain a target rendering node to be added; Adding the target rendering node to be added to the first target rendering node of the image rendering structure to complete the structural editing of the image rendering structure, thereby obtaining the target image rendering structure; The first target rendering node and the target rendering node to be added are brother nodes or parent-child nodes, and when the first target rendering node is a layer rendering node, and the first target rendering node and the target rendering node to be added are parent-child nodes, the type of the first target rendering node after editing is a container rendering node type.

6. The method according to claim 4, characterized in that When the structure editing information includes the rendering node deletion information, editing the structure of the image rendering structure according to the structure editing information to obtain the target image rendering structure includes: Acquire a second target rendering node from the rendering node deletion information; the second target rendering node is a rendering node to be deleted in the image rendering structure; The second target rendering node is deleted from the image rendering structure to complete the structural editing of the image rendering structure, thereby obtaining the target image rendering structure.

7. The method according to claim 4, characterized in that When the structure editing information includes the rendering node exchange information, editing the structure of the image rendering structure according to the structure editing information to obtain the target image rendering structure includes: Acquire a third target rendering node and a fourth target rendering node from the rendering node exchange information; the third target rendering node and the fourth target rendering node are rendering nodes that do not have an inheritance relationship in the image rendering structure, and the third target rendering node and the fourth target rendering node are determined by a rendering area corresponding to the image rendering structure; In the image rendering structure, the third target rendering node and the fourth target rendering node are exchanged to complete the structural editing of the image rendering structure, thereby obtaining the target image rendering structure.

8. The method according to any one of claims 2 to 7, characterized in that: After rendering each file node in the image file structure to obtain at least one rendering node corresponding to each file node in the image rendering structure, and rendering reference information and rendering effect information corresponding to each rendering node in the at least one rendering node, the method further includes: Obtaining a root rendering node from the image rendering structure; the root rendering node is a rendering node in the image rendering structure used to start drawing; Determining edit lock information according to the root rendering node; Adding the editing lock information to each rendering node in the image rendering structure, thereby completing locking of the image rendering structure and obtaining a locked image rendering structure; Correspondingly, the editing of the image rendering structure according to the editing information to obtain a target image rendering structure includes: When the editing lock information is in a released state, editing the locked image rendering structure according to the editing information, and setting the editing lock information to an editing state; When the editing of the locked image rendering structure is completed, the target image rendering structure is obtained, and the editing lock information is set to the released state.

9. The method according to any one of claims 1 to 7, characterized in that: The file node in the image file structure includes original image related information; The traversing the image rendering structure, using the rendering reference information and the rendering effect information, rendering each rendering node, and obtaining an image frame sequence, includes: Traversing the image rendering structure, using the rendering reference information in each rendering node, and determining a reference file node; Acquire the original image related information corresponding to the reference file node; Using the rendering effect information and the original image related information corresponding to the reference file node, the information corresponding to the current frame in each rendering node is drawn to obtain a current image frame; the current image frame belongs to the image frame sequence; The image rendering structure is continuously traversed to draw information corresponding to the next frame until the drawing of information corresponding to each frame is completed, and then the drawing is terminated to obtain the image frame sequence.

10. The method according to any one of claims 2 to 7, characterized in that: The acquiring the editing information for the image rendering structure includes: Drawing the image rendering structure to obtain an initial image frame sequence; For the initial image frame sequence, the editing information for the image rendering structure is received.

11. An image rendering device, characterized in that: include: An information acquisition module is used to acquire an image prototype file and decode an image file structure from the image prototype file; The image prototype file is information corresponding to the image prototype, the image file structure is information to be rendered, and the image file structure includes at least one file node; A rendering module, used to render each file node in the image file structure, and obtain at least one rendering node corresponding to each file node in the image rendering structure, and rendering reference information and rendering effect information corresponding to each rendering node in the at least one rendering node; wherein the rendering reference information is a reference relationship between each rendering node and the file node, and the rendering effect information is modifiable rendering attribute data corresponding to each rendering node; A rendering module is used to traverse the image rendering structure, use the rendering reference information and the rendering effect information to render each rendering node, and obtain an image frame sequence.

12. An image rendering device, characterized in that: include: A memory for storing executable instructions; A processor, configured to implement the method according to any one of claims 1 to 10 when executing the executable instructions stored in the memory.

13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores executable instructions for causing a processor to execute the instructions to implement the method according to any one of claims 1 to 10.

Citation Information

Patent Citations

  • Scenario rendering and optimizing method, system and mobile terminal based on predict braches

    CN103544727A

  • Conservative partitioning for rendering a computer-generated animation

    CN104508711A