Animation data processing method and device, computer program product and electronic equipment

By generating maps carrying multiple animations and animation segmentation in the material, the cumbersome rendering process and low playback efficiency caused by skeletal model combination processing is solved, and efficient model animation playback is achieved.

CN119722879APending Publication Date: 2025-03-28GUANGZHOU BOGUAN TELECOMM TECH LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411778336.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-04
Publication Date
2025-03-28

Smart Images

  • Figure CN119722879A_ABST
    Figure CN119722879A_ABST
Patent Text Reader

Abstract

The invention provides an animation data processing method and device, a computer program product and electronic equipment, and relates to the technical field of computers. The animation data processing method comprises the following steps: acquiring multiple segments of skeletal animation data with the same model and the same material, and generating a chartlet carrying multiple segments of animations according to the multiple segments of skeletal animation data with the same model and the same material; transmitting the chartlet carrying the multiple sections of animations into a material to obtain a material added with the chartlet, and in the material added with the chartlet, segmenting the multiple sections of animations carried by the chartlet to obtain a plurality of animation frame intervals; wherein the material added with the chartlet is used for controlling the special effect particle emitter to emit the special effect particles so as to generate model animations matched with the animation frame intervals. According to the method and the device, the skeleton models are subjected to batch processing, so that the GPU can play a plurality of different animation frame intervals only by calling the rendering function once, and the playing efficiency of the model animation can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to an animation data processing method, an animation data processing device, a computer program product, and an electronic device. Background Art

[0002] During the model animation rendering process, in order to avoid lag caused by too many drawing batches, when there are too many cluster model assets with animation, they are usually batched.

[0003] In the related art, when batch processing is performed on the skeleton model, the skeleton animation data needs to be converted into a DA (DataAsset) asset table containing information such as the model and animation through a plug-in (for example, GPUSkin). This batch processing method requires the model to read the DA asset table every time an animation is played during the rendering phase, resulting in a more cumbersome rendering process and lower playback efficiency of the model animation.

[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention

[0005] The present disclosure provides an animation data processing method, an animation data processing device, a computer program product and an electronic device, so as to at least to some extent solve the problems in the related art such as the complicated rendering process and the low playback efficiency of the model animation.

[0006] According to a first aspect of the present disclosure, there is provided an animation data processing method, the method comprising: obtaining multiple segments of skeletal animation data with the same model and the same material, and generating a texture carrying multiple segments of animation based on the multiple segments of skeletal animation data with the same model and the same material; passing the texture carrying the multiple segments of animation into the material to obtain the material with the texture added, and in the material with the texture added, dividing the multiple segments of animation carried by the texture to obtain multiple animation frame intervals; wherein the material with the texture added is used to control a special effect particle emitter to emit special effect particles to generate a model animation matching the multiple animation frame intervals.

[0007] According to a second aspect of the present disclosure, there is provided an animation data processing device, the device comprising: a texture generation module, for acquiring multiple segments of skeletal animation data with the same model and the same material, and generating a texture carrying multiple segments of animation based on the multiple segments of skeletal animation data with the same model and the same material; an animation segmentation module, for transferring the texture carrying the multiple segments of animation into the material to obtain the material with the texture added, and in the material with the texture added, segmenting the multiple segments of animation carried by the texture to obtain multiple animation frame intervals; wherein the material with the texture added is used to control a special effect particle emitter to emit special effect particles to generate a model animation matching the multiple animation frame intervals.

[0008] According to a third aspect of the present disclosure, a computer program product is provided, including a computer program, wherein when the computer program is executed by a processor, the animation data processing method of the first aspect and possible implementation methods thereof are implemented.

[0009] According to a fourth aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute the animation data processing method of the above-mentioned first aspect and its possible implementation method by executing the executable instructions.

[0010] The technical solution disclosed in this disclosure has the following beneficial effects:

[0011] In the above-mentioned animation data processing process, multiple segments of skeletal animation data with the same model and the same material are obtained, and a map carrying multiple segments of animation is generated according to the multiple segments of skeletal animation data with the same model and the same material; the map carrying multiple segments of animation is passed into the material to obtain a material with the map added, and in the material with the map added, the multiple segments of animation carried by the map are cut apart to obtain multiple animation frame intervals; wherein the material with the map added is used to control the special effect particle emitter to emit special effect particles to generate model animations matching multiple animation frame intervals. The present disclosure bakes multiple segments of skeletal animation data into a map, and passes the map containing multiple segments of animation into the corresponding material, and cuts the multiple segments of animation in the map in the material, so as to realize batch processing of skeletal models and directly produce batched game assets. In addition, the material with the map added in the present disclosure is used to control the special effect particle emitter to emit special effect particles to generate model animations matching multiple animation frame intervals, so that the GPU (Graphics Processing Unit, graphics processor) only needs to call the rendering function once to play multiple different animation frame intervals, which can improve the playback efficiency of the model animation. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] Figure 1A flowchart showing a method for processing animation data in this exemplary embodiment is shown;

