Animation generation method and device of model, storage medium and electronic device

By merging models and determining vertex weight information, the movement of sub-models is controlled, solving the problem of high computational cost caused by multiple bone bindings and improving the production efficiency of model breaking animations.

CN116228941BActive Publication Date: 2026-07-24NETEASE (HANGZHOU) NETWORK CO LTD
View PDF -1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NETEASE (HANGZHOU) NETWORK CO LTD
Filing Date
2023-03-03
Publication Date
2026-07-24

AI Technical Summary

Technical Problem

Existing technologies suffer from high computational complexity and low efficiency when generating model-breaking animations due to multiple bone binding operations.

Method used

By acquiring multiple first models and merging them into a second model, determining the vertex weight information of the second model, and controlling the movement of each first model based on the weight information, a fragmentation animation is generated, reducing the need for multiple bone bindings.

Benefits of technology

It saves data storage space and computational load, and improves the production efficiency of model breaking animation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116228941B_ABST
    Figure CN116228941B_ABST
Patent Text Reader

Abstract

The application discloses an animation generation method and device of a model, a storage medium and an electronic device. The method comprises the following steps: acquiring a plurality of first models; merging the plurality of first models into a second model; determining first weight information of vertices of the second model; determining second weight information of the vertices of at least one first model based on the first weight information; and controlling the motion of each corresponding first model based on the second weight information to obtain a skeletal animation of each first model, wherein the skeletal animations of the plurality of first models constitute a broken animation of the second model. The application solves the technical problem of low animation production efficiency of a model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of animation technology, and more specifically, to a method, apparatus, storage medium, and electronic device for generating animation of a model. Background Technology

[0002] Currently, when generating model shattering animations, the complete model to be shattered is usually cut offline, and then each shattered sub-model is rigged with bones and animated. After that, the shattered sub-models are merged into a complete model. However, a model can only correspond to one set of bones. Therefore, after merging multiple sub-models into a complete model, only one set of bones is retained, and the other bones are discarded. Thus, multiple bone rigging is required. However, multiple rigging greatly increases the amount of computation, resulting in the technical problem of low efficiency in producing model shattering animations.

[0003] There is currently no effective solution to the above problems. Summary of the Invention

[0004] At least some embodiments of this application provide a method, apparatus, storage medium, and electronic device for generating animations of models, in order to at least solve the technical problem of low efficiency in model animation production.

[0005] According to one embodiment of this application, an animation generation method for a model is provided. The method includes: acquiring a first model, wherein multiple first models are used to generate a fragmentation animation of a second model; merging the multiple first models into a second model, wherein at least one vertex of the first model is used to determine the vertices of the second model; determining first weight information of the vertices of the second model, wherein the first weight information represents the degree of influence of each first target bone in at least one first target bone to which the vertex of the second model is bound, on driving the movement of the vertex of the second model; based on the first weight information, determining second weight information of the vertices of at least one first model, wherein the second weight information represents the degree of influence of each second target bone in at least one second target bone to which the vertex of each corresponding first model is bound, on driving the movement of the vertex of the first model; and controlling the movement of each corresponding first model based on the second weight information to obtain a skeletal animation of each first model, wherein the skeletal animations of multiple first models constitute the fragmentation animation of the second model.

[0006] According to one embodiment of this application, a method for generating animation of a model is provided. The method includes: displaying multiple first models on a graphical user interface, wherein the multiple first models are used to generate a breaking animation of a second model; responding to an animation creation operation acting on the graphical user interface, calling a target plugin to generate a skeletal animation for each first model, wherein the second model is obtained by merging multiple first models, at least one vertex of the first model is used to determine the vertices of the second model, first weight information of the vertices of the second model is used to generate second weight information of the vertices of the at least one first model, the first weight information is used to represent the degree of influence of each first target bone in at least one first target bone to which the vertex of the second model is bound, on driving the movement of the vertex of the second model, the second weight information is used to represent the degree of influence of each second target bone in at least one second target bone to which the corresponding vertex of each first model is bound, on driving the movement of the vertex of the first model, and the skeletal animation of each first model is obtained by controlling the movement of the corresponding first model based on the second weight information; and displaying a breaking animation of the second model composed of the skeletal animations of the multiple first models on the graphical user interface.

[0007] According to one embodiment of this application, an animation generation apparatus for a model is provided. The apparatus includes: an acquisition unit for acquiring a plurality of first models, wherein the plurality of first models are used to generate a fragmentation animation of a second model; a first merging unit for merging the plurality of first models into a second model, wherein at least one vertex of the first model is used to determine the vertices of the second model; a first determining unit for determining first weight information of the vertices of the second model, wherein the first weight information represents the degree of influence of each first target bone in at least one first target bone to which the vertex of the second model is bound, on driving the movement of the vertex of the second model; a second determining unit for determining second weight information of the vertices of at least one first model based on the first weight information, wherein the second weight information represents the degree of influence of each second target bone in at least one second target bone to which the vertex of each corresponding first model is bound, on driving the movement of the vertex of the first model; and a control unit for controlling the movement of each corresponding first model based on the second weight information to obtain a skeletal animation of each first model, wherein the skeletal animations of the plurality of first models constitute the fragmentation animation of the second model.

[0008] According to one embodiment of this application, an animation generation apparatus for a model is provided. The apparatus includes: a first display unit for displaying multiple first models on a graphical user interface, wherein the multiple first models are used to generate a breaking animation of a second model; a calling unit for responding to an animation creation operation performed on the graphical user interface and calling a target plugin to generate a skeletal animation for each first model, wherein the second model is obtained by merging multiple first models, at least one vertex of the first model is used to determine the vertices of the second model, first weight information of the vertices of the second model is used to generate second weight information of the vertices of at least one first model, the first weight information is used to represent the degree of influence of each first target bone in at least one first target bone to which the vertex of the second model is bound on driving the vertex movement of the second model, the second weight information is used to represent the degree of influence of each second target bone in at least one second target bone to which the vertex of each corresponding first model is bound on driving the vertex movement of the first model, and the skeletal animation of each first model is obtained by controlling the movement of each corresponding first model based on the second weight information; and a second display unit for displaying a breaking animation of the second model composed of the skeletal animations of multiple first models on a graphical user interface.

[0009] According to one embodiment of this application, a computer-readable storage medium is also provided, which stores a computer program, wherein the computer program is configured to execute the animation generation method of the model in any of the above claims when running.

[0010] According to one embodiment of this application, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to execute the animation generation method of the model in any of the above claims.

[0011] In at least some embodiments of this application, multiple first models can be obtained, which are sub-models corresponding to the second model. The multiple first models are used to generate the breaking animation of the second model. After obtaining the multiple first models, the multiple first models can be merged to obtain the second model. After obtaining the second model, the first weight information of the vertices of the second model can be determined. Then, based on the first weight information, the second weight information of the vertices of at least one first model can be determined. Based on the second weight information, the movement of each corresponding first model can be controlled to obtain the skeletal animation of each first model. The skeletal animations of multiple first models constitute the breaking animation of the second model. In other words, in this embodiment, sub-models can be merged into a complete model. Then, the weight information of the vertices of the complete model is determined, and based on the weight information of the complete model, the weight information of the vertices of each sub-model is determined. Then, the movement of each sub-model is controlled based on the weight information of the vertices of the sub-model to obtain the breaking animation of the complete model. In this process, the calculation is mainly based on the complete model. Since the data storage and calculation of the complete model are much smaller than those of multiple sub-models, the breaking animation of the complete model is obtained by calculating the complete model, which achieves the purpose of saving data storage space and reducing data calculation, thereby achieving the technical effect of improving the animation production efficiency of the model and solving the technical problem of low animation production efficiency of the model. Attached Figure Description

[0012] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments of this application and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0013] Figure 1 This is a hardware structure block diagram of a mobile terminal for an animation generation method of a model according to an embodiment of this application.

[0014] Figure 2 This is a flowchart of an animation generation method for a model according to one embodiment of this application;

[0015] Figure 3 This is a flowchart of an animation generation method for a model according to one embodiment of this application;

[0016] Figure 4 This is a flowchart of a method for creating an animation of a model according to an embodiment of this application;

[0017] Figure 5 This is a schematic diagram of a stalagmite model according to an embodiment of this application;

[0018] Figure 6 This is a schematic diagram of a stalagmite crushing model according to an embodiment of this application;

[0019] Figure 7 This is a schematic diagram of key animation frames of a broken virtual object according to an embodiment of this application;

