CN111563945B - Generation method, device and equipment of character morphing animation and readable storage medium - Google Patents

Generation method, device and equipment of character morphing animation and readable storage medium Download PDF

Info

Publication number
CN111563945B
CN111563945B CN202010367218.6A CN202010367218A CN111563945B CN 111563945 B CN111563945 B CN 111563945B CN 202010367218 A CN202010367218 A CN 202010367218A CN 111563945 B CN111563945 B CN 111563945B
Authority
CN
China
Prior art keywords
model
change
role
character
preset
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010367218.6A
Other languages
Chinese (zh)
Other versions
CN111563945A (en
Inventor
任俊璐
刘毅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Perfect World Beijing Software Technology Development Co Ltd
Original Assignee
Perfect World Beijing Software Technology Development Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Perfect World Beijing Software Technology Development Co Ltd filed Critical Perfect World Beijing Software Technology Development Co Ltd
Priority to CN202010367218.6A priority Critical patent/CN111563945B/en
Publication of CN111563945A publication Critical patent/CN111563945A/en
Priority to PCT/CN2021/081842 priority patent/WO2021218482A1/en
Application granted granted Critical
Publication of CN111563945B publication Critical patent/CN111563945B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T13/00Animation
    • G06T13/203D [Three Dimensional] animation
    • G06T13/403D [Three Dimensional] animation of characters, e.g. humans, animals or virtual beings
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/50Controlling the output signals based on the game progress
    • A63F13/52Controlling the output signals based on the game progress involving aspects of the displayed game scene

Abstract

The invention discloses a method, a device and equipment for generating a character morphing animation and a readable storage medium, relates to the technical field of game design, can directly load a mask layout when a morphing instruction is received, generates the morphing animation by fusing the mask layout with a skeleton change process, does not need to perform mask processing and the like on the mask layout, reduces the calculation amount, reduces the cost and the difficulty, avoids overhigh workload, and improves the generation efficiency of the morphing animation. The method comprises the following steps: receiving a change instruction, and acquiring a role model and a change model of a target game role; receiving a change instruction, and acquiring a role model and a change model of a target game role; determining a bone offset, and generating a bone change process from a role model to a change model based on the bone offset; loading a plurality of Mongolian layouts of the target game role, and generating a material change process by adopting the Mongolian layouts; and fusing the skeleton change process and the material change process to obtain the change animation of the target game role.

Description

Generation method, device and equipment of character morphing animation and readable storage medium
Technical Field
The invention relates to the technical field of game design, in particular to a method, a device, equipment and a readable storage medium for generating a role-changing animation.
Background
With the continuous development of the internet, people in the modern society live with various games, and the games as a leisure and entertainment mode greatly relieve the pressure of people in life, work and study. In recent years, game design techniques have become mature, and competitive games are favored by many people. In an athletic game, a player may select a game character in the game world, use the game character to make a monster, a breakthrough, or the like in the game world. In order to enrich the playing methods and the images of the game roles, a changing mechanism of the game roles is also provided in many games, when the role attributes of the game roles meet the changing requirements, the game roles can change, role changing animations are displayed in the games, the game roles change into another form, the increase of the attack power, the change of the role images and the like are realized, and more new ideas are brought to players.
In the related art, when a game developer designs a change of a game character, a plurality of Mask (Mask) maps for representing each stage of the change process are usually required to be drawn for the game character, the plurality of Mask maps are masked by engine material nodes to generate a change animation of the game character, and when a player requests a change in a game, the change animation is displayed to realize the change of the game character.
In the process of implementing the invention, the inventor finds that the related art has at least the following problems:
the computational capability of the engine material nodes is limited, the number of Mask maps is limited to 16, generally, for a game role with a complex role model, the whole morphing process cannot be completely reflected by the morphing animation composed of 16 Mask maps, the computational load of the engine material nodes needs to be increased, and the game role morphing cost and difficulty are high, the workload is high, and the efficiency is low.
Disclosure of Invention
In view of the above, the present invention provides a method, an apparatus, a device and a readable storage medium for generating a character morphing animation, and mainly aims to solve the problems of high game character morphing cost and difficulty, large workload and low efficiency caused by increasing the calculation amount of engine material nodes.
According to a first aspect of the present invention, there is provided a method for generating a character-changing animation, the method comprising:
receiving a change instruction, and acquiring a role model and a change model of a target game role, wherein the role model is a model of an unchanged image of the target game role, and the change model is a model of an image of the changed target game role;
determining a bone offset, and generating a bone change process of the character model to the metamorphic model based on the bone offset, wherein the bone offset indicates a moving distance of a space point forming the character model in the process of changing the character model to the metamorphic model;
loading a plurality of Mongolian layouts of the target game role, and generating a material change process by adopting the Mongolian layouts;
and fusing the skeleton change process and the material change process to obtain the change animation of the target game role.
According to a second aspect of the present invention, there is provided an apparatus for generating a character-change animation, the apparatus comprising:
the first obtaining module is used for receiving a change instruction and obtaining a role model and a change model of a target game role, wherein the role model is a model of an unchanged image of the target game role, and the change model is a model of an image of a changed target game role;
a generating module, configured to determine a bone offset, and based on the bone offset, generate a bone change process of the character model to the metamorphic model, where the bone offset indicates a moving distance of a spatial point constituting the character model in the process of changing the character model to the metamorphic model;
the loading module is used for loading a plurality of Mongolian layouts of the target game role and generating a material change process by adopting the Mongolian layouts;
and the fusion module is used for fusing the bone change process and the material change process to obtain the change animation of the target game role.
According to a third aspect of the present invention, there is provided an apparatus comprising a memory storing a computer program and a processor implementing the steps of the method of the first aspect when the processor executes the computer program.
According to a fourth aspect of the present invention, there is provided a readable storage medium having stored thereon a computer program which, when executed by a processor, carries out the steps of the method of the first aspect as set forth above.
By means of the technical scheme, the method, the device, the equipment and the readable storage medium for generating the character morphing animation can directly load the mask layout when a morphing instruction is received, the morphing animation is generated and displayed in a game by fusing the mask layout with the skeleton variation process, processing operations such as masking on the mask layout are not needed, the calculation amount is reduced, the cost and the difficulty of the game character morphing are reduced, the workload of developers is prevented from being too high, and the generation efficiency of the morphing animation is improved.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
FIG. 1 is a flow chart illustrating a method for generating a character morphing animation according to an embodiment of the present invention;
FIG. 2A is a flow chart illustrating a method for generating a character morphing animation according to an embodiment of the present invention;
FIG. 2B is a diagram illustrating a method for generating a character morphing animation according to an embodiment of the present invention;
FIG. 2C is a diagram illustrating a method for generating a character morphing animation according to an embodiment of the present invention;
FIG. 2D is a diagram illustrating a method for generating a character morphing animation according to an embodiment of the present invention;
fig. 3A is a schematic structural diagram illustrating a device for generating a character morphing animation according to an embodiment of the present invention;
FIG. 3B is a schematic structural diagram illustrating an apparatus for generating a character morphing animation according to an embodiment of the present invention;
fig. 3C is a schematic structural diagram illustrating a device for generating a character morphing animation according to an embodiment of the present invention;
fig. 3D is a schematic structural diagram illustrating a device for generating a character morphing animation according to an embodiment of the present invention;
FIG. 3E is a schematic structural diagram illustrating an apparatus for generating a character morphing animation according to an embodiment of the present invention;
fig. 3F is a schematic structural diagram illustrating a device for generating a character morphing animation according to an embodiment of the present invention;
fig. 4 is a schematic diagram illustrating an apparatus structure of an apparatus according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention can be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
The embodiment of the invention provides a method for generating a role-changing animation, which comprises the following steps of:
101. and receiving a change instruction, and acquiring a role model and a change model of the target game role, wherein the role model is a model of an unchanged image of the target game role, and the change model is a model of an image of the changed target game role.
102. And determining a bone offset, and generating a bone change process of changing the character model to the metamorphic model based on the bone offset, wherein the bone offset indicates the moving distance of the space point forming the character model in the process of changing the character model to the metamorphic model.
103. And loading a plurality of Mongolian layouts of the target game role, and generating a material change process by adopting the plurality of Mongolian layouts.
104. And fusing the skeleton change process and the material change process to obtain the change animation of the target game role.
According to the method provided by the embodiment of the invention, when the morphing instruction is received, the mask layout can be directly loaded, the morphing animation is generated and displayed in the game by fusing the mask layout and the skeleton variation process, processing operations such as masking and the like on the mask layout are not needed, the calculated amount is reduced, the cost and the difficulty of the role morphing of the game are reduced, the too high workload of developers is avoided, and the generation efficiency of the morphing animation is improved.
An embodiment of the present invention provides a method for generating a character morphing animation, as shown in fig. 2A, the method includes:
201. and establishing a role model and a metamorphic model of the target game role.
The inventor realizes that the whole deformation of the game character in many games needs to be completed in a short time at present, therefore, when a developer of the game designs the deformation process of the game character, a plurality of Mask maps for showing each stage in the deformation process are drawn for the game character, the Mask processing is carried out on the plurality of Mask maps through an engine material node, thereby forming the deformation process of the game character, and when a player requests the deformation in the game, the deformation process is displayed, thereby realizing the deformation of the game character. In the process, the Mask map belongs to a set template, the effect of the game role change is determined, the process is only carried out according to the Mask, the change process of the common game role is delicate, a large number of Mask maps are needed for completely showing the change process, and the calculated amount of engine material nodes is tested. In addition, the art workload for making the Mask map is very large, and the Mask map is only deformed by simply changing the skin of the model, so that the deformation process is unnatural or the Mask map is likely to be cracked. Therefore, the invention provides a method for generating a character morphing animation, which constructs a skeleton variation process and a plurality of masking layouts, directly loads the masking layouts to be fused with the skeleton variation process when morphing is needed, can generate the morphing animation and directly display the morphing process without setting Mask maps in advance, not only reduces the art difficulty, programs the whole morphing process, reduces the performance calculation, shortens the self-making period of the morphing animation, but also makes the morphing animation more natural and realizes the morphing without dead angles.
In order to realize the method, the model when the game role is not changed and the model after the change are determined, so that the rendering of the stage model in the change process is realized, and a foundation is laid for the generation of a subsequent mask graph. The model of the non-transformed image of the target game role is the role model mentioned in the embodiment of the invention, and the model of the transformed image of the target game role is the transformed model mentioned in the embodiment of the invention. When the character model and the variant model are manufactured, the character model is obtained based on the basic image of the game character, and the variant of the character in the game is usually realized by a series of evolutions, changes and the like on the basic image, so the character model can be established firstly, and the variant model can be established on the basis of the character model. The specific process of establishing the role model and the metamorphic model is as follows: first, wiring is performed in accordance with the image of the target game character, and a character model is generated. And then, determining the changed image of the target game character, and mapping the changed image with the joint of the character model. In the actual application process, the character model and the metamorphic model generated after the target character image and the metamorphic image are wired can be as shown in fig. 2B. In fig. 2B, the left model is a character model, the right model is a morphing model, and lines formed on the surfaces of the two models are wirings. According to the wiring, a plurality of grids can be formed, so that the grids can be filled based on materials subsequently to realize the fusion of the model and the materials instead of simply changing the skin, the fusion is comprehensive and complete, the model and the materials are prevented from being cut apart, and the obtained deformation effect is better and natural. In order to ensure that joints, bones and the like between the character model and the metamorphic model are completely corresponding, so that the motion of the character model and the metamorphic model in the game is correct and the corresponding bones can be driven, the wiring of the character model and the metamorphic model on the corresponding parts needs to be ensured to be completely consistent. For example, referring to the triangle formed by the wiring in the circle in fig. 2C, the triangle is located at the knee of the character model, and the triangle also corresponds to the knee of the morph model. It should be noted that the present invention is only illustrated by using a triangle, in the practical application process, the wiring may also form a quadrangle, a pentagon, etc. on the model, and no matter what shape is formed, the shapes correspond to each other in the character model and the deformation model, so that the wiring of the two models can be ensured to be completely consistent. Next, the pitch between the wirings of the character model is changed using the joints as the fixed points, and a morphing model is obtained. The wiring number and the wiring mode of the transformer model can be consistent with those of the role model through the process, and the wirings of all parts are mutually corresponding, so that the role model and the transformer model are ensured to be consistent in wiring, the fusion deformation from the role model to the transformer model can be realized in the subsequent process, and the deformed transformer model is ensured to be correct in the subsequent operation.
After the role model and the transformer model are obtained through wiring, the role model and the transformer model need to be bound, and the requirement for fusing the two models subsequently is met. When the character model and the variant model are bound, because some bones are not possessed by the character model, but the variant model has, for example, a tail, a tip and the like, and the fusion process of the model requires that weight information of the character model and the variant model is mutually transmitted, and can be realized only if the bones are the same, at least one bone to be added needs to be obtained, the mapping position of the at least one bone to be added in the character model is determined, and the at least one bone to be added is added to the character model according to the mapping position. Wherein, at least one bone to be added, namely the bone which is included by the metamorphic model and not included by the character model. For example, assuming that the metamorphic model has more tails than the character model and the tails consist of 6 bones, the 6 bones are placed in the character model where the tails are wired at the tail vertebrae and skin is added to control the motion information of the tails. And then, establishing a mapping relation between the role model and the variant model based on the joints, and binding the role model and the variant model, namely binding the same joints between the role model and the variant model, so that the role model and the variant model are bound, and further realizing skin addition.
202. A plurality of montage layouts is created.
In the embodiment of the invention, after the generation of the skeleton change process is completed, the material establishment is started for each model, so that the skinning operation on the models is realized, and a plurality of skinning layouts are established. The material is required to be evolved along with the model, so the material also has an evolution process, a plurality of preset materials corresponding to the role model are required to be obtained, for each preset material in the preset materials, the material creation is carried out on the role model based on the preset material to obtain a creation result, the creation result is copied to the function node, and the material function of the role model is generated. And then, according to the same flow, repeating the process of executing the material function, and generating the material function for each preset material in the plurality of preset materials to obtain a plurality of material functions. And finally, converting the plurality of material functions into a plurality of Mongolian layouts. It should be noted that the plurality of preset materials also have a creation order, and the material function generation process needs to be sequentially executed according to the order, so that the generated plurality of montage layouts are correct in color change. In the process of actual application, after the creation result is generated, the creation result can be displayed to a developer for the developer to refer to and modify. When a confirmation instruction for the creation result is received, it may be determined that the developer feels that the creation result of the material is satisfactory, and the process of copying the authoring result may be continuously performed, or the confirmation by the developer may not be relied on, which is not specifically limited by the present invention.
It should be noted that, in the above step 201 and step 202, the generation process of the character model, the morphing model, and the mask map is described in detail, in the embodiment of the present invention, the generation process is executed before the morphing instruction is received, and after the morphing instruction is received, the model and the mask map may be directly obtained for use. In the process of practical application, after the change instruction is received, the generation process of the model and the mask diagram can be executed, and the model and the mask diagram can be fused in different modes in the change process of different times, so that various change operations are realized. The time of the color modeling model, the metamorphic model and the Mongolian layout is not particularly limited.
203. Receiving a change instruction, acquiring a role model and a change model of a target game role, determining a skeleton offset, and generating a skeleton change process from the role model to the change model based on the skeleton offset.
In the embodiment of the invention, after the character model and the morphing model are generated, since the morphing of the game character in the game usually needs to embody a morphing process, the interest and the impact of the morphing process can be embodied, therefore, after a morphing instruction is received, a skeleton morphing process for displaying the morphing process needs to be constructed based on the character model and the morphing model, and the process of the character model evolving to the morphing model is embodied. When the process is established, the character model and the metamorphic model need to be arranged at the same position for comparison, the difference between the two models is determined, and the difference is evolved according to time to form the process, so that the skeletal difference between the character model and the metamorphic model needs to be calculated as skeletal offset, and the skeletal offset is utilized to evolve the metamorphic process to generate the skeletal variation process. In the embodiment, the change instruction request is changed from the role model to the change model, and in the actual application process, the change instruction may also request to change from the change model to the role model, so that the bone change process and the material change process are fused in a reverse order subsequently.
When calculating the skeleton difference value, because the centers of gravity of the character model and the deformation model are different, in order to realize the comparison of corresponding parts between the character model and the deformation model, a preset skeleton standard point needs to be obtained, the position of the preset skeleton standard point mapped in the character model is used as a first reference point, the position of the preset skeleton standard point mapped in the deformation model is used as a second reference point, the second reference point is superposed with the first reference point, the character model and the deformation model are controlled to be superposed, so that the skeleton difference value between space points of the superposed character model and the appointed part of the deformation model is calculated, and the skeleton difference value is used as the skeleton offset. Wherein the bone offset is substantially a spatial vector. In the actual application process, the preset skeleton standard point can be generally selected as a pelvis, so that the pelvis set by the deformation model is moved to the position of the pelvis of the role model, and the position information of the skeleton when the final deformation is finished is determined. Then, displacement and rotation space information of corresponding bones between the character model and the metamorphic model can be obtained by using an xform (cloud form) command, and a bone difference value between the character model and the metamorphic model is calculated, so that a bone offset is obtained.
After the bone offset is calculated, the generation of the bone change process is initiated. Considering that the number of the space points forming the role model and the transformation model is large, if the space points are moved once to realize the comparison of each part between the two models, the evolution process of the part is formed, and a large amount of workload is involved, therefore, the two models can be divided into regions respectively, the comparison is performed according to the regions to generate the evolution process of the regions, and finally, the evolution processes of the regions are assembled to form the skeleton change process. In this way, firstly, the character model needs to be divided according to a plurality of preset parts to obtain a plurality of first model regions of the character model, and the metamorphic model continues to be divided according to a plurality of preset parts to obtain a plurality of second model regions of the metamorphic model. The preset part can be divided into a head, a hand, a chest and the like. Then, the first model region and the second model region of the same part are associated to generate a plurality of region groups, namely, the appearance before the transformation of each part and the appearance after the transformation are determined, so that the transformation process between the two is formed subsequently. Next, the bone difference value is recorded in the morphing controller for subsequent fusion of the contents included in the region group based on the morphing controller. In the process of practical application, at the same time point, one region group may be fused, or more than one region group may be fused, so that at least one preset change time point may be further set, and each preset change time point in the at least one preset change time point may correspond to at least one region group to be fused, that is, at this time point, which parts are required to be changed, for example, it is assumed that the whole change process needs to go through 3 seconds, and the change of the foot and the leg needs to be completed in the first second, so that when the preset change time point is 1, the corresponding region groups to be fused are also the foot and the leg.
After the above-described work is completed, the generation of the bone change process can be started. Specifically, the bone difference value may be recorded in a morphing controller, and based on the morphing controller, the model regions included in each of the plurality of region groups are fused to generate a bone change process. In addition, if at least one preset morphing time exists, for each preset morphing time point in the at least one preset morphing time point, at least one target area group to be fused corresponding to the preset morphing time point is determined, and the controller is started to fuse the at least one target area group to be fused to obtain a phase model of the preset morphing time point. By repeatedly performing the generation of the phase model, a bone change process can be generated. The change of the bone position of the corresponding region can be controlled according to the attributes for different regions based on the controller, so that the evolution process formed in the bone change process is richer and finer. If in the IK (Inverse Kinematics) state, the arm and leg length ratios need to be calculated separately and the length ratios are also added to the controller, the above fusion process can still be completed, so that the transformation can be achieved in both the FK (Forward Kinematics) and IK states.
It should be noted that, for some region groups that need to show details, the model regions included in the region groups may be continuously segmented into finer regions that need to show details, and the finer regions are finely segmented according to the requirements of the animation.
204. And loading a plurality of Mongolian layouts of the target game role, and generating a material change process by adopting the plurality of Mongolian layouts.
In the embodiment of the invention, after the plurality of masking layouts are created, as the changing process of the game role is a gradual progressive process and is not directly changed from one material to another material, in order to reflect the naturalness of the changing process of the material, the plurality of masking layouts are adopted to generate the changing process of the material, so that the changing process of the material is reflected in the animation. Specifically, when the material change process is generated, a plurality of mask layouts of the target game role are obtained. In the game, the change of the material at each time point in the whole change process is preset, so that the preset change time point is determined. For each preset morphing time point in the preset morphing time points, loading at least two target masking layouts indicated by the preset morphing time points in the multiple masking graphs, carrying out color sampling on the multiple masking layouts, fusing the at least two target masking layouts according to a preset color change value, and repeatedly executing the fusion process of the masking layouts respectively for the preset morphing time points to obtain a material change process. The mask map is a material map including the entire body of the game character.
In addition, various image qualities and configurations are provided in the game, the morphing process is limited in some configurations, and a careful morphing process is not needed, so that different numbers and different mask patterns can be selected to be loaded under different configured game environments, the morphing process is simplified, and the fit with a player computer is guaranteed. Furthermore, the body changing effect can be customized, the bone changing process and the material changing process are fused according to different modes, positions, time and the like, the body changing can be more random, and the experience of a player is improved.
205. And fusing the skeleton change process and the material change process to obtain the change animation of the target game role.
In the embodiment of the invention, after the material change process is generated, the bone change process and the material change process are not combined together, so the bone change process and the material change process are fused to obtain the change animation of the target game role. Specifically, when fusion is performed, first, a preset starting position is obtained, and the preset starting position is mapped on the character model. The preset starting position is also the position from which the material change starts, and the preset starting position can be the heart, the head and the footstep, and the preset starting position can be defined by the staff. And then, adopting a material change process, and taking a preset starting position as a starting point to perform rendering fusion on the bone change process to generate a morphing animation. The process of fusing the bone change process and the material change process is substantially to fill the grid formed by wiring in the bone change process by adopting materials, so that pixel points filled in the grid are consistent with pixel points of the materials in the material change process, and the whole fusion process can be realized by executing fusion codes in MatLayerblend (material layer mixing) nodes. For example, referring to fig. 2D, if a large area of light-colored material in the first model in fig. 2D is material a, and a large area of dark-colored material in the third model in fig. 2D is material B, when the bone change process and the material change process are fused, the weight of material a is 0.9, and the weight of material B is 0.1, the first model in fig. 2D can be obtained by fusion; the weight of material A is 0.7, and the weight of material B is 0.3, so that the second model in FIG. 2D can be obtained by fusion; a weight of 0.5 for material A and 0.5 for material B can be fused to obtain the third model in FIG. 2D. Wherein, the above mentioned weight is used to represent the proportion of the material in the whole model, the weight is constantly changing, and the changing process of the weight is strongly related to the changing process of the skeleton.
The whole process of generating the above-described morphing animation may be directly displayed in the game, or may be generated in advance, and the morphing animation may be displayed when a morphing command is received. The present invention does not specifically limit the generation timing of the morphing animation.
According to the method provided by the embodiment of the invention, when the morphing instruction is received, the mask layout can be directly loaded, the morphing animation is generated and displayed in the game by fusing the mask layout and the skeleton variation process, processing operations such as masking and the like on the mask layout are not needed, the calculated amount is reduced, the cost and the difficulty of the role morphing of the game are reduced, the too high workload of developers is avoided, and the generation efficiency of the morphing animation is improved.
Further, as a specific implementation of the method shown in fig. 1, an embodiment of the present invention provides an apparatus for generating a character morphing animation, where, as shown in fig. 3A, the apparatus includes: the system comprises a first acquisition module 301, a generation module 302, a loading module 303 and a fusion module 304.
The first obtaining module 301 is configured to receive a change instruction, and obtain a role model and a change model of a target game role, where the role model is a model of an unchanged image of the target game role, and the change model is a model of an image of a changed image of the target game role;
the generating module 302 is configured to determine a bone offset, and generate a bone change process of the character model to the changed model based on the bone offset, wherein the bone offset indicates a moving distance of a spatial point constituting the character model in the process of changing the character model to the changed model;
the loading module 303 is configured to load a plurality of mask layouts of the target game role, and generate a material quality change process by using the plurality of mask layouts;
the fusion module 304 is configured to fuse the bone change process and the material change process to obtain a morphing animation of the target game character.
In a specific application scenario, as shown in fig. 3B, the apparatus further includes: a routing module 305, a mapping module 306, a modification module 307, an addition module 308, and a binding module 309.
The wiring module 305 is configured to perform wiring according to the image of the target game character to generate the character model;
the mapping module 306 is configured to determine an image of the target game character after the change, and map the image after the change with a joint of the character model;
the changing module 307 is configured to change the distance between the wires of the character model by using the joint as a fixed point to obtain the variant model, where the number of wires and the wire arrangement mode of the variant model are consistent with those of the character model;
the adding module 308 is configured to obtain at least one bone to be added, determine a mapping position of the at least one bone to be added in the character model, and add the at least one bone to be added to the character model according to the mapping position, where the at least one bone to be added is a bone that is included in the metamorphic model and that is not included in the character model;
the binding module 309 is configured to establish a mapping relationship between the role model and the metamorphic model based on a joint, and bind the role model and the metamorphic model.
In a specific application scenario, as shown in fig. 3C, the apparatus further includes: a second acquisition module 310, a creation module 311, a replication module 312, and a translation module 313.
The second obtaining module 310 is configured to obtain a plurality of preset materials corresponding to the role model;
the creating module 311 is configured to create, for each preset material in the plurality of preset materials, a material of the character model based on the preset material to obtain a creating result;
the copying module 312 is configured to copy the authoring result to a function node, and generate a material function of the role model;
the replication module 312 is further configured to repeat the process of executing the material function, and generate a material function for each of the plurality of preset materials to obtain the plurality of material functions;
the converting module 313 is configured to convert the material functions into the masking layouts.
In a specific application scenario, as shown in fig. 3D, the generating module 302 includes: a calculation unit 3021, a division unit 3022, an association unit 3023, and a fusion unit 3024.
The calculating unit 3021, configured to calculate a bone difference value between the character model and the metamorphic model as the bone offset;
the dividing unit 3022 is configured to divide the role model according to a plurality of preset locations to obtain a plurality of first model regions of the role model;
the dividing unit 3022 is further configured to divide the deformation model according to the plurality of preset locations to obtain a plurality of second model regions of the deformation model;
the association unit 3023 is configured to associate the first model region and the second model region at the same location, and generate a plurality of region groups;
the fusion unit 3024 is configured to record the bone difference in a morphing controller, and perform fusion processing on the model regions included in each of the plurality of region groups based on the morphing controller, so as to generate the bone change process.
In a specific application scenario, the calculating unit 3021 is configured to obtain a preset skeleton standard point, use a position of the preset skeleton standard point mapped in the character model as a first reference point, and use a position of the preset skeleton standard point mapped in the change model as a second reference point; the second reference point is coincided with the first reference point, and the role model and the body-changing model are controlled to be overlapped; and calculating the bone difference value between the overlapped space points of the character model and the appointed part of the metamorphic model, and taking the bone difference value as the bone offset.
In a specific application scenario, as shown in fig. 3E, the loading module 303 includes: an acquisition unit 3031, a determination unit 3032, a loading unit 3033 and a sampling unit 3034.
The obtaining unit 3031 is configured to obtain a plurality of Mongolian layouts of the target game role;
the determining unit 3032 is configured to determine a plurality of preset change time points;
the loading unit 3033 is configured to load, for each preset morphing time point in the plurality of preset morphing time points, at least two target mask maps indicated by the preset morphing time point in the plurality of mask maps;
the sampling unit 3034 is configured to perform color sampling on the plurality of mask layouts, and fuse the at least two target mask layouts according to a preset color variation value;
the sampling unit 3034 is further configured to repeatedly perform a fusion process of the masking layout on the plurality of preset morphing time points, respectively, to obtain the material variation process.
In a specific application scenario, as shown in fig. 3F, the fusion module 304 includes: a mapping unit 3041 and a fusion unit 3042.
The mapping unit 3041 is configured to obtain a preset starting position, and map the preset starting position on the role model;
the fusion unit 3042 is configured to render and fuse the bone change process by using the material change process and using the preset starting position as a starting point, so as to generate the morphing animation.
According to the device provided by the embodiment of the invention, when a morphing instruction is received, the mask layout can be directly loaded, the morphing animation is generated and displayed in a game by fusing the mask layout and the skeleton variation process, processing operations such as masking and the like on the mask layout are not needed, the calculated amount is reduced, the cost and the difficulty of the role morphing of the game are reduced, the too high workload of developers is avoided, and the generation efficiency of the morphing animation is improved.
It should be noted that other corresponding descriptions of the functional units related to the device for generating a character morphing animation provided in the embodiment of the present invention may refer to the corresponding descriptions in fig. 1 and fig. 2A, and are not described herein again.
In an exemplary embodiment, referring to fig. 4, there is further provided a device, where the device 400 includes a communication bus, a processor, a memory, and a communication interface, and may further include an input/output interface and a display device, where the functional units may communicate with each other through the bus. The memory stores a computer program, and the processor executes the program stored in the memory to execute the method for generating the character morphing animation in the above embodiment.
A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method for generating a character morphing animation.
Through the above description of the embodiments, those skilled in the art will clearly understand that the present application can be implemented by hardware, and also by software plus a necessary general hardware platform. Based on such understanding, the technical solution of the present application may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.), and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the implementation scenarios of the present application.
Those skilled in the art will appreciate that the figures are merely schematic representations of one preferred implementation scenario and that the blocks or flow diagrams in the figures are not necessarily required to practice the present application.
Those skilled in the art will appreciate that the modules in the devices in the implementation scenario may be distributed in the devices in the implementation scenario according to the description of the implementation scenario, or may be located in one or more devices different from the present implementation scenario with corresponding changes. The modules of the implementation scenario may be combined into one module, or may be further split into a plurality of sub-modules.
The above application serial numbers are for description purposes only and do not represent the superiority or inferiority of the implementation scenarios.
The above disclosure is only a few specific implementation scenarios of the present application, but the present application is not limited thereto, and any variations that can be made by those skilled in the art are intended to fall within the scope of the present application.