[0013] Figure 2 A schematic diagram showing a skeletal animation produced by an artist in this exemplary embodiment;

[0014] Figure 3 A flowchart of controlling a special effect particle emitter to emit special effect particles to generate a model animation matching a target animation frame interval is shown in this exemplary embodiment;

[0015] Figure 4 A flowchart of batch processing of a skeleton model in this exemplary embodiment is shown;

[0016] Figure 5 A structural block diagram of an animation data processing device in this exemplary embodiment is shown;

[0017] Figure 6 An electronic device for implementing the above-mentioned animation data processing method in this exemplary embodiment is shown. DETAILED DESCRIPTION

[0018] Exemplary embodiments of the present disclosure will be described more fully hereinafter with reference to the accompanying drawings.

[0019] The accompanying drawings are schematic diagrams of the present disclosure and are not necessarily drawn to scale. Some of the block diagrams shown in the accompanying drawings may be functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or in hardware modules or integrated circuits, or in networks, processors or microcontrollers. The embodiments can be implemented in various forms and should not be construed as being limited to the examples set forth herein. The features, structures or characteristics described in the present disclosure may be combined in one or more embodiments in any suitable manner. In the description below, many specific details are provided to provide a full description of the embodiments of the present disclosure. However, those skilled in the art should appreciate that one or more specific details may be omitted when implementing the technical solution of the present disclosure, or one or more specific details may be replaced by other methods, components, devices, steps, etc.

[0020] In the related art, when batch processing is performed on the skeleton model, the skeleton animation data needs to be converted into a DA (DataAsset) asset table containing information such as the model and animation through a plug-in (for example, GPUSkin). This batch processing method requires the model to read the DA asset table every time an animation is played during the rendering phase, resulting in a more cumbersome rendering process and lower playback efficiency of the model animation.

[0021] In view of one or more of the above problems, exemplary embodiments of the present disclosure provide an animation data processing method, an animation data processing device, a computer program product, and an electronic device.

[0022] In an optional embodiment, reference Figure 1 As shown, a flowchart of an animation data processing method is provided, which specifically includes the following steps S110 to S120:

[0023] Step S110, acquiring multiple segments of skeletal animation data with the same model and the same material, and generating a map carrying multiple segments of animation according to the multiple segments of skeletal animation data with the same model and the same material;

[0024] Step S120, passing the map carrying multiple animations into the material to obtain the material with the map added, and in the material with the map added, dividing the multiple animations carried by the map to obtain multiple animation frame intervals; wherein the material with the map added is used to control the special effect particle emitter to emit special effect particles to generate a model animation that matches the multiple animation frame intervals.

[0025] Figure 1 In the method shown, by baking multiple segments of skeletal animation data into a map, passing the map containing multiple segments of animation into the corresponding material, and dividing the multiple segments of animation in the map in the material, the skeletal model can be batched and batched game assets can be directly produced; based on the material with the texture added, the special effect particle emitter is controlled to emit special effect particles to generate model animations that match multiple animation frame intervals, so that the GPU only needs to call the rendering function once to play multiple different animation frame intervals, which can improve the playback efficiency of the model animation.

[0026] Below Figure 1 Provide detailed instructions for each step.

[0027] In step S110, multiple segments of skeletal animation data with the same model and the same material are obtained, and a texture carrying multiple segments of animation is generated according to the multiple segments of skeletal animation data with the same model and the same material.

[0028] The model may be a dynamically changeable model object pre-made by an artist, such as a dynamically changeable model such as a character model or an animal model, and the present disclosure does not specifically limit this.

[0029] Among them, the skeletal animation data can be skeletal animation data pre-produced by artists for a specific model, and can include but is not limited to small-volume in-situ animation data. Exemplarily, after creating the model, the skeletal animation data corresponding to the model can be produced by an animation data production tool. It should be noted that the present disclosure does not specifically limit the generation method and source of the skeletal animation data corresponding to the model.

[0030] The model takes a horse as an example. Figure 2 As shown, a schematic diagram of a skeletal animation produced by an artist is provided. Skeletal animation data of multiple segments with the same model and material may include but is not limited to animation data of a horse in different states such as sleeping, running, and eating grass. The present disclosure does not make specific limitations on this.

[0031] Among them, the texture carrying multiple animations can record the animation through the offset information of the model vertices.

[0032] Exemplarily, multiple segments of skeletal animation data may be stored in a texture through the Vertex Animation Tools plug-in of UE (Unreal Engine) to obtain a texture carrying multiple segments of animation data.

[0033] In an optional embodiment, the above-mentioned generation of a texture carrying multiple animation segments based on multiple skeletal animation data with the same model and the same material can be achieved through the following steps: converting the animation data type of the multiple skeletal animation data with the same model and the same material to obtain vertex animation data with the same model and the same material; storing the vertex animation data with the same model and the same material into a texture to obtain a texture carrying multiple animation segments.

