CN114241099A - Method and device for batch zeroing of animation data and computer equipment - Google Patents

Method and device for batch zeroing of animation data and computer equipment Download PDF

Info

Publication number
CN114241099A
CN114241099A CN202111549478.6A CN202111549478A CN114241099A CN 114241099 A CN114241099 A CN 114241099A CN 202111549478 A CN202111549478 A CN 202111549478A CN 114241099 A CN114241099 A CN 114241099A
Authority
CN
China
Prior art keywords
target
animation data
skeleton
skin
animation
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.)
Pending
Application number
CN202111549478.6A
Other languages
Chinese (zh)
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.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network 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 Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN202111549478.6A priority Critical patent/CN114241099A/en
Publication of CN114241099A publication Critical patent/CN114241099A/en
Pending legal-status Critical Current

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

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The application provides a method and a device for batch zeroing of animation data, computer equipment and a computer readable storage medium, and belongs to the technical field of data processing. The method comprises the following steps: determining at least one optional virtual role and attribute information of each optional virtual role according to the skin model in the target animation file and the skin skeleton corresponding to the skin model; responding to the operation that a user endows a target virtual role in the selectable virtual roles with a target name, and adding the target name to the attribute information of the target virtual role; and performing zeroing processing on the target virtual role with the target name according to the attribute information of the target virtual role. The method and the device can achieve the effect of improving the efficiency of executing the zeroing operation on the animation data.

Description