Claims (10)

1. A method for generating a character-changing animation, comprising:
receiving a change instruction, and acquiring a role model and a change model of a target game role, wherein the role model is a model of an unchanged image of the target game role, and the change model is a model of an image of the changed target game role;
determining a bone offset, and generating a bone change process of the character model to the metamorphic model based on the bone offset, wherein the bone offset indicates a moving distance of a space point forming the character model in the process of changing the character model to the metamorphic model;
loading a plurality of mask layouts of the target game role, and generating a material quality change process by adopting the plurality of mask layouts, wherein the plurality of mask layouts are obtained by converting a plurality of material functions of the role model, each material function in the plurality of material functions is generated by copying a creation result obtained by creating a material for the role model based on a preset material to a function node, and the material quality change process is generated by performing color sampling on at least two target mask layouts indicated in the plurality of mask layouts at each preset change time point and fusing the at least two target mask layouts according to a preset color change value;
and fusing the skeleton change process and the material change process to obtain the change animation of the target game role.
2. The method of claim 1, wherein before receiving the change instruction and obtaining the character model and the change model of the target game character, the method further comprises:
wiring according to the image of the target game role to generate the role model;
determining the figure of the changed target game role, and mapping the figure of the changed figure with the joint of the role model;
changing the distance between the wiring lines of the character model by taking the joint as a fixed point to obtain the change model, wherein the wiring number and the wiring mode of the change model are consistent with those of the character model;
obtaining at least one bone to be added, determining a mapping position of the at least one bone to be added in the character model, and adding the at least one bone to be added to the character model according to the mapping position, wherein the at least one bone to be added is a bone which is included in the metamorphic model and is not included in the character model;
and establishing a mapping relation between the role model and the transformer model based on joints, and binding the role model and the transformer model.
3. The method of claim 1, wherein before receiving the change instruction and obtaining the character model and the change model of the target game character, the method further comprises:
obtaining a plurality of preset materials corresponding to the role model;
for each preset material in the plurality of preset materials, establishing the material of the role model based on the preset material to obtain an establishing result;
copying the creating result to a function node to generate a material function of the role model;
repeating the process of executing the material function, and generating a material function for each preset material in the plurality of preset materials to obtain the plurality of material functions;
and converting the material functions into the Mongolian layouts.
4. The method of claim 1, wherein determining a bone offset and generating a bone change process for changing the character model to the metamorphic model based on the bone offset comprises:
calculating a bone difference value between the character model and the metamorphic model as the bone offset;
dividing the role model according to a plurality of preset parts to obtain a plurality of first model areas of the role model;
dividing the deformation model according to the preset parts to obtain a plurality of second model areas of the deformation model;
associating the first model area and the second model area at the same position to generate a plurality of area groups;
and recording the skeleton difference value in a morphing controller, and respectively fusing model regions included in each of the plurality of region groups based on the morphing controller to generate the skeleton variation process.
5. The method of claim 4, wherein said calculating a bone difference value between said character model and said metamorphic model as said bone offset comprises:
acquiring a preset skeleton standard point, taking the position of the preset skeleton standard point mapped in the character model as a first reference point, and taking the position of the preset skeleton standard point mapped in the metamorphic model as a second reference point;
the second reference point is coincided with the first reference point, and the role model and the body-changing model are controlled to be overlapped;
and calculating the bone difference value between the overlapped space points of the character model and the appointed part of the metamorphic model, and taking the bone difference value as the bone offset.
6. The method according to claim 1, wherein the loading of the plurality of masking layouts of the target game character and the generation of the material quality change process using the plurality of masking layouts comprises:
obtaining a plurality of Mongolian layouts of the target game role;
determining a plurality of preset change time points;
for each preset morphing time point in the plurality of preset morphing time points, loading at least two target masking images indicated by the preset morphing time points in the plurality of masking images;
sampling colors of the plurality of mask layouts, and fusing the at least two target mask layouts according to a preset color change value;
and repeatedly executing the fusion process of the masking layout for the plurality of preset change time points respectively to obtain the material change process.
7. The method of claim 1, wherein fusing the skeletal change process and the material change process to obtain the change animation of the target game character comprises:
acquiring a preset starting position, and mapping the preset starting position on the role model;
and rendering and fusing the bone change process by adopting the material change process and taking the preset starting position as a starting point to generate the body-changing animation.
8. An apparatus for generating a character morphing animation, comprising:
the first obtaining module is used for receiving a change instruction and obtaining a role model and a change model of a target game role, wherein the role model is a model of an unchanged image of the target game role, and the change model is a model of an image of a changed target game role;
a generating module, configured to determine a bone offset, and based on the bone offset, generate a bone change process of the character model to the metamorphic model, where the bone offset indicates a moving distance of a spatial point constituting the character model in the process of changing the character model to the metamorphic model;
the device comprises a loading module, a quality change process generation module and a quality change processing module, wherein the loading module is used for loading a plurality of mask layouts of the target game role, generating the quality change process by adopting the plurality of mask layouts, the plurality of mask layouts are obtained by converting a plurality of material functions of the role model, each material function in the plurality of material functions is generated by copying a creation result obtained by creating a material for the role model based on a preset material to a function node, and the quality change process is generated by carrying out color sampling on at least two target mask layouts indicated in the plurality of mask layouts at each preset change time point and fusing the at least two target mask layouts according to a preset color change value;
and the fusion module is used for fusing the bone change process and the material change process to obtain the change animation of the target game role.
9. A character-change animation generation device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method of any one of claims 1 to 7 when executing the computer program.
10. A readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
CN202010367218.6A 2020-04-30 2020-04-30 Generation method, device and equipment of character morphing animation and readable storage medium Active CN111563945B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202010367218.6A CN111563945B (en) 2020-04-30 2020-04-30 Generation method, device and equipment of character morphing animation and readable storage medium
PCT/CN2021/081842 WO2021218482A1 (en) 2020-04-30 2021-03-19 Method and apparatus for generating character transformation animation, and device and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010367218.6A CN111563945B (en) 2020-04-30 2020-04-30 Generation method, device and equipment of character morphing animation and readable storage medium