[0020] Figure 8 This is a schematic diagram of a baking skeletal animation according to an embodiment of this application;

[0021] Figure 9 This is a schematic diagram of a baking skeletal animation according to an embodiment of this application;

[0022] Figure 10 This is a schematic diagram of a baking skeletal animation according to an embodiment of this application;

[0023] Figure 11 This is a schematic diagram of a skeletal animation of a broken model according to an embodiment of this application;

[0024] Figure 12 This is a schematic diagram of a skeletal animation of a broken model according to an embodiment of this application;

[0025] Figure 13 This is a schematic diagram of an animation generation apparatus for a model according to an embodiment of this application;

[0026] Figure 14 This is a schematic diagram of an animation generation apparatus for a model according to an embodiment of this application;

[0027] Figure 15 This is a schematic diagram of an electronic device according to an embodiment of this application. Detailed Implementation

[0028] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0029] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0030] In one possible implementation, model breaking is a common animation technique in game development. For example, when a building model is hit by a weapon, the object breaks. When the number of fragments is small, it is difficult to achieve a shocking effect. Moreover, the appearance of a large number of fragments is computationally intensive for real-time games, resulting in low efficiency in generating model breaking animations. To solve this technical problem, the common method in this field is to separately rig the sub-models corresponding to the complete model to be broken and create skeletal animations for each sub-model. Then, the sub-models with skeletal animations are merged into a complete model. However, since a model can only correspond to one set of bones, the bones of different sub-models may conflict with each other during the process of merging multiple sub-models into a complete model. Only one set of bones will be retained, and the others will be discarded. Therefore, multiple rigs need to be rigged during the process of merging multiple sub-models into a complete model so that the merged complete model can display the skeletal animations of each sub-model during the model breaking process. However, multiple rigs greatly increase the computational load, and the technical problem of low efficiency in generating model breaking animations still exists.

[0031] This application proposes an animation generation method for a model. Multiple first models are obtained, each a sub-model corresponding to a second model. These first models are used to generate a breaking animation of the second model. After obtaining the multiple first models, they are merged based on their position information to obtain a second model. After obtaining the second model, first weight information of the vertices of the second model is determined. This first weight information represents the influence of each first target bone in at least one first target bone to which the vertex of the second model is bound, on the movement of the vertex of the second model. Then, based on the first weight information, second weight information of the vertices of at least one first model is determined. This second weight information represents the influence of each second target bone in at least one second target bone to which the vertex of each corresponding first model is bound, on the movement of the vertex of the first model. Finally, based on the second weight information, the movement of each corresponding first model is controlled to obtain a skeletal animation for each first model. The skeletal animations of multiple first models constitute the breaking animation of the second model. In this process, multiple first models are first merged into a second model. Then, the weight information of the vertices of the second model is determined. Based on the weight information of the second model, the weight information of each first model is generated. The movement of the first sub-model is controlled based on the first weight information. This eliminates the need for multiple bone bindings, greatly saving computing resources and improving computing efficiency. This achieves the technical effect of improving the animation production efficiency of the model, thus solving the technical problem of low animation production efficiency of the model.

[0032] The methods described in this application can be executed on a mobile terminal, a computer terminal, or a similar computing device. For example, when running on a mobile terminal, the mobile terminal can be a smartphone, tablet computer, PDA, mobile internet device, PAD, game console, or other terminal device. Figure 1 This is a hardware structure block diagram of a mobile terminal for an animation generation method of a model according to an embodiment of this application. For example... Figure 1 As shown, a mobile terminal may include one or more ( Figure 1 Only one is shown in the image. Processor 102 (processor 102 may include, but is not limited to, a central processing unit (CPU), graphics processing unit (GPU), digital signal processing (DSP) chip, microprocessor (MCU), programmable logic device (FPGA), neural network processor (NPU), tensor processor (TPU), artificial intelligence (AI) type processor, etc.) and memory 104 for storing data. In one embodiment of this application, it may also include: input / output device 108 and display device 110.

[0033] In some optional embodiments primarily focused on gaming scenarios, the aforementioned device may also provide a human-computer interaction interface with a touch-sensitive surface. This interface can sense finger contact and / or gestures to interact with a graphical user interface (GUI). The human-computer interaction functions may include the following: creating web pages, drawing, word processing, creating electronic documents, playing games, video conferencing, instant messaging, sending and receiving emails, call interfaces, playing digital videos, playing digital music, and / or web browsing, etc. Executable instructions for performing the aforementioned human-computer interaction functions are configured / stored in one or more processor-executable computer program products or readable storage media.

[0034] Those skilled in the art will understand that Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the mobile terminal described above. For example, the mobile terminal may also include components that are more... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.

[0035] According to one embodiment of this application, an embodiment of a method for generating animation of a model is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0036] In one possible implementation, embodiments of this application provide a method for generating animations of a model. Figure 2 This is a flowchart of a model animation generation method according to an embodiment of this application, such as... Figure 2 As shown, the method includes the following steps:

[0037] Step S201: Obtain multiple first models, wherein the multiple first models are used to generate the shattering animation of the second model.

[0038] In the technical solution provided in step S201 above, the second model can be a complete model, and the multiple first models are the broken models of the second model. That is, the multiple first models can be several sub-models corresponding to the second model, and the multiple first models are used to generate the broken animation of the second model.

[0039] For example, after a model is broken, a complete model can be broken into multiple sub-models. The complete model can be regarded as a second model, and the multiple sub-models can be regarded as multiple first models. Based on this, multiple sub-models after the second model is broken can be obtained first, and the breaking animation of the complete model can be generated based on the multiple sub-models.

[0040] Step S202: Merge multiple first models into a second model, wherein at least one vertex of the first model is used to determine the vertex of the second model.

[0041] In the technical solution provided in step S202 above, after obtaining multiple first models, since each first model is a sub-model of the second model, the multiple first models can be merged to obtain the second model. In the process of merging multiple first models, the vertices of the merged second model can be determined according to the vertex information of the first models. The vertex information includes at least the vertex position, vertex index, vertex order, and at least one associated vertex of the first model.

[0042] In this embodiment, after a complete second model is broken, it will be broken into multiple first models. In this case, a vertex in the second model may correspond to a vertex in two or more of the broken first sub-models. Based on the vertex information of each vertex in the first model, the position of the vertex in the second model can be determined. Based on this, the position of each vertex in the second model can be determined according to the vertex position of each vertex in each of the multiple first models. Then, based on the determined vertex position of each vertex in the second model, the multiple first models are merged to obtain the second model.

[0043] Step S203: Determine the first weight information of the vertices of the second model, wherein the first weight information is used to represent the degree of influence of each first target bone in at least one first target bone to which the vertices of the second model are bound on the movement of the vertices of the second model.

[0044] In step S203 above, each first model can be bound to at least one bone, wherein the center of the first model corresponds to the center of the bound bone, each first model corresponds to its bound bone, and each vertex of the first model is bound to its corresponding bone. The movement of the bone can drive the movement of the bound vertex. After merging multiple first models into a second model, since there may be overlapping vertices or edges of two or more first models, that is, vertices in two or more first models correspond to one vertex in the second model after merging, in this case, one vertex in the second model may be affected by two or more bones bound to it. Based on this, the first weight information of the vertex of the second model can be determined. The first weight information is used to represent the influence of each first target bone in at least one first target bone bound to the vertex of the second model on driving the movement of the vertex of the second model.

[0045] In this embodiment, since a skeleton is bound to the center of the first model, and each vertex in the first model is bound to its attached skeleton, when multiple first models are merged to form the second model, the skeletons bound to the vertices of the first models that have been merged into the second model can be regarded as the first target skeletons bound to those vertices in the second model. Each vertex in the second model is affected by all the first target skeletons bound to it. Specifically, if a vertex in the second model is merged from a vertex in one first model, then that vertex in the second model is only affected by one first target skeleton; if a vertex in the second model is merged from vertices in two or more first models, then that vertex in the second model will be affected by multiple first target skeletons. Based on this, the first weight information of the vertices in the second model can be determined according to the degree of influence of the first target skeletons bound to each vertex in the second model on driving the movement of each vertex. This degree of influence can be represented by a weight value.