[0034] Optionally, the model can be driven to move according to the skeletal animation data, and the vertex information of each frame of the model can be recorded to obtain corresponding vertex animation data. Vertex animation data refers to key data used to describe or drive mesh vertex deformation during 3D graphics rendering.

[0035] Optionally, after obtaining vertex animation data with the same model and material for multiple segments, the vertex animation data with the same model and material for multiple segments can be merged to obtain merged vertex animation data, and the merged vertex animation data can be stored in a texture to obtain a texture carrying multiple segments of animation.

[0036] By converting skeletal animation data into vertex animation data, data support can be provided for the subsequent generation of textures carrying multiple segments of animation data, so that animation assets with the same model and material can be batched together, thereby improving model rendering efficiency.

[0037] In an optional embodiment, the above-mentioned storing vertex animation data of multiple segments of the same model and the same material into a map to obtain a map carrying multiple segments of animation can be achieved through the following steps: merging vertex animation data of multiple segments of the same model and the same material to obtain merged vertex animation data; generating a map carrying multiple segments of animation based on the merged vertex animation data.

[0038] For example, if the first segment of vertex animation data contains 10 animation frames, the second segment of vertex animation data contains 20 animation frames, and the third segment of vertex animation data contains 20 animation frames, these three segments of vertex animation data can be merged in sequence, that is, the second segment of vertex animation data is appended to the first segment of vertex animation data, and the third segment of vertex animation data is appended to the second segment of vertex animation data to obtain merged vertex animation data, and the merged vertex animation data contains a total of 50 animation frames of data.

[0039] For example, based on a preset merging rule, multiple segments of vertex animation data with the same model and the same material can be merged to obtain merged vertex animation data. The preset merging rule can be set by the developer, and the present disclosure does not specifically limit this.

[0040] By merging multiple segments of vertex animation data, it is possible to generate a map carrying multiple segments of animation, thereby achieving the purpose of batching.

[0041] In an optional embodiment, the above-mentioned skeleton animation data with multiple segments of the same model and the same material can generate a map carrying multiple segments of animation, which can also be achieved by the following steps: merging multiple segments of skeleton animation data with the same model and the same material to obtain merged skeleton animation data; and generating a map carrying multiple segments of animation based on the merged skeleton animation data.

[0042] For example, if the first segment of skeletal animation data contains 10 animation frames, the second segment of skeletal animation data contains 20 animation frames, and the third segment of skeletal animation data contains 20 animation frames, these three segments of skeletal animation data can be merged in sequence, that is, the second segment of skeletal animation data is appended to the first segment of skeletal animation data, and the third segment of skeletal animation data is appended to the second segment of skeletal animation data to obtain merged skeletal animation data, and the merged skeletal animation data contains a total of 50 animation frames of data.

[0043] For example, based on a preset merging rule, multiple pieces of skeletal animation data with the same model and material can be merged to obtain merged skeletal animation data. The preset merging rule can be set by the developer, and the present disclosure does not specifically limit this.

[0044] By merging multiple segments of skeletal animation data, it is possible to generate a texture that carries multiple segments of animation, thereby achieving the purpose of batching.

[0045] In step S120, a texture carrying multiple animation segments is passed into a material to obtain a material with the texture added thereto, and in the material with the texture added thereto, the multiple animation segments carried by the texture are divided to obtain multiple animation frame intervals; wherein the material with the texture added thereto is used to control a special effect particle emitter to emit special effect particles to generate a model animation that matches the multiple animation frame intervals.

[0046] Specifically, a texture carrying multiple animations can be passed into a target material to obtain a material with the texture added. The target material here can be the same material corresponding to multiple skeletal animation data.

[0047] For example, the animation frame interval can be represented by the frame interval formed by the start frame and the end frame of each animation segment in the merged whole animation, so as to distinguish the animations of different segments in the material. For example: the frame interval of the sleeping animation is 0-10 frames; the frame interval of the running animation is 11-15 frames; the frame interval of the grazing animation is 16-30 frames. Among them, the merged whole animation refers to a whole animation formed by merging multiple animation segments.

[0048] Optionally, the frame interval of the entire merged animation can be normalized so that the frame interval of each animation frame interval is mapped to the range of [0,1]. For example, the frame interval of the sleeping animation is mapped to 0-0.33; the frame interval of the running animation is mapped to 0.33-0.5; and the frame interval of the grazing animation is mapped to 0.5-1.

[0049] After obtaining the material with the texture added, the texture carrying multiple animation segments can be attached to the corresponding material to obtain the material with the texture added, and in the material with the texture added, the multiple animation segments carried by the texture can be cut apart to obtain multiple animation frame intervals, so as to distinguish different animation segments in the material.