Publications (2)

Publication Number Publication Date
CN111563945A CN111563945A (en) 2020-08-21
CN111563945B true CN111563945B (en) 2021-04-20

Family

ID=72073301

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010367218.6A Active CN111563945B (en) 2020-04-30 2020-04-30 Generation method, device and equipment of character morphing animation and readable storage medium

Country Status (2)

Country Link
CN (1) CN111563945B (en)
WO (1) WO2021218482A1 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111563945B (en) * 2020-04-30 2021-04-20 完美世界(北京)软件科技发展有限公司 Generation method, device and equipment of character morphing animation and readable storage medium
CN111973988B (en) * 2020-08-24 2024-02-06 网易(杭州)网络有限公司 Method, device, equipment and storage medium for processing model in game
CN112316422B (en) * 2020-11-27 2023-01-13 上海米哈游天命科技有限公司 Clothing change method and device, electronic equipment and storage medium
CN112999659A (en) * 2021-02-22 2021-06-22 网易(杭州)网络有限公司 Game data processing method, device, storage medium and electronic equipment
CN114882153A (en) * 2022-04-01 2022-08-09 网易(杭州)网络有限公司 Animation generation method and device
CN116012499B (en) * 2022-10-20 2023-11-03 武汉两点十分文化传播有限公司 Method and system for rapidly generating maya three-dimensional character animation

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106780683A (en) * 2017-02-23 2017-05-31 网易(杭州)网络有限公司 The processing method and processing device of bone animation data
CN109615683A (en) * 2018-08-30 2019-04-12 广州多维魔镜高新科技有限公司 A kind of 3D game animation model production method based on 3D dress form

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001052201A (en) * 1999-08-04 2001-02-23 Namco Ltd Image generation system and information storage medium
US9536338B2 (en) * 2012-07-31 2017-01-03 Microsoft Technology Licensing, Llc Animating objects using the human body
CN102930586A (en) * 2012-10-11 2013-02-13 北京航空航天大学 Interactive geometry deformation method based on linear rotation invariant differential coordinates
US10134167B2 (en) * 2013-03-15 2018-11-20 Dreamworks Animation Llc Using curves to emulate soft body deformation
US10061871B2 (en) * 2015-07-27 2018-08-28 Technische Universiteit Delft Linear blend skinning weight optimization utilizing skeletal pose sampling
CN106960459B (en) * 2016-12-26 2019-07-26 北京航空航天大学 The method relocated in role animation based on the dynamic (dynamical) covering technology of expanding location and weight
US20180225858A1 (en) * 2017-02-03 2018-08-09 Sony Corporation Apparatus and method to generate realistic rigged three dimensional (3d) model animation for view-point transform
CN108510577B (en) * 2018-01-31 2021-03-23 中国科学院软件研究所 Realistic motion migration and generation method and system based on existing motion data
EP3759693A4 (en) * 2018-02-27 2021-11-24 Magic Leap, Inc. Matching meshes for virtual avatars
CN108961367A (en) * 2018-06-21 2018-12-07 珠海金山网络游戏科技有限公司 The method, system and device of role image deformation in the live streaming of three-dimensional idol
CN111062864B (en) * 2019-12-20 2023-09-08 网易(杭州)网络有限公司 Animation model scaling method and device, electronic equipment and storage medium
CN111563945B (en) * 2020-04-30 2021-04-20 完美世界(北京)软件科技发展有限公司 Generation method, device and equipment of character morphing animation and readable storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106780683A (en) * 2017-02-23 2017-05-31 网易(杭州)网络有限公司 The processing method and processing device of bone animation data
CN109615683A (en) * 2018-08-30 2019-04-12 广州多维魔镜高新科技有限公司 A kind of 3D game animation model production method based on 3D dress form