[0046] For example, suppose a vertex in the second model is influenced by two first target bones. For ease of explanation, this vertex can be called vertex A, and the two first target bones can be called first target bone X and first target bone Y, respectively. The weight of vertex A's influence from first target bone X is 0.4, and the weight of vertex A's influence from first target bone Y is 0.6. Based on this, the first weight information of vertex A in the second model can be determined according to the weight values ​​of the influence of all the first target bones to which vertex A is bound. This weight information of vertex A includes the weight values ​​of the influence of all the first target bones to which vertex A is bound. Based on this method, the first weight information of each vertex in the second model can be determined.

[0047] Step S204: Based on the first weight information, determine the second weight information of at least one vertex of the first model, wherein the second weight information is used to represent the degree of influence of each second target bone in at least one second target bone to which each vertex of the corresponding first model is bound on the vertex motion of the first model.

[0048] In step S204 above, as described above, the first weight information of the vertices of the second model may include multiple weight values. These multiple weight values ​​represent the degree of influence of all the first target bones to which the vertices of the second model are attached on the movement of the vertices of the second model. Since the second model is obtained by merging multiple first models, based on this, after determining the first weight information of the vertices of the second model, the second weight information of the vertices of at least one first model can be determined based on the first weight information. The second weight information is used to represent the degree of influence of each second target bone in at least one second target bone to which the vertex of each first model is attached on the movement of the vertices of the first model.

[0049] In this embodiment, as described above, the first weight information of the vertices of the second model may include one or more weight values, which represent the degree to which the vertices in the second model are influenced by the first target bone to which they are bound. Based on this, the second weight information of at least one vertex of the first model can be determined according to the weight values ​​in the first weight information of the vertices of the second model.

[0050] Following the previous example, suppose the second weight information of vertex A in the second model includes weight values ​​of 0.4 and 0.6. 0.4 represents the influence of the first target bone X, to which vertex A is bound, on driving the vertex's movement; 0.6 represents the influence of the first target bone Y, to which vertex A is bound, on driving the vertex's movement. Since vertex A in the second model is obtained by merging vertices from the first model, suppose vertex A in the second model is obtained by merging vertex a1 in the first model M and vertex a2 in the first model N, where the first model M corresponds to the first target bone X and the second model N corresponds to the first target bone Y. Based on this, according to the correspondence between the first model and the first target bone, the weight value of 0.4, representing the influence of the first target bone X on vertex A in the second model, can be used as the second weight information of vertex a1 in the first model M corresponding to vertex A; and the weight value of 0.6, representing the influence of the first target bone Y on vertex A in the second model, can be used as the second weight information of vertex a2 in the first model N corresponding to vertex A. Based on this method, the second weight information of each vertex in the first model can be determined.

[0051] Step S205: Based on the second weight information, control the motion of each corresponding first model to obtain the skeletal animation of each first model, wherein the skeletal animations of multiple first models constitute the fragmentation animation of the second model.

[0052] In step S205 above, since the first weight information is used to represent the degree of influence of each second target bone in at least one second target bone to which each vertex of the first model is bound on driving the vertex movement of the first model, and since the movement of the bones can drive the movement of the vertices, based on this, after determining the first weight information of each vertex of the first model, the movement of each corresponding first model can be controlled based on the first weight information to obtain the skeletal animation of each first model, wherein the skeletal animations of multiple first models constitute the fragmentation animation of the second model.

[0053] In this embodiment, since the second weight information includes the degree of influence of each second target bone in at least one second target bone to which each vertex of the first model is bound on driving the vertex movement of the first model, and the movement of the bones can drive the movement of the vertices, the vertices in the first model can be controlled to move based on the second weight information. The movement of the vertices can drive the movement of the model, thereby generating the skeletal animation of the first model. The simultaneous playback of the skeletal animations of multiple first models constitutes the fragmentation animation of the second model.

[0054] In at least some embodiments of this application, multiple first models can be merged into a second model, thereby determining the first weight information of each vertex of the second model, and determining the weight information of the vertices of the first model based on the weight information. Then, the movement of the first model is controlled based on the weight information of the vertices of the first model to obtain the skeletal animation of the first model. The entire process is mainly based on the merged complete model for calculation, without the need to create skeletal animation for each sub-model. Since the data storage and computation of the complete model are much smaller than those of multiple sub-models, by calculating the complete model, the fragmented animation of the complete model is obtained, which achieves the purpose of saving data storage space and reducing data computation, thereby achieving the technical effect of improving the animation production efficiency of the model and solving the technical problem of low animation production efficiency of the model.

[0055] The method described above in this embodiment will be further illustrated with examples below.

[0056] As an optional implementation, the animation generation method of the model further includes: binding at least one bone to each first model to obtain multiple bones of multiple first models; merging the multiple bones into the skeleton of the second model; and determining at least one first target bone to which the vertices of the second model are bound in the skeleton of the second model.

[0057] In this embodiment, at least one bone can be bound to each first model to obtain multiple bones of multiple first models. The vertex of each first model is bound to the bone corresponding to that model. The movement of the bone can drive the movement of the model vertex. Then, multiple bones can be merged into the skeleton of the second model. In the skeleton of the second model, at least the first target bone to which the vertex of the second model is bound can be determined.

[0058] For example, since each vertex of the first model is bound to the corresponding skeleton of that model, and each first model is a fragmented model of the second model, vertices of multiple first models can be merged based on the position of the vertex of each first model in the second model. Because vertices are bound to skeletons, the merging process can also merge skeletons, which then form the framework of the second model. When merging vertices in the first models, it's possible that two vertices from two different first models merge to become one vertex in the second model. Since each of the two vertices in the two first models is bound to at least one skeleton, in this case, the skeleton bound to the vertex in the first model before merging can be used as the first target skeleton bound to the vertex in the merged second model. Specifically, if a vertex in the second model corresponds to a vertex in one of the first models, then that vertex in the second model is bound to one first target skeleton; if a vertex in the second model corresponds to at least two vertices in at least two different first models, then that vertex in the second model is bound to two or more first target skeletons.

[0059] As an optional implementation, multiple bones are merged into the skeleton of the second model, including: establishing a hierarchical relationship between the multiple bones based on the vertices of each first model to obtain the skeleton of the second model.

[0060] In this embodiment, since the first model is a fragmented version of the second model, the bones bound to the first model are independent and do not affect each other. However, after merging multiple bones to obtain the skeleton of the second model, the movement of the bones becomes interdependent; that is, the movement of one bone affects the movement of another. In this case, it is necessary to establish a hierarchical relationship between the bones. This hierarchical relationship can be a parent-child relationship between bones. Based on the hierarchical relationship between bones, parent bones and child bones can be determined. The movement of the parent bone can drive the movement of the child bone, and the movement of the child bone will not affect the movement of the parent bone. A hierarchical relationship can be established between multiple bones based on each vertex of the first model to obtain the skeleton of the second model.

[0061] Optionally, since a vertex of the first model may be bound to multiple bones, the hierarchical relationship between bones can be determined based on the degree of influence of each bone bound to the first model on driving the movement of the vertex. In this case, the level of a bone can be determined based on the magnitude of its influence on driving the movement of the vertex. For example, the level of a bone with a greater influence is higher than the level of a bone with a smaller influence.

[0062] For example, as described above, the influence of the bones bound to a vertex on the movement of that vertex can be represented by weight values. A larger weight value indicates a greater influence of the bones on the movement of that vertex; a smaller weight value indicates a smaller influence. Based on this, the hierarchical relationship between bones can be determined based on the weight values ​​of vertices. For instance, in the first model, a vertex is bound to two bones. The weight value of the first bone's influence on the movement of that vertex is 0.3, and the weight value of the second bone's influence is 0.7. Since 0.7 is greater than 0.3, in this case, the level of the second bone is greater than that of the first bone; that is, the second bone can be considered the parent bone, and the first bone the child bone.

[0063] As an alternative implementation, the animation generation method for the model further includes: determining at least one second target bone to which each vertex of the first model is bound in the multiple bones.

[0064] In this embodiment, each of the multiple first models is bound to at least one bone. Therefore, the multiple first models are bound to multiple bones. Merging these multiple bones yields the skeleton of the second model. The bone bound to a vertex of the second model is the first target bone. Since the second model is obtained by merging multiple first models, a vertex in the second model may correspond to a vertex in one of the first models, or it may be obtained by merging vertices from two or more first models. That is, a vertex in the second model may correspond to vertices from two or more first models. Therefore, a vertex in the second model may be bound to one first target bone, or it may be bound to multiple first target bones. Thus, based on the first target bones bound to vertices in the second model, the second target bone bound to the vertex in the first model corresponding to that vertex in the second model can be determined.