Method and device for batch zeroing of animation data and computer equipment
Technical Field
The application relates to the technical field of data processing, in particular to a batch zeroing method and device for animation data and computer equipment.
Background
With the development of computer technology, more and more electronic games are appearing in people's lives. In these video games, when a cut scene needs to be displayed, the model in the animation is subjected to a zeroing process, so that the position and other parameters of the model in the animation can be changed.
In the related art, a person skilled in the related art will generally manually identify each virtual character in an animation file one by one, and manually perform operations such as key frame manual copying and numerical value and curve modification of animation data for each virtual character by means of some tools for copying animation frames, and manually perform zero resetting. However, in an actual scene, a case where animation data needs to be processed in a large volume is often encountered.
In this case, the efficiency of the zeroing operation of the animation data may be caused.
Disclosure of Invention
The application aims to provide a method and a device for batch zeroing of animation data and computer equipment, and the effect of improving the efficiency of executing zeroing operation on the animation data can be achieved.
The embodiment of the application is realized as follows:
one aspect of the embodiments of the present application provides a method for batch zeroing of animation data, including:
determining at least one optional virtual role and attribute information of each optional virtual role according to a skin model in a target animation file and a skin skeleton corresponding to the skin model;
responding to the operation that a user endows a target virtual role in the selectable virtual roles with a target name, and adding the target name to the attribute information of the target virtual role;
and performing zeroing processing on the target virtual character with the target name according to the attribute information of the target virtual character, wherein the processed animation data of the center of mass in the body skeleton of the target virtual character is the animation data of the pure center of mass.
Optionally, the determining at least one optional virtual character and attribute information of each optional virtual character according to the skin model in the target animation file and the skin skeleton corresponding to the skin model includes:
obtaining skin bones corresponding to the skin models;
determining at least one skin model belonging to the same selectable virtual role according to the identification of the root skeleton of the skin skeleton corresponding to each skin model;
determining animation data of body skeletons and animation data of accessory skeletons of the selectable virtual character according to the animation data of each skin model belonging to the same selectable virtual character in the target animation file;
determining the identification of the body skeleton and the identification of the accessory skeleton of the selectable virtual role according to the identification of each skeleton in the skin skeletons corresponding to the skin model;
and creating a temporary virtual object, controlling the temporary virtual object to move according to the moving mode of the center of mass skeleton in the body skeleton of the selectable virtual character, and obtaining the animation data of the pure center of mass according to the animation data of the temporary virtual object.
Optionally, the determining, according to the identifier of the root bone of the skin bone corresponding to each skin model, at least one skin model belonging to the same selectable virtual role includes:
and if the identification of the root skeleton of the skin skeleton corresponding to the first skin model is the same as the identification of the root skeleton of the skin skeleton corresponding to the second skin model, determining that the first skin model and the second skin model belong to the same optional virtual role.
Optionally, the determining animation data of a body skeleton and animation data of an attachment skeleton of the selectable virtual character according to the animation data of the skin models belonging to the same selectable virtual character in the target animation file includes:
acquiring a motion track of the skin model in a preset time period in the target animation file;
and analyzing the motion trail according to time to obtain animation data of the body skeleton of the selectable virtual character and animation data of the attachment skeleton.
Optionally, the deriving animation data of the pure centroid from the animation data of the temporary virtual object comprises:
and taking the animation data of the temporary virtual object in a preset time period as the animation data of the pure centroid.
Optionally, the zeroing the target virtual character with the target name according to the attribute information of the target virtual character includes:
creating a role directory corresponding to the target name;
storing the identification of the body skeleton, the animation data of the body skeleton, the identification of the attachment skeleton and the animation data of the attachment skeleton as original information into the character directory;
and adjusting the original information stored in the role catalog according to the animation data of the pure centroid.
Optionally, the adjusting the original information stored in the character directory according to the animation data of the pure centroid includes:
and modifying the animation data of the center of mass bone in the body bone of the original information into the animation data of the pure center of mass.
Optionally, before performing zeroing processing on the target virtual character with the target name according to the attribute information of the target virtual character, the method further includes:
and performing frame attribute conversion on animation data of a body skeleton, animation data of an attachment skeleton and animation data of a pure center of mass in the attribute information of the target virtual character.
Optionally, the determining at least one optional virtual character and attribute information of each optional virtual character according to the skin model in the target animation file and the skin skeleton corresponding to the skin model includes:
responding to the operation that a user selects the target animation file in a zeroing tool, loading the target animation file, and analyzing a plurality of original skin models from the target animation file;
and responding to the selection operation of the user on at least one original skin model in the multiple original skin models, taking the selected original skin model as the skin model in the target animation file, and determining at least one selectable virtual role and attribute information of each selectable virtual role according to the skin model in the target animation file and a skin skeleton corresponding to the skin model.
Optionally, the attribute information of each selectable virtual role includes: an identification of a body skeleton, animation data of a body skeleton, an identification of an attachment skeleton, animation data of an attachment skeleton, and/or animation data of a pure center of mass.
In a second aspect of the embodiments of the present application, there is provided an apparatus for batch zeroing of animation data, including:
the determining module is used for determining at least one optional virtual role and attribute information of each optional virtual role according to the skin model in the target animation file and the skin skeleton corresponding to the skin model;
an adding module, configured to add a target name to attribute information of a target virtual character in response to an operation of giving the target name to the target virtual character in the selectable virtual characters by a user;
and the zeroing module is used for performing zeroing processing on the target virtual role with the target name according to the attribute information of the target virtual role.
Optionally, the apparatus further includes a creating module, configured to create a role directory corresponding to the target name.
Optionally, the apparatus further comprises a saving module for saving the identification of the body skeleton, the animation data of the body skeleton, the identification of the attachment skeleton, and the animation data of the attachment skeleton as original information into the character directory.
Optionally, the apparatus further includes an adjusting module, configured to adjust the original information stored in the character directory according to the animation data of the pure centroid.
Optionally, the apparatus further comprises a conversion module for performing frame attribute conversion on the animation data of the body skeleton, the animation data of the attachment skeleton, and the animation data of the simple centroid in the attribute information of the target virtual character.
In a third aspect of the embodiments of the present application, there is provided a computer device, the computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when executed by the processor, the computer program implements the method for batch zeroing of animation data according to the first aspect.
In a fourth aspect of the embodiments of the present application, a computer-readable storage medium is provided, where a computer program is stored, and when executed by a processor, the computer program implements the method for batch zeroing of animation data according to the first aspect.
The beneficial effects of the embodiment of the application include:
according to the animation data batch zeroing method provided by the embodiment of the application, at least one selectable virtual role and attribute information of each selectable virtual role are determined according to a skin model in a target animation file and a skin skeleton corresponding to the skin model, the operation that a user gives a target name to the target virtual role in each selectable virtual role is responded, the target name is added to the attribute information of the target virtual role, and the target virtual role with the target name is subjected to zeroing processing according to the attribute information of the target virtual role. The method comprises the steps of determining at least one selectable virtual character and attribute information of each selectable virtual character according to a skin model in a target animation file and a skin skeleton corresponding to the skin model, and determining the attribute information of the selectable virtual characters and the attribute information of the selectable virtual characters in the target animation file in batches according to a corresponding relation between the skin model and the skin skeleton. In this way, the selectable virtual characters in the target animation file can be determined in batch, and after the target names are given to the target virtual characters, the user can quickly and intuitively determine the relation of the target virtual characters. Therefore, the effect of improving the efficiency of executing the zeroing operation on the animation data can be achieved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
FIG. 1 is a flowchart of a first method for batch zeroing of animation data according to an embodiment of the present disclosure;
FIG. 2 is a flowchart of a second method for batch zeroing of animation data according to an embodiment of the present application;
FIG. 3 is a flowchart of a third method for batch zeroing of animation data according to an embodiment of the present application;
FIG. 4 is a flowchart of a fourth method for batch zeroing of animation data according to an embodiment of the present application;
FIG. 5 is a flowchart of a fifth method for batch zeroing of animation data according to an embodiment of the present application;
FIG. 6 is a flowchart of a sixth method for batch zeroing of animation data according to an embodiment of the present application;
FIG. 7 is a flowchart of a seventh method for batch zeroing of animation data according to an embodiment of the present application;
FIG. 8 is a schematic structural diagram of an apparatus for batch zeroing of animation data according to an embodiment of the present disclosure;
fig. 9 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
With the development of computer technology, more and more electronic games are appearing in people's lives. In these video games, when a cut scene needs to be displayed, the model in the animation is subjected to a zeroing process, so that the position and other parameters of the model in the animation can be changed. Related technicians can manually identify each virtual character in the animation file one by one, and manually zero key frame manual copying, numerical value and curve modification and other operations of animation data are respectively carried out on each virtual character by means of tools for copying animation frames. However, in an actual scene, a case where animation data needs to be processed in a large volume is often encountered. In this case, the efficiency of the zeroing operation of the animation data may be caused.
The method comprises the steps of determining at least one selectable virtual role and attribute information of each selectable virtual role according to a skin model in a target animation file and a skin skeleton corresponding to the skin model, responding to an operation of giving a target name to the target virtual role in the selectable virtual roles by a user, adding the target name to the attribute information of the target virtual role, and performing zeroing processing on the target virtual role with the target name according to the attribute information of the target virtual role, so that the effect of improving the efficiency of performing zeroing operation on animation data can be achieved.
The embodiment of the application takes an animation data batch zeroing method applied to computer equipment as an example for explanation. It is not intended that embodiments of the present application be applicable only to computer devices for batch zeroing of animation data.
The following explains the animation data batch zeroing method provided in the embodiment of the present application in detail.
Fig. 1 is a flowchart of a method for batch zeroing of animation data according to the present application, where the method may be applied to a terminal device, where the terminal device may be a computer, a tablet computer, a smart phone, and/or other electronic devices with processing functions, and specifically, the terminal device may also be an electronic device installed with Digital Content Creation (DCC) software. Referring to fig. 1, an embodiment of the present application provides an animation data batch zeroing method, including:
step 1001: and determining at least one optional virtual role and attribute information of each optional virtual role according to the skin model in the target animation file and the skin skeleton corresponding to the skin model.
Optionally, the target animation file may be an animation file in a Max format, or an animation file in a Maya (auto Video Interleaved, avi) format, or an animation file in an Audio Video Interleaved format, or an animation file in a Moving Picture Experts Group (MPEG), or an animation file in a streaming media format (FLASH Video, FLV), or an animation file in another format. The embodiments of the present application do not limit this.
Alternatively, the target animation file may be an animation file that requires a zeroing operation.
Alternatively, the zeroing operation may refer to an operation of removing external factors affecting the displacement or action of the virtual character in the animation, and only preserving the displacement or action of the centroid of the virtual character itself in the animation.
Optionally, in case the target animation file is opened or loaded, at least one frame of animation comprising a virtual scene may be displayed, wherein various geometric objects and/or virtual characters may be included in the virtual scene, and wherein the geometric objects and/or virtual characters may be skinned.
Alternatively, the virtual character may be a human-shaped character, a character in the shape of other objects, or a character in the shape of other possible shapes. The embodiments of the present application do not limit this.
Optionally, since the skinning bone and the skinning model are independent from each other, the operation of binding the skinning model to the skinning bone in order for the skinning bone to drive the skinning model to generate the corresponding displacement or action is skinning.
In addition, a certain corresponding relation exists between the skin skeleton and the skin model, and each skin skeleton corresponding to the skin model can be found according to the corresponding relation.
Alternatively, the skinned model may be the geometry of all participating skinning in the scene displayed after opening or loading the target animation file. Or an object participating in the specific shape of the skin in the displayed scene after the target animation file is opened or loaded, for example, the specific shape may be a human shape, a shape of a certain part on a human body, or a shape of other animals or other objects. The embodiments of the present application do not limit this.
Alternatively, the selectable virtual characters may be all virtual characters in the scene that are displayed after the target animation file is opened or loaded. Additionally, any of the selectable avatars may include at least one of the skinning models.
Optionally, the attribute information of each selectable virtual role may include: an identification of a body skeleton, animation data of a body skeleton, an identification of an attachment skeleton, animation data of an attachment skeleton, and/or animation data of a pure center of mass. That is, after the target animation file is opened or loaded, the attribute information of all virtual characters in the displayed scene may include an identification of a body skeleton, animation data of the body skeleton, an identification of an attachment skeleton, animation data of the attachment skeleton, and/or animation data of a pure center of mass corresponding to each virtual character.
Optionally, the body bone may be a CS bone, which may specifically include a bone model of the skull, vertebra, sternum, ribs, humerus, clavicle, tibia, fibula, phalanges, femur, center of mass bone, etc., of each of the optional virtual characters.
Optionally, the attachment skeleton may be Bone skeleton, which may include a skeletal model of clothing, accessories, and/or weapons, etc. of each optional virtual character equipment.
Optionally, the attachment skeleton is covered on the body skeleton, and when each optional virtual character displaces or moves, the attachment skeleton makes corresponding displacement or movement along with the displacement or movement of the body skeleton.
Optionally, the simple centroid may refer to a centroid of each selectable virtual character, for example, the centroid of each selectable virtual character may be set to a position where a bone closest to a femur of each selectable virtual character is located in a vertebra of each selectable virtual character, the centroid of each selectable virtual character may also be set to a position where the femur of each selectable virtual character is located, and the centroid of each selectable virtual character may also be set to other reasonable positions. The embodiments of the present application do not limit this.
Alternatively, the identification of the body bones may be an identification for marking each body bone, one and only one for each body bone. If the marks of a plurality of body skeletons are the same, the plurality of body skeletons are the same body skeleton.
Alternatively, the identification of the attachment bones may be an identification for marking each attachment bone, one and only one for each attachment bone. If the identifications of a plurality of accessory bones are the same, the plurality of accessory bones are the same accessory bone.
For example, the animation data of the body skeleton may be Bip data, the animation data of the body skeleton may be data corresponding to each body skeleton or a path in which the data of each body skeleton is stored, and loading or reading the animation data of the body skeleton may display a model of the corresponding each body skeleton. For example, the animation data of the body skeleton is data of a skull of an optional virtual character, and after the animation data of the body skeleton is loaded or read, a model of the skull of the optional virtual character can be displayed.
In addition, the animation data of the body skeleton can be used for indicating the connection relation between the bones in the body skeleton and can also be used for indicating the action relation between the bones in the body skeleton. For example, the animated data of the body bone may specifically indicate a specific motion or a specific displacement situation of a vertebra, a sternum, a rib, a humerus, a tibia, a fibula and/or a femur in case of a forward bending of a centroid bone in the body bone.
For example, the animation data of the attachment bones may be data corresponding to each attachment bone or a path where the data of each attachment bone is stored, and loading or reading the animation data of the attachment bones may display a model of each corresponding attachment bone. For example, the animation data of the attachment skeleton is data of a knife weapon equipped with an optional virtual character, and after the animation data of the attachment skeleton is loaded or read, a model of the knife weapon can be displayed.
In addition, the animation data of the accessory skeleton can be used for indicating the connection relationship between the bones in the accessory skeleton and can also be used for indicating the connection relationship and/or action relationship between the bones in the accessory skeleton and the bones in the body skeleton. For example, the animation data of the attachment skeleton may specifically indicate a specific motion or a specific displacement condition of a weapon held in the hand of the optional virtual character in the attachment skeleton in case the phalanges in the body skeleton are bent forward.
Alternatively, the animation data of the simple centroid may be Xaf data, and the animation data of the simple centroid may be data corresponding to the centroid of each of the selectable virtual characters after the zeroing operation or a path in which the data corresponding to the centroid of each of the selectable virtual characters after the zeroing operation is performed is deposited. For example, after loading or reading the animation data of the simple centroid, a model of the centroid of each selectable virtual character and/or a displacement state of the model of the centroid of each selectable virtual character after the zeroing operation is performed may be displayed.
Optionally, in a case that the animation data of the body skeleton, the animation data of the attachment skeleton, and the animation data of the simple center of mass are respectively paths in which corresponding data are stored, the data of the body skeleton, the data of the attachment skeleton, and the data of the simple center of mass of each selectable virtual character may be respectively stored in one corresponding folder, and the data of the body skeleton, the data of the attachment skeleton, and the data of the simple center of mass of each selectable virtual character may be acquired according to the paths in which corresponding data are stored, through the identification of the body skeleton, the animation data of the body skeleton, the identification of the attachment skeleton, the animation data of the attachment skeleton, and the animation data of the simple center of mass.
Therefore, the relation among the skin models, the skin skeletons and the optional virtual characters in the target animation file can be determined in batch, and the efficiency of analyzing the target animation file can be improved.
Step 1002: and responding to the operation that a user endows a target virtual role in the optional virtual roles with a target name, and adding the target name to the attribute information of the target virtual role.
Optionally, the target virtual character may include a part of optional virtual characters that need to be subjected to the zeroing operation, or may include all of the optional virtual characters. Of course, the target avatar may be selected by the user. The embodiments of the present application do not limit this.
Illustratively, the target virtual character may include an optional virtual character that appears repeatedly in each frame animation of the target animation file. For example, after opening or loading the target animation file, 100 frames of animation may be obtained or displayed, and a portion of the selectable virtual character appears in each of the 100 frames of animation, then the portion of the selectable virtual character may be taken as the target virtual character. If there is another portion of the selectable virtual character that appears in only one of the 100 animations, the another portion of the selectable virtual character may not be considered the target virtual character. The embodiments of the present application do not limit this.
Alternatively, the target name may be a preset name, or may be a name set by the user in real time. The target names assigned to the target virtual characters may be different from one another. The embodiments of the present application do not limit this.
Optionally, the attribute information of the target virtual character may include: identification of body bones, animation data of body bones, identification of attachment bones, animation data of pure centroids.
It should be noted that the target animation file may include a plurality of selectable virtual characters, and the plurality of selectable virtual characters may repeatedly appear in each frame animation of the target animation file, that is, the plurality of virtual characters may be the same virtual character appearing in different frames of an animation scene corresponding to the target animation file, and then the plurality of selectable virtual characters are used as the target virtual character, different target names are given to the target virtual character and displayed on a virtual interface of the terminal device, and the target name is added to attribute information of each target virtual character. In addition, when different target names are assigned to the target virtual character, the data in the target animation file is not changed. Therefore, the user can conveniently search or select the target virtual roles in batch.
It should be noted that, by adding the target name to the attribute information of the target virtual character, the same target virtual character of each frame of animation in the target animation file can be associated together according to the target name, and a plurality of target virtual characters required to be associated can be freely associated together according to actual requirements, for example, in the zeroing process, the animation information of the virtual character B needs to be given to the virtual character a, the virtual character B and the virtual character a can be associated together, so that all the attribute information of the target virtual characters required to be zeroed in the virtual scene displayed after the target animation file is opened or loaded can be completely exported. Therefore, the effect of improving the efficiency of executing the zeroing operation on the animation data can be achieved.
Step 1003: and performing zeroing processing on the target virtual character with the target name according to the attribute information of the target virtual character.
Optionally, the processed animation data of the center of mass skeleton in the body skeleton of the target virtual character is the animation data of the pure center of mass.
Optionally, after the zeroing process is performed on the target virtual character with the target name, the animation data of the bones other than the centroid bone and the accessory bones in the body bones of the target virtual character may be generated correspondingly according to the animation data of the centroid bone in the body bones of the target virtual character, or may be preset in advance. The embodiments of the present application do not limit this.
Optionally, the connection relationship or the action relationship between each body skeleton of each target virtual character and each attachment skeleton may be determined according to the identification of the body skeleton, the animation data of the body skeleton, the identification of the attachment skeleton, and the animation data of the attachment skeleton, and each body skeleton and each attachment skeleton are connected or skinned to generate a new virtual character after the zeroing process is performed.
It should be noted that, after the zeroing process is performed on the target virtual character with the target name according to the attribute information of the target virtual character, the animation data of the centroid skeleton of the target virtual character with the target name can be accurately changed into the animation data of the simple centroid in batch, and other body skeletons and/or attachment skeletons of the target virtual character can also be accurately moved or displaced according to the animation data of the centroid skeleton of the target virtual character. In this way, the fluency and accuracy of the movement or displacement of each target virtual character after the zeroing process is performed can be ensured.
In the embodiment of the application, at least one selectable virtual character and attribute information of each selectable virtual character are determined according to a skin model in a target animation file and a skin skeleton corresponding to the skin model, an operation that a user gives a target name to the target virtual character in each selectable virtual character is responded, the target name is added to the attribute information of the target virtual character, and the target virtual character with the target name is subjected to zeroing processing according to the attribute information of the target virtual character. The method comprises the steps of determining at least one selectable virtual character and attribute information of each selectable virtual character according to a skin model in a target animation file and a skin skeleton corresponding to the skin model, and determining the attribute information of the selectable virtual characters and the attribute information of the selectable virtual characters in the target animation file in batches according to a corresponding relation between the skin model and the skin skeleton. In this way, the selectable virtual characters in the target animation file can be determined in batch, and after the target names are given to the target virtual characters, the user can quickly and intuitively determine the relation of the target virtual characters. Therefore, the effect of improving the efficiency of executing the zeroing operation on the animation data can be achieved.
In one possible implementation manner, referring to fig. 2, determining at least one selectable virtual character and attribute information of each selectable virtual character according to the skin model in the target animation file and the skin skeleton corresponding to the skin model includes:
step 1004: and obtaining the skinned skeleton corresponding to each skinned model.
Optionally, each skinned model may correspond to at least one skinned bone that includes the body bone and/or the attachment model.
Step 1005: and determining at least one skin model belonging to the same selectable virtual role according to the identification of the root skeleton of the skin skeleton corresponding to each skin model.
Alternatively, the root bone may be a vertebra of the body bone of the alternative virtual character, or may be another bone of the body bone of the alternative virtual character.
Optionally, the root bone of the skinned bone has one and only one identification. If the identification of the root skeleton of the skin skeleton corresponding to each skin model is the same, determining that the root skeleton of the skin skeleton is the same, and further determining that each skin model belongs to the same optional virtual role.
Since the root skeleton of the skin skeleton has one and only one identification, all skin models and/or skin skeletons belonging to the same optional virtual role can be determined in batch through the identification of the root skeleton. In this way, all the skinning models and/or skinning bones corresponding to the optional virtual roles can be determined in batch for subsequent operations. Thus, the efficiency of animation data processing can be improved.
Step 1006: and determining animation data of the body skeleton and the attachment skeleton of the optional virtual character according to the animation data of the skin models belonging to the same optional virtual character in the target animation file.
It should be noted that the animation data of each skin model and/or each skin skeleton is stored in the target animation file, and after all skin models and/or skin skeletons corresponding to each selectable virtual character are determined, the animation data of all skin models and/or skin skeletons corresponding to each selectable virtual character are used as the animation data of the body skeleton of the selectable virtual character and the animation data of the attachment skeleton, so that subsequent operations can be accurately performed on the animation data of the body skeleton corresponding to the selectable virtual character and the animation data of the attachment skeleton.
Step 1007: and determining the identification of the body skeleton and the identification of the accessory skeleton of the optional virtual character according to the identification of each skeleton in the skin skeletons corresponding to the skin model.
As each skeleton in the skinned skeletons corresponding to the skinned model has one mark, the body skeleton and the attachment skeleton of the optional virtual character can be accurately determined, so that the body skeleton and the attachment skeleton of the optional virtual character can be quickly and accurately found.
Step 1008: and creating a temporary virtual object, controlling the temporary virtual object to move according to the moving mode of the center of mass skeleton in the body skeleton of the selectable virtual character, and obtaining the animation data of the pure center of mass according to the animation data of the temporary virtual object.
Illustratively, the temporary virtual object is not a virtual object derived directly from the target animation file, but rather a virtual character regenerated from animation data and/or identification of the body skeleton of the alternative virtual character and animation data and/or identification of the attachment skeleton or from other data. The temporary virtual object may be used to simulate the movement or motion of the selectable virtual character.
In one possible approach, deriving animation data for the simple centroid from animation data for the temporary virtual object includes:
and taking the animation data of the temporary virtual object in a preset time period as the animation data of the pure centroid.
Optionally, the preset time period may be set in advance, for example, the preset time period may be set to 1 minute, and specifically, the time length may also be represented by a frame number of the target animation file in the preset time period, for example, the preset time period may be set to a time length corresponding to 500-frame animation, which indicates that the frame number of the animation scene corresponding to the target animation file in the preset time period is 500 frames. The preset time period may also be the whole time length of the animation in the target animation file, or may also be a partial time length of the animation in the target animation file. The embodiments of the present application do not limit this.
It is worth mentioning that the animation data of the simple centroid of the selectable virtual character is obtained by creating a temporary virtual object and moving the temporary virtual object in a manner of simulating the movement of the centroid skeleton in the body skeleton of the selectable virtual character. In this way, the accuracy of the animation data of the simple centroid can be ensured.
In one possible implementation manner, referring to fig. 3, determining at least one skin model belonging to the same selectable virtual character according to the identifier of the root bone of the skin bone corresponding to each skin model includes:
step 1009: and if the identification of the root skeleton of the skin skeleton corresponding to the first skin model is the same as the identification of the root skeleton of the skin skeleton corresponding to the second skin model, determining that the first skin model and the second skin model belong to the same optional virtual role.
Because the root skeleton of each skin skeleton has only one identifier, whether the first skin model and the second skin model belong to the same optional virtual role can be determined by judging whether the identifier of the root skeleton of the skin skeleton corresponding to the first skin model is the same as the identifier of the root skeleton of the skin skeleton corresponding to the second skin model. In this way, all skin models and/or skin bones corresponding to the selectable virtual characters can be determined for subsequent operations.
In a possible implementation manner, referring to fig. 4, determining animation data of a body skeleton and animation data of an attachment skeleton of the optional virtual character according to the animation data of the skin models belonging to the same optional virtual character in the target animation file includes:
step 1010: and obtaining the motion trail of the skin model in the preset time period in the target animation file.
Optionally, the motion trajectory may include a displacement trajectory of the skin model relative to an origin of world coordinates of the virtual scene, a displacement trajectory of the skin model relative to an initial position where the skin model is located in the virtual scene within the preset time period, and an action trajectory of the skin model relative to the centroid bone. The embodiments of the present application do not limit this.
Step 1011: analyzing the motion trail according to time to obtain animation data of the body skeleton of the selectable virtual character and animation data of the attachment skeleton.
Optionally, the analyzing may specifically be analyzing the motion trajectory of the skin model frame by frame to obtain a connection relationship or an action relationship between body bones and/or attachment bones in the skin model.
Optionally, analyzing the motion trajectory according to time may be to sequentially arrange the frames of animations in the target animation file according to a time sequence, and then sequentially analyze the arranged frames of animations to obtain animation data of the body skeleton and animation data of the attachment skeleton of the selectable virtual character.
In this way, the accuracy of the resulting animation data of the body skeleton of the selectable virtual character and the animation data of the attachment skeleton can be improved.
In one possible implementation manner, referring to fig. 5, performing zeroing processing on the target avatar having the target name according to the attribute information of the target avatar includes:
step 1013: and creating a role directory corresponding to the target name.
Alternatively, the character directory may be a directory for recording or presenting the target virtual characters so that the user can quickly and intuitively search for or select the target virtual characters. Thus, the efficiency of animation data processing can be improved.
Step 1014: and storing the identification of the body skeleton, the animation data of the body skeleton, the identification of the accessory skeleton and the animation data of the accessory skeleton as original information into the character directory.
Optionally, the original information refers to information before the zeroing operation has not been performed on the target animation file.
The original information is also recorded and stored in the role catalog, so that the user can quickly and intuitively search or select the animation data of the skeleton or the skeleton identification of each target virtual role, and the user can conveniently adjust the original information.
Step 1015: and adjusting the original information stored in the role catalog according to the animation data of the pure centroid.
Further, the adjusting the original information stored in the character directory according to the animation data of the simple centroid includes:
and modifying the animation data of the center of mass bone in the body bone of the original information into the animation data of the pure center of mass.
In this way, external factors that affect the virtual character's displacement or motion in the animation can be removed to complete the zeroing operation.
It should be noted that the original information stored in the role directory is adjusted according to the animation data of the simple centroid by creating the role directory corresponding to the target name and recording and storing the original information in the role directory. Therefore, the user can quickly and intuitively search or select the original information of each target virtual role in batches, and the efficiency of batch adjustment of the original information by the user can be improved. Therefore, the effect of improving the efficiency of executing the zeroing operation on the animation data can be achieved.
In one possible implementation, after saving the identification of the body skeleton, the animation data of the body skeleton, the identification of the attachment skeleton, and the animation data of the attachment skeleton as original information into the character directory, the method may further include:
the role directory is sent to a server.
Alternatively, the server may be a server dedicated to the animation data zeroing process. For example, the server may be a server rendering a farm management tool.
Alternatively, the rendering farm management tool may be Deadline software, the rendering farm management tool including a plurality of farm machines for rendering.
And generating a plurality of animation data zeroing tasks according to the number of the target virtual characters and the number of preset farm machines, and sending the plurality of animation data zeroing tasks to the farm machines.
Optionally, each farm machine may adjust the raw information stored in the character directory based on the animation data of the simple centroid.
Optionally, each farm machine may further determine a connection relationship or an action relationship between each body skeleton and each attachment skeleton of each target virtual character according to the identification of the body skeleton, the animation data of the body skeleton, the identification of the attachment skeleton and the animation data of the attachment skeleton, and connect or skin each body skeleton and each attachment skeleton to generate a new virtual character.
Optionally, after generating a plurality of animation data zeroing tasks according to the number of the target virtual characters and the number of the preset farm machines and sending the plurality of animation data zeroing tasks to the farm machines, the method may further include:
and generating notification information and sending the notification information to the terminal equipment.
Optionally, the notification information is used to instruct each farm machine to complete the adjustment of the original information stored in the role directory.
It is worth mentioning that at the same time, the farm machines can process different animation data, respectively. Therefore, the time for carrying out the zeroing processing on the target animation file can be shortened, and the effect of improving the efficiency of carrying out the zeroing operation on the animation data can be achieved.
In a possible implementation manner, referring to fig. 6, before performing zeroing processing on the target avatar having the target name according to the attribute information of the target avatar, the method further includes:
step 1016: and performing frame attribute conversion on animation data of a body skeleton, animation data of an attachment skeleton and animation data of a pure center of mass in the attribute information of the target virtual character.
Alternatively, the frame attribute conversion may be to convert attribute information of a target virtual character in a Key (K) frame in the target animation file.
Alternatively, the transformation operation may be to adjust the position to which the body bones and/or appendage bones and/or the simple center of mass of the target virtual character point.
For example, the conversion operation may be to adjust the animation data of the body skeleton, the animation data of the attachment skeleton, and the animation data of the simple center of mass in the attribute information of the target virtual character, so as to adjust the position pointed by each body skeleton and/or each attachment skeleton and/or each simple center of mass of the target virtual character to the ground where the target virtual character is currently located in the virtual scene.
In this way, the body skeleton, the appendage skeleton, and/or the simple center of mass of the target virtual character can be made to point to the ground on which the target virtual character is currently located in the virtual scene. Therefore, the skin model and/or the skin skeleton of the target virtual character can be correctly displayed after the zero returning operation is carried out.
In a possible implementation manner, referring to fig. 7, determining at least one selectable virtual character and attribute information of each selectable virtual character according to the skin model in the target animation file and the skin skeleton corresponding to the skin model, further includes:
step 1017: and responding to the operation that the user selects the target animation file in the zeroing tool, loading the target animation file, and analyzing a plurality of original skin models from the target animation file.
Optionally, each original skin model is a skin model that can be directly obtained from the target animation file after the target animation file is loaded before the zeroing operation is performed on the target animation file.
Step 1018: and responding to the selection operation of the user on at least one original skin model in the multiple original skin models, taking the selected original skin model as the skin model in the target animation file, and determining at least one selectable virtual role and attribute information of each selectable virtual role according to the skin model in the target animation file and a skin skeleton corresponding to the skin model.
Therefore, the relation among the skin models, the skin skeletons and the optional virtual characters in the target animation file can be determined in batch, and the efficiency of analyzing the target animation file can be improved.
The following describes a device, an apparatus, and a computer-readable storage medium for executing the method for batch zeroing of animation data provided by the present application, and specific implementation processes and technical effects thereof are referred to above and will not be described again below.
Fig. 8 is a schematic structural diagram of an animation data batch zeroing apparatus according to an embodiment of the present application, and referring to fig. 8, the apparatus includes:
the determining module 201 may be configured to determine at least one selectable virtual character and attribute information of each selectable virtual character according to the skin model in the target animation file and the skin skeleton corresponding to the skin model.
The adding module 202 may be configured to add the target name to the attribute information of the target virtual character in response to an operation of giving the target name to the target virtual character in the selectable virtual characters by a user.
The zeroing module 203 may be configured to perform zeroing on the target avatar with the target name according to the attribute information of the target avatar.
Optionally, the apparatus further includes a creating module, which may be configured to create a role directory corresponding to the target name.
Optionally, the apparatus further comprises a saving module, which may be configured to save the identification of the body skeleton, the animation data of the body skeleton, the identification of the attachment skeleton, and the animation data of the attachment skeleton as the original information into the character directory.
Optionally, the apparatus further comprises an adjusting module, which may be configured to adjust the original information stored in the character directory according to the animation data of the pure centroid.
Optionally, the apparatus further comprises a conversion module, which can be used for performing frame attribute conversion on the animation data of the body skeleton, the animation data of the attachment skeleton, and the animation data of the pure center of mass in the attribute information of the target virtual character.
The above-mentioned apparatus is used for executing the method provided by the foregoing embodiment, and the implementation principle and technical effect are similar, which are not described herein again.
These above modules may be one or more integrated circuits configured to implement the above methods, such as: one or more Application Specific Integrated Circuits (ASICs), or one or more microprocessors, or one or more Field Programmable Gate Arrays (FPGAs), etc. For another example, when one of the above modules is implemented in the form of a Processing element scheduler code, the Processing element may be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
Fig. 9 is a schematic structural diagram of a computer device according to an embodiment of the present application. Referring to fig. 9, the computer apparatus includes: a memory 301 and a processor 302, wherein the memory 301 stores a computer program operable on the processor 302, and the processor 302 executes the computer program to implement the steps of any of the above-mentioned method embodiments.
The embodiments of the present application also provide a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.
Optionally, the present application also provides a program product, such as a computer readable storage medium, comprising a program which, when executed by a processor, is adapted to perform any of the above-described embodiments of the method for batch zeroing of animated data.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of a unit is merely a logical division, and an actual implementation may have another division, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
The integrated unit implemented in the form of a software functional unit may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium and includes several instructions to enable a computer device (which may be a personal computer, a server, or a network device) or a processor (processor) to execute some steps of the methods according to the embodiments of the present invention. And the aforementioned storage medium includes: a U disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
The above description is only a preferred embodiment of the present application and is not intended to limit the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (13)