Also Published As

Publication number Publication date
WO2021218482A1 (en) 2021-11-04
CN111563945A (en) 2020-08-21

Similar Documents

Publication Publication Date Title
CN111563945B (en) Generation method, device and equipment of character morphing animation and readable storage medium
JP3579148B2 (en) Method and system for operating a plurality of motion units to generate articulated body motion
WO2022001652A1 (en) Virtual character control method and apparatus, computer device, and storage medium
US20100156935A1 (en) Method and apparatus for deforming shape of three dimensional human body model
CN111714880B (en) Picture display method and device, storage medium and electronic device
CN110992495B (en) Method and device for deforming virtual model
CN111773686A (en) Animation generation method and device, storage medium and electronic device
CN112950769A (en) Three-dimensional human body reconstruction method, device, equipment and storage medium
CN112598773A (en) Method and device for realizing skeleton skin animation
CN112669414A (en) Animation data processing method and device, storage medium and computer equipment
WO2006013813A1 (en) Information processing device and program
JP4842242B2 (en) Method and apparatus for real-time expression of skin wrinkles during character animation
CN112184862A (en) Control method and device of virtual object and electronic equipment
WO2017167167A1 (en) Model object construction method, server, and system
CN115115752A (en) Virtual garment deformation prediction method and device, storage medium and electronic equipment
CN114758108A (en) Virtual object driving method, device, storage medium and computer equipment
CN111973988B (en) Method, device, equipment and storage medium for processing model in game
CN112843683A (en) Control method and device of virtual role, electronic equipment and storage medium
CN111744196B (en) Task target guiding method and device in game task
CN115018959A (en) Drive processing method, device, equipment and storage medium for three-dimensional virtual model
CN113313796A (en) Scene generation method and device, computer equipment and storage medium
CN112348931A (en) Foot reverse motion control method, device, equipment and storage medium
CN115908664B (en) Animation generation method and device for man-machine interaction, computer equipment and storage medium
CN112669194B (en) Animation processing method, device, equipment and storage medium in virtual scene
Got Developement of a new automatic skinning system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant