CN118212327A - Character local animation realization method and device, storage medium and electronic device - Google Patents

Character local animation realization method and device, storage medium and electronic device Download PDF

Info

Publication number
CN118212327A
CN118212327A CN202211615413.1A CN202211615413A CN118212327A CN 118212327 A CN118212327 A CN 118212327A CN 202211615413 A CN202211615413 A CN 202211615413A CN 118212327 A CN118212327 A CN 118212327A
Authority
CN
China
Prior art keywords
bone
skeleton
proxy
component
rotation data
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
CN202211615413.1A
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.)
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 CN202211615413.1A priority Critical patent/CN118212327A/en
Priority to PCT/CN2023/137132 priority patent/WO2024125388A1/en
Publication of CN118212327A publication Critical patent/CN118212327A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T13/00Animation
    • 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 invention provides a method and a device for realizing local animation of a role, a storage medium and an electronic device, wherein the method comprises the following steps: acquiring rotation data of an intermediate bone of a character bone model, wherein the character bone model comprises a first component and a second component, the first component and the second component being connected by the intermediate bone; searching a proxy skeleton of the intermediate skeleton, wherein the proxy skeleton stores spatial relationship data of the intermediate skeleton relative to a root skeleton; writing the rotation data to the proxy bone; a bone mask corresponding to the first component is determined to control the proxy bone to implement a partial animation that includes the first component. The scheme realizes the local animation of the separation of the first component and the second component, avoids the problem that the first component swings back and forth when the second component moves, and realizes the locally stable animation expression effect.

Description

Character local animation realization method and device, storage medium and electronic device
Technical Field
The invention relates to the technical field of computers, in particular to a method and a device for realizing local animation of a role, a storage medium and an electronic device.
Background
In the related art, a character in a game needs to perform different actions at different positions (upper and lower body) under a specific state, for example, archery during running, a pull bow action is required for the upper body, and a running action is required for the lower body.
In the scheme of the related technology, the upper body animation and the lower body animation can be separated by manufacturing a Mask of the upper body skeleton and binding the Mask to the upper body Layer of Animator Controller and then matching with the whole body animation Layer. Because the animation operation is in the part space, the Rotation curves recorded in the animation are all relative to the movement of the father node, namely, even if the Spine (Bip 001 Spine) does not move, the father node pelvis (Bip 001 Pelvis) of the animation is swayed, the Bip001Spine skeleton still follows the swaying, and finally the upper body is swayed back and forth along the waist. For example, the upper body can rock along with the waist of the user during running, so that the problem that the upper body swings back and forth during running is solved, and the stable representation effect of the upper body cannot be realized.
In view of the above problems in the related art, no effective solution has been found yet.
Disclosure of Invention
The embodiment of the invention provides a method and a device for realizing local animation of a role, a storage medium and an electronic device.
According to one embodiment of the present invention, there is provided a character partial animation realization method including: acquiring rotation data of an intermediate bone of a character bone model, wherein the character bone model comprises a first component and a second component, the first component and the second component being connected by the intermediate bone; searching a proxy skeleton of the intermediate skeleton, wherein the proxy skeleton stores spatial relationship data of the intermediate skeleton relative to a root skeleton; writing the rotation data to the proxy bone; a bone mask corresponding to the first component is determined to control the proxy bone to implement a partial animation that includes the first component.
Optionally, writing the rotation data to the proxy bone includes: determining first rotation data of the intermediate skeleton in a root space and second rotation data of the intermediate skeleton in a parent space; writing the first rotation data into a first proxy bone of the intermediate bone in a root space, and writing the second rotation data into a second proxy bone of the intermediate bone in a father space.
Optionally, determining a bone mask corresponding to the first component to control the proxy bone comprises: determining a bone mask corresponding to the first component; the proxy bone is controlled in the root space of the intermediate bone using the bone mask.
Optionally, determining a bone mask corresponding to the first component to control the proxy bone comprises: determining a bone mask corresponding to the first component; the proxy skeleton is controlled in a root space of the intermediate skeleton using the skeleton mask, and the proxy skeleton is controlled in a parent space of the intermediate skeleton.
Optionally, the intermediate skeleton includes a plurality of proxy skeletons, and controlling the proxy skeletons in a root space of the intermediate skeleton using the skeleton mask includes: obtaining a conversion coefficient matrix of the plurality of proxy bones, wherein the conversion coefficient matrix comprises a plurality of conversion coefficients, and each conversion coefficient corresponds to one proxy bone; respectively carrying out interpolation processing on the rotation data of the plurality of agent bones by adopting the conversion coefficient matrix to correspondingly obtain a plurality of smoothly-transited root space data; and respectively controlling the plurality of proxy bones in the root space of the intermediate bones by adopting the plurality of root space data.
Optionally, searching for the proxy skeleton of the intermediate skeleton includes: locating a target level of the intermediate bone in the bone model; looking up proxy bones of the intermediate bones in the target hierarchy in the bone model.
Optionally, searching for the proxy skeleton of the intermediate skeleton in the target hierarchy in the skeleton model includes: searching the target level in the bone model for the proxy bone of the intermediate bone in the root space, and searching the target level in the bone model for the proxy bone of the intermediate bone in the parent space.
Optionally, after writing the rotation data to the proxy bone, the method further comprises: reading agent rotation data of the agent skeleton in a root space, and acquiring real-time rotation data of a father skeleton of the intermediate skeleton; calculating the rotation offset of the intermediate skeleton in a parent space by adopting the proxy rotation data and the real-time rotation data; real-time rotation data of a parent space of the intermediate bone is updated based on the rotation offset.
According to another embodiment of the present invention, there is provided a character partial animation realization apparatus including:
An acquisition module for acquiring rotational data of an intermediate bone of a bone model, wherein the bone model
Comprising a first part and a second part, said first part and said second part being connected by said intermediate bone 5; the searching module is used for searching the proxy skeleton of the middle skeleton, wherein the proxy skeleton stores the spatial relation data of the middle skeleton relative to the root skeleton; a writing module for writing the rotation data into the proxy bone; a control module for determining a skeleton mask corresponding to the first component to control the proxy skeleton to implement a partial animation comprising the first component.
Optionally, the writing module includes: a determining unit for determining first rotation data of the intermediate skeleton in a root space 0 and second rotation data in a parent space; the writing unit is used for writing the first rotation data into a first proxy bone of the middle bone in a root space and writing the second rotation data into a second proxy bone of the middle bone in a father space.
Optionally, the control module includes: a determining unit for determining the position corresponding to the first component
Is a bone mask of (2); a first control unit for controlling said proxy skeleton in a root space 5 of said intermediate skeleton using said skeleton mask.
Optionally, the control module includes: a determining unit for determining a bone mask corresponding to the first component; a second control unit for controlling the proxy skeleton in a root space of the intermediate skeleton and controlling the proxy skeleton in a parent space of the intermediate skeleton using the skeleton mask.
Optionally, the first control unit or the second control unit includes: an obtaining subunit, configured to obtain a conversion coefficient matrix of the plurality of proxy bones, where the conversion coefficient matrix includes a plurality of conversion coefficients, and each conversion coefficient corresponds to one proxy bone; the processing subunit is used for respectively carrying out interpolation processing on the rotation data of the plurality of agent bones by adopting the conversion coefficient matrix to correspondingly obtain a plurality of smoothly-transited root space data; and the control subunit is used for respectively controlling the plurality of proxy bones in the root space of the intermediate bones by adopting the plurality of root space data.
5, The searching module comprises: a positioning unit for positioning the intermediate bone in the position
A target level in the bone model; a searching unit, configured to search the target hierarchy in the skeleton model for a proxy skeleton of the intermediate skeleton.
Optionally, the search unit includes: a searching subunit, configured to search, in the target hierarchy in the bone model, a proxy bone of the intermediate bone in a root space, and search, in the target hierarchy in the bone model, a proxy bone of the intermediate bone in a parent space.
Optionally, the apparatus further includes: the reading module is used for reading the proxy rotation data of the proxy skeleton in the root space and acquiring the real-time rotation data of the father skeleton of the middle skeleton after the writing module writes the rotation data into the proxy skeleton; the calculation module is used for calculating the rotation offset of the intermediate skeleton in the father space by adopting the proxy rotation data and the real-time rotation data; and the updating module is used for updating the real-time rotation data of the father space of the middle skeleton based on the rotation offset.
According to a further embodiment of the invention, there is also provided a storage medium having stored therein a computer program, wherein the computer program is arranged to perform the steps of any of the method embodiments described above when run.
According to a further embodiment of the invention, there is also provided an electronic device comprising a memory having stored therein a computer program and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
According to the invention, rotation data of an intermediate skeleton of a character skeleton model is acquired, wherein the character skeleton model comprises a first component and a second component, and the first component and the second component are connected through the intermediate skeleton; the method comprises the steps of searching the proxy skeleton of the middle skeleton, wherein the proxy skeleton stores the spatial relation data of the middle skeleton relative to the root skeleton, writing the rotation data into the proxy skeleton, determining a skeleton mask corresponding to the first component to control the proxy skeleton so as to realize the local animation comprising the first component, acquiring the rotation data of the real middle skeleton and writing the rotation data into the proxy skeleton of the middle skeleton, and controlling the proxy skeleton through the skeleton mask instead of controlling the real middle skeleton, so that a father skeleton in the second component can be prevented from transmitting the rotation data to the first component through the middle skeleton, the local animation of the first component and the second component are realized, the problem that the first component swings back and forth when the second component moves is avoided, and the locally stable animation expression effect is realized.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute a limitation on the application. In the drawings:
FIG. 1 is a block diagram of the hardware architecture of a character partial animation implementation computer according to an embodiment of the present invention;
FIG. 2 is a flow diagram of a method for implementing a character partial animation according to an embodiment of the invention;
FIG. 3 is a flow chart of the embodiment of the invention for realizing the upper and lower body animation separation;
FIG. 4 is a block diagram of a character partial animation realization device according to an embodiment of the present invention;
fig. 5 is a block diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present application, a technical solution in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present application without making any inventive effort, shall fall within the scope of the present application. It should be noted that, without conflict, the embodiments of the present application and features of the embodiments may be combined with each other.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the application described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
The method according to the first embodiment of the present application may be implemented in a mobile phone, a tablet, a server, a computer, or a similar electronic terminal. Taking the example of running on a computer, fig. 1 is a block diagram of a hardware structure of a character partial animation implementation computer according to an embodiment of the present application. As shown in fig. 1, the computer may include one or more processors 102 (only one is shown in fig. 1) (the processor 102 may include, but is not limited to, a microprocessor MCU or a processing device such as a programmable logic device FPGA) and a memory 104 for storing data, and optionally, a transmission device 106 for communication functions and an input-output device 108. It will be appreciated by those of ordinary skill in the art that the configuration shown in FIG. 1 is merely illustrative and is not intended to limit the configuration of the computer described above. For example, the computer may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
The memory 104 may be used to store a computer program, for example, a software program of application software and a module, such as a computer program corresponding to a method for implementing a local animation of a character in an embodiment of the present invention, and the processor 102 executes the computer program stored in the memory 104 to perform various functional applications and data processing, that is, implement the above-mentioned method. Memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, memory 104 may further include memory located remotely from processor 102, which may be connected to the computer via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof. In this embodiment, the processor 104 is configured to control the target virtual character to perform a specified operation to complete the game task in response to the man-machine interaction instruction and the game policy. The memory 104 is used to store program scripts for electronic games, configuration information, sound resource information for virtual characters, and the like.
The transmission device 106 is used to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communications provider of a computer. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, simply referred to as a NIC) that can connect to other network devices through a base station to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is configured to communicate with the internet wirelessly.
Optionally, the input/output device 108 further includes a man-machine interaction screen, configured to obtain a man-machine interaction instruction through a man-machine interaction interface, and further configured to present a picture in the virtual scene;
In this embodiment, a method for implementing a local animation of a character is provided, and fig. 2 is a schematic flow chart of a method for implementing a local animation of a character according to an embodiment of the present invention, as shown in fig. 2, the flow chart includes the following steps:
step S202, acquiring rotation data of an intermediate skeleton of a character skeleton model, wherein the character skeleton model comprises a first component and a second component, and the first component and the second component are connected through the intermediate skeleton;
the skeleton model of the embodiment may be an object model of a virtual character in a virtual scene, and the virtual scene may be a virtual game scene, a virtual teaching scene, a virtual social scene, and the like.
The intermediate bone of this embodiment may be a Spine, neck (pack) or the like, and the corresponding first and second members may be upper and lower body members joined by the Spine, or body and head members joined by the neck, the first and second members being a bone mass comprised of several bones. The intermediate skeleton of the present embodiment is a real skeleton in a character skeleton model.
In one example, the first component is an upper body component and the second component is a lower body component, and acquiring rotation data of the intermediate bone of the bone model includes: rotational data of a vertebra of the bone model is acquired.
Step S204, searching a proxy skeleton of the middle skeleton, wherein the proxy skeleton stores spatial relation data of the middle skeleton relative to the root skeleton;
in this embodiment, the spatial relationship data is used to indicate the positional relationship of the intermediate bone and the root bone, such as spatial transformation data between different coordinate systems.
The proxy skeleton of this embodiment may be configured to set a Root space of the intermediate skeleton, or may be configured to be simultaneously set in a Root (Root) space and a Parent (Parent) space of the intermediate skeleton.
Optionally, the proxy bone also stores spatial relationship data of the intermediate bone relative to the parent bone.
Step S206, writing the rotation data into the agent skeleton;
Step S208, determining a skeleton mask corresponding to the first component to control the proxy skeleton to implement the partial animation including the first component.
The skeleton Mask (Mask) of this embodiment may be created in advance using Unity or the like, and the skeleton Mask is bound to the proxy skeleton, and controls the proxy skeleton instead of controlling the actual intermediate skeleton when the animation is performed.
In this embodiment, the solution further includes: the bone mask corresponding to the second component is determined to control the intermediate bone to achieve a partial animation comprising the second component, which may be a whole body mask or a partial mask covering the second component, in which case the bone mask of the first component is arranged uppermost and covers the whole body mask at the location of the first component.
Acquiring rotation data of an intermediate skeleton of a character skeleton model, wherein the character skeleton model comprises a first component and a second component, and the first component and the second component are connected through the intermediate skeleton; the method comprises the steps of searching the proxy skeleton of the middle skeleton, wherein the proxy skeleton stores the spatial relation data of the middle skeleton relative to the root skeleton, writing the rotation data into the proxy skeleton, determining a skeleton mask corresponding to the first component to control the proxy skeleton so as to realize the local animation comprising the first component, acquiring the rotation data of the real middle skeleton and writing the rotation data into the proxy skeleton of the middle skeleton, and controlling the proxy skeleton through the skeleton mask instead of controlling the real middle skeleton, so that a father skeleton in the second component can be prevented from transmitting the rotation data to the first component through the middle skeleton, the local animation of the first component and the second component are realized, the problem that the first component swings back and forth when the second component moves is avoided, and the locally stable animation expression effect is realized.
In one implementation of the present embodiment, writing rotation data to the proxy bone includes: determining first rotation data of the intermediate skeleton in the root space and second rotation data of the intermediate skeleton in the parent space; the first rotation data is written to a first proxy bone of the intermediate bone in the root space and the second rotation data is written to a second proxy bone of the intermediate bone in the parent space.
In one example, writing rotation data to the proxy bone includes: determining first rotation data of the intermediate bone in root space; the first rotation data is written to a first proxy bone of the intermediate bone in the root space.
Taking the middle skeleton as a vertebra as an example, additionally creating a plurality of Root space proxy vertebra skeletons and a plurality of Root space proxy vertebra skeletons under the Root skeleton in the FBX animation file by writing a Bake tool. And the rotation data of the real vertebra in the Root space and the part space are written into the corresponding proxy bones respectively.
In one implementation scenario of the present embodiment, determining a skeleton mask corresponding to the first component to control the proxy skeleton comprises: determining a bone mask corresponding to the first component; the proxy skeleton is controlled in the root space of the intermediate skeleton using a skeleton mask.
In another implementation scenario of the present embodiment, determining a skeleton mask corresponding to the first component to control the proxy skeleton comprises: determining a bone mask corresponding to the first component; a root space control proxy bone at the intermediate bone and a parent space control proxy bone at the intermediate bone using bone masks.
The embodiment can also set the proxy skeleton in the Parent space at the same time, and select to adopt the Root space control proxy skeleton in the middle skeleton or the Root space and Parent space joint control proxy skeleton according to the requirements of animation expression, because some animation expression requirements do not need complete Root space animation, but hope to mix in the Root space and the part space according to the appointed coefficient, so as to obtain the mixed animation.
Based on the two implementation scenarios, the intermediate skeleton includes a plurality of proxy skeletons, and the root space control proxy skeleton in the intermediate skeleton using skeleton masks includes: obtaining a conversion coefficient matrix of a plurality of proxy bones, wherein the conversion coefficient matrix comprises a plurality of conversion coefficients, and each conversion coefficient corresponds to one proxy bone; respectively carrying out interpolation processing on the rotation data of a plurality of agent bones by adopting a conversion coefficient matrix, and correspondingly obtaining a plurality of smoothly-transited root space data; a plurality of proxy bones are controlled in a root space of the intermediate bones using a plurality of root space data, respectively.
In this embodiment, a plurality of proxy bones are provided, taking the middle bone as a vertebra, and three adjacent vertebrae of the front end, middle and end are provided, and a plurality of proxy bones are used, where each proxy bone is respectively configured with a different weight, for example, the front end, middle and end proxy bones are respectively configured with a weight 0.2,0.5,1.0, and the calculation of the corresponding bone final result data is performed according to the following formula: final result =
Data of proxy skeleton a' weight + data of lower body animation skeleton a (1-weight),
Where weight is the corresponding proxy bone weight. The interpolation effect is realized by means of different weights, and finally, 5 splicing is smoothly transited to Root space data, so that smoother local animation is realized.
In one example, finding a proxy bone of an intermediate bone includes: locating a target level of the intermediate bone in the bone model; the proxy skeleton of the intermediate skeleton is found in a target hierarchy in the skeleton model.
Optionally, searching the proxy skeleton of the intermediate skeleton in the target hierarchy in the skeleton model includes: at the position of
The proxy skeleton of the intermediate skeleton in the root space is searched in the target hierarchy in the skeleton model, and the proxy skeleton of the intermediate skeleton in the father space is searched in the target hierarchy of 0 in the skeleton model. Of course, it is also possible to mold only the bones
The target hierarchy in the model looks up proxy bones of the intermediate bones in root space.
Alternatively, the bone model of the present embodiment may be constructed using Bip bone system.
In one example of this embodiment, after writing the rotation data to the proxy bone, further comprising:
Reading agent rotation data of an agent skeleton in a root space and acquiring real-time 5 rotation data of a father skeleton of an intermediate skeleton; calculating the rotation offset of the middle skeleton in the father space by adopting the proxy rotation data and the real-time rotation data; real-time rotation data of the parent space of the intermediate bone is updated based on the rotation offset.
In the example, the data of the real vertebral bone required by the part space can be reversely deduced by compiling a Unity script and adopting the data of the proxy bone in the Root space, and the assignment is carried out, so that the rotation of the real vertebral bone is ensured
The rotation data is changed due to the parent skeleton, but the rotation data of the proxy skeleton is unchanged, so that the stable upper body animation which does not twist along with the 0 pelvis is obtained in real time.
FIG. 3 is a flow chart of the embodiment of the invention for realizing the separation of the upper body animation and the lower body animation, comprising: animation is produced and exported as an FBX file, a Bake tool is used for processing and generating a new FBX file, corresponding Mask and Animator Controller resources are produced in Unity, codes are used, and the bone position is corrected according to the Bake information.
5 With the solution of this embodiment, in the FBX file, several proxy vertebrae (ProxySpines) are added for corresponding to the actual vertebrae (Original vertebrae), and then the Rotation data of each frame of Original vertebrae are converted to the Root bone space of the skeleton and recorded on the Rotation curve of ProxySpines bones so that the upper body does not twist with the crotch. The transition of the upper body and the lower body can be smoothed through a plurality of bones, the upper body and the lower body can be mixed in proportion between the Parent space animation and the Root space animation, the upper body animation and the lower body animation which are more stable and natural are obtained, the effect is better, the existing animations can be spliced, and the development cost is saved.
From the description of the above embodiments, it will be clear to a person skilled in the art that the method according to the above embodiments may be implemented by means of software plus the necessary general hardware platform, but of course also by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method according to the embodiments of the present invention.
Example 2
The embodiment also provides a device for realizing the local animation of the character, which is used for realizing the embodiment and the preferred implementation, and the description is omitted. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
Fig. 4 is a block diagram of a character partial animation realization device according to an embodiment of the present invention, as shown in fig. 4, comprising: an acquisition module 40, a lookup module 42, a write module 44, a control module 46, wherein,
An acquisition module 40 for acquiring rotational data of an intermediate bone of a bone model, wherein the bone model comprises a first part and a second part, the first part and the second part being connected by the intermediate bone;
A searching module 42, configured to search for a proxy skeleton of the intermediate skeleton, where the proxy skeleton stores spatial relationship data of the intermediate skeleton with respect to a root skeleton;
A write module 44 for writing the rotation data to the proxy bone;
A control module 46 for determining a skeleton mask corresponding to the first component to control the proxy skeleton to implement a partial animation comprising the first component.
Optionally, the writing module includes: a determining unit for determining first rotation data of the intermediate skeleton in a root space and second rotation data of the intermediate skeleton in a parent space; the writing unit is used for writing the first rotation data into a first proxy bone of the middle bone in a root space and writing the second rotation data into a second proxy bone of the middle bone in a father space.
Optionally, the control module includes: a determining unit for determining a bone mask corresponding to the first component; a first control unit for controlling the proxy bone in a root space of the intermediate bone using the bone mask.
Optionally, the control module includes: a determining unit for determining a bone mask corresponding to the first component; a second control unit for controlling the proxy skeleton in a root space of the intermediate skeleton and controlling the proxy skeleton in a parent space of the intermediate skeleton using the skeleton mask.
Optionally, the first control unit or the second control unit includes: an obtaining subunit, configured to obtain a conversion coefficient matrix of the plurality of proxy bones, where the conversion coefficient matrix includes a plurality of conversion coefficients, and each conversion coefficient corresponds to one proxy bone; the processing subunit is used for respectively carrying out interpolation processing on the rotation data of the plurality of agent bones by adopting the conversion coefficient matrix to correspondingly obtain a plurality of smoothly-transited root space data; and the control subunit is used for respectively controlling the plurality of proxy bones in the root space of the intermediate bones by adopting the plurality of root space data.
Optionally, the searching module includes: a positioning unit for positioning a target level of the intermediate bone in the bone model; a searching unit, configured to search the target hierarchy in the skeleton model for a proxy skeleton of the intermediate skeleton.
Optionally, the search unit includes: a searching subunit, configured to search, in the target hierarchy in the bone model, a proxy bone of the intermediate bone in a root space, and search, in the target hierarchy in the bone model, a proxy bone of the intermediate bone in a parent space.
Optionally, the apparatus further includes: the reading module is used for reading the proxy rotation data of the proxy skeleton in the root space and acquiring the real-time rotation data of the father skeleton of the middle skeleton after the writing module writes the rotation data into the proxy skeleton; the calculation module is used for calculating the rotation offset of the intermediate skeleton in the father space by adopting the proxy rotation data and the real-time rotation data; and the updating module is used for updating the real-time rotation data of the father space of the middle skeleton based on the rotation offset.
It should be noted that each of the above modules may be implemented by software or hardware, and for the latter, it may be implemented by, but not limited to: the modules are all located in the same processor; or the above modules may be located in different processors in any combination.
Example 3
The embodiment of the application also provides an electronic device, and fig. 5 is a structural diagram of the electronic device according to the embodiment of the application, as shown in fig. 5, including a processor 51, a communication interface 52, a memory 53 and a communication bus 54, where the processor 51, the communication interface 52 and the memory 53 complete communication with each other through the communication bus 54, and the memory 53 is used for storing a computer program;
the processor 51 is configured to execute a program stored in the memory 53, and implement the following steps: acquiring rotation data of an intermediate bone of a character bone model, wherein the character bone model comprises a first component and a second component, the first component and the second component being connected by the intermediate bone; searching a proxy skeleton of the intermediate skeleton, wherein the proxy skeleton stores spatial relationship data of the intermediate skeleton relative to a root skeleton; writing the rotation data to the proxy bone; a bone mask corresponding to the first component is determined to control the proxy bone to implement a partial animation that includes the first component.
Optionally, writing the rotation data to the proxy bone includes: determining first rotation data of the intermediate skeleton in a root space and second rotation data of the intermediate skeleton in a parent space; writing the first rotation data into a first proxy bone of the intermediate bone in a root space, and writing the second rotation data into a second proxy bone of the intermediate bone in a father space.
Optionally, determining a bone mask corresponding to the first component to control the proxy bone comprises: determining a bone mask corresponding to the first component; the proxy bone is controlled in the root space of the intermediate bone using the bone mask.
Optionally, determining a bone mask corresponding to the first component to control the proxy bone comprises: determining a bone mask corresponding to the first component; the proxy skeleton is controlled in a root space of the intermediate skeleton using the skeleton mask, and the proxy skeleton is controlled in a parent space of the intermediate skeleton.
Optionally, the intermediate skeleton includes a plurality of proxy skeletons, and controlling the proxy skeletons in a root space of the intermediate skeleton using the skeleton mask includes: obtaining a conversion coefficient matrix of the plurality of proxy bones, wherein the conversion coefficient matrix comprises a plurality of conversion coefficients, and each conversion coefficient corresponds to one proxy bone; respectively carrying out interpolation processing on the rotation data of the plurality of agent bones by adopting the conversion coefficient matrix to correspondingly obtain a plurality of smoothly-transited root space data; and respectively controlling the plurality of proxy bones in the root space of the intermediate bones by adopting the plurality of root space data.
Optionally, searching for the proxy skeleton of the intermediate skeleton includes: locating a target level of the intermediate bone in the bone model; looking up proxy bones of the intermediate bones in the target hierarchy in the bone model.
Optionally, searching for the proxy skeleton of the intermediate skeleton in the target hierarchy in the skeleton model includes: searching the target level in the bone model for the proxy bone of the intermediate bone in the root space, and searching the target level in the bone model for the proxy bone of the intermediate bone in the parent space.
Optionally, after writing the rotation data to the proxy bone, the method further comprises: reading agent rotation data of the agent skeleton in a root space, and acquiring real-time rotation data of a father skeleton of the intermediate skeleton; calculating the rotation offset of the intermediate skeleton in a parent space by adopting the proxy rotation data and the real-time rotation data; real-time rotation data of a parent space of the intermediate bone is updated based on the rotation offset.
The communication bus mentioned by the above terminal may be a peripheral component interconnect standard (PERIPHERAL COMPONENT INTERCONNECT, abbreviated as PCI) bus or an extended industry standard architecture (Extended Industry Standard Architecture, abbreviated as EISA) bus, etc. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The communication interface is used for communication between the terminal and other devices.
The memory may include random access memory (Random Access Memory, RAM) or may include non-volatile memory (non-volatile memory), such as at least one disk memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, abbreviated as CPU), a network processor (Network Processor, abbreviated as NP), etc.; but may also be a digital signal processor (DIGITAL SIGNAL Processing, DSP), application Specific Integrated Circuit (ASIC), field-Programmable gate array (FPGA) or other Programmable logic device, discrete gate or transistor logic device, discrete hardware components.
In yet another embodiment of the present application, a computer readable storage medium is provided, where instructions are stored, which when executed on a computer, cause the computer to perform the character localized animation implementation method according to any of the above embodiments.
In yet another embodiment of the present application, a computer program product containing instructions that, when run on a computer, cause the computer to perform the character localized animation implementation method of any of the above embodiments is also provided.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present application, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, by wired (e.g., coaxial cable, optical fiber, digital Subscriber Line (DSL)), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk Solid STATE DISK (SSD)), etc.
The foregoing embodiment numbers of the present application are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
In the foregoing embodiments of the present application, the descriptions of the embodiments are emphasized, and for a portion of this disclosure that is not described in detail in this embodiment, reference is made to the related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed technology may be implemented in other manners. The above-described embodiments of the apparatus are merely exemplary, and the division of the units, such as the division of the units, is merely a logical function division, and may be implemented in another manner, for example, multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interfaces, units or modules, or may be in electrical or other forms.
The units described as separate units may or may not be physically separate, and units shown 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 may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be embodied essentially or in part or all of the technical solution or in part in the form of a software product stored in a storage medium, including instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a usb disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely a preferred embodiment of the present application and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present application, which are intended to be comprehended within the scope of the present application.

Claims (10)

1. A method for implementing local animation of a character, comprising:
acquiring rotation data of an intermediate bone of a character bone model, wherein the character bone model comprises a first component and a second component, the first component and the second component being connected by the intermediate bone;
Searching a proxy skeleton of the intermediate skeleton, wherein the proxy skeleton stores spatial relationship data of the intermediate skeleton relative to a root skeleton;
Writing the rotation data to the proxy bone;
a bone mask corresponding to the first component is determined to control the proxy bone to implement a partial animation that includes the first component.
2. The method of claim 1, wherein writing the rotation data to the proxy bone comprises:
determining first rotation data of the intermediate skeleton in a root space and second rotation data of the intermediate skeleton in a parent space;
Writing the first rotation data into a first proxy bone of the intermediate bone in a root space, and writing the second rotation data into a second proxy bone of the intermediate bone in a father space.
3. The method of claim 1, wherein the proxy bone comprises a proxy bone in a root space, determining a bone mask corresponding to the first component to control the proxy bone comprising:
determining a bone mask corresponding to the first component;
The proxy bone is controlled in the root space of the intermediate bone using the bone mask.
4. The method of claim 1, wherein the proxy bones comprise a proxy bone in a root space and a proxy bone in a parent space, determining a bone mask corresponding to the first component to control the proxy bone comprising:
determining a bone mask corresponding to the first component;
the proxy skeleton is controlled in a root space of the intermediate skeleton using the skeleton mask, and the proxy skeleton is controlled in a parent space of the intermediate skeleton.
5. The method of claim 3 or 4, wherein the intermediate skeleton comprises a plurality of proxy skeletons, and wherein controlling the proxy skeletons in a root space of the intermediate skeleton using the skeleton mask comprises:
obtaining a conversion coefficient matrix of the plurality of proxy bones, wherein the conversion coefficient matrix comprises a plurality of conversion coefficients, and each conversion coefficient corresponds to one proxy bone;
Respectively carrying out interpolation processing on the rotation data of the plurality of agent bones by adopting the conversion coefficient matrix to correspondingly obtain a plurality of smoothly-transited root space data;
And respectively controlling the plurality of proxy bones in the root space of the intermediate bones by adopting the plurality of root space data.
6. The method of claim 1, wherein finding a proxy bone for the intermediate bone comprises:
Locating a target level of the intermediate bone in the bone model;
Looking up proxy bones of the intermediate bones in the target hierarchy in the bone model.
7. The method of claim 1, wherein after writing the rotation data to the proxy bone, the method further comprises:
Reading agent rotation data of the agent skeleton in a root space, and acquiring real-time rotation data of a father skeleton of the intermediate skeleton;
Calculating the rotation offset of the intermediate skeleton in a parent space by adopting the proxy rotation data and the real-time rotation data;
Real-time rotation data of a parent space of the intermediate bone is updated based on the rotation offset.
8. A character partial animation realization device, comprising:
an acquisition module for acquiring rotational data of an intermediate bone of a bone model, wherein the bone model comprises a first component and a second component, the first component and the second component being connected by the intermediate bone;
The searching module is used for searching the proxy skeleton of the middle skeleton, wherein the proxy skeleton stores the spatial relation data of the middle skeleton relative to the root skeleton;
A writing module for writing the rotation data into the proxy bone;
A control module for determining a skeleton mask corresponding to the first component to control the proxy skeleton to implement a partial animation comprising the first component.
9. A storage medium having a computer program stored therein, wherein the computer program is arranged to perform the method of any of claims 1 to 7 when run.
10. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to run the computer program to perform the method of any of claims 1 to 7.
CN202211615413.1A 2022-12-15 2022-12-15 Character local animation realization method and device, storage medium and electronic device Pending CN118212327A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202211615413.1A CN118212327A (en) 2022-12-15 2022-12-15 Character local animation realization method and device, storage medium and electronic device
PCT/CN2023/137132 WO2024125388A1 (en) 2022-12-15 2023-12-07 Character partial animation implementation method and apparatus, computer device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211615413.1A CN118212327A (en) 2022-12-15 2022-12-15 Character local animation realization method and device, storage medium and electronic device

Publications (1)

Publication Number Publication Date
CN118212327A true CN118212327A (en) 2024-06-18

Family

ID=91455062

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211615413.1A Pending CN118212327A (en) 2022-12-15 2022-12-15 Character local animation realization method and device, storage medium and electronic device

Country Status (2)

Country Link
CN (1) CN118212327A (en)
WO (1) WO2024125388A1 (en)

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10262447B2 (en) * 2016-09-30 2019-04-16 Disney Enterprises, Inc. Systems and methods for virtual entity animation
CN111773686A (en) * 2020-06-30 2020-10-16 完美世界(北京)软件科技发展有限公司 Animation generation method and device, storage medium and electronic device
CN112090076B (en) * 2020-08-14 2022-02-01 深圳中清龙图网络技术有限公司 Game character action control method, device, equipment and medium
CN112999659B (en) * 2021-02-22 2024-05-28 网易(杭州)网络有限公司 Game data processing method and device, storage medium and electronic equipment
CN113888679A (en) * 2021-09-09 2022-01-04 北京像素软件科技股份有限公司 Animation generation method, device, equipment and medium
CN115311391A (en) * 2022-06-20 2022-11-08 网易(杭州)网络有限公司 Animation transfer method and device between skeleton models and electronic equipment

Also Published As

Publication number Publication date
WO2024125388A1 (en) 2024-06-20

Similar Documents

Publication Publication Date Title
CN101505320B (en) Graphic user interface sharing method, system and tool
CN106375142B (en) The test method and device of application program
CN109740751B (en) Architecture fusion method of neural network model and related device
CN106843828A (en) interface display, loading method and device
CN112596815B (en) Method and device for generating functional component, storage medium and electronic device
CN109754072B (en) Processing method of network offline model, artificial intelligence processing device and related products
CN113398580B (en) Game scene generation method and device, storage medium and electronic device
CN107633013A (en) Page picture generation method, device and computer-readable recording medium
CN111708563B (en) Method and device for updating UI control in game
CN109815115A (en) Method and device, the computer equipment, storage medium of debugging bridge joint mouth
CN111159265B (en) ETL data migration method and system
CN108228444A (en) A kind of test method and device
CN109147022A (en) VR data rendering method and system, computer equipment, computer storage medium
CN110288703A (en) Image processing method, device, equipment and storage medium
CN111598987B (en) Skeleton processing method, device, equipment and storage medium of virtual object
CN113398595A (en) Scene resource updating method and device, storage medium and electronic device
CN114116481A (en) Kubernetes system-based artificial intelligence algorithm model testing method and system
CN113989442A (en) Building information model construction method and related device
CN105957133B (en) A kind of method and apparatus for loading textures
CN105573816A (en) Virtual input method, device and system
CN112802164B (en) Method and device for realizing animation state machine, storage medium and electronic device
CN118212327A (en) Character local animation realization method and device, storage medium and electronic device
CN111651146A (en) Function generation method, device, equipment and medium
CN112587922A (en) Model display method and device
CN111161032A (en) Product generation method and device

Legal Events

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