[0065] For example, suppose that the target bones bound to vertex A in the second model include first target bone X and first target bone Y, where first target bone X corresponds to the first model M and second target bone Y corresponds to the second model N, and vertex A is obtained by merging vertex a1 in the first model M and vertex a2 in the second model N. Based on this, first target bone X can be determined as a second target bone bound to vertex a1 in the first model M, and first target bone Y can be determined as a second target bone bound to vertex a2 in the first model N.

[0066] As an optional implementation, step S203, determining the first weight information of the vertices of the second model, includes: determining the first weight information that matches the breaking animation of the second model, wherein the first weight information is used to control each first target bone to drive the vertex movement of the second model, so that at least one first model corresponding to the vertex of the second model generates skeletal animation.

[0067] In this embodiment, since the second model is obtained by merging multiple first models, and the multiple first models are fragmented sub-models of the second model, based on this, first weight information matching the fragmented animation of the second model can be determined. The first weight information is used to control the vertex movement of each first target bone to drive the second model, so that at least one first model corresponding to the vertex of the second model generates skeletal animation.

[0068] For example, when multiple first models are merged to form a second model, the bones bound to the vertices of the merged first models can be considered as the first target bones bound to those vertices in the second model. Each vertex in the second model is affected by all the first target bones it is bound to. Specifically, if a vertex in the second model is merged from a vertex in one first model, then that vertex in the second model is affected by only one first target bone; if a vertex in the second model is merged from vertices in two or more first models, then that vertex in the second model will be affected by multiple first target bones. The influence of all the first target bones on a vertex in the second model can be represented by first weight information, which can be used to control the movement of each first target bone driving the vertex in the second model.

[0069] For example, suppose a vertex in the second model is affected by two first target bones, where the weight of the influence of the first first target bone on the vertex is 0.4 and the weight of the influence of the second first target bone on the vertex is 0.6. Based on this, each first target bone can be controlled to drive the vertex movement of the second model according to the weight of the influence of all the first target bones on vertex A, so that at least one first model corresponding to the vertex of the second model can generate skeletal animation.

[0070] As an optional implementation, step S204, determining the second weight information of at least one vertex of the first model based on the first weight information, includes: adjusting the first weight information based on the at least one vertex of the first model corresponding to the vertex of the second model to obtain the second weight information of the vertex of the first model.

[0071] In this embodiment, after determining the first weight information of the vertices in the second model, the second weight information of the vertices of the at least one first model corresponding to the vertices of the second model can be obtained by adjusting the first weight information.

[0072] For example, the first weight information of the vertices in the second model may include one or more weight values, which are used to represent the degree of influence of the vertex in the second model on the first target bone to which it is bound. The vertex in the second model may be obtained by merging one or more vertices in the first model. There is a mapping relationship between the vertices in the first model and the first target bone in the second model. Based on this, at least one vertex in the first model corresponding to the vertex in the second model can be determined first. Then, based on the mapping relationship between the vertices in the first model and the first target bone in the second model, the first target bone corresponding to the vertex in the first model can be determined. The weight value of the influence of the first target bone to which the vertex in the second model is bound to the vertex in the first weight information on driving the movement of the vertex is used as the second weight information of the vertex in the first model.

[0073] As an optional implementation, step S202, merging multiple first models into a second model, includes: performing baking operations on the multiple first models respectively; merging the baked multiple first models to obtain a second model.

[0074] In this embodiment, during the process of merging multiple first models, the multiple first models can be baked separately, and the baked multiple first models can be merged to obtain the second model.

[0075] For example, baking multiple first models involves rendering textures based on the model's application scenario. The baked model has more detailed information, so merging the multiple baked first models later results in a more complete second model. Moreover, during the model merging process, there is no need to adjust the model again, which greatly saves computing resources.

[0076] As an optional implementation, the animation generation method for the model further includes: acquiring an original animation, wherein the original animation is used to demonstrate the process of breaking the virtual object represented by the second model; determining multiple fragmented virtual objects in the original animation as multiple first models, wherein the multiple fragmented virtual objects are used to constitute the virtual object, and each first model has corresponding key animation frames for each fragmented virtual object.

[0077] In this embodiment, the original animation of the second model is used to demonstrate the process of breaking the virtual object represented by the second model. The original animation includes multiple fragment virtual objects, which can be identified as multiple first models. That is, the multiple first models are the broken models of the second model. Each fragment virtual object is used to construct the virtual object, and each first model has corresponding key animation frames for each fragment virtual object.

[0078] For example, when a virtual object is broken, multiple fragment virtual objects can be generated. These multiple fragment virtual objects can be merged to obtain a virtual object. The virtual object can be represented by a second model, and the fragment virtual objects can be represented by a first model.

[0079] As an optional implementation, the animation generation method for the model further includes: generating vertices of the second model based on at least one of the following information of vertices of at least one first model: vertex position, vertex index, vertex order, and associated vertices of at least one vertex of the first model.

[0080] In this embodiment, since the second model is obtained by merging multiple first models, the vertices of each of the multiple first models include vertex information. The vertex information of a vertex includes at least: vertex position, vertex index, vertex order, and associated vertices of at least one vertex from the first models. The vertex position indicates the vertex's location in the second model, the vertex index is used to locate the vertex in the second model, the vertex order indicates the vertex's sequence number in the second model, and the associated vertices of at least one vertex from the first models are the vertices used to merge the first models to obtain the same vertex in the second model. Based on this, the vertices of the second model can be generated based on the vertex information of at least one vertex from the first models.

[0081] In one possible implementation, embodiments of this application provide another method for generating animations for a model. Figure 3 This is a flowchart of an animation generation method for a model according to one embodiment of this application, such as... Figure 3 As shown, the method may include the following steps:

[0082] Step S301: Display multiple first models on the graphical user interface, wherein the multiple first models are used to generate the breaking animation of the second model.

[0083] In step S301 above, multiple first models are fragmented sub-models of the second model. After obtaining the second model, multiple first models can be displayed on the graphical user interface. These multiple first models are used to generate the fragmentation animation of the second model.

[0084] For example, step S301 above can be performed by animation software, which can be 3ds Max software. 3ds Max software includes a graphical user interface, and when in response to acquiring multiple first models, 3ds Max software can display multiple first models on the graphical user interface.

[0085] Step S302: In response to the animation creation operation applied to the graphical user interface, the target plugin is invoked to generate skeletal animation for each first model.

[0086] In step S302 above, in response to the animation creation operation of the graphical user interface, the target plugin can be invoked to generate the skeletal animation of each first model. The second model is obtained by merging multiple first models. At least one vertex of the first model is used to determine the vertices of the second model. The first weight information of the vertices of the second model is used to generate the second weight information of the vertices of the at least one first target bone to which the vertices of the second model are bound, representing the degree of influence of each first target bone in the at least one first target bone to which the vertices of the second model are bound, on driving the movement of the vertices of the second model. The second weight information is used to represent the degree of influence of each second target bone in the at least one second target bone to which the vertices of each corresponding first model are bound, on driving the movement of the vertices of the first model. The skeletal animation of each first model is obtained by controlling the movement of each corresponding first model based on the second weight information.

[0087] For example, 3ds Max software includes a target plugin, and the graphical user interface (GUI) of 3ds Max software can include animation control. When 3ds Max software responds to the user's selection of the animation control, that is, responds to the animation operation applied to the GUI, based on this, 3ds Max software can call the target plugin to build a skeleton for each first model and record the mapping relationship between each first model and its corresponding skeleton. Then, the target plugin can merge multiple first models to obtain a second model, and then determine the first weight information of the vertices of the second model. This first weight information is used to represent the degree of influence of each first target bone in at least one first target bone to which the vertices of the second model are bound, on driving the movement of the vertices of the second model. After determining the first weight information of the vertices of the second model, the second weight information of the vertices of at least one first model can be determined based on the first weight information. This second weight information is used to represent the degree of influence of at least one second target bone to which each vertex of the first model is bound on driving the movement of the vertices of the first model. Then, the movement of each corresponding first model can be controlled based on the second weight information to obtain the skeletal animation of each first model. The method for determining the first weight information of the vertices of the second model and the second weight information of the vertices of the first model can refer to the methods described in steps S203 and S204 above, and will not be repeated here.

[0088] Step S303: Display the breaking animation of the second model, which consists of the skeletal animations of multiple first models, on the graphical user interface.