1. A method for batch zeroing of animation data is characterized by comprising the following steps:
determining at least one optional virtual role and attribute information of each optional virtual role according to a skin model in a target animation file and a skin skeleton corresponding to the skin model;
responding to an operation of giving a target name to a target virtual role in the optional virtual roles, and adding the target name to attribute information of the target virtual role;
and performing zeroing processing on the target virtual character with the target name according to the attribute information of the target virtual character, wherein the processed animation data of the center of mass in the body skeleton of the target virtual character is the animation data of a pure center of mass.
2. The method for batch zeroing of animation data according to claim 1, wherein the determining at least one optional virtual character and attribute information of each optional virtual character according to the skin model in the target animation file and the skin skeleton corresponding to the skin model comprises:
obtaining skin bones corresponding to the skin models;
determining at least one skin model belonging to the same selectable virtual role according to the identification of the root skeleton of the skin skeleton corresponding to each skin model;
determining animation data of body skeletons and animation data of accessory skeletons of the selectable virtual character according to the animation data of each skin model belonging to the same selectable virtual character in the target animation file;
determining the identification of the body skeleton and the identification of the accessory skeleton of the selectable virtual role according to the identification of each skeleton in the skin skeletons corresponding to the skin model;
and creating a temporary virtual object, controlling the temporary virtual object to move according to the moving mode of the center of mass skeleton in the body skeleton of the selectable virtual character, and obtaining the animation data of the pure center of mass according to the animation data of the temporary virtual object.
3. The method for batch zeroing of animation data according to claim 2, wherein the determining at least one skin model belonging to the same selectable virtual character according to the identification of the root bone of the skin bone corresponding to each skin model comprises:
and if the identification of the root skeleton of the skin skeleton corresponding to the first skin model is the same as the identification of the root skeleton of the skin skeleton corresponding to the second skin model, determining that the first skin model and the second skin model belong to the same optional virtual role.
4. The method for batch zeroing of animation data according to claim 2, wherein the determining animation data of body bones and animation data of attachment bones of the optional virtual character according to the animation data of the skin models belonging to the same optional virtual character in the target animation file comprises:
acquiring a motion track of the skin model in a preset time period in the target animation file;
and analyzing the motion trail according to time to obtain animation data of the body skeleton of the selectable virtual character and animation data of the attachment skeleton.
5. The batch zeroing method of animation data according to claim 2, wherein the deriving the animation data of the pure center of mass from the animation data of the temporary virtual object comprises:
and taking the animation data of the temporary virtual object in a preset time period as the animation data of the pure centroid.
6. The batch zeroing method for animation data according to any one of claims 1 to 5, wherein the zeroing the target virtual character with the target name according to the attribute information of the target virtual character comprises:
creating a role directory corresponding to the target name;
storing the identification of the body skeleton, the animation data of the body skeleton, the identification of the attachment skeleton and the animation data of the attachment skeleton as original information into the character directory;
and adjusting the original information stored in the role catalog according to the animation data of the pure centroid.
7. The method of claim 6, wherein the adjusting the original information stored in the character directory according to the animation data of the simple centroid comprises:
and modifying the animation data of the center of mass bone in the body bone of the original information into the animation data of the pure center of mass.
8. The batch zeroing method for animation data according to any one of claims 1-5, wherein before performing zeroing processing on the target virtual character with the target name according to the attribute information of the target virtual character, the method further comprises:
and performing frame attribute conversion on animation data of a body skeleton, animation data of an attachment skeleton and animation data of a pure center of mass in the attribute information of the target virtual character.
9. The method for batch zeroing of animation data according to any one of claims 1-5, wherein the determining of the at least one optional virtual character and the attribute information of each optional virtual character according to the skin model in the target animation file and the skin skeleton corresponding to the skin model further comprises:
responding to the operation that a user selects the target animation file in a zeroing tool, loading the target animation file, and analyzing a plurality of original skin models from the target animation file;
and responding to the selection operation of the user on at least one original skin model in the multiple original skin models, taking the selected original skin model as the skin model in the target animation file, and determining at least one selectable virtual role and attribute information of each selectable virtual role according to the skin model in the target animation file and a skin skeleton corresponding to the skin model.
10. The method of bulk zeroing of animation data according to any of claims 1-5, wherein the attribute information of each of the selectable virtual characters comprises: an identification of a body skeleton, animation data of a body skeleton, an identification of an attachment skeleton, animation data of an attachment skeleton, and/or animation data of a pure center of mass.
11. An apparatus for batch zeroing of animation data, the apparatus comprising:
the determining module is used for determining at least one optional virtual role and attribute information of each optional virtual role according to the skin model in the target animation file and the skin skeleton corresponding to the skin model;
an adding module, configured to add a target name to attribute information of a target virtual character in response to an operation of giving the target name to the target virtual character in the selectable virtual characters by a user;
and the zeroing module is used for performing zeroing processing on the target virtual role with the target name according to the attribute information of the target virtual role.
12. A computer device, comprising: memory in which a computer program is stored which is executable on the processor, and a processor which, when executing the computer program, carries out the steps of the method according to any one of the preceding claims 1 to 10.
13. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, carries out the steps of the method of one of claims 1 to 10.
CN202111549478.6A 2021-12-17 2021-12-17 Method and device for batch zeroing of animation data and computer equipment Pending CN114241099A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111549478.6A CN114241099A (en) 2021-12-17 2021-12-17 Method and device for batch zeroing of animation data and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111549478.6A CN114241099A (en) 2021-12-17 2021-12-17 Method and device for batch zeroing of animation data and computer equipment

Publications (1)

Publication Number Publication Date
CN114241099A true CN114241099A (en) 2022-03-25

Family

ID=80757846

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111549478.6A Pending CN114241099A (en) 2021-12-17 2021-12-17 Method and device for batch zeroing of animation data and computer equipment

Country Status (1)

Country Link
CN (1) CN114241099A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112215930A (en) * 2020-10-19 2021-01-12 珠海金山网络游戏科技有限公司 Data processing method and device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112215930A (en) * 2020-10-19 2021-01-12 珠海金山网络游戏科技有限公司 Data processing method and device

Similar Documents

Publication Publication Date Title
CN112598785B (en) Method, device and equipment for generating three-dimensional model of virtual image and storage medium
CN109395390B (en) Method and device for processing face model of game character, processor and terminal
CN109978975A (en) A kind of moving method and device, computer equipment of movement
CN111462283B (en) Method, medium, device and apparatus for playing large number of same character animations
CN109035415B (en) Virtual model processing method, device, equipment and computer readable storage medium
CN110298907B (en) Virtual character action control method and device, computing equipment and storage medium
CN111161365B (en) Compression method and device for bone animation data
CN114241099A (en) Method and device for batch zeroing of animation data and computer equipment
CN113487709A (en) Special effect display method and device, computer equipment and storage medium
CN114093021A (en) Dance video motion extraction method and device, computer equipment and storage medium
CN108654088B (en) Program debugging method and device, storage medium and electronic device
CN110310352B (en) Role action editing method and device, computing equipment and storage medium
CN111028322A (en) Game animation expression generation method and device and electronic equipment
CN110414596B (en) Video processing method, video processing device, model training method, model training device, storage medium and electronic device
CN112069075A (en) Fashion testing method and device for game role and game client
CN113407031B (en) VR (virtual reality) interaction method, VR interaction system, mobile terminal and computer readable storage medium
WO2023035725A1 (en) Virtual prop display method and apparatus
JP2003337956A (en) Apparatus and method for computer graphics animation
CN112819931A (en) Animation generation method, animation generation device, terminal and storage medium
CN110992448B (en) Animation processing method, device, electronic equipment and storage medium
CN113018855B (en) Action switching method and device for virtual role
CN111368667B (en) Data acquisition method, electronic equipment and storage medium
CN116228942B (en) Character action extraction method, device and storage medium
CN110877332B (en) Robot dance file generation method and device, terminal device and storage medium
CN110120092B (en) Three-dimensional head data acquisition method and device and electronic equipment

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