[0050] In an optional embodiment, in the material to which the texture is added, the multiple animation segments carried by the texture are divided into multiple animation frame intervals, which can be achieved through the following steps: obtaining animation division parameters; according to the animation division parameters, in the material to which the texture is added, the multiple animation segments carried by the texture are divided into multiple animation frame intervals.

[0051] The animation division parameter refers to the parameter based on which the frame interval is divided, and the present disclosure does not make any specific limitation on this.

[0052] Optionally, by comparing the similarities of adjacent animation frames, division can be performed between two animation frames whose similarities are less than a preset threshold, so as to separate multiple animation segments carried by the texture and obtain multiple animation frame intervals.

[0053] Optionally, corresponding interval identifiers may be generated for different animation frame intervals so as to distinguish different animation frame intervals.

[0054] In an optional embodiment, the above-mentioned acquisition of animation division parameters can be achieved through the following steps: obtaining the number of animation frames and the animation merging order corresponding to the skeletal animation data of multiple segments of the same model and the same material; determining the animation division parameters according to the number of animation frames and the animation merging order corresponding to the skeletal animation data of multiple segments of the same model and the same material.

[0055] The animation merging order refers to the arrangement order of multiple skeletal animation data when baked into a texture. For example, according to the animation merging order of multiple skeletal animation data, the number of animation frames corresponding to the multiple skeletal animation data can be sorted in sequence to obtain a sorting result, and the multiple animation segments carried by the texture can be divided according to the sorting result to obtain multiple animation frame intervals.

[0056] Since the same materials and models can be batched, the present invention bakes multiple segments of animation data with the same models and materials into a map together, and separates them in the material, so that the materials and models corresponding to different animation frame intervals are the same, and batched game assets can be directly produced.

[0057] By splitting the multiple animation segments carried by the texture, multiple animation frame intervals are obtained, so that batched game assets can be directly produced, thereby realizing multi-animation switching and playback based on the GPU (graphics processing unit), thereby reducing performance consumption.

[0058] Materials with added maps can be used to control special effect particle emitters to emit special effect particles to generate model animations that match multiple animation frame intervals, which can realize GPU multi-animation playback and switching.

[0059] Optionally, a material with a map added is used to control a special effect particle emitter to emit special effect particles to generate a model animation that matches a target animation frame interval, where the target animation frame interval is an animation frame interval corresponding to a target interval identifier, and the target interval identifier is an interval identifier selected from interval identifiers of multiple animation frame intervals.

[0060] Specifically, the particle emitter can be controlled by adding a material with a texture to read the vertex animation data corresponding to the target animation frame interval in the texture to emit special effect particles, so as to render the model generated by the special effects and obtain the model animation that matches the target animation frame interval, thereby realizing the animation playback and switching of the special effect particles on the GPU.

[0061] For example, during the animation playback stage, an interval identifier can be randomly selected from the interval identifiers of multiple animation frame intervals as the target interval identifier; or an interval identifier can be selected from the interval identifiers of multiple animation frame intervals in a specific order as the target interval identifier, which is not specifically limited in the present disclosure. For example, taking a cow as an example, the model can be determined as the target interval identifier in the order of the interval identifier of the frame interval of the sleeping animation, the interval identifier of the frame interval of the grazing animation, and the interval identifier of the frame interval of the running animation.

[0062] By determining the target animation frame interval, that is, the animation frame interval to be played, the animation playback and switching of the batch model can be realized, which can be applied but not limited to the playback scenario of the standby animation.

[0063] Optionally, during the animation playback stage, the animation playback speed can be controlled by the playback time control parameters (such as frame interval time) configured in the special effects script. The shorter the frame interval time is set, the faster the playback speed; the longer the frame interval time is set, the slower the playback speed. The present disclosure does not make specific limitations on this.

[0064] Optionally, the special effect particle emitter emits special effect particles based on animation interpolation to generate animation frames matching the animation interpolation; the target animation frame interval is mapped to the [0, 1] interval; the animation interpolation is within the [0, 1] interval, and the animation interpolation increases a time increment for each animation frame generated.

[0065] Exemplarily, taking the target animation frame interval as the sleeping animation frame interval, the sleeping animation frame interval is 0-10 frames, and the frame interval can be remapped to the [0,1] interval to normalize the animation playback interval.

[0066] The animation interpolation can be regarded as a control parameter of the playback progress, which can be passed into the material to control the special effect particle emitter to emit special effect particles based on the animation interpolation through the material to generate animation frames matching the animation interpolation. The time increment can be the time increment added after each frame is played, such as 0.003, which is not specifically limited in the present disclosure.

[0067] For example, the current animation interpolation value is 0.1, and the sum of 0.1 and the time increment can be used as the next animation interpolation value. The progress increment is added to 0.1 each frame later, so that the value of 0.1 gradually increases, which is equivalent to the progress bar of the animation. The animation is played because of this value.

[0068] For example, when the frame interval of the target animation frame interval is mapped to the [0, 1] interval, Figure 3 The flowchart shown provides a method of controlling a special effect particle emitter to emit special effect particles to generate a model animation that matches a target animation frame interval, which may specifically include the following steps:

[0069] Step S301, determine the current animation interpolation, and the current animation interpolation starts from 0;

[0070] Step S302, based on the current animation interpolation, determining the animation frame in the target animation frame interval that matches the current animation interpolation;

[0071] Step S303, controlling the special effect particle emitter to emit special effect particles to render an animation frame that matches the current animation interpolation;

[0072] Step S304, increasing the current animation interpolation by a time increment, and determining whether the updated current animation interpolation exceeds 1; if not, jump to step S302; if so, execute step S305;

[0073] Step S305: the target animation frame interval is played.

[0074] Optionally, during the animation playback stage, after the target animation frame interval is played, an interval identifier can be randomly selected from the interval identifiers of multiple animation frame intervals as a new target interval identifier; based on the new target interval identifier, an animation frame interval that matches the new target interval identifier is determined from multiple animation frame intervals, and the special effect particle emitter is controlled to emit special effect particles to generate a model animation that matches the animation frame interval of the new target interval identifier, so as to realize GPU multi-animation switching, so that the GPU only needs to call the rendering function once to draw multiple identical objects, thereby reducing performance consumption and reducing the cost of animation rendering.

[0075] For example, Figure 4 As shown, a flowchart of batch processing of a skeleton model is provided, which may specifically include the following steps:

[0076] Step S401, obtaining multiple segments of skeletal animation data with the same model and the same material;

[0077] Step S402, converting the animation data type of multiple segments of skeletal animation data with the same model and the same material to obtain multiple segments of vertex animation data with the same model and the same material;

[0078] Step S403, storing the vertex animation data of multiple segments with the same model and the same material into a texture, and obtaining a texture carrying multiple segments of animation;

[0079] Step S404, passing the texture carrying multiple animations into the material to obtain the material with the texture added;

[0080] Step S405 , in the material to which the texture is added, multiple animation segments carried by the texture are cut into separate segments to obtain multiple animation frame intervals.

[0081] The exemplary embodiment of the present disclosure also provides an animation data processing device, referring to Figure 5 As shown, the animation data processing device 500 may include the following program modules:

[0082] The texture generation module 510 is used for the texture generation module, which is used to obtain multiple skeletal animation data with the same model and the same material, and generate a texture carrying multiple animations according to the multiple skeletal animation data with the same model and the same material;

[0083] The animation segmentation module 520 is used to pass a texture carrying multiple animation segments into a material to obtain a material with the texture added, and to segment the multiple animation segments carried by the texture in the material with the texture added to obtain multiple animation frame intervals; wherein the material with the texture added is used to control a special effect particle emitter to emit special effect particles to generate a model animation that matches the multiple animation frame intervals.

[0084] In an optional embodiment, based on the aforementioned scheme, the texture generation module 510 also includes: a vertex animation data acquisition module, which is used to convert the animation data type of the skeletal animation data with the same multi-segment model and the same material to obtain the vertex animation data with the same multi-segment model and the same material; a texture baking module, which is used to store the vertex animation data with the same multi-segment model and the same material into the texture to obtain a texture carrying multiple segments of animation.

[0085] In an optional embodiment, based on the aforementioned scheme, the texture baking module can be configured to: merge vertex animation data of multiple segments of the same model and the same material to obtain merged vertex animation data; and generate a texture carrying multiple segments of animation based on the merged vertex animation data.

[0086] In an optional embodiment, based on the aforementioned scheme, the animation segmentation module 520 includes an animation segmentation parameter acquisition module for acquiring animation segmentation parameters; a frame interval acquisition module for segmenting multiple animation segments carried by the texture in the material to which the texture is added according to the animation segmentation parameters to obtain multiple animation frame intervals.

[0087] In an optional embodiment, based on the aforementioned scheme, the animation division parameter acquisition module can be configured to: obtain the number of animation frames and the animation merging order corresponding to the skeletal animation data of multiple segments of the model with the same material; determine the animation division parameters according to the number of animation frames and the animation merging order corresponding to the skeletal animation data of multiple segments of the model with the same material.

[0088] In an optional embodiment, based on the aforementioned scheme, a material with a map is added to control a special effect particle emitter to emit special effect particles to generate a model animation that matches a target animation frame interval, the target animation frame interval is an animation frame interval corresponding to a target interval identifier, and the target interval identifier is an interval identifier selected from interval identifiers of multiple animation frame intervals.

[0089] In an optional embodiment, based on the aforementioned scheme, the special effect particle emitter emits special effect particles based on animation interpolation to generate animation frames that match the animation interpolation; the target animation frame interval is mapped to the [0, 1] interval; the animation interpolation is within the [0, 1] interval, and the animation interpolation increases a time increment for each animation frame generated.