[0089] In step S303 above, after generating the skeletal animation of each first model, the fragmentation animation of the second model, which is composed of the skeletal animations of multiple first models, can be displayed on the graphical user interface.

[0090] For example, after generating the skeletal animation for each first model, the 3ds Max software can simultaneously display the skeletal animations of multiple first models on the graphical user interface to create the fragmentation animation of the second model.

[0091] In at least some embodiments of this application, multiple first models can be displayed on a graphical user interface, wherein the multiple first models are used to generate the breaking animation of a second model; when responding to an animation production operation performed on the graphical user interface, a target plugin can be called to generate the skeletal animation of each first model, and then the breaking animation of the second model composed of the skeletal animations of the multiple first models is displayed on the graphical user interface. That is to say, in the embodiments of this application, the skeletal animations of multiple first models can be generated by the target plugin, and the skeletal animations of the multiple first models can constitute the breaking animation of the second model without the need for multiple bone bindings, which greatly saves computing resources and improves computing efficiency, thereby achieving the technical effect of improving the animation production efficiency of the model, and thus solving the technical problem of low animation production efficiency of the model.

[0092] The technical solutions of the present invention will be further illustrated below with reference to preferred embodiments.

[0093] In related technologies, when generating fragmented animations of models, the model to be animated is typically cut offline using a physics engine. The resulting sub-models are then merged into a single, complete model. This complete model includes multiple sub-models, and skeletons are then built and bound within these sub-models before skeletal animation is created. However, after merging the sub-models, the center points of the sub-models within the merged complete model are difficult to determine. This makes it difficult to pinpoint the center point of each sub-model when building the skeleton, resulting in inaccurate skeleton placement. Furthermore, during the merging process, edges and vertices of the sub-models may overlap after merging. This makes it difficult to select vertices when binding them to the skeleton, leading to low animation generation efficiency.

[0094] In related technologies, when generating model shattering animations, after offline cutting of the model to be shattered into multiple sub-models, the sub-models can be individually rigged and animated. Then, the sub-models are merged to obtain a complete model, so that the animation effect of each sub-model when the model shatters is similar to that of the complete model. However, since one model can only correspond to one set of bones, the bones of different sub-models may conflict with each other during the process of merging multiple sub-models into a complete model. Only one set of bones will be retained, and the others will be discarded. Therefore, multiple rigging is required during the process of merging multiple sub-models into a complete model so that the merged complete model can display the skeletal animation of each sub-model during the model shattering process. However, multiple rigging greatly increases the amount of computation, and the same technical problem of low production efficiency of model shattering animations still exists.

[0095] However, this application provides an animation generation method for a model. By acquiring multiple first models, which are sub-models corresponding to a second model, and using these multiple first models to generate a breaking animation of the second model, after acquiring the multiple first models, the multiple first models can be merged based on their position information to obtain a second model. After obtaining the second model, first weight information of the vertices of the second model can be determined. The first weight information represents the influence of each first target bone in at least one first target bone to which the vertex of the second model is bound on the movement of the vertex of the second model. Then, based on the first weight information, second weight information of the vertices of at least one first model can be determined. The second weight information represents the influence of each second target bone in at least one second target bone to which the vertex of each corresponding first model is bound on the movement of the vertex of the first model. Finally, based on the second weight information, the movement of each corresponding first model is controlled to obtain a skeletal animation of each first model. The skeletal animations of multiple first models constitute the breaking animation of the second model. In this process, multiple first models are first merged into a second model. Then, the weight information of the vertices of the second model is determined. Based on the weight information of the second model, the weight information of each first model is generated. The movement of the first sub-model is controlled based on the first weight information. This eliminates the need for multiple bone bindings, greatly saving computing resources and improving computing efficiency. This achieves the technical effect of improving the animation production efficiency of the model, thus solving the technical problem of low animation production efficiency of the model.

[0096] The animation production method of the model in the embodiments of this application will be further described below. Figure 4 This is a flowchart of a model animation production method provided according to an embodiment of this application, such as... Figure 4 As shown, the method includes the following steps:

[0097] Step S401: Create the corresponding skeleton for the broken model.

[0098] In step S401 above, the 3D software 3ds Max includes a custom plugin. After the 3ds Max software obtains the broken model of the complete model, it can call the custom plugin to bind bones to each broken model and record the mapping relationship between the broken model and the bones.

[0099] In this embodiment, a self-made plugin can be used to bind the skeleton of the broken model without manual binding, which solves the technical problems of inaccurate skeleton binding position and difficulty in vertex selection, and improves the efficiency of skeleton binding.

[0100] Figure 5 This is a schematic diagram of a stalagmite model according to an embodiment of this application, such as... Figure 5 As shown, the stalagmite model is a complete model, and it can be broken into multiple fragmented models.

[0101] Figure 6 This is a schematic diagram of a stalagmite fragmentation model according to an embodiment of this application, as shown below. Figure 6 As shown, the stalagmite model can be broken into multiple fragmented models, each of which is an independent sub-model, and the shapes of the fragmented models are irregularly distributed.

[0102] Step S402: Perform mesh collapse on the broken model to obtain the complete model.

[0103] In step S402 above, a custom plugin in 3ds Max software can be used to collapse the mesh of multiple broken models to obtain a complete model.

[0104] Optionally, since each broken model is bound to a skeleton, and the vertices of each broken model are bound to the corresponding skeleton of the broken model, after merging the broken models into a complete model, the skeletons of multiple broken models can also be bound together to obtain the skeleton corresponding to the complete model.

[0105] For example, since each vertex of a broken model is bound to the corresponding bone of the broken model, the movement of the bone can drive the movement of the vertex. After merging the broken models into a complete model, since some vertices of the broken models may overlap after merging, a vertex in the merged complete model may be bound to multiple bones. Based on this, the weight information of each vertex in the complete model can be determined. This weight information is used to indicate the degree of influence of the bones to which the vertex is bound on driving the movement of the vertex.

[0106] Step S403: Skin the complete model and restore the skin weights of the vertices.

[0107] In step S403 above, after obtaining the complete model and determining the weight information of the vertices of the complete model, the complete model can be skinned, that is, the complete model is bound to the skeleton corresponding to the model.

[0108] For example, since there is a mapping relationship between the vertices of the broken model and the vertices of the complete model obtained after collapse, the weight information of the vertices of the broken model before collapse can be determined based on the weight information of the vertices after collapse, and then the determined weight information of the vertices can be determined as the skinning weights of the vertices.

[0109] Optionally, in the embodiments of this application, when creating the model's breaking animation, the breaking animation is typically created based on the key animation frames of the broken virtual object. Figure 7 This is a schematic diagram of a key animation frame of a broken virtual object according to an embodiment of this application.

[0110] Optionally, before collapsing multiple broken models into a complete model, skeletal animation baking can be performed on multiple broken models to optimize the skeletal animation of the broken models. The 3ds Max software's custom plugin includes a baking option, which includes two function controls: one is "All" and the other is "Select". The "All" function control can be used to bake the skeletal animation of each broken sub-model in the complete model at the same time, while the "Select" function control can be used to select the skeletal animation of the broken model to be baked from the complete sub-model.

[0111] Figure 8 This is a schematic diagram of a baking skeletal animation according to an embodiment of this application, such as... Figure 8 As shown, when the "All" control is selected in the baking options, all broken parts of the complete model can be baked simultaneously.

[0112] Figure 9 This is a schematic diagram of a baking skeletal animation according to an embodiment of this application, such as... Figure 9 As shown, when the "Select" control is selected in the baking options, you can select the broken model you want to bake from the full model.

[0113] Figure 10 This is a schematic diagram of a baking skeletal animation according to an embodiment of this application, such as... Figure 10 As shown, after the self-made plugin has finished baking, the baked stalagmite model can be displayed on the interface.

[0114] Optionally, the 3ds Max software interface can continuously play each frame of the model's breaking process animation. Figure 11This is a schematic diagram of a skeletal animation of a broken model according to an embodiment of this application. Figure 12 This is a schematic diagram of a skeletal animation of a broken model according to an embodiment of this application, wherein, Figure 11 It's an animation of the crushing model displayed on the interface during the initial crushing stage. The crushing model is quite large. Figure 12 This is an animation of the fracture model displayed on the post-fracture interface; the fracture model is relatively small. Based on... Figure 11 and Figure 12 The crushing model shows that the crushing model is larger in the early stage of crushing and smaller in the later stage of crushing.

