Animation synthesis method, animation synthesis device, electronic equipment and medium
By splitting animation units into motion effect elements and modifying configuration files according to playback time to generate new resources and layer information, the problems of high complexity and low reusability in animation compositing operations are solved, thus simplifying operations and improving reusability.
Patent Information
- Application Number
- CN202011337695.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-25
- Publication Date
- 2025-02-21
- Estimated Expiration
- 2040-11-25
AI Technical Summary
In existing technologies, animation compositing operations are highly complex and the reuse rate of animation units is low.
By breaking down animation units into finer-grained motion elements, and modifying the external timing parameters in the initial configuration file of each motion element according to its playback time, new resource information and layer information are generated, and the animation is synthesized.
It simplifies the animation compositing process, reduces complexity, and increases the reusability of motion elements.
Smart Images

Figure CN112348928B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present disclosure relate to the field of computer technology, and more specifically, to an animation synthesis method, an animation synthesis device, an electronic device, and a storage medium. Background Art
[0002] With the continuous development of computer technology, network technology and electronic technology, watching animation has become a widely used entertainment method in people's lives. Among them, the animation includes multiple animation units, and each animation unit has a corresponding initial configuration file. In other words, the animation is synthesized by multiple animation units, and the process of synthesizing the animation by multiple animation units is to modify the initial configuration file of each animation unit to obtain a new configuration file, and generate the animation configuration file according to the multiple new configuration files.
[0003] In the process of implementing the concept of the present disclosure, the inventors discovered that there are at least the following problems in the related art: the complexity of implementing animation synthesis operations using the related art is relatively high. Summary of the invention
[0004] In view of this, the embodiments of the present disclosure provide an animation synthesis method, an animation synthesis device, an electronic device and a storage medium.
[0005] One aspect of the present disclosure provides an animation synthesis method, which includes: determining the playback time of each of a plurality of motion effect elements, wherein each of the motion effect elements has a corresponding initial configuration file, and the initial configuration file includes initial external time parameter information, initial resource information, and initial layer information; modifying the initial external time parameter information in the initial configuration file corresponding to each of the motion effect elements according to the playback time of each of the motion effect elements to obtain the modified external time parameter information; generating new resource information and new layer information according to the modified external time parameter information, the initial resource information, and the initial layer information; generating a new configuration file according to the modified external time parameter information, the new resource information, and the new layer information; determining a target configuration file according to a plurality of the new configuration files; and calling the target configuration file to synthesize the animation.
[0006] Another aspect of the disclosed embodiment provides an animation synthesis device, which includes: a first determination module, used to determine the playback time of each of a plurality of motion effect elements, wherein each of the motion effect elements has a corresponding initial configuration file, and the initial configuration file includes initial external time parameter information, initial resource information and initial layer information; a modification module, used to modify the initial external time parameter information in the initial configuration file corresponding to each of the motion effect elements according to the playback time of each of the motion effect elements, so as to obtain the modified external time parameter information; a first generation module, used to generate new resource information and new layer information according to the modified external time parameter information, the initial resource information and the initial layer information; a second generation module, used to generate a new configuration file according to the modified external time parameter information, the new resource information and the new layer information; a second determination module, used to determine a target configuration file according to a plurality of the new configuration files; and a calling module, used to call the target configuration file to synthesize the animation.
[0007] Another aspect of an embodiment of the present disclosure provides an electronic device, which includes: one or more processors; and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method described above.
[0008] Another aspect of an embodiment of the present disclosure provides a computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, enables the processor to implement the method described above.
[0009] Another aspect of an embodiment of the present disclosure provides a computer program product, the computer program product comprising a computer program, and the computer program is used to implement the above-mentioned method when executed by a processor.
[0010] According to the disclosed embodiment of the present invention, by determining the playback time of each of a plurality of motion effect elements, each motion effect element has a corresponding initial configuration file, the initial configuration file includes initial external time parameter information, initial resource information and initial layer information, and according to the playback time of each motion effect element, the initial external time parameter information in the initial configuration file corresponding to each motion effect element is modified to obtain the modified external time parameter information, and new resource information and new layer information are generated according to the modified external time parameter information, initial resource information and initial layer information, and a new configuration file is generated according to the modified external time parameter information, new resource information and new layer information, and a target configuration file is determined according to a plurality of new configuration files, and the target configuration file is called to synthesize an animation. Since the initial external time parameter information in the initial configuration file corresponding to the motion effect element is modified according to the playback time of each motion effect element, and there is no need to recursively modify the time-related information in the initial layer information, the operation of the configuration file for generating the animation is simplified. Since the operation of generating a configuration file for an animation is simplified, and the configuration file for an animation is generated based on the configuration files for generating an animation of multiple motion effect elements, the complexity of the animation synthesis operation is reduced, thereby at least partially overcoming the technical problem of high complexity of the animation synthesis operation using related technologies. At the same time, since the correlation between different motion effect elements is small, a higher reuse rate of motion effect elements is achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] The above and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:
[0012] Figure 1 The schematic diagram schematically shows a schematic diagram of time parameter information according to an embodiment of the present disclosure;
[0013] Figure 2 An exemplary system architecture to which the animation synthesis method according to an embodiment of the present disclosure can be applied is schematically shown;
[0014] Figure 3 A flowchart of an animation synthesis method according to an embodiment of the present disclosure is schematically shown;
[0015] Figure 4 A schematic diagram schematically shows a list of dynamic effect elements according to an embodiment of the present disclosure;
[0016] Figure 5 A schematic diagram schematically shows a playback time setting according to an embodiment of the present disclosure;
[0017] Figure 6A flowchart schematically shows another method for processing a configuration file of a dynamic effect element according to an embodiment of the present disclosure;
[0018] Figure 7 A block diagram schematically shows an animation synthesis device according to an embodiment of the present disclosure;
[0019] Figure 8 A block diagram of an electronic device suitable for implementing an animation synthesis method according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0020] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.
[0021] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise", "include", etc. used herein indicate the existence of the features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.
[0022] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification, and should not be interpreted in an idealized or overly rigid manner.
[0023] In the case of using expressions such as "at least one of A, B, and C, etc.", it should generally be interpreted in accordance with the meaning of the expression generally understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.). In the case of using expressions such as "at least one of A, B, or C, etc.", it should generally be interpreted in accordance with the meaning of the expression generally understood by those skilled in the art (for example, "a system having at least one of A, B, or C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).
[0024] In order to better understand the technical solutions of the embodiments of the present disclosure, the basic concepts involved in the embodiments of the present disclosure are first explained.
[0025] The timeline is used to organize and control the changes and actions of animations. The main components of the timeline include layers and frames. The timeline is used to identify the number of animation frames and the position of each frame. Each scale in the timeline represents a frame, and the number on it represents the sequence number of the frame.
[0026] The layers in animation are like a stack of transparent papers, each with a different picture on it, and stacking these papers together forms a more complex picture. If you add content to a certain position in the previous layer, the content at the same position in the next layer will be blocked. If there is no content at a certain position in the previous layer, the content at the same position in the next layer will not be blocked, and the content at the same position in the next layer can be seen at that position in the previous layer. Each layer in animation is independent of each other.
[0027] Layer information (layers) may include information of one or more layers. Layer information may include information of multiple layers. Layer information may include resource reference identifier, built-in time parameter information, built-in size information, and layer transformation attribute information. Built-in time parameter information may include start keyframe (ip), end keyframe (op), and start time (st). Built-in size information may include built-in width information and built-in height information. Layer transformation attribute information may include anchor point attribute information, position attribute information, transparency attribute information, transformation rotation attribute information, and scaling attribute information.
[0028] Resource information (assets) can provide vector graphics resources for a layer. Resource information can include at least one resource item, and each resource item can be represented by a resource item identifier. The resource reference identifier in the layer information has a corresponding resource item identifier.
[0029] The configuration file can be called when playing the animation. The configuration file can include resource information, layer information, external time parameter information, external size parameter information, font information and other information. Among them, other information can be understood as information that does not affect the animation synthesis, such as name information. Each animation unit has a corresponding configuration file. The configuration file can be in the form of a JSON (JavaScript Object Notation, JS object notation) file. JSON is a lightweight data exchange format.
[0030] According to an embodiment of the present disclosure, external time parameter information is used to characterize the total time parameter information of a synthesis unit on the time axis. Built-in time parameter information is used to characterize the time parameter information of each layer on the time axis. Each synthesis unit has at least one corresponding layer. In the related art, a synthesis unit is an animation unit. If the time parameter information is divided into levels, it can be considered that the external time parameter information is the highest level of time parameter information, and the built-in time parameter information is the lower level of time parameter information.
[0031] Figure 1 The schematic diagram schematically shows a schematic diagram of time parameter information according to an embodiment of the present disclosure. Figure 1 As shown, the animation unit has two corresponding layers, namely layer 1 and layer 2. The built-in time parameter information corresponding to layer 1 is built-in time parameter information 1, and the built-in time parameter information corresponding to layer 2 is built-in time parameter information 2. The external time parameter information corresponding to the animation unit consists of built-in time parameter information 1 and built-in time parameter information 2.
[0032] For example, Figure 1 Some information of the corresponding animation unit configuration file is as follows:
[0033]
[0034]
[0035] The part above "assets" represents the external time parameter information. The time parameter information in "layers" is the built-in time parameter information, including the built-in time parameter information of the two layers. It can be seen from the above configuration files that the level of the external time parameter information is higher than that of the built-in time parameter information.
[0036] In the related art, an animation configuration file is generated based on configuration files of multiple animation units, and the animation configuration file is called to realize synthetic animation. For the sake of convenience, the configuration file before modification is called the initial configuration file, and the modified configuration file is called the new configuration file. The information fields included in the initial configuration file and the new configuration file are the same. Accordingly, the initial configuration file may include initial external time parameter information, initial external size parameter information, initial resource information, initial layer information, initial font information and other information. The initial layer information may include initial built-in time parameter information, initial built-in size parameter information and initial layer transformation attribute information, etc.
[0037] For the configuration file of the animation unit used to generate the animation, the relevant technology is to modify the initial external time parameter information and the initial built-in time parameter information in the initial layer information of each layer by recursive traversal according to the set playback time of the animation unit, so as to obtain a new configuration file of the animation unit, and the new configuration file of the animation unit is used as the configuration file for generating the animation. It should be noted that the layer information in the new configuration file of the animation unit is not the reconstructed layer information, but is obtained by modifying the initial built-in time parameter information in the initial layer information. The initial resource information in the initial configuration file of the animation unit is not modified, that is, the resource information in the new configuration file of the animation unit is the initial resource information in the initial configuration file.
[0038] In the process of realizing the concept of the present disclosure, the inventor discovered that since the related technology uses a recursive traversal method to modify the initial external time parameter information and the initial built-in time parameter information in the initial layer information of each layer, and each animation unit includes multiple layers, and each layer may also have nested layers, the layer depth is deep, and the above modification method requires more fields to be modified. Therefore, the operation of the configuration file for generating the animation using the related technology is more cumbersome. Since the animation configuration file is generated based on the configuration files for generating the animation of multiple motion effect elements, the complexity of the animation synthesis operation is relatively high. In addition, when synthesizing the animation based on multiple animation units, due to the large correlation between the multiple animation units, the reuse rate of the animation units is not high.
[0039] In order to solve the above problems, the inventors found that since animation can be understood as a combination of text animation, decorative animation and background animation, the animation unit is the basis of the animation, and the animation unit is also a combination of text animation, decorative animation and background animation. Therefore, the animation can be split into a finer granularity than the animation unit, or it can be understood as splitting the animation unit according to the level. When the animation synthesis is performed based on the finer granularity split result, since the correlation between different finer granularity split results is small, a higher reuse rate can be achieved. This can solve the problem of low reuse rate of animation units in related technologies. In the embodiment of the present disclosure, the result of the finer granularity split of the animation compared to the animation unit is called a motion effect element, that is, the motion effect element can be a text animation, a decorative motion effect or a background motion effect. The animation unit can include multiple motion effect elements. Similarly, each motion effect element has a corresponding initial configuration file, and the initial configuration file may include initial external time parameter information, initial external size parameter information, initial resource information, initial layer information, initial font information and other information. The initial layer information may include initial built-in time parameter information, initial built-in size parameter information, initial layer transformation property information, and the like.
[0040] The embodiments of the present disclosure provide an animation synthesis method, device, and electronic device to which the method can be applied. The method generates an animation configuration file based on configuration files of multiple motion effect elements. For the configuration files of motion effect elements used to generate animations, it is proposed to modify the initial external time parameter information in the initial configuration file of the motion effect element according to the playback time of each motion effect element, while the initial layer information (i.e., the initial built-in time parameter information) in the initial configuration file does not need to be modified. On this basis, based on the modified initial external time parameter information, initial resource information, and initial layer information, new resource information and new layer information are obtained, and based on the modified external time parameter information, new resource information, and new layer information, a new configuration file is obtained, and a target configuration file is determined based on multiple new configuration files, and the target configuration file is called to synthesize the animation. This will be explained below in conjunction with specific embodiments.
[0041] Figure 2 The exemplary system architecture 200 to which the animation synthesis method according to the embodiment of the present disclosure can be applied is schematically shown. It should be noted that: Figure 2 What is shown is merely an example of a system architecture to which the embodiments of the present disclosure can be applied, in order to help those skilled in the art understand the technical content of the present disclosure, but it does not mean that the embodiments of the present disclosure cannot be used in other devices, systems, environments or scenarios.
[0042] like Figure 2 As shown, the system architecture 200 according to this embodiment may include terminal devices 201, 202, 203, a network 204 and a server 205. The network 204 is used to provide a medium for communication links between the terminal devices 201, 202, 203 and the server 205. The network 204 may include various connection types, such as wired and / or wireless communication links, etc.
[0043] The user can use the terminal devices 201, 202, 203 to interact with the server 205 through the network 204 to receive or send messages, etc. Various communication client applications can be installed on the terminal devices 201, 202, 203, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients and / or social platform software, etc. (only as examples).
[0044] The terminal devices 201 , 202 , and 203 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.
[0045] The server 205 may be a server that provides various services, such as a background management server (only an example) that provides support for websites browsed by users using the terminal devices 201, 202, and 203. The background management server may analyze and process the received data such as user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device.
[0046] It should be noted that the animation synthesis method provided in the embodiment of the present disclosure can generally be executed by the terminal device 101, 102, or 103, or can also be executed by other terminal devices different from the terminal devices 101, 102, or 103. Correspondingly, the animation synthesis device provided in the embodiment of the present disclosure can also be set in the terminal device 101, 102, or 103, or can be set in other terminal devices different from the terminal devices 101, 102, or 103.
[0047] It should be understood that Figure 2 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0048] Figure 3 The flowchart of an animation synthesis method according to an embodiment of the present disclosure is schematically shown.
[0049] like Figure 3 As shown, the method includes operations S310 to S360.
[0050] In operation S310, the play time of each of the plurality of motion effect elements is determined, wherein each motion effect element has a corresponding initial configuration file, and the initial configuration file includes initial external time parameter information, initial resource information, and initial layer information.
[0051] In an embodiment of the present disclosure, multiple motion effect elements can be obtained from the motion effect element list, and a corresponding play time can be determined for each motion effect element. The play time of each motion effect element can be used as a basis for determining the sequence of the motion effect elements. The play time refers to the time interval between the first frame and the current frame.
[0052] The initial configuration file may include initial external time parameter information, initial resource information, and initial layer information. Since each motion effect element may have one or at least two layers, the initial layer information may include initial layer information of each layer.
[0053] Figure 4 The following schematically shows a list of dynamic effect elements according to an embodiment of the present disclosure. Figure 4As shown, three motion effect elements are selected from the motion effect element list, namely motion effect element A, motion effect element B and motion effect element C.
[0054] Figure 5 A schematic diagram of a playback time setting according to an embodiment of the present disclosure is shown schematically. Figure 5 As shown, on the time axis, Figure 4 The selected motion element A, motion element B and motion element C are respectively set with corresponding playback time.
[0055] In operation S320, initial external time parameter information in an initial configuration file corresponding to each motion effect element is modified according to the play time of each motion effect element to obtain modified external time parameter information.
[0056] In the embodiment of the present disclosure, after the playback time of each motion effect element is obtained, the initial external time parameter information in the initial configuration file corresponding to the motion effect element can be modified according to the playback time of each motion effect element, that is, the start key frame, end key frame and start time in the initial external time parameter information are modified. The initial built-in time parameter information in the initial layer information of the initial configuration file remains unchanged, that is, there is no need to recursively modify the initial built-in time parameter information in the initial layer information.
[0057] For example, part of the initial configuration file of the animation element A is as follows:
[0058]
[0059]
[0060] The initial external time parameter information in the initial configuration file corresponding to the motion effect element A is modified, and part of the information of the modified configuration file is as follows:
[0061]
[0062]
[0063] Comparing the initial configuration file and the modified configuration file of the motion effect element A, we can see that the difference between the two is that the "op" of the external time parameter information in the modified configuration file (i.e. the modified external time parameter information) is 190, while the "op" of the initial external time parameter information is 150, and the other parts are the same. That is, the initial external time parameter information is modified according to the playback time of the motion effect element, while the initial built-in time parameter information is not modified.
[0064] In operation S330, new resource information and new layer information are generated according to the modified external time parameter information, the initial resource information, and the initial layer information.
[0065] In an embodiment of the present disclosure, after obtaining the modified external time parameter information, new resource information and a new layer may be constructed.
[0066] According to an embodiment of the present disclosure, the initial configuration file may further include initial external size parameter information. After obtaining the modified external time parameter information, the initial resource information may be modified according to the initial layer information to obtain new resource information. New layer information may be obtained according to the modified external time parameter information and at least one initial external size parameter information to achieve the construction of a new layer. The new layer information may include new built-in time parameter information, new built-in size parameter information, and new layer transformation attribute information. The new layer transformation attribute information may be determined by a preset layer transformation attribute rule and at least one initial external size parameter information. The preset layer transformation attribute rule is used as the basis for the new layer transformation attribute information. The new built-in time parameter information is the modified external time parameter information. The new built-in size parameter information is the initial external size parameter information.
[0067] In operation S340, a new configuration file is generated according to the modified external time parameter information, the new resource information, and the new layer information.
[0068] In the embodiment of the present disclosure, after obtaining the new resource information, new layer information and modified external time parameter information corresponding to each motion effect element, a new configuration file corresponding to each motion effect element can be generated according to the above information and the initial configuration file. The resource information, layer information and external time parameter information included in the new configuration file are respectively the new resource information, the new layer information and the modified external time parameter information, and the other information in the new configuration file except the above information is consistent with the corresponding information in the initial configuration file.
[0069] In operation S350, a target profile is determined based on the plurality of new profiles.
[0070] In an embodiment of the present disclosure, after obtaining a new configuration file of each animation element, the new configuration files of multiple animation elements can be synthesized into a target configuration file, and the target configuration file can be called when synthesizing animation. According to an embodiment of the present disclosure, the configuration file can be a JSON file.
[0071] In operation S360, the target configuration file is called to synthesize the animation.
[0072] In an embodiment of the present disclosure, the target configuration file may be a JSON file. The target configuration file corresponds to an animation synthesized by multiple motion effect elements. In addition, Lottie may be used to call the target configuration file to play an animation synthesized by multiple motion effect elements. The effect of the animation synthesis may be viewed by playing. Among them, Lottie is a library that supports Android, iOS, and ReactNative and uses JSON files to implement animation effects.
[0073] According to the technical solution of the embodiment of the present disclosure, by determining the playback time of each of a plurality of motion effect elements, each motion effect element has a corresponding initial configuration file, the initial configuration file includes initial external time parameter information, initial resource information and initial layer information, and according to the playback time of each motion effect element, the initial external time parameter information in the initial configuration file corresponding to each motion effect element is modified to obtain the modified external time parameter information, and new resource information and new layer information are generated according to the modified external time parameter information, initial resource information and initial layer information, and a new configuration file is generated according to the modified external time parameter information, new resource information and new layer information, and a target configuration file is determined according to a plurality of new configuration files, and the target configuration file is called to synthesize an animation. Since the initial external time parameter information in the initial configuration file corresponding to the motion effect element is modified according to the playback time of each motion effect element, and there is no need to recursively modify the time-related information in the initial layer information, the operation of the configuration file for generating the animation is simplified. Since the operation of generating a configuration file for an animation is simplified, and the configuration file for an animation is generated based on the configuration files for generating an animation of multiple motion effect elements, the complexity of the animation synthesis operation is reduced, thereby at least partially overcoming the technical problem of high complexity of the animation synthesis operation using related technologies. At the same time, since the correlation between different motion effect elements is small, a higher reuse rate of motion effect elements is achieved.
[0074] Optionally, based on the above technical solution, the initial configuration file also includes initial external size parameter information and initial font information. Generating a new configuration file according to the modified external time parameter information, new resource information and new layer information may include the following operations.
[0075] A new configuration file is generated according to the modified external time parameter information, the new resource information, the new layer information, the initial external size parameter information and the initial font information.
[0076] In the embodiment of the present disclosure, the font information in the new configuration file corresponding to each motion effect element is the initial font information.
[0077] Optionally, based on the above technical solution, generating new resource information and new layer information according to the modified external time parameter information, initial resource information and initial layer information may include the following operations.
[0078] The initial resource information is modified according to the initial layer information to obtain new resource information. The new layer information is obtained according to the modified external time parameter information and at least one initial external size parameter information.
[0079] In an embodiment of the present disclosure, the initial resource information may include at least one initial resource item. For each dynamic effect element, the initial layer information of the dynamic effect element may be set as a new resource item in the initial resource information, that is, the initial resource information may be added to the initial resource information as a new resource item to obtain new resource information. Among them, each resource item may be represented by a resource item identifier (id). Accordingly, a new resource item may be represented by a new resource item identifier, and resource item identifiers of different new resource items are different. It should be noted that since the initial layer information may include information of multiple layers, therefore, adding the initial resource information as a new resource item to the initial resource information as described here is to add the information of multiple layers as a new resource item to the initial resource information. Correspondingly, for each dynamic effect element, the information of multiple layers corresponds to the same new resource item, that is, the information of multiple layers corresponds to the same new resource item identifier.
[0080] According to an embodiment of the present disclosure, since the layer information may include built-in time parameter information, built-in size parameter information and layer transformation property information, in order to construct a new layer, it is necessary to determine the above information for the new layer. For each motion effect element, the new built-in time parameter information may be determined based on the modified external time parameter information of the motion effect element, and the new built-in size parameter information may be determined based on the initial external size parameter information of the motion effect element. The new layer transformation property information is determined based on the initial size parameter information of multiple motion effect elements. According to an embodiment of the present disclosure, the new layer information may also include a new resource reference identifier (refId), and the new resource reference identifier may be used as an identifier for referencing a resource item.
[0081] According to the embodiments of the present disclosure, since resource information can provide resources for a layer, that is, when playing an animation, the layer needs to call the corresponding resource item in the resource information to implement it, and the resource item has a corresponding resource item identifier. Therefore, in order to enable the layer to accurately call the corresponding resource item in the corresponding resource information, it is necessary to set the resource reference identifier in the layer information according to the resource item identifier in the resource information, so that the resource item identifier corresponding to the resource item in the resource information that the layer needs to call is consistent with the resource reference identifier in the layer information. On this basis, a new resource reference identifier is set according to the new resource item identifier, so that the new resource reference identifier has a corresponding new resource item identifier, and different new resource reference identifiers have different new resource item identifiers.
[0082] For example, the initial resource information and initial layer information in the initial configuration file of the motion effect element A are as follows, wherein the initial layer information includes information of two layers, and the resource reference identifiers corresponding to the two layers are "refId"="comp_0" and "refId"="comp_1" respectively.
[0083]
[0084]
[0085] The new resource information of the animation element A is as follows:
[0086]
[0087]
[0088] Comparing the initial resource information of the animation element A with the new resource information of the animation element, it can be seen that based on the initial resource information, the new resource information adds a resource item, and the resource item identifier of the added resource item is "id" = "custom_comp_0", which corresponds to the initial layer information, that is, the layer information corresponding to the resource reference identifier "refId" = "comp_0" in the initial layer information, and the resource reference identifier "refId" = "comp_1". The corresponding layer information all corresponds to the resource item whose resource item identifier is "id" = "custom_comp_0".
[0089] According to the embodiment of the present disclosure, the initial resource information is modified according to the initial layer information to obtain new resource information, and the new layer information is obtained according to the modified external time parameter information and at least one initial external size parameter information, so that the new layer information is constructed from the layer level. In the related art, the initial layer information is modified instead of reconstructing the new layer information.
[0090] Optionally, based on the above technical solution, obtaining new layer information according to the modified external time parameter information and at least one initial external size parameter information may include the following operations.
[0091] Determine target time parameter information according to the modified external time parameter information. Determine target layer transformation attribute information according to preset layer transformation attribute rules and at least one initial external size parameter information. Obtain new layer information according to the target time parameter information and the target layer transformation attribute information.
[0092] In an embodiment of the present disclosure, in order to construct a new layer for each dynamic effect element, it is necessary to determine the built-in time parameter information, the built-in size parameter information and the layer transformation attribute information, wherein the modified external time parameter information corresponding to the dynamic effect element can be used as the new built-in time parameter information, and the new built-in time parameter information is referred to as the target time parameter information. The initial external size parameter information corresponding to the dynamic effect element can be used as the new built-in size parameter information, and the new built-in size parameter information is referred to as the target size parameter information. The layer transformation attribute rules can be set in advance to obtain the preset layer transformation attribute rules, and the initial external time parameter information of multiple dynamic effect elements can be processed according to the preset layer transformation attribute rules to determine the new layer transformation attribute information, and the new layer transformation attribute information is referred to as the target layer transformation attribute information.
[0093] Optionally, based on the above technical solution, the target layer transformation attribute information includes target positioning point attribute information and target position attribute information. According to the preset layer transformation attribute rule and at least one initial external size parameter information, determining the target layer transformation attribute information may include the following operations.
[0094] According to the initial external size parameter information, the first center position information is determined. The first center position information is determined as the target positioning point attribute information. According to the multiple initial external size parameter information, the second center position information is determined, wherein the second center position information is the center position information of the animation synthesized by the multiple dynamic effect elements. The second center position information is determined as the target position attribute information.
[0095] In an embodiment of the present disclosure, the initial external size parameter information may include initial external width information and initial external height information. The target layer transformation attribute information may include target positioning point attribute information and target position attribute information, wherein the target positioning point attribute information may refer to the position information corresponding to the center position of the dynamic effect element, that is, the center position information of the dynamic effect element, and the center position information of the dynamic effect element may be referred to as the first center position information.
[0096] According to an embodiment of the present disclosure, the target position attribute information may refer to the position where the motion effect element appears in the animation, wherein the animation is synthesized by a plurality of motion effect elements. According to an embodiment of the present disclosure, the position information corresponding to the center position of the animation, i.e., the center position information of the animation, is referred to as the second center position information, and the second center position information is determined as the target position attribute information. The reason for setting the target position attribute information as the second center position information (i.e., the center position information of the animation) is that: since the initial external size parameter information of different motion effect elements may be different, the animation is synthesized by a plurality of motion effect elements, and when playing the animation, it is necessary to ensure that each motion effect element appears in the display screen, which requires selecting a universal position, which can ensure that each motion effect element appears in the display screen, and the center position of the animation is the position that satisfies the above conditions, therefore, the center position information of the animation (i.e., the second center position information) is determined as the target position attribute information.
[0097] According to an embodiment of the present disclosure, the first center position information (i.e., target location point attribute information) includes first width information and first height information, wherein the first width information is half of the initial external width information of the motion effect element, and the first height information is half of the initial external height information. The second center position information (i.e., target position attribute information) includes second width information and second height information, wherein the second width information is half of the largest initial external width information among all initial external width information, and the second height information is half of the largest initial external height information among all initial external height information.
[0098] According to an embodiment of the present disclosure, the target layer transformation attribute information may further include target transparency attribute information, target transformation rotation attribute information and target scaling attribute information, and the above information may be set according to default conditions.
[0099] Exemplarily, the new layer information of the dynamic element A is as follows, wherein o represents the target transparency attribute information, r represents the target transformation rotation attribute information, s represents the target scaling attribute information, a represents the target positioning point attribute information, p represents the target position attribute information, w represents the new built-in width information (ie, the initial external width information), h represents the new built-in height information (ie, the initial external height information), and refId represents the new resource reference identifier.
[0100]
[0101]
[0102] According to an embodiment of the present disclosure, the new resource reference identifier included in the new layer information of the motion effect element A is consistent with the new resource item identifier included in the new resource information of the motion effect element A described above, wherein the new resource reference identifier is refId=custom_comp_0, and the new resource item identifier is id=custom_comp_0. When the motion effect element A is played, the new resource item identifier that is consistent with the new resource reference identifier is determined according to the new resource reference identifier of the motion effect element A.
[0103] Optionally, based on the above technical solution, determining the target configuration file according to multiple new configuration files may include the following operations.
[0104] Determine target external size parameter information based on initial external size parameter information in multiple new configuration files. Determine target external time parameter information based on modified external time parameter information in multiple new configuration files. Determine target resource information based on new resource information in multiple new configuration files. Determine target layer information based on new layer information in multiple new configuration files. Determine target font information based on initial font information in multiple new configuration files. Determine target configuration file based on target external size parameter information, target external time parameter information, target resource information, and target font information.
[0105] In an embodiment of the present disclosure, for each motion effect element, the external size parameter information in the new configuration file of the motion effect element is the initial external size parameter information of the motion effect element, and the external time parameter information in the new configuration file of the motion effect element is the modified external time parameter information of the motion effect element.
[0106] Determining the target resource information based on the new resource information in the multiple new configuration files may include: merging the new resource information of the multiple dynamic effect elements into the first array. Determining the target layer information based on the new layer information in the multiple new configuration files may include: merging the new layer information of the multiple dynamic effect elements into the second array. It should be noted that if a layer is a background layer, the new layer information of the layer needs to be set at the end of the second array.
[0107] Determining the target font information according to the initial font information in the multiple new configuration files may include: merging the initial font information in the multiple animation elements into a third array. Since the configuration file may include other information that does not affect the animation synthesis, such as name information, in addition to the external time parameter information, external size parameter information, resource information, layer information and font information, the configuration file may also include other information that does not affect the animation synthesis, such as name information. Therefore, in the process of synthesizing the target configuration file, the default principle may be adopted for other information.
[0108] Optionally, based on the above technical solution, the initial external size parameter information in each new configuration file includes initial external width information and initial external height information. Determining target external size parameter information according to the initial external size parameter information in multiple new configuration files may include the following operations.
[0109] Determine the maximum width information from the initial external width information in the multiple new configuration files. Determine the maximum height information from the initial external height information in the multiple new configuration files. Determine the target external size parameter information according to the maximum width information and the maximum height information.
[0110] In an embodiment of the present disclosure, the target external size parameter information may be target external width information and target external height information, wherein the target external width information may be the maximum width information among all initial external width information, and the target external height information may be the maximum height information among all initial external height information.
[0111] According to an embodiment of the present disclosure, the second width information is half of the target external width information, and the second height information is half of the target external height information.
[0112] Optionally, based on the above technical solution, the modified external time parameter information in each new configuration file includes a start key frame and an end key frame. Determining the target external time parameter information according to the modified external time parameter information in multiple new configuration files may include the following operations.
[0113] A minimum start keyframe is determined from the start keyframes in the multiple new configuration files. A maximum end keyframe is determined from the end keyframes in the multiple new configuration files. Target external time parameter information is determined based on the minimum start keyframe and the maximum end keyframe.
[0114] In an embodiment of the present disclosure, the target external time parameter information may include a target external start keyframe and a target external end keyframe. The target external start keyframe may be the minimum start keyframe of all start keyframes, and the target end keyframe may be the maximum end keyframe of all end keyframes. Usually, the target external start keyframe is 0, and the target external end keyframe is the end keyframe of the last motion effect element.
[0115] Optionally, based on the above technical solution, the new resource information includes at least one new resource item identifier, and each new layer information includes a new resource reference identifier. The new resource reference identifier has a corresponding new resource item identifier, and different new resource reference identifiers correspond to different new resource item identifiers.
[0116] In the embodiments of the present disclosure, different new resource item identifiers are different, and different new resource reference identifiers correspond to different new resource item identifiers. The reason for the above setting is that since resource information can provide resources for a layer, in order to enable the layer to accurately call the corresponding resource item in the corresponding resource information, it is necessary to make the resource item identifier corresponding to the resource item in the resource information that the layer needs to call consistent with the resource reference identifier in the layer information. On this basis, a new resource reference identifier is set according to the new resource item identifier, so that the new resource reference identifier has a corresponding new resource item identifier, and different new resource reference identifiers have different new resource item identifiers.
[0117] Figure 6 A flowchart of another method for processing a configuration file of a dynamic effect element according to an embodiment of the present disclosure is schematically shown.
[0118] like Figure 6 As shown, the method includes operations S601 to S621.
[0119] In operation S601 , a play time of each of a plurality of motion effect elements is determined.
[0120] In an embodiment of the present disclosure, each motion effect element has a corresponding initial configuration file, and the initial configuration file includes initial external time parameter information, initial resource information, initial layer information, initial external size parameter information and initial font information.
[0121] In operation S602, initial external time parameter information in an initial configuration file corresponding to each motion effect element is modified according to the play time of each motion effect element to obtain modified external time parameter information.
[0122] In operation S603, the initial resource information is modified according to the initial layer information to obtain new resource information.
[0123] In an embodiment of the present disclosure, the new resource information includes at least one new resource item identifier.
[0124] In operation S604, target time parameter information is determined according to the modified external time parameter information.
[0125] In operation S605, first center position information is determined according to the initial external size parameter information;
[0126] In operation S606, the first center position information is determined as the target positioning point attribute information.
[0127] In operation S607, second center position information is determined according to the plurality of initial external size parameter information.
[0128] In an embodiment of the present disclosure, the second center position information is the center position information of an animation synthesized by a plurality of motion effect elements.
[0129] In operation S608, the second center position information is determined as the target position attribute information.
[0130] In operation S609, new layer information is obtained according to the target time parameter information, the target positioning point attribute information and the target position attribute information.
[0131] In the embodiment of the present disclosure, each new layer information includes a new resource reference identifier. The new resource reference identifier has a corresponding new resource item identifier, and different new resource reference identifiers correspond to different new resource item identifiers.
[0132] In operation S610, a new configuration file is generated according to the modified external time parameter information, the new resource information, the new layer information, the initial external size parameter information, and the initial font information.
[0133] In operation S611, maximum width information is determined from initial external width information in a plurality of new configuration files.
[0134] In operation S612, maximum height information is determined from the initial external height information in the plurality of new configuration files.
[0135] In operation S613, target external size parameter information is determined according to the maximum width information and the maximum height information.
[0136] In operation S614, a minimum start key frame is determined from among the start key frames in the plurality of new configuration files.
[0137] In operation S615, a maximum end key frame is determined from among the end key frames in the plurality of new profiles.
[0138] In operation S616, target external time parameter information is determined according to the minimum start key frame and the maximum end key frame.
[0139] In operation S617, target resource information is determined according to new resource information in the plurality of new configuration files.
[0140] In operation S618, target layer information is determined according to new layer information in the plurality of new configuration files.
[0141] In operation S619, target font information is determined according to the initial font information in the plurality of new configuration files.
[0142] In operation S620, a target configuration file is determined according to the target external size parameter information, the target external time parameter information, the target resource information, and the target font information.
[0143] In an embodiment of the present disclosure, the target configuration file is used to be called when playing an animation composed of multiple motion effect elements.
[0144] In operation S621, a target configuration file is called to synthesize an animation.
[0145] According to the technical solution of the embodiment of the present disclosure, since the initial external time parameter information in the initial configuration file corresponding to the animation element is modified according to the playback time of each animation element, without recursively modifying the time-related information in the initial layer information, the operation of the configuration file for generating the animation is simplified, and thus, at least partially overcomes the technical problem that the operation of the configuration file for generating the animation using the related technology is cumbersome. The above realizes the synthesis of animation from the time level. At the same time, since the correlation between different animation elements is small, a higher reuse rate of animation elements is achieved. The initial layer information is used as a new resource item in the initial resource information to generate new resource information, and the new layer information is generated according to the modified external time parameter information, the preset layer transformation attribute rule and at least one initial external size parameter information, so as to realize the synthesis of animation from the layer level. On this basis, since the operation of the configuration file for generating the animation is simplified, and the animation configuration file is generated based on the configuration files for generating the animation of multiple animation elements, therefore, at least partially overcomes the technical problem of the high complexity of the animation synthesis operation using the related technology, and reduces the complexity of the animation synthesis operation.
[0146] Figure 7 The block diagram schematically shows a device for synthesizing animation according to an embodiment of the present disclosure.
[0147] like Figure 7 As shown, the animation synthesis device 700 may include a first determination module 710 , a modification module 720 , a first generation module 730 , and a second generation module 740 .
[0148] The first determination module 710 , the modification module 720 , the first generation module 730 , and the second generation module 740 are in communication connection.
[0149] The first determination module 710 is used to determine the playback time of each of the multiple animation elements, wherein each animation element has a corresponding initial configuration file, and the initial configuration file includes initial external time parameter information, initial resource information and initial layer information.
[0150] The modification module 720 is used to modify the initial external time parameter information in the initial configuration file corresponding to each motion effect element according to the playback time of each motion effect element, and obtain the modified external time parameter information.
[0151] The first generating module 730 is used to generate new resource information and new layer information according to the modified external time parameter information, initial resource information and initial layer information.
[0152] The second generating module 740 is used to generate a new configuration file according to the modified external time parameter information, new resource information and new layer information.
[0153] The second determining module 750 is configured to determine a target configuration file according to a plurality of new configuration files.
[0154] The calling module 760 is used to call the target configuration file to synthesize the animation.
[0155] According to the technical solution of the embodiment of the present disclosure, by determining the playback time of each of a plurality of motion effect elements, each motion effect element has a corresponding initial configuration file, the initial configuration file includes initial external time parameter information, initial resource information and initial layer information, and according to the playback time of each motion effect element, the initial external time parameter information in the initial configuration file corresponding to each motion effect element is modified to obtain the modified external time parameter information, and new resource information and new layer information are generated according to the modified external time parameter information, initial resource information and initial layer information, and a new configuration file is generated according to the modified external time parameter information, new resource information and new layer information, and a target configuration file is determined according to a plurality of new configuration files, and the target configuration file is called to synthesize an animation. Since the initial external time parameter information in the initial configuration file corresponding to the motion effect element is modified according to the playback time of each motion effect element, and there is no need to recursively modify the time-related information in the initial layer information, the operation of the configuration file for generating the animation is simplified. Since the operation of generating a configuration file for an animation is simplified, and the configuration file for an animation is generated based on the configuration files for generating an animation of multiple motion effect elements, the complexity of the animation synthesis operation is reduced, thereby at least partially overcoming the technical problem of high complexity of the animation synthesis operation using related technologies. At the same time, since the correlation between different motion effect elements is small, a higher reuse rate of motion effect elements is achieved.
[0156] Optionally, based on the above technical solution, the initial configuration file also includes initial external size parameter information and initial font information.
[0157] The second generating module 740 may include a generating submodule.
[0158] The generation submodule is used to generate a new configuration file according to the modified external time parameter information, new resource information, new layer information, initial external size parameter information and initial font information.
[0159] Optionally, based on the above technical solution, the first generating module 730 may include a first obtaining submodule and a second obtaining submodule.
[0160] The first acquisition submodule is used to modify the initial resource information according to the initial layer information to obtain new resource information.
[0161] The second obtaining submodule is used to obtain new layer information according to the modified external time parameter information and at least one initial external size parameter information.
[0162] Optionally, based on the above technical solution, the second obtaining submodule may include a first determining unit, a second determining unit and an obtaining unit.
[0163] The first determining unit is used to determine the target time parameter information according to the modified external time parameter information.
[0164] The second determining unit is used to determine the target layer transformation attribute information according to a preset layer transformation attribute rule and at least one initial external size parameter information.
[0165] The obtaining unit is used to obtain new layer information according to target time parameter information and target layer transformation attribute information.
[0166] Optionally, based on the above technical solution, the target layer transformation attribute information includes target positioning point attribute information and target position attribute information.
[0167] The second determining unit may include a first determining subunit, a second determining subunit, a third determining subunit, and a fourth determining subunit.
[0168] The first determining subunit is used to determine the first center position information according to the initial external size parameter information.
[0169] The second determining subunit is used to determine the first center position information as the target positioning point attribute information.
[0170] The third determination subunit is used to determine the second center position information according to the multiple initial external size parameter information, wherein the second center position information is the center position information of the animation synthesized by the multiple motion effect elements.
[0171] The fourth determining subunit is used to determine the second center position information as the target position attribute information.
[0172] Optionally, based on the above technical solution, the second determination module may include a first determination submodule, a second determination submodule, a third determination submodule, a fourth determination submodule, a fifth determination submodule and a sixth determination submodule.
[0173] The first determination submodule is used to determine target external size parameter information according to initial external size parameter information in a plurality of new configuration files.
[0174] The second determination submodule is used to determine the target external time parameter information according to the modified external time parameter information in the multiple new configuration files.
[0175] The third determination submodule is used to determine the target resource information according to the new resource information in the multiple new configuration files.
[0176] The fourth determination submodule is used to determine the target layer information according to the new layer information in the multiple new configuration files.
[0177] The fifth determination submodule is used to determine the target font information according to the initial font information in the multiple new configuration files.
[0178] The sixth determination submodule is used to determine the target configuration file according to the target external size parameter information, the target external time parameter information, the target resource information and the target font information.
[0179] Optionally, based on the above technical solution, the initial external size parameter information in each new configuration file includes initial external width information and initial external height information.
[0180] The first determining submodule may include a third determining unit, a fourth determining unit, and a fifth determining unit.
[0181] The third determining unit is used to determine the maximum width information from the initial external width information in the multiple new configuration files.
[0182] The fourth determining unit is used to determine the maximum height information from the initial external height information in the multiple new configuration files.
[0183] The fifth determining unit is used to determine the target external size parameter information according to the maximum width information and the maximum height information.
[0184] Optionally, based on the above technical solution, the modified external time parameter information in each new configuration file includes a start key frame and an end key frame.
[0185] The second determining submodule may include a sixth determining unit, a seventh determining unit, and an eighth determining unit.
[0186] The sixth determining unit is configured to determine a minimum starting key frame from the starting key frames in the multiple new configuration files.
[0187] The seventh determining unit is used to determine the maximum end key frame from the end key frames in the multiple new configuration files.
[0188] The eighth determining unit is used to determine the target external time parameter information according to the minimum start key frame and the maximum end key frame.
[0189] Optionally, based on the above technical solution, the new resource information includes at least one new resource item identifier, and each new layer information includes a new resource reference identifier. The new resource reference identifier has a corresponding new resource item identifier, and different new resource reference identifiers correspond to different new resource item identifiers.
[0190] According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits, or at least part of the functions of any one of them can be implemented in one module. According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits can be split into multiple modules for implementation. According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits can be at least partially implemented as hardware circuits, such as field programmable gate arrays (Field Programmable Gate Array, FPGA), programmable logic arrays (Programmable Logic Arrays, PLA), systems on chips, systems on substrates, systems on packages, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), or can be implemented by hardware or firmware of any other reasonable way of integrating or packaging the circuit, or by any one of the three implementation methods of software, hardware, and firmware or by a suitable combination of any of them. Alternatively, according to the embodiments of the present invention, one or more of the modules, submodules, units, and subunits can be at least partially implemented as computer program modules, and when the computer program modules are run, the corresponding functions can be performed.
[0191] For example, any of the first determination module 710, the modification module 720, the first generation module 730, the second generation module 740, the second determination module 750, and the calling module 760 communication connection can be combined in one module / unit / sub-unit for implementation, or any of the modules / units / sub-units can be split into multiple modules / units / sub-units. Alternatively, at least part of the functions of one or more of these modules / units / sub-units can be combined with at least part of the functions of other modules / units / sub-units and implemented in one module / unit / sub-unit. According to an embodiment of the present disclosure, at least one of the first determination module 710, the modification module 720, the first generation module 730, the second generation module 740, the second determination module 750 and the call module 760 communication connection can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application-specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or in any one of the three implementation methods of software, hardware and firmware or in any appropriate combination of any of them. Alternatively, at least one of the first determination module 710, the modification module 720, the first generation module 730, the second generation module 740, the second determination module 750 and the call module 760 communication connection can be at least partially implemented as a computer program module, and when the computer program module is run, the corresponding function can be executed.
[0192] It should be noted that the animation synthesis device part in the embodiment of the present disclosure corresponds to the animation synthesis method part in the embodiment of the present disclosure. The description of the animation synthesis device part specifically refers to the animation synthesis method part, which will not be repeated here.
[0193] Figure 8 A block diagram of an electronic device suitable for implementing the method described above according to an embodiment of the present disclosure is schematically shown. Figure 8 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0194] like Figure 8As shown, the electronic device 800 according to the embodiment of the present disclosure includes a processor 801, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 802 or the program loaded from the storage part 808 to the random access memory (RAM) 803. The processor 801 may include, for example, a general-purpose microprocessor (such as a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (for example, an application-specific integrated circuit (ASIC)), etc. The processor 801 may also include an onboard memory for caching purposes. The processor 801 may include a single processing unit or multiple processing units for performing different actions of the method flow according to the embodiment of the present disclosure.
[0195] In RAM 803, various programs and data required for the operation of electronic device 800 are stored. Processor 801, ROM 802 and RAM 803 are connected to each other via bus 804. Processor 801 performs various operations of the method flow according to the embodiment of the present disclosure by executing the program in ROM 802 and / or RAM 803. It should be noted that the program can also be stored in one or more memories other than ROM 802 and RAM 803. Processor 801 can also perform various operations of the method flow according to the embodiment of the present disclosure by executing the program stored in the one or more memories.
[0196] According to an embodiment of the present disclosure, the electronic device 800 may further include an input / output (I / O) interface 805, which is also connected to the bus 804. The electronic device 800 may further include one or more of the following components connected to the I / O interface 805: an input portion 806 including a keyboard, a mouse, etc.; an output portion 807 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage portion 808 including a hard disk, etc.; and a communication portion 809 including a network interface card such as a LAN card, a modem, etc. The communication portion 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the I / O interface 805 as needed. A removable medium 811, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 810 as needed, so that a computer program read therefrom is installed into the storage portion 808 as needed.
[0197] According to an embodiment of the present disclosure, the method flow according to an embodiment of the present disclosure can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable storage medium, and the computer program contains a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 809, and / or installed from the removable medium 811. When the computer program is executed by the processor 801, the above-mentioned functions defined in the system of the embodiment of the present disclosure are executed. According to an embodiment of the present disclosure, the system, equipment, device, module, unit, etc. described above can be implemented by a computer program module.
[0198] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present disclosure is implemented.
[0199] According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium. For example, it may include, but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM (Erasable Programmable Read Only Memory) or flash memory), a portable compact disk read-only memory (Computer Disc Read-Only Memory, CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, apparatus, or device.
[0200] For example, according to an embodiment of the present disclosure, the computer-readable storage medium may include the ROM 802 and / or the RAM 803 described above and / or one or more memories other than the ROM 802 and the RAM 803 .
[0201] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram may represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box may also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions. It can be understood by those skilled in the art that the features recorded in the various embodiments and / or claims of the present disclosure can be combined and / or combined in a variety of ways, even if such a combination or combination is not explicitly recorded in the present disclosure. In particular, without departing from the spirit and teaching of the present disclosure, the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways. All of these combinations and / or combinations fall within the scope of the present disclosure.
[0202] The embodiments of the present disclosure are described above. However, these embodiments are only for illustrative purposes and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the various embodiments cannot be used in combination to advantage. The scope of the present disclosure is defined by the attached claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art may make a variety of substitutions and modifications, which should all fall within the scope of the present disclosure.
Claims
1. An animation synthesis method, comprising: Determine the playback time of each of the plurality of motion effect elements, wherein each of the motion effect elements has a corresponding initial configuration file, and the initial configuration file includes initial external time parameter information, initial external size parameter information, initial resource information, and initial layer information; According to the playback time of each of the motion effect elements, modify the initial external time parameter information in the initial configuration file corresponding to each of the motion effect elements to obtain the modified external time parameter information; Modify the initial resource information according to the initial layer information to obtain new resource information; Obtaining new layer information according to the modified external time parameter information and at least one of the initial external size parameter information; Generate a new configuration file according to the modified external time parameter information, the new resource information and the new layer information; Determine a target configuration file according to the plurality of new configuration files; and The target configuration file is called to synthesize the animation.
2. The method according to claim 1, wherein: The initial configuration file also includes initial font information; The generating a new configuration file according to the modified external time parameter information, the new resource information and the new layer information comprises: The new configuration file is generated according to the modified external time parameter information, the new resource information, the new layer information, the initial external size parameter information and the initial font information.
3. The method according to claim 1, wherein: The obtaining of new layer information according to the modified external time parameter information and at least one of the initial external size parameter information comprises: Determine the target time parameter information according to the modified external time parameter information; Determining target layer transformation attribute information according to a preset layer transformation attribute rule and at least one of the initial external size parameter information; and The new layer information is obtained according to the target time parameter information and the target layer transformation attribute information.
4. The method according to claim 3, wherein: The target layer transformation attribute information includes target positioning point attribute information and target position attribute information; The step of determining target layer transformation attribute information according to a preset layer transformation attribute rule and at least one of the initial external size parameter information includes: Determining first center position information according to the initial external size parameter information; Determine the first center position information as the target positioning point attribute information; Determine second center position information according to the plurality of initial external size parameter information, wherein the second center position information is center position information of an animation synthesized by the plurality of the motion effect elements; and The second center position information is determined as the target position attribute information.
5. The method according to any one of claims 1 to 4, wherein The step of determining a target configuration file according to the plurality of new configuration files comprises: Determining target external size parameter information according to the initial external size parameter information in the plurality of new configuration files; Determine the target external time parameter information according to the modified external time parameter information in the plurality of new configuration files; Determine target resource information according to new resource information in a plurality of said new configuration files; Determine the target layer information according to the new layer information in the plurality of new configuration files; Determining target font information according to the initial font information in the plurality of new configuration files; and The target configuration file is determined according to the target external size parameter information, the target external time parameter information, the target resource information and the target font information.
6. The method according to claim 5, wherein: The initial external size parameter information in each of the new configuration files includes initial external width information and initial external height information; The determining target external size parameter information according to the initial external size parameter information in the multiple new configuration files includes: Determine maximum width information from the initial external width information in the plurality of new configuration files; Determining maximum height information from the initial external height information in the plurality of new configuration files; and The target external size parameter information is determined according to the maximum width information and the maximum height information.
7. The method according to claim 5, wherein: The modified external time parameter information in each of the new configuration files includes a start key frame and an end key frame; The step of determining the target external time parameter information according to the modified external time parameter information in the plurality of new configuration files includes: Determine a minimum starting key frame from the starting key frames in the plurality of new configuration files; Determining a maximum end key frame from the end key frames in the plurality of new configuration files; and The target external time parameter information is determined according to the minimum start key frame and the maximum end key frame.
8. The method according to any one of claims 1 to 4, wherein The new resource information includes at least one new resource item identifier, and each of the new layer information includes a new resource reference identifier; the new resource reference identifier has a corresponding new resource item identifier, and different new resource reference identifiers correspond to different new resource item identifiers.
9. An animation synthesis device, comprising: A first determination module is used to determine the playback time of each of the plurality of motion effect elements, wherein each of the motion effect elements has a corresponding initial configuration file, and the initial configuration file includes initial external time parameter information, initial external size parameter information, initial resource information, and initial layer information; A modification module, used to modify the initial external time parameter information in the initial configuration file corresponding to each of the motion effect elements according to the playback time of each of the motion effect elements, to obtain the modified external time parameter information; A first obtaining submodule is used to modify the initial resource information according to the initial layer information to obtain new resource information; A second obtaining submodule is used to obtain new layer information according to the modified external time parameter information and at least one of the initial external size parameter information; A second generating module, used for generating a new configuration file according to the modified external time parameter information, the new resource information and the new layer information; A second determining module, configured to determine a target configuration file according to the plurality of new configuration files; and The calling module is used to call the target configuration file to synthesize the animation.
10. An electronic device, comprising: one or more processors; a memory for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 8.
11. A computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, enables the processor to implement the method according to any one of claims 1 to 8.
12. A computer program product, comprising a computer program, wherein the computer program is used to implement the method according to any one of claims 1 to 8 when executed by a processor.
Citation Information
Patent Citations
Multiplane animation system
US20180246871A1
Systems and methods for rule-based animated content generation
WO2014099380A1