[0090] The specific details of each part of the above-mentioned device have been described in detail in the implementation method of the method part. The undisclosed details can be found in the implementation method of the method part, so they will not be repeated here.

[0091] The exemplary embodiments of the present disclosure also provide a computer program product, which includes a computer program, and when the computer program is executed by a processor, the above-mentioned animation data processing method is implemented.

[0092] In one embodiment, the computer program product may be a tangible product containing a computer program, such as a computer-readable storage medium storing a computer program. The readable storage medium may be a storage medium based on electrical, magnetic, optical, electromagnetic, infrared, or other signals, including but not limited to: random access memory (RAM), read-only memory (ROM), magnetic tape, floppy disk, flash memory (Flash), mechanical hard disk (HDD), solid-state drive (SSD), and the like. Exemplarily, the computer program product may be implemented as a non-volatile storage medium storing a computer program, such as a read-only memory, a NAND flash memory, and the like.

[0093] In one embodiment, the computer program product may be an intangible product including a computer program. Exemplarily, the computer program product may be implemented as a virtual digital product, such as a digital file storing an executable file, an installation package, etc. of the computer program.

[0094] The code of the computer program can be written in one or more programming languages. Programming languages ​​such as C language, Java, C++, etc. The program code can be executed entirely on the user computing device, or partially on the user computing device, or as a separate software package, or partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, such as a local area network (LAN), a wide area network (WAN), etc., or can be connected to an external computing device (e.g., an Internet connection provided by an operator).

[0095] The computer program may be carried or transmitted via electrical, magnetic, optical, electromagnetic, infrared, or other signals. The electronic device may convert the signal carrying the computer program into a digital signal, thereby running the computer program. When the computer program is run on an electronic device, its code is used to enable the electronic device to execute (more specifically, the processor of the electronic device may execute) the method steps of various exemplary embodiments of the present disclosure. Exemplarily, the following steps may be included:

[0096] Acquire multiple skeletal animation data with the same model and the same material, and generate a texture carrying multiple animations according to the multiple skeletal animation data with the same model and the same material;

[0097] A texture carrying multiple animations is passed into a material to obtain a material with the texture added thereto, and in the material with the texture added thereto, the multiple animations carried by the texture are divided to obtain multiple animation frame intervals; wherein the material with the texture added thereto is used to control a special effect particle emitter to emit special effect particles to generate a model animation matching the multiple animation frame intervals.

[0098] In an optional embodiment, based on the aforementioned scheme, the above-mentioned generation of a texture carrying multiple animation segments based on multiple skeletal animation data with the same model and the same material can be achieved through the following steps: converting the animation data type of the multiple skeletal animation data with the same model and the same material to obtain vertex animation data with the same model and the same material; storing the vertex animation data with the same model and the same material into a texture to obtain a texture carrying multiple animation segments.

[0099] In an optional embodiment, based on the aforementioned scheme, the above-mentioned storing vertex animation data of multiple segments of the same model and the same material into a map to obtain a map carrying multiple segments of animation can be achieved through the following steps: merging vertex animation data of multiple segments of the same model and the same material to obtain merged vertex animation data; generating a map carrying multiple segments of animation based on the merged vertex animation data.

[0100] In an optional embodiment, based on the aforementioned scheme, in the material to which the texture is added, the multiple animation segments carried by the texture are divided into multiple animation frame intervals, which can be achieved by the following steps: obtaining animation division parameters; according to the animation division parameters, in the material to which the texture is added, the multiple animation segments carried by the texture are divided into multiple animation frame intervals.

[0101] In an optional embodiment, based on the aforementioned scheme, the above-mentioned acquisition of animation division parameters can be achieved through the following steps: obtaining the number of animation frames and the animation merging order corresponding to the skeletal animation data with the same multi-segment model and the same material; determining the animation division parameters according to the number of animation frames and the animation merging order corresponding to the skeletal animation data with the same multi-segment model and the same material.

[0102] In an optional embodiment, based on the aforementioned scheme, a material with a map is added to control a special effect particle emitter to emit special effect particles to generate a model animation that matches a target animation frame interval, the target animation frame interval is an animation frame interval corresponding to a target interval identifier, and the target interval identifier is an interval identifier selected from interval identifiers of multiple animation frame intervals.

[0103] In an optional embodiment, based on the aforementioned scheme, the special effect particle emitter emits special effect particles based on animation interpolation to generate animation frames that match the animation interpolation; the target animation frame interval is mapped to the [0, 1] interval; the animation interpolation is within the [0, 1] interval, and the animation interpolation increases a time increment for each animation frame generated.

[0104] In the above steps, by baking multiple segments of skeletal animation data into a map, passing the map containing multiple segments of animation into the corresponding material, and dividing the multiple segments of animation in the map in the material, the skeletal model can be batched and batched game assets can be directly produced; based on the material with the texture added, the special effect particle emitter is controlled to emit special effect particles to generate model animations that match multiple animation frame intervals, so that the GPU only needs to call the rendering function once to play multiple different animation frame intervals, which can improve the playback efficiency of the model animation.