[0115] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0116] This embodiment also provides an animation generation apparatus for a model, which is used to implement the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the terms "unit" and "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0117] Figure 13 This is a schematic diagram of an animation generation apparatus for a model according to an embodiment of this application, such as... Figure 13 As shown, the animation generation device 1300 of the model includes: an acquisition unit 1301, a first merging unit 1302, a first determining unit 1303, a second determining unit 1304, and a control unit 1305.

[0118] The acquisition unit 1301 is used to acquire multiple first models, wherein the multiple first models are used to generate the shattering animation of the second model.

[0119] The first merging unit 1302 is used to merge multiple first models into a second model, wherein at least one vertex of the first model is used to determine the vertex of the second model.

[0120] The first determining unit 1303 is used to determine the first weight information of the vertices of the second model, wherein the first weight information is used to represent the degree of influence of each first target bone in at least one first target bone to which the vertices of the second model are bound on driving the movement of the vertices of the second model.

[0121] The second determining unit 1304 is used to determine the second weight information of at least one vertex of the first model based on the first weight information, wherein the second weight information is used to represent the degree of influence of each second target bone in at least one second target bone to which each vertex of the corresponding first model is bound on the vertex motion of the first model.

[0122] The control unit 1305 is used to control the motion of each corresponding first model based on the second weight information to obtain the skeletal animation of each first model, wherein the skeletal animations of multiple first models constitute the fragmentation animation of the second model.

[0123] Optionally, the device 1300 further includes: a binding unit for binding at least one bone to each first model to obtain multiple bones of multiple first models; a second merging unit for merging multiple bones into a skeleton of a second model; and a third determining unit for determining, in the skeleton of the second model, at least one first target bone to which the vertices of the second model are bound.

[0124] Optionally, the second merging unit is also used to establish hierarchical relationships between multiple bones based on the vertices of each first model to obtain the skeleton of the second model.

[0125] Optionally, the device 1300 further includes: a binding unit for determining at least one second target bone to which each vertex of the first model is bound in the plurality of bones.

[0126] Optionally, the first determining unit 1303 includes: a determining module, used to determine first weight information that matches the breaking animation of the second model, wherein the first weight information is used to control each first target bone to drive the vertex movement of the second model, so that at least one first model corresponding to the vertex of the second model generates skeletal animation.

[0127] Optionally, the second determining unit 1304 includes: an adjustment module, used to adjust the first weight information based on at least one vertex of the first model corresponding to the vertex of the second model, to obtain the second weight information of the vertex of the first model.

[0128] Optionally, the first merging unit 1302 includes: a baking module for performing baking operations on multiple first models respectively; and a merging module for merging the multiple baked first models to obtain a second model.

[0129] Optionally, the device 1300 is further configured to: acquire an original animation, wherein the original animation is used to demonstrate the process of breaking a virtual object represented by a second model; and determine multiple fragmented virtual objects in the original animation as multiple first models, wherein the multiple fragmented virtual objects are used to constitute a virtual object, and each first model has a corresponding key animation frame for each fragmented virtual object.

[0130] Optionally, the device 1300 further includes a generation unit for generating vertices of a second model based on at least one of the following information of vertices of at least one first model: vertex position, vertex index, vertex order, and associated vertices of vertices of at least one first model.

[0131] In the animation generation apparatus of the model in this embodiment, the acquisition unit 1301 is used to acquire multiple first models, wherein the multiple first models are used to generate the breaking animation of the second model; the merging unit is used to merge the multiple first models into a second model, wherein at least one vertex of the first model is used to determine the vertex of the second model; the first determining unit is used to determine the first weight information of the vertices of the second model; the second determining unit is used to determine the second weight information of the vertices of at least one first model based on the first weight information; and the control unit is used to control the movement of each corresponding first model based on the second weight information to obtain the skeletal animation of each first model, wherein the skeletal animations of the multiple first models constitute the breaking animation of the second model. In other words, in this embodiment, sub-models can be merged into a complete model. Then, the weight information of the vertices of the complete model is determined, and based on the weight information of the complete model, the weight information of the vertices of each sub-model is determined. Then, the movement of each sub-model is controlled based on the weight information of the vertices of the sub-model to obtain the breaking animation of the complete model. In this process, the calculation is mainly based on the complete model. Since the data storage and calculation of the complete model are much smaller than those of multiple sub-models, the breaking animation of the complete model is obtained by calculating the complete model, which achieves the purpose of saving data storage space and reducing data calculation, thereby achieving the technical effect of improving the animation production efficiency of the model and solving the technical problem of low animation production efficiency of the model.

[0132] Figure 14 This is a schematic diagram of an animation generation apparatus for a model according to an embodiment of this application, such as... Figure 14 As shown, the animation generation device 1400 of the model includes: a first display unit 1401, a calling unit 1402, and a second display unit 1403.

[0133] The first display unit 1401 is used to display multiple first models on a graphical user interface, wherein the multiple first models are used to generate a breaking animation of a second model.

[0134] Calling unit 1402 is used to call the target plugin to generate skeletal animation for each first model in response to an animation production operation performed on the graphical user interface. The second model is obtained by merging multiple first models. The vertices of at least one first model are used to determine the vertices of the second model. The first weight information of the vertices of the second model is used to generate the second weight information of the vertices of at least one first model. The first weight information is used to represent the degree of influence of each first target bone in at least one first target bone to which the vertices of the second model are bound to on driving the movement of the vertices of the second model. The second weight information is used to represent the degree of influence of each second target bone in at least one second target bone to which the vertices of each corresponding first model are bound on driving the movement of the vertices of the first model. The skeletal animation of each first model is obtained by controlling the movement of each corresponding first model based on the second weight information.

[0135] The second display unit 1403 is used to display, on a graphical user interface, a fragmentation animation of a second model consisting of skeletal animations of multiple first models.

[0136] In the animation generation apparatus for the model in this embodiment, a first display unit is used to display multiple first models on a graphical user interface, wherein the multiple first models are used to generate a breaking animation of a second model; a calling unit is used to call a target plugin to generate skeletal animation for each first model in response to an animation production operation performed on the graphical user interface; and a second display unit is used to display the breaking animation of the second model composed of the skeletal animations of the multiple first models on the graphical user interface. In other words, in this embodiment, the skeletal animation of each first model can be generated based on the target plugin, eliminating the need for multiple skeletal bindings, saving computational resources, improving the efficiency of model animation production, and thus solving the technical problem of low model animation production efficiency.

[0137] It should be noted that the above-mentioned units and modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but not limited to these: all the above-mentioned units and modules are located in the same processor; or, the above-mentioned units and modules are located in different processors in any combination.

[0138] Embodiments of this application also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above method embodiments when run.

[0139] Optionally, in this embodiment, the computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0140] Optionally, in this embodiment, the computer-readable storage medium may be located in any computer terminal in a group of computer terminals in a computer network, or in any mobile terminal in a group of mobile terminals.

[0141] Optionally, in this embodiment, the computer-readable storage medium may be configured to store a computer program for performing the following steps:

[0142] S1, Obtain multiple first models, wherein the multiple first models are used to generate the shattering animation of the second model;

[0143] S2, merge multiple first models into a second model, wherein at least one vertex of the first model is used to determine the vertex of the second model;

[0144] S3, determine the first weight information of the vertices of the second model, wherein the first weight information is used to represent the degree of influence of each first target bone in at least one first target bone to which the vertices of the second model are bound on the movement of the vertices of the second model.

[0145] S4, based on the first weight information, determine the second weight information of at least one vertex of the first model, wherein the second weight information is used to represent the degree of influence of each second target bone in at least one second target bone to which each vertex of the corresponding first model is bound on the vertex motion of the first model.

[0146] S5, based on the second weight information, control the motion of each corresponding first model to obtain the skeletal animation of each first model, wherein the skeletal animations of multiple first models constitute the fragmentation animation of the second model.

[0147] Optionally, the aforementioned computer-readable storage medium is further configured to store program code for performing the following steps: binding at least one bone to each first model to obtain multiple bones of multiple first models; merging the multiple bones into the skeleton of a second model; and determining, within the skeleton of the second model, at least one first target bone to which the vertices of the second model are bound.

[0148] Optionally, the aforementioned computer-readable storage medium is further configured to store program code for performing the following steps: establishing hierarchical relationships between multiple bones based on the vertices of each first model to obtain the skeleton of the second model.

[0149] Optionally, the aforementioned computer-readable storage medium is further configured to store program code for performing the following steps: determining at least one second target bone to which each vertex of the first model is bound in a plurality of bones.

[0150] Optionally, the aforementioned computer-readable storage medium is further configured to store program code for performing the following steps: determining first weight information matching the shattering animation of the second model, wherein the first weight information is used to control the vertex movement of the second model driven by each first target bone, so that at least one first model corresponding to the vertex of the second model generates skeletal animation.

[0151] Optionally, the aforementioned computer-readable storage medium is further configured to store program code for performing the following steps: adjusting first weight information based on at least one vertex of the first model corresponding to the vertex of the second model to obtain second weight information of the vertex of the first model.

[0152] Optionally, the aforementioned computer-readable storage medium is further configured to store program code for performing the following steps: baking multiple first models respectively; merging the baked multiple first models to obtain a second model.

[0153] Optionally, the aforementioned computer-readable storage medium is further configured to store program code for performing the following steps: acquiring an original animation, wherein the original animation is used to demonstrate the process of breaking a virtual object represented by a second model; determining multiple fragmented virtual objects in the original animation as multiple first models, wherein the multiple fragmented virtual objects are used to constitute a virtual object, and each first model has corresponding key animation frames for each fragmented virtual object.

[0154] Optionally, the aforementioned computer-readable storage medium is further configured to store program code for performing the following steps: generating vertices of a second model based on at least one of the following information of vertices of at least one first model: vertex position, vertex index, vertex order, and associated vertices of at least one vertex of the first model.

[0155] In this embodiment, a technical solution for generating animation of a model is provided using a non-volatile storage medium. Sub-models can be merged into a complete model. Then, the vertex weights of the complete model are determined, and based on these weights, the vertex weights of each sub-model are determined. Furthermore, the movement of each sub-model is controlled based on these vertex weights to obtain a fragmentation animation of the complete model. In this process, calculations are primarily performed based on the complete model. Since the data storage and computational load of the complete model are far less than those of multiple sub-models, obtaining the fragmentation animation of the complete model through calculations on the complete model achieves the goals of saving data storage space and reducing computational load. This improves the efficiency of model animation production and solves the technical problem of low model animation production efficiency.

[0156] Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this application can be embodied in the form of a software product, which can be stored in a computer-readable storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, terminal device, or network device, etc.) to execute the methods according to the embodiments of this application.

[0157] In exemplary embodiments of this application, a computer-readable storage medium stores a program product capable of implementing the methods described above in this embodiment. In some possible implementations, various aspects of the embodiments of this application may also be implemented as a program product including program code, which, when the program product is run on a terminal device, causes the terminal device to perform the steps described in the "Exemplary Methods" section of this embodiment according to various exemplary embodiments of this application.

[0158] The program product for implementing the above-described method according to embodiments of this application may employ a portable compact disc read-only memory (CD-ROM) and include program code, and may run on a terminal device, such as a personal computer. However, the program product of the embodiments of this application is not limited thereto. In the embodiments of this application, the computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.

[0159] The aforementioned program product may take the form of any combination of one or more computer-readable media. Such computer-readable storage media may be, for example, but not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof. More specific examples (not exhaustive) of computer-readable storage media include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0160] It should be noted that the program code contained on the computer-readable storage medium can be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.

[0161] This application also provides an electronic device including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.

[0162] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.

[0163] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program:

[0164] S1, Obtain multiple first models, wherein the multiple first models are used to generate the shattering animation of the second model;

[0165] S2, merge multiple first models into a second model, wherein at least one vertex of the first model is used to determine the vertex of the second model;

[0166] S3, determine the first weight information of the vertices of the second model, wherein the first weight information is used to represent the degree of influence of each first target bone in at least one first target bone to which the vertices of the second model are bound on the movement of the vertices of the second model.

[0167] S4, based on the first weight information, determine the second weight information of at least one vertex of the first model, wherein the second weight information is used to represent the degree of influence of each second target bone in at least one second target bone to which each vertex of the corresponding first model is bound on the vertex motion of the first model.

[0168] S5, based on the second weight information, control the motion of each corresponding first model to obtain the skeletal animation of each first model, wherein the skeletal animations of multiple first models constitute the fragmentation animation of the second model.

[0169] Optionally, the processor may also be configured to perform the following steps via a computer program: binding at least one bone to each first model to obtain multiple bones of multiple first models; merging the multiple bones into the skeleton of a second model; and determining, within the skeleton of the second model, at least one first target bone to which the vertices of the second model are bound.

[0170] Optionally, the processor described above can also be configured to perform the following steps via a computer program: based on the vertices of each first model, establish hierarchical relationships between multiple bones to obtain the skeleton of the second model.

[0171] Optionally, the processor described above may also be configured to perform the following steps via a computer program: determining at least one second target bone to which each vertex of the first model is bound in the multiple bones.

[0172] Optionally, the processor may also be configured to perform the following steps via a computer program: determining first weight information that matches the breaking animation of the second model, wherein the first weight information is used to control the vertex movement of the second model driven by each first target bone, so that at least one first model corresponding to the vertex of the second model generates skeletal animation.

[0173] Optionally, the processor may also be configured to perform the following steps via a computer program: based on at least one vertex of the first model corresponding to the vertex of the second model, adjust the first weight information to obtain the second weight information of the vertex of the first model.

[0174] Optionally, the processor may also be configured to perform the following steps via a computer program: baking multiple first models respectively; merging the baked multiple first models to obtain a second model.

[0175] Optionally, the processor may also be configured to perform the following steps via a computer program: acquiring an original animation, wherein the original animation is used to demonstrate the process of breaking a virtual object represented by a second model; determining multiple fragmented virtual objects in the original animation as multiple first models, wherein the multiple fragmented virtual objects are used to constitute a virtual object, and each first model has corresponding key animation frames for each fragmented virtual object.

[0176] Optionally, the processor may also be configured to perform the following steps via a computer program: generating vertices of a second model based on at least one of the following information of vertices of at least one first model: vertex position, vertex index, vertex order, and associated vertices of at least one vertex of the first model.

[0177] In the electronic device of this embodiment, a method for generating animation of a model is provided. Sub-models can be merged into a complete model. Then, the vertex weights of the complete model are determined, and based on these weights, the vertex weights of each sub-model are determined. Furthermore, the movement of each sub-model is controlled based on these vertex weights to obtain a fragmentation animation of the complete model. In this process, calculations are primarily performed based on the complete model. Since the data storage and computational load of the complete model are far less than those of multiple sub-models, obtaining the fragmentation animation of the complete model through calculations achieves the goal of saving data storage space and reducing computational load, thereby improving the efficiency of model animation production and solving the technical problem of low model animation production efficiency.

[0178] Figure 15 This is a schematic diagram of an electronic device according to an embodiment of this application. Figure 15 As shown, the electronic device 1500 is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.

[0179] like Figure 15 As shown, the electronic device 1500 is presented in the form of a general-purpose computing device. The components of the electronic device 1500 may include, but are not limited to: at least one processor 1510, at least one memory 1520, a bus 1530 connecting different system components (including memory 1520 and processor 1510), and a display 1540.

[0180] The memory 1520 stores program code that can be executed by the processor 1510, causing the processor 1510 to perform the steps described in the method section of the embodiments of this application according to various exemplary implementations of this application.

[0181] The memory 1520 may include a readable medium in the form of volatile memory cells, such as random access memory (RAM) 15201 and / or cache memory 15202, and may further include read-only memory (ROM) 15203, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory.

[0182] In some instances, memory 1520 may also include programs / utilities 15204 having a set (at least one) of program modules 15205, including but not limited to: an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Memory 1520 may further include memory remotely located relative to processor 1510, which can be connected to electronic device 1500 via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0183] Bus 1530 can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, peripheral bus, graphics acceleration port, processor 1510, or a local bus using any of the various bus structures.

[0184] The display 1540 may be, for example, a touchscreen liquid crystal display (LCD) that allows a user to interact with the user interface of the electronic device 1500.

[0185] Optionally, the electronic device 1500 can also communicate with one or more external devices 1400 (e.g., keyboard, pointing device, Bluetooth device, etc.), one or more devices that enable a user to interact with the electronic device 1500, and / or any device that enables the electronic device 1500 to communicate with one or more other computing devices (e.g., router, modem, etc.). This communication can be performed via the input / output (I / O) interface 1550. Furthermore, the electronic device 1500 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via the network adapter 1560. Figure 15 As shown, network adapter 1560 communicates with other modules of electronic device 1500 via bus 1530. It should be understood that, although... Figure 15 As not shown, other hardware and / or software modules may be used in conjunction with electronic device 1500, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0186] The aforementioned electronic device 1500 may further include: a keyboard, a cursor control device (such as a mouse), an input / output interface (I / O interface), a network interface, a power supply, and / or a camera.