[0105] The exemplary embodiment of the present disclosure also provides an electronic device capable of implementing the above-mentioned animation data processing method. The electronic device may include a processor and a memory. The memory stores executable instructions of the processor, such as program code. The processor executes the method in the exemplary embodiment by executing the executable instructions. In addition, the electronic device may also include a display for displaying a graphical user interface.

[0106] Reference below Figure 6 , the electronic device is exemplified in the form of a general-purpose computing device. It should be understood that Figure 6The electronic device 600 shown is only an example and should not limit the functions and scope of use of the embodiments of the present disclosure.

[0107] like Figure 6 As shown, the electronic device 600 may include: a processor 610 , a memory 620 , a bus 630 , an I / O (input / output) interface 640 , a network adapter 650 , and a display 660 .

[0108] The memory 620 may include a volatile memory, such as a RAM 621, a cache unit 622, and may also include a non-volatile memory, such as a ROM 623. The memory 620 may also include one or more program modules 624, such program modules 624 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or a combination thereof may include the implementation of a network environment. For example, the program module 624 may include each module in the above-mentioned device.

[0109] The processor 610 may include one or more processing units. For example, the processor 610 may include an AP (Application Processor), a modem processor, a GPU (Graphics Processing Unit), an ISP (Image Signal Processor), a controller, an encoder, a decoder, a DSP (Digital Signal Processor), a baseband processor and / or an NPU (Neural-Network Processing Unit), etc.

[0110] The processor 610 may be configured to execute executable instructions stored in the memory 620 , such as executing any one or more method steps in this exemplary embodiment.

[0111] Exemplarily, the processor 610 may perform the following steps:

[0112] Acquire multiple skeletal animation data with the same model and the same material, and generate a texture carrying multiple animations according to the multiple skeletal animation data with the same model and the same material;

[0113] A texture carrying multiple animations is passed into a material to obtain a material with the texture added thereto, and in the material with the texture added thereto, the multiple animations carried by the texture are divided to obtain multiple animation frame intervals; wherein the material with the texture added thereto is used to control a special effect particle emitter to emit special effect particles to generate a model animation matching the multiple animation frame intervals.

[0114] In an optional embodiment, based on the aforementioned scheme, the above-mentioned generation of a texture carrying multiple animation segments based on multiple skeletal animation data with the same model and the same material can be achieved through the following steps: converting the animation data type of the multiple skeletal animation data with the same model and the same material to obtain vertex animation data with the same model and the same material; storing the vertex animation data with the same model and the same material into a texture to obtain a texture carrying multiple animation segments.

[0115] In an optional embodiment, based on the aforementioned scheme, the above-mentioned storing vertex animation data of multiple segments of the same model and the same material into a map to obtain a map carrying multiple segments of animation can be achieved through the following steps: merging vertex animation data of multiple segments of the same model and the same material to obtain merged vertex animation data; generating a map carrying multiple segments of animation based on the merged vertex animation data.

[0116] In an optional embodiment, based on the aforementioned scheme, in the material to which the texture is added, the multiple animation segments carried by the texture are divided into multiple animation frame intervals, which can be achieved by the following steps: obtaining animation division parameters; according to the animation division parameters, in the material to which the texture is added, the multiple animation segments carried by the texture are divided into multiple animation frame intervals.

[0117] In an optional embodiment, based on the aforementioned scheme, the above-mentioned acquisition of animation division parameters can be achieved through the following steps: obtaining the number of animation frames and the animation merging order corresponding to the skeletal animation data with the same multi-segment model and the same material; determining the animation division parameters according to the number of animation frames and the animation merging order corresponding to the skeletal animation data with the same multi-segment model and the same material.

[0118] In an optional embodiment, based on the aforementioned scheme, a material with a map is added to control a special effect particle emitter to emit special effect particles to generate a model animation that matches a target animation frame interval, the target animation frame interval is an animation frame interval corresponding to a target interval identifier, and the target interval identifier is an interval identifier selected from interval identifiers of multiple animation frame intervals.

[0119] In an optional embodiment, based on the aforementioned scheme, the special effect particle emitter emits special effect particles based on animation interpolation to generate animation frames that match the animation interpolation; the target animation frame interval is mapped to the [0, 1] interval; the animation interpolation is within the [0, 1] interval, and the animation interpolation increases a time increment for each animation frame generated.

[0120] In the above steps, by baking multiple segments of skeletal animation data into a map, passing the map containing multiple segments of animation into the corresponding material, and dividing the multiple segments of animation in the map in the material, the skeletal model can be batched and batched game assets can be directly produced; based on the material with the texture added, the special effect particle emitter is controlled to emit special effect particles to generate model animations that match multiple animation frame intervals, so that the GPU only needs to call the rendering function once to play multiple different animation frame intervals, which can improve the playback efficiency of the model animation.