[0187] Those skilled in the art will understand that Figure 15The structure shown is for illustrative purposes only and does not limit the structure of the electronic device described above. For example, the electronic device 1500 may also include components that are more... Figure 15 The more or fewer components shown, or having the same Figure 1 Different configurations are shown. The memory 1520 can be used to store computer programs and corresponding data, such as the computer program and corresponding data corresponding to the model animation generation method in this embodiment. The processor 1510 executes various functional applications and data processing by running the computer program stored in the memory 1520, thereby implementing the aforementioned model animation generation method.

[0188] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0189] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0190] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.

[0191] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0192] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0193] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.

[0194] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A method for generating animation of a model, characterized in that, include: Obtain multiple first models, wherein the multiple first models are used to generate the fragmentation animation of the second model; The plurality of first models are merged into a second model, wherein at least one vertex of the first model is used to determine the vertex of the second model; First weight information of the vertices of the second model is determined, wherein the first weight information is used to represent the degree of influence of each of the first target bones in at least one first target bone to which the vertices of the second model are bound on driving the movement of the vertices of the second model. Based on the first weight information, second weight information of at least one vertex of the first model is determined, wherein the second weight information is used to represent the degree of influence of each second target bone in at least one second target bone to which each vertex of the first model is bound on driving the vertex movement of the first model. Based on the second weight information, the motion of each first model is controlled to obtain the skeletal animation of each first model, wherein the skeletal animation of the plurality of first models constitutes the fragmentation animation of the second model; Wherein, there is a mapping relationship between the vertices in the first model and the first target skeleton in the second model, and the step of determining the second weight information of at least one vertex of the first model based on the first weight information includes: determining the first target skeleton corresponding to the vertex in the first model in the second model based on the mapping relationship; and determining the second weight information of the vertex in the first model based on the degree of influence of the first target skeleton on the vertex motion driving the second model in the first weight information.

2. The method according to claim 1, characterized in that, The method further includes: Bind at least one bone to each of the first models to obtain multiple bones for the plurality of first models; The multiple bones are merged into the skeleton of the second model; In the skeleton of the second model, the at least one first target bone to which the vertices of the second model are bound is determined.

3. The method according to claim 2, characterized in that, The multiple bones are merged into the skeleton of the second model, including: Based on each vertex of the first model, establish the hierarchical relationship between the multiple bones to obtain the skeleton of the second model; The hierarchy relationship is used to represent the parent-child relationship between the multiple bones, and the hierarchy relationship is determined by the degree of influence of the bones to which each vertex of the first model is bound on driving the vertex movement. The level of the bone with a greater degree of influence is higher than the level of the bone with a lesser degree of influence.

4. The method according to claim 2, characterized in that, The method further includes: In the plurality of bones, determine the at least one second target bone to which each vertex of the first model is bound.

5. The method according to claim 1, characterized in that, Determining the first weight information of the vertices in the second model includes: Determine the first weight information that matches the shattering animation of the second model, wherein the first weight information is used to control each first target bone to drive the vertex movement of the second model so that at least one of the first models corresponding to the vertices of the second model generates the skeletal animation.

6. The method according to claim 1, characterized in that, Based on the first weight information, determine the second weight information of at least one vertex of the first model, including: Based on at least one vertex of the first model corresponding to a vertex of the second model, the first weight information is adjusted to obtain the second weight information of at least one vertex of the first model.

7. The method according to claim 1, characterized in that, Merging the multiple first models into a second model includes: Baking operations are performed on the plurality of first models respectively; The multiple first models after baking are merged to obtain the second model.

8. The method according to any one of claims 1 to 7, characterized in that, The method further includes: Obtain the original animation, wherein the original animation is used to demonstrate the process of shattering the virtual object represented by the second model; The multiple fragmented virtual objects in the original animation are identified as the multiple first models, wherein the multiple fragmented virtual objects are used to constitute the virtual object, and each first model has a corresponding key animation frame for each fragmented virtual object.

9. The method according to any one of claims 1 to 7, characterized in that, The method further includes: The vertices of the second model are generated based on at least one of the following information of at least one vertex of the first model: vertex position, vertex index, vertex order, and associated vertex of at least one vertex of the first model.

10. A method for generating animation of a model, characterized in that, include: Multiple first models are displayed on a graphical user interface, wherein the multiple first models are used to generate a breaking animation of a second model; In response to an animation creation operation applied to the graphical user interface, a target plugin is invoked to generate skeletal animation for each of the first models. The second model is obtained by merging the multiple first models. At least one vertex of the first model is used to determine the vertices of the second model. First weight information of the vertices of the second model is used to generate second weight information of the vertices of at least one first target bone to which the vertex of the second model is bound, representing the degree of influence of each first target bone on driving the vertex movement of the second model. The second weight information is used to represent the degree of influence of each second target bone to which the corresponding vertex of the first model is bound, representing the degree of influence of each second target bone on driving the vertex movement of the first model. The skeletal animation of each first model is obtained by controlling the movement of each corresponding first model based on the second weight information. The graphical user interface displays a fragmentation animation of the second model, which is composed of the skeletal animations of the plurality of first models; Wherein, there is a mapping relationship between the vertices in the first model and the first target skeleton in the second model, and the degree of influence of the first target skeleton on the movement of the vertices in the second model in the first weight information is used to determine the second weight information of the vertices in the first model.

11. An animation generation device for a model, characterized in that, include: An acquisition unit is used to acquire multiple first models, wherein the multiple first models are used to generate a shattering animation of a second model; A merging unit is used to merge the plurality of first models into a second model, wherein at least one vertex of the first model is used to determine the vertex of the second model; The first determining unit is used to determine the first weight information of the vertices of the second model, wherein the first weight information is used to represent the degree of influence of each of the first target bones in at least one first target bone to which the vertices of the second model are bound on driving the movement of the vertices of the second model. The second determining unit is used to determine second weight information of at least one vertex of the first model based on the first weight information, wherein the second weight information is used to represent the degree of influence of each second target bone in at least one second target bone to which each vertex of the first model is bound on the vertex motion of the first model. A control unit is configured to control the motion of each corresponding first model based on the second weight information to obtain the skeletal animation of each first model, wherein the skeletal animations of the plurality of first models constitute the fragmentation animation of the second model; Wherein, there is a mapping relationship between the vertices in the first model and the first target skeleton in the second model, and the second determining unit is used to determine the second weight information of at least one vertex of the first model based on the first weight information through the following steps: determining the first target skeleton corresponding to the vertex in the first model in the second model based on the mapping relationship; determining the second weight information of the vertex of the first model based on the degree of influence of the first target skeleton on the vertex motion driving the second model in the first weight information.

12. An animation generation device for a model, characterized in that, include: A first display unit is used to display multiple first models on a graphical user interface, wherein the multiple first models are used to generate a breaking animation of a second model; The calling unit is used to respond to the animation production operation applied to the graphical user interface, and to call the target plugin to generate the skeletal animation of each of the first models. The second model is obtained by merging the multiple first models. At least one vertex of the first model is used to determine the vertex of the second model. The first weight information of the vertices of the second model is used to generate the second weight information of the vertices of at least one first model. The first weight information is used to represent the degree of influence of each first target bone in at least one first target bone to which the vertex of the second model is bound on the movement of the vertex of the second model. The second weight information is used to represent the degree of influence of each second target bone in at least one second target bone to which the vertex of each corresponding first model is bound on the movement of the vertex of the first model. The skeletal animation of each first model is obtained by controlling the movement of each corresponding first model based on the second weight information. The second display unit is used to display, on the graphical user interface, a fragmentation animation of the second model consisting of the skeletal animations of the plurality of first models; Wherein, there is a mapping relationship between the vertices in the first model and the first target skeleton in the second model, and the degree of influence of the first target skeleton on the movement of the vertices in the second model in the first weight information is used to determine the second weight information of the vertices in the first model.

13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein the computer program is configured to perform the method described in any one of claims 1 to 10 when executed by a processor.

14. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to run the computer program to perform the method described in any one of claims 1 to 10.