[0121] The bus 630 is used to realize the connection between different components of the electronic device 600, and may include a data bus, an address bus, and a control bus.

[0122] The electronic device 600 can communicate with one or more external devices 700 (eg, a keyboard, a mouse, an external controller, etc.) through the I / O interface 640 .

[0123] The electronic device 600 can communicate with one or more networks through the network adapter 650. For example, the network adapter 650 can provide mobile communication solutions such as 3G / 4G / 5G, or provide wireless communication solutions such as wireless LAN, Bluetooth, near field communication, etc. The network adapter 650 can communicate with other modules of the electronic device 600 through the bus 630.

[0124] The electronic device 600 may display a graphical user interface and the like through the display 660 .

[0125] although Figure 6 Not shown, other hardware and / or software modules may also be provided in the electronic device 600, including but not limited to: a display, a microcode, a device driver, a redundant processor, an external disk drive array, a RAID (Redundant Arrays of Independent Disks) system, a tape drive, and a data backup storage system.

[0126] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the exemplary embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.

[0127] It will be appreciated by those skilled in the art that various aspects of the present disclosure may be implemented as a system, method or program product. Therefore, various aspects of the present disclosure may be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or an implementation combining hardware and software aspects, which may be collectively referred to herein as a "circuit", "module" or "system". Those skilled in the art will readily think of other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any variations, uses or adaptive changes of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and implementation are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.

[0128] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A method for processing animation data, characterized in that: The method comprises: Acquire multiple segments of skeletal animation data with the same model and the same material, and generate a texture carrying multiple segments of animation according to the multiple segments of skeletal animation data with the same model and the same material; The texture carrying multiple animations is passed into the material to obtain a material with the texture added thereto, and in the material with the texture added thereto, the multiple animations carried by the texture are divided to obtain multiple animation frame intervals; wherein the material with the texture added thereto is used to control a special effect particle emitter to emit special effect particles to generate a model animation that matches the multiple animation frame intervals.

2. The method according to claim 1, characterized in that The step of generating a texture carrying multiple animation segments according to the multiple skeletal animation data having the same model and the same material comprises: The skeletal animation data of the plurality of segments having the same model and the same material are converted into animation data types to obtain vertex animation data of the plurality of segments having the same model and the same material; The vertex animation data of the multiple segments having the same model and the same material are stored in a texture, so as to obtain a texture carrying multiple segments of animation.

3. The method according to claim 1, characterized in that The step of generating a texture carrying multiple animation segments according to the multiple skeletal animation data having the same model and the same material comprises: Merging the plurality of segments of skeletal animation data having the same model and the same material to obtain merged skeletal animation data; A texture carrying multiple animation segments is generated according to the merged skeletal animation data.

4. The method according to claim 1, characterized in that In the material to which the texture is added, multiple animation segments carried by the texture are cut into pieces to obtain multiple animation frame intervals, including: Get animation division parameters; According to the animation division parameters, in the material to which the texture is added, multiple animation segments carried by the texture are divided to obtain multiple animation frame intervals.

5. The method according to claim 4, characterized in that The step of obtaining animation division parameters includes: Obtain the number of animation frames and the animation merging order corresponding to the skeletal animation data of the multiple segments having the same model and the same material; The animation division parameters are determined according to the number of animation frames corresponding to the skeletal animation data of the multiple segments having the same model and the same material and the animation merging order.

6. The method according to claim 1, characterized in that The material to which the map is added is used to control the special effect particle emitter to emit special effect particles to generate a model animation that matches a target animation frame interval, wherein the target animation frame interval is an animation frame interval corresponding to a target interval identifier, and the target interval identifier is an interval identifier selected from the interval identifiers of the multiple animation frame intervals.

7. The method according to claim 6, characterized in that The special effect particle emitter emits special effect particles based on animation interpolation to generate animation frames matching the animation interpolation; the target animation frame interval is mapped to the [0, 1] interval; the animation interpolation is within the [0, 1] interval, and the animation interpolation increases by a time increment each time an animation frame is generated.

8. An animation data processing device, characterized in that: The device comprises: A texture generation module, used for acquiring multiple segments of skeletal animation data with the same model and the same material, and generating a texture carrying multiple segments of animation according to the multiple segments of skeletal animation data with the same model and the same material; An animation segmentation module is used to pass the texture carrying multiple animation segments into the material to obtain the material with the texture added, and in the material with the texture added, the multiple animation segments carried by the texture are segmented to obtain multiple animation frame intervals; wherein the material with the texture added is used to control the special effect particle emitter to emit special effect particles to generate a model animation matching the multiple animation frame intervals.

9. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

10. An electronic device, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; The processor is configured to perform the method of any one of claims 1 to 7 by executing the executable instructions.