WO2024125388A1 - Character partial animation implementation method and apparatus, computer device, and storage medium - Google Patents
Character partial animation implementation method and apparatus, computer device, and storage medium Download PDFInfo
- Publication number
- WO2024125388A1 WO2024125388A1 PCT/CN2023/137132 CN2023137132W WO2024125388A1 WO 2024125388 A1 WO2024125388 A1 WO 2024125388A1 CN 2023137132 W CN2023137132 W CN 2023137132W WO 2024125388 A1 WO2024125388 A1 WO 2024125388A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- bone
- proxy
- skeleton
- component
- rotation data
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 50
- 210000000988 bone and bone Anatomy 0.000 claims abstract description 198
- 238000004590 computer program Methods 0.000 claims description 27
- 230000015654 memory Effects 0.000 claims description 24
- 238000006243 chemical reaction Methods 0.000 claims description 15
- 239000011159 matrix material Substances 0.000 claims description 8
- 238000012545 processing Methods 0.000 claims description 5
- 230000000694 effects Effects 0.000 abstract description 5
- 238000010586 diagram Methods 0.000 description 9
- 101001121408 Homo sapiens L-amino-acid oxidase Proteins 0.000 description 7
- 102100026388 L-amino-acid oxidase Human genes 0.000 description 7
- 230000008569 process Effects 0.000 description 6
- 230000005540 biological transmission Effects 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 4
- 230000006870 function Effects 0.000 description 4
- 230000003993 interaction Effects 0.000 description 4
- 101000827703 Homo sapiens Polyphosphoinositide phosphatase Proteins 0.000 description 3
- 102100023591 Polyphosphoinositide phosphatase Human genes 0.000 description 3
- 230000008901 benefit Effects 0.000 description 3
- 238000004364 calculation method Methods 0.000 description 3
- 210000001624 hip Anatomy 0.000 description 3
- 230000009471 action Effects 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 210000004197 pelvis Anatomy 0.000 description 2
- 238000000926 separation method Methods 0.000 description 2
- OKTJSMMVPCPJKN-UHFFFAOYSA-N Carbon Chemical compound [C] OKTJSMMVPCPJKN-UHFFFAOYSA-N 0.000 description 1
- 101100012902 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) FIG2 gene Proteins 0.000 description 1
- 101100233916 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) KAR5 gene Proteins 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 229910021389 graphene Inorganic materials 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 238000013515 script Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
- 230000007704 transition Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T13/00—Animation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T13/00—Animation
- G06T13/20—3D [Three Dimensional] animation
- G06T13/40—3D [Three Dimensional] animation of characters, e.g. humans, animals or virtual beings
Definitions
- the present invention relates to the field of computer technology, and in particular to a method and device for realizing local animation of a character, a computer device and a readable medium.
- the character in the game needs different parts (such as the upper and lower body) to perform different actions respectively in specific states. For example, shooting an arrow while running requires the upper body to draw the bow and the lower body to run.
- the related technical solution is to make a Mask of the upper body bones and bind it to the upper body layer of the Animator Controller, and then cooperate with a full-body animation layer to achieve the separation of the upper and lower body animation. Because the animation calculations are all in the Parent space, the Rotation curves recorded in the animation are all relative to the movement of the parent node, that is, even if the spine (Bip001Spine) does not move, but its parent node pelvis (Bip001Pelvis) shakes, then the Bip001Spine bone will still shake with it, and eventually the upper body will swing back and forth with the waist. For example, when shooting arrows while running, the upper body will shake with the waist when running, which causes the problem of the upper body swinging back and forth when shooting arrows while running, and the upper body cannot be stable.
- the present application provides a method and device for realizing local animation of a character, a computer device and a readable medium.
- a method for realizing local animation of a character comprising: obtaining rotation data of an intermediate skeleton of a character skeleton model, wherein the character skeleton model comprises a first A component and a second component, wherein the first component and the second component are connected via the intermediate skeleton; searching for 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 into the proxy skeleton; and determining a bone mask corresponding to the first component to control the proxy skeleton to achieve a local animation including the first component.
- a device for realizing local animation of a character comprising: an acquisition module for acquiring rotation data of an intermediate bone of a skeleton model, wherein the skeleton model comprises a first component and a second component, and the first component and the second component are connected via the intermediate bone; a search module for searching for a proxy bone of the intermediate bone, wherein the proxy bone stores spatial relationship data of the intermediate bone relative to a root bone; a writing module for writing the rotation data into the proxy bone; and a control module for determining a bone mask corresponding to the first component to control the proxy bone to realize local animation including the first component.
- a computer device comprising a memory, a processor and a computer program/instructions stored in the memory, wherein the processor implements the steps of the method described in the first aspect when executing the computer program/instructions.
- a computer-readable medium having a computer program/instruction stored thereon, wherein the computer program/instruction, when executed by a processor, implements the steps of the method described in the first aspect.
- a computer program product comprising a computer program/instruction, wherein when the computer program/instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
- the rotation data of the intermediate skeleton of the character skeleton model is obtained, wherein the character skeleton model includes a first component and a second component, and the first component and the second component are connected through the intermediate skeleton; the proxy skeleton of the intermediate skeleton is searched, wherein the proxy skeleton stores the spatial relationship data of the intermediate skeleton relative to the root skeleton, the rotation data is written into the proxy skeleton, and the skeleton mask corresponding to the first component is determined to control the proxy skeleton to realize the local animation including the first component, and the rotation data of the real intermediate skeleton is obtained and written into the proxy skeleton of the intermediate skeleton, and the proxy skeleton is controlled by the skeleton mask instead of the real intermediate skeleton, so that the parent skeleton in the second component can be prevented from being rotated through the intermediate skeleton.
- the skeleton transmits the rotation data to the first component, realizing the local animation of the first component being separated from the second component, avoiding the problem of the
- FIG1 schematically shows a hardware structure block diagram of a computer for realizing partial character animation according to an embodiment of the present invention
- FIG2 schematically shows a flow chart of a method for realizing local animation of a character according to an embodiment of the present invention
- FIG3 schematically shows a flow chart of implementing upper and lower body animation separation according to an embodiment of the present invention
- FIG4 schematically shows a structural block diagram of a device for realizing local animation of a character according to an embodiment of the present invention
- FIG5 schematically shows a block diagram of a computer device for implementing the method according to the present invention.
- FIG. 6 schematically shows a block diagram of a computer program product for implementing the method according to the present invention.
- the term "including” and variations thereof are to be interpreted as open-ended terms meaning “including but not limited to.”
- the term “based on” is to be interpreted as “based, at least in part, on.”
- the terms “one embodiment” and “an embodiment” are to be interpreted as “at least one embodiment.”
- the term “another embodiment” is to be interpreted as “at least one other embodiment.”
- FIG1 is a hardware structure block diagram of a computer for realizing local animation of a character in an embodiment of the present invention.
- the computer may include one or more (only one is shown in FIG1 ) processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data.
- the above-mentioned computer may also include a transmission device 106 and an input and output device 108 for communication functions.
- FIG1 is only for illustration and does not limit the structure of the above-mentioned computer.
- the computer may also include more or fewer components than those shown in FIG1 , or have a configuration different from that shown in FIG1 .
- the memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as a computer program corresponding to a method for realizing local animation of a character in an embodiment of the present invention.
- the processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, the above method is realized.
- the memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory.
- the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computer via a network.
- Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.
- the processor 104 is used to respond to human-computer interaction instructions and game strategies, and control the target virtual character to perform specified operations to complete the game task.
- the memory 104 is used to store program scripts, configuration information, and sound resource information of virtual characters of electronic games.
- the transmission device 106 is used to receive or send data via a network.
- the specific example of the above network may include a wireless network provided by a communication provider of the computer.
- the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet.
- the transmission device 106 can be a radio frequency (Radio Frequency, referred to as RF) module, which is used to communicate with the Internet wirelessly.
- RF Radio Frequency
- the input and output device 108 also includes a human-computer interaction screen for communicating with the user through the human-computer interaction interface.
- the port is used to obtain human-computer interaction instructions and also to present images in the virtual scene;
- FIG. 2 is a flow chart of a method for realizing partial 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 obtaining rotation data of an intermediate skeleton of a character skeleton model, wherein the character skeleton model includes a first component and a second component, and the first component and the second component are connected via the intermediate skeleton;
- the skeleton model of this 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, etc.
- the intermediate skeleton of this embodiment can be a spine, a neck, etc.
- the first component and the second component can be an upper body component and a lower body component connected by a spine, or a body component and a head component connected by a neck.
- the first component and the second component are a skeleton group composed of several bones.
- the intermediate skeleton of this embodiment is a real skeleton in the character skeleton model.
- the first component is an upper body component
- the second component is a lower body component
- obtaining rotation data of a middle bone of the skeleton model includes: obtaining rotation data of a spine of the skeleton model.
- Step S204 searching for a proxy bone of the middle bone, wherein the proxy bone stores spatial relationship data of the middle bone relative to the root bone;
- the spatial relationship data is used to indicate the positional relationship between the intermediate bones and the root bone, such as spatial transformation data between different coordinate systems.
- the proxy skeleton of this embodiment can be set in the root space of the intermediate skeleton, or can be set in the root space and parent space of the intermediate skeleton at the same time.
- 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 proxy skeleton
- Step S208 Determine a bone mask corresponding to the first component to control the proxy bone to implement a local animation including the first component.
- the skeleton mask (Mask) of this embodiment can be pre-created by using Unity or other similar software.
- the skeleton mask is bound to the proxy skeleton.
- the skeleton mask controls the proxy skeleton. bones instead of controlling the real intermediate bones.
- the solution also includes: determining a bone mask corresponding to the second component to control the intermediate bone to achieve local animation including the second component.
- the bone mask of the second component can be a full-body mask or a partial mask covering the second component. If it is a full-body mask, the bone mask of the first component is set at the top layer and covers the full-body mask at the position of the first component.
- the rotation data of the middle bone of the character skeleton model is obtained, wherein the character skeleton model includes a first component and a second component, and the first component and the second component are connected through the middle bone; the proxy bone of the middle bone is searched, wherein the proxy bone stores the spatial relationship data of the middle bone relative to the root bone, the rotation data is written into the proxy bone, and the bone mask corresponding to the first component is determined to control the proxy bone to realize the local animation including the first component, by obtaining the rotation data of the real middle bone and writing it into the proxy bone of the middle bone, and controlling the proxy bone through the bone mask instead of controlling the real middle bone, it is possible to prevent the parent bone in the second component from transmitting the rotation data to the first component through the middle bone, thereby realizing the local animation of the first component separated from the second component, avoiding the problem of the first component swaying back and forth when the second component moves, and realizing the local stable animation performance effect.
- writing rotation data to the proxy bone includes: determining the first rotation data of the intermediate bone in the root space and the second rotation data in the parent space; writing the first rotation data to the first proxy bone of the intermediate bone in the root space, and writing the second rotation data to the second proxy bone of the intermediate bone in the parent space.
- writing the rotation data to the proxy bone includes: determining first rotation data of the intermediate bone in the root space; and writing the first rotation data to the first proxy bone of the intermediate bone in the root space.
- determining the bone mask corresponding to the first component to control the proxy bone includes: determining the bone mask corresponding to the first component; and using the bone mask to control the proxy bone in the root space of the intermediate bone.
- determining the bone mask corresponding to the first component to control the proxy bone includes: determining the bone mask corresponding to the first component; using the bone mask to control the proxy bone in the root space of the intermediate bone, and controlling the proxy bone in the parent space of the intermediate bone.
- This embodiment can also set the proxy skeleton in the parent space at the same time, and choose to use the root space of the intermediate skeleton to control the proxy skeleton or the root space and parent space to jointly control the proxy skeleton according to the needs of animation performance. This is because some animation performance requirements do not require complete Root space animation, but rather hope to mix the Root space and Parent space according to the specified coefficient to obtain a mixed animation.
- the intermediate skeleton includes multiple proxy bones
- using bone masks to control the proxy bones in the root space of the intermediate skeleton includes: obtaining conversion coefficient matrices of the multiple proxy bones, wherein the conversion coefficient matrix includes multiple conversion coefficients, and each conversion coefficient corresponds to a proxy bone; using the conversion coefficient matrix to interpolate the rotation data of the multiple proxy bones respectively, and correspondingly obtaining multiple smoothly transitioned root space data; using multiple root space data to control the multiple proxy bones in the root space of the intermediate skeleton.
- multiple proxy bones are set. Taking the middle bone as the spine, three adjacent spines are set at the front, middle and end. Multiple proxy bones are used, and different weights are configured for each proxy bone. For example, the front, middle and end proxy bones are configured with weights of 0.2, 0.5, and 1.0 respectively.
- the calculation of the corresponding bone final result data is performed according to the following formula:
- Final result proxy bone A’ data * weight + lower body animation bone A data * (1-weight), where weight is the corresponding proxy bone weight.
- the interpolation effect is achieved by different weights, and finally the splicing is more smoothly transitioned to the root space data, thereby achieving smoother local animation.
- finding a proxy bone for the intermediate bone includes: locating a target level of the intermediate bone in the skeleton model; and finding a proxy bone for the intermediate bone in the target level in the skeleton model.
- searching for a proxy bone of an intermediate bone in a target hierarchy in a skeleton model includes: searching for a proxy bone of an intermediate bone in a root space in a target hierarchy in a skeleton model, and searching for a proxy bone of an intermediate bone in a parent space in a target hierarchy in a skeleton model. Only look for root-space proxy bones for intermediate bones in the target hierarchy in the skeleton model.
- the skeleton model of this embodiment can be constructed using the Bip skeleton system.
- the rotation data after the rotation data is written to the proxy bone, it also includes: reading the proxy rotation data of the proxy bone in the root space, and obtaining the real-time rotation data of the parent bone of the intermediate bone; using the proxy rotation data and the real-time rotation data to calculate the rotation offset of the intermediate bone in the parent space; updating the real-time rotation data of the parent space of the intermediate bone based on the rotation offset.
- FIG. 3 is a schematic diagram of the process of separating the upper and lower body animations according to an embodiment of the present invention, including: making an animation and exporting it as an FBX file, using the Bake tool to process and generate a new FBX file, making corresponding Mask and Animator Controller resources in Unity, and using code to correct the bone position according to the Bake information.
- proxy spines Proxy Spines
- the Rotation data of each frame of the Original Spines is converted to the Root bone space of the skeleton and recorded on the rotation curve of the Proxy Spines bone, so that the upper body will not twist with the hips.
- the transition between the upper and lower body can also be smoothed by multiple bones, and the Parent space animation and the Root space animation can be mixed in proportion to obtain a more stable and natural upper and lower body animation, which makes the effect better, and the existing animations can be spliced to save development costs.
- the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk), including a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute various functions of the present invention.
- a storage medium such as ROM/RAM, magnetic disk, optical disk
- a terminal device which can be a mobile phone, computer, server, or network device, etc.
- a device for realizing local animation of a character is also provided, which is used to realize the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated.
- the term "module” can realize a combination of software and/or hardware of a predetermined function.
- the device described in the following embodiments is preferably realized by software, the realization of hardware, or a combination of software and hardware is also possible and conceived.
- FIG4 is a structural block diagram of a device for realizing local animation of a character according to an embodiment of the present invention.
- the device includes: an acquisition module 40, a search module 42, a writing module 44, and a control module 46, wherein:
- An acquisition module 40 is used to acquire rotation data of an intermediate skeleton of a skeleton model, wherein the skeleton model includes a first component and a second component, and the first component and the second component are connected through the intermediate skeleton;
- a search module 42 configured to search for a proxy skeleton of the intermediate skeleton, wherein the proxy skeleton stores spatial relationship data of the intermediate skeleton relative to the root skeleton;
- a writing module 44 used for writing the rotation data into the proxy skeleton
- the control module 46 is used to determine the bone mask corresponding to the first component to control the proxy bone to achieve local animation including the first component.
- the writing module includes: a determination unit, used to determine the first rotation data of the intermediate skeleton in the root space and the second rotation data in the parent space; a writing unit, used to write the first rotation data into the first proxy bone of the intermediate skeleton in the root space, and write the second rotation data into the second proxy bone of the intermediate skeleton in the parent space.
- control module includes: a determination unit, used to determine a bone mask corresponding to the first component; and a first control unit, used to control the proxy bone in the root space of the intermediate bone using the bone mask.
- control module includes: a determination unit, used to determine a bone mask corresponding to the first component; and a second control unit, used to use the bone mask to control the proxy bone in the root space of the intermediate bone, and to control the proxy bone in the parent space of the intermediate bone.
- the first control unit or the second control unit includes: an acquisition subunit, used to acquire a conversion coefficient matrix of the multiple proxy bones, wherein the conversion coefficient matrix includes multiple conversion coefficients, and each conversion coefficient corresponds to a proxy bone; a processing subunit, used to use the conversion coefficient matrix to interpolate the rotation data of the multiple proxy bones respectively, and obtain multiple smoothly transitioned root space data; a control subunit, used to use the multiple root space data to control the multiple proxy bones in the root space of the intermediate bone respectively.
- the search module includes: a positioning unit, used to locate the target level of the intermediate skeleton in the skeleton model; and a search unit, used to search for a proxy skeleton of the intermediate skeleton in the target level in the skeleton model.
- the search unit includes: a search subunit, used to search for a proxy bone of the intermediate bone in the root space in the target level in the skeleton model, and to search for a proxy bone of the intermediate bone in the parent space in the target level in the skeleton model.
- the device also includes: a reading module, used to read the proxy rotation data of the proxy bone in the root space and obtain the real-time rotation data of the parent bone of the intermediate bone after the writing module writes the rotation data into the proxy bone; a calculation module, used to calculate the rotation offset of the intermediate bone in the parent space using the proxy rotation data and the real-time rotation data; and an updating module, used to update the real-time rotation data of the parent space of the intermediate bone based on the rotation offset.
- a reading module used to read the proxy rotation data of the proxy bone in the root space and obtain the real-time rotation data of the parent bone of the intermediate bone after the writing module writes the rotation data into the proxy bone
- a calculation module used to calculate the rotation offset of the intermediate bone in the parent space using the proxy rotation data and the real-time rotation data
- an updating module used to update the real-time rotation data of the parent space of the intermediate bone based on the rotation offset.
- the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
- the various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof.
- a microprocessor or a digital signal processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components of the device for implementing local character animation according to an embodiment of the present invention.
- the present invention may also be implemented as a program/instruction (e.g., a computer program/instruction and a computer program product) for executing a part or all of the methods described herein.
- Such a program/instruction for implementing the present invention may be stored in a computer program or instructions.
- the invention may be stored on a readable medium, or may be in the form of one or more signals, such signals may be downloaded from an Internet website, or provided on a carrier signal, or in any other form.
- Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information.
- Information can be computer readable instructions, data structures, modules of programs or other data.
- Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage, quantum memory, graphene-based storage media or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.
- PRAM phase change memory
- SRAM static random access memory
- DRAM dynamic random access memory
- RAM random access memory
- ROM read-only memory
- EEPROM electrically erasable programm
- FIG5 schematically shows a block diagram of a computer device that can implement a method for implementing a local character animation according to the present invention
- the computer device includes a processor 510 and a computer-readable medium in the form of a memory 520.
- the memory 520 is an example of a computer-readable medium, which has a storage space 530 for storing a computer program/instruction 531.
- each step in the method for implementing the local character animation described above can be implemented.
- Fig. 6 schematically shows a block diagram of a computer program product for implementing the method for implementing local character animation according to the present invention.
- the computer program product includes a computer program/instruction 610, and when the computer program/instruction 610 is executed by a processor such as the processor 510 shown in Fig. 5, each step in the method for implementing local character animation described above can be implemented.
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Processing Or Creating Images (AREA)
Abstract
The present invention provides a character partial animation implementation method and apparatus, a computer device, and a storage medium. The method comprises: obtaining rotation data of a middle bone of a character bone model, wherein the character bone model comprises a first part and a second part, and the first part is connected to the second part by means of the middle bone; searching for a proxy bone of the middle bone, wherein the proxy bone stores spatial relationship data of the middle bone relative to a root bone; writing the rotation data into the proxy bone; and determining a bone mask corresponding to the first part to control the proxy bone to implement partial animation comprising the first part. According to the solution, the partial animation in which the first part and the second part are separated is achieved, so that the problem of the first part swinging back and forth when the second part moves is avoided, thereby achieving a partial stable animation performance effect.
Description
交叉引用cross reference
本申请要求2022年12月15日递交的、申请号为“202211615413.1”、发明名称为“角色局部动画实现方法及装置、存储介质、电子装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims priority to the Chinese patent application filed on December 15, 2022, with application number "202211615413.1" and invention name "Character local animation implementation method and device, storage medium, electronic device", all contents of which are incorporated by reference in this application.
本发明涉及计算机技术领域,尤其是涉及到一种角色局部动画实现方法及装置、计算机设备及可读介质。The present invention relates to the field of computer technology, and in particular to a method and device for realizing local animation of a character, a computer device and a readable medium.
相关技术中,游戏中的角色在特定状态下需要不同部位(如上下半身)分别执行不同的动作,比如奔跑时射箭,需要上半身做拉弓动作,下半身做奔跑动作。In the related art, the character in the game needs different parts (such as the upper and lower body) to perform different actions respectively in specific states. For example, shooting an arrow while running requires the upper body to draw the bow and the lower body to run.
相关技术的方案时通过制作一个上半身骨骼的Mask,并将其绑定到Animator Controller的上半身Layer上,再配合一个全身动画Layer,可以实现上下半身动画分离。因为动画运算都在Parent空间,动画中记录的Rotation(旋转)曲线,都是相对于父节点的运动,也就是即便脊椎骨(Bip001Spine)不产生运动,但是它的父节点骨盆(Bip001Pelvis)如果有晃动,那么Bip001Spine骨骼也仍然会跟随晃动,最终导致上半身会跟随腰部来回摇摆。比如跑步中射箭,上半身会随着跑步时的腰部一起晃动也就造成了跑步时射箭,上半身来回摇摆的问题,无法实现上半身稳定的表现效果。The related technical solution is to make a Mask of the upper body bones and bind it to the upper body layer of the Animator Controller, and then cooperate with a full-body animation layer to achieve the separation of the upper and lower body animation. Because the animation calculations are all in the Parent space, the Rotation curves recorded in the animation are all relative to the movement of the parent node, that is, even if the spine (Bip001Spine) does not move, but its parent node pelvis (Bip001Pelvis) shakes, then the Bip001Spine bone will still shake with it, and eventually the upper body will swing back and forth with the waist. For example, when shooting arrows while running, the upper body will shake with the waist when running, which causes the problem of the upper body swinging back and forth when shooting arrows while running, and the upper body cannot be stable.
针对相关技术中存在的上述问题,目前尚未发现有效的解决方案。With respect to the above-mentioned problems existing in the related technologies, no effective solutions have been found so far.
发明内容Summary of the invention
为了解决上述技术问题或者至少部分地解决上述技术问题,本申请提供了一种角色局部动画实现方法及装置、计算机设备及可读介质。In order to solve the above technical problems or at least partially solve the above technical problems, the present application provides a method and device for realizing local animation of a character, a computer device and a readable medium.
根据本发明的一个方面,提供了一种角色局部动画实现方法,包括:获取角色骨骼模型的中间骨骼的旋转数据,其中,所述角色骨骼模型包括第一
部件和第二部件,所述第一部件和所述第二部件通过所述中间骨骼连接;查找所述中间骨骼的代理骨骼,其中,所述代理骨骼存储有所述中间骨骼相对根骨骼的空间关系数据;将所述旋转数据写入所述代理骨骼;确定对应于所述第一部件的骨骼遮罩来控制所述代理骨骼,以实现包括所述第一部件的局部动画。According to one aspect of the present invention, a method for realizing local animation of a character is provided, comprising: obtaining rotation data of an intermediate skeleton of a character skeleton model, wherein the character skeleton model comprises a first A component and a second component, wherein the first component and the second component are connected via the intermediate skeleton; searching for 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 into the proxy skeleton; and determining a bone mask corresponding to the first component to control the proxy skeleton to achieve a local animation including the first component.
根据本发明的另一个方面,提供了一种角色局部动画实现装置,包括:获取模块,用于获取骨骼模型的中间骨骼的旋转数据,其中,所述骨骼模型包括第一部件和第二部件,所述第一部件和所述第二部件通过所述中间骨骼连接;查找模块,用于查找所述中间骨骼的代理骨骼,其中,所述代理骨骼存储有所述中间骨骼相对根骨骼的空间关系数据;写入模块,用于将所述旋转数据写入所述代理骨骼;控制模块,用于确定对应于所述第一部件的骨骼遮罩来控制所述代理骨骼,以实现包括所述第一部件的局部动画。According to another aspect of the present invention, there is provided a device for realizing local animation of a character, comprising: an acquisition module for acquiring rotation data of an intermediate bone of a skeleton model, wherein the skeleton model comprises a first component and a second component, and the first component and the second component are connected via the intermediate bone; a search module for searching for a proxy bone of the intermediate bone, wherein the proxy bone stores spatial relationship data of the intermediate bone relative to a root bone; a writing module for writing the rotation data into the proxy bone; and a control module for determining a bone mask corresponding to the first component to control the proxy bone to realize local animation including the first component.
根据本发明的又一个方面,提供了一种计算机设备,包括存储器、处理器及存储在存储器上的计算机程序/指令,所述处理器执行所述计算机程序/指令时实现上述第一方面所述方法的步骤。According to another aspect of the present invention, there is provided a computer device, comprising a memory, a processor and a computer program/instructions stored in the memory, wherein the processor implements the steps of the method described in the first aspect when executing the computer program/instructions.
根据本发明的再一方面,提供了一种计算机可读介质,其上存储有计算机程序/指令,所述计算机程序/指令被处理器执行时实现上述第一方面所述方法的步骤。According to yet another aspect of the present invention, there is provided a computer-readable medium having a computer program/instruction stored thereon, wherein the computer program/instruction, when executed by a processor, implements the steps of the method described in the first aspect.
根据本发明的再一个方面,提供了一种计算机程序产品,包括计算机程序/指令,所述计算机程序/指令被处理器执行时实现上述第一方面所述方法的步骤。According to yet another aspect of the present invention, there is provided a computer program product, comprising a computer program/instruction, wherein when the computer program/instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
通过本发明,获取角色骨骼模型的中间骨骼的旋转数据,其中,角色骨骼模型包括第一部件和第二部件,第一部件和第二部件通过中间骨骼连接;查找中间骨骼的代理骨骼,其中,代理骨骼存储有中间骨骼相对根骨骼的空间关系数据,将旋转数据写入代理骨骼,确定对应于第一部件的骨骼遮罩来控制代理骨骼,以实现包括第一部件的局部动画,通过获取真实的中间骨骼的旋转数据并写入中间骨骼的代理骨骼,并通过骨骼遮罩来控制控制代理骨骼,而不是控制真实的中间骨骼,可以防止第二部件中的父骨骼通过中间骨
骼将旋转数据传导至第一部件,实现了第一部件与第二部件分离的局部动画,避免了第二部件运动时第一部件来回摇摆的问题,实现了局部稳定的动画表现效果。Through the present invention, the rotation data of the intermediate skeleton of the character skeleton model is obtained, wherein the character skeleton model includes a first component and a second component, and the first component and the second component are connected through the intermediate skeleton; the proxy skeleton of the intermediate skeleton is searched, wherein the proxy skeleton stores the spatial relationship data of the intermediate skeleton relative to the root skeleton, the rotation data is written into the proxy skeleton, and the skeleton mask corresponding to the first component is determined to control the proxy skeleton to realize the local animation including the first component, and the rotation data of the real intermediate skeleton is obtained and written into the proxy skeleton of the intermediate skeleton, and the proxy skeleton is controlled by the skeleton mask instead of the real intermediate skeleton, so that the parent skeleton in the second component can be prevented from being rotated through the intermediate skeleton. The skeleton transmits the rotation data to the first component, realizing the local animation of the first component being separated from the second component, avoiding the problem of the first component swaying back and forth when the second component moves, and realizing the local stable animation performance effect.
上述说明仅是本发明技术方案的概述,为了能够更清楚了解本发明的技术手段,而可依照说明书的内容予以实施,并且为了让本发明的上述和其它目的、特征和优点能够更明显易懂,以下特举本发明的具体实施方式。The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below.
通过阅读下文优选实施方式的详细描述,本发明的上述及各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。在附图中:The above and various other advantages and benefits of the present invention will become apparent to those skilled in the art by reading the detailed description of the preferred embodiments below. In the accompanying drawings:
图1示意性地示出了本发明实施例的一种角色局部动画实现计算机的硬件结构框图;FIG1 schematically shows a hardware structure block diagram of a computer for realizing partial character animation according to an embodiment of the present invention;
图2示意性地示出了根据本发明实施例的一种角色局部动画实现方法的流程示意图;FIG2 schematically shows a flow chart of a method for realizing local animation of a character according to an embodiment of the present invention;
图3示意性地示出了本发明实施例实现上下半身动画分离的流程示意图;FIG3 schematically shows a flow chart of implementing upper and lower body animation separation according to an embodiment of the present invention;
图4示意性地示出了根据本发明实施例的一种角色局部动画实现装置的结构框图;FIG4 schematically shows a structural block diagram of a device for realizing local animation of a character according to an embodiment of the present invention;
图5示意性地示出了用于实现根据本发明的方法的计算机设备的框图;以及FIG5 schematically shows a block diagram of a computer device for implementing the method according to the present invention; and
图6示意性地示出了实现根据本发明的方法的计算机程序产品的框图。FIG. 6 schematically shows a block diagram of a computer program product for implementing the method according to the present invention.
下面结合附图和具体的实施方式对本发明作进一步的描述。以下描述仅为说明本发明的基本原理而并非对其进行限制。The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments. The following description is only intended to illustrate the basic principles of the present invention and is not intended to limit the present invention.
如本文中所使用的,术语“包括”及其变体要被解读为意味着“包括但不限于”的开放式术语。术语“基于”要被解读为“至少部分地基于”。术语“一个实施例”和“一种实施例”要被解读为“至少一个实施例”。术语“另一个实施例”要被解读为“至少一个其他实施例”。As used herein, the term "including" and variations thereof are to be interpreted as open-ended terms meaning "including but not limited to." The term "based on" is to be interpreted as "based, at least in part, on." The terms "one embodiment" and "an embodiment" are to be interpreted as "at least one embodiment." The term "another embodiment" is to be interpreted as "at least one other embodiment."
实施例一
Embodiment 1
本申请实施例一所提供的方法实施例可以在手机、平板、服务器、计算机或者类似的电子终端中执行。以运行在计算机上为例,图1是本发明实施例的一种角色局部动画实现计算机的硬件结构框图。如图1所示,计算机可以包括一个或多个(图1中仅示出一个)处理器102(处理器102可以包括但不限于微处理器MCU或可编程逻辑器件FPGA等的处理装置)和用于存储数据的存储器104,可选地,上述计算机还可以包括用于通信功能的传输设备106以及输入输出设备108。本领域普通技术人员可以理解,图1所示的结构仅为示意,其并不对上述计算机的结构造成限定。例如,计算机还可包括比图1中所示更多或者更少的组件,或者具有与图1所示不同的配置。The method embodiment provided in the first embodiment of the present application can be executed in a mobile phone, a tablet, a server, a computer or a similar electronic terminal. Taking running on a computer as an example, FIG1 is a hardware structure block diagram of a computer for realizing local animation of a character in an embodiment of the present invention. As shown in FIG1 , the computer may include one or more (only one is shown in FIG1 ) processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data. Optionally, the above-mentioned computer may also include a transmission device 106 and an input and output device 108 for communication functions. It can be understood by those of ordinary skill in the art that the structure shown in FIG1 is only for illustration and does not limit the structure of the above-mentioned computer. For example, the computer may also include more or fewer components than those shown in FIG1 , or have a configuration different from that shown in FIG1 .
存储器104可用于存储计算机程序,例如,应用软件的软件程序以及模块,如本发明实施例中的一种角色局部动画实现方法对应的计算机程序,处理器102通过运行存储在存储器104内的计算机程序,从而执行各种功能应用以及数据处理,即实现上述的方法。存储器104可包括高速随机存储器,还可包括非易失性存储器,如一个或者多个磁性存储装置、闪存、或者其他非易失性固态存储器。在一些实例中,存储器104可进一步包括相对于处理器102远程设置的存储器,这些远程存储器可以通过网络连接至计算机。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。在本实施例中,处理器104用于响应人机交互指令和游戏策略,控制目标虚拟角色执行指定操作以完成游戏任务。存储器104用于存储电子游戏的程序脚本,配置信息,虚拟角色的声音资源信息等。The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as a computer program corresponding to a method for realizing local animation of a character in an embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, the above method is realized. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computer via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof. In this embodiment, the processor 104 is used to respond to human-computer interaction instructions and game strategies, and control the target virtual character to perform specified operations to complete the game task. The memory 104 is used to store program scripts, configuration information, and sound resource information of virtual characters of electronic games.
传输设备106用于经由一个网络接收或者发送数据。上述的网络具体实例可包括计算机的通信供应商提供的无线网络。在一个实例中,传输设备106包括一个网络适配器(Network Interface Controller,简称为NIC),其可通过基站与其他网络设备相连从而可与互联网进行通讯。在一个实例中,传输设备106可以为射频(Radio Frequency,简称为RF)模块,其用于通过无线方式与互联网进行通讯。The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computer. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (Radio Frequency, referred to as RF) module, which is used to communicate with the Internet wirelessly.
可选的,输入输出设备108还包括人机交互屏幕用于通过人机交互接
口获取人机交互指令,还用于呈现虚拟场景中的画面;Optionally, the input and output device 108 also includes a human-computer interaction screen for communicating with the user through the human-computer interaction interface. The port is used to obtain human-computer interaction instructions and also to present images in the virtual scene;
在本实施例中提供了一种角色局部动画实现方法,图2是根据本发明实施例的一种角色局部动画实现方法的流程示意图,如图2所示,该流程包括如下步骤:In this embodiment, a method for realizing partial animation of a character is provided. FIG. 2 is a flow chart of a method for realizing partial animation of a character according to an embodiment of the present invention. As shown in FIG. 2 , the flow chart includes the following steps:
步骤S202,获取角色骨骼模型的中间骨骼的旋转数据,其中,角色骨骼模型包括第一部件和第二部件,第一部件和第二部件通过中间骨骼连接;Step S202, obtaining rotation data of an intermediate skeleton of a character skeleton model, wherein the character skeleton model includes a first component and a second component, and the first component and the second component are connected via the intermediate skeleton;
本实施例的骨骼模型可以是虚拟场景中虚拟角色的物体模型,虚拟场景可以是虚拟游戏场景,虚拟教学场景,虚拟社交场景等。The skeleton model of this 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, etc.
本实施例的中间骨骼可以是脊椎骨(Spine),脖子(neck)等,对应的,第一部件和第二部件可以是脊椎骨连接的上半身部件和下半身部件,或者是脖子连接的身体部件和头部部件,第一部件和第二部件是由若干个骨骼组成的骨骼群。本实施例的中间骨骼是角色骨骼模型中的真实骨骼。The intermediate skeleton of this embodiment can be a spine, a neck, etc. Correspondingly, the first component and the second component can be an upper body component and a lower body component connected by a spine, or a body component and a head component connected by a neck. The first component and the second component are a skeleton group composed of several bones. The intermediate skeleton of this embodiment is a real skeleton in the character skeleton model.
在一个示例中,所述第一部件为上半身部件,所述第二部件为下半身部件,获取骨骼模型的中间骨骼的旋转数据包括:获取骨骼模型的脊椎骨的旋转数据。In one example, the first component is an upper body component, the second component is a lower body component, and obtaining rotation data of a middle bone of the skeleton model includes: obtaining rotation data of a spine of the skeleton model.
步骤S204,查找中间骨骼的代理骨骼,其中,代理骨骼存储有中间骨骼相对根骨骼的空间关系数据;Step S204, searching for a proxy bone of the middle bone, wherein the proxy bone stores spatial relationship data of the middle bone relative to the root bone;
在本实施例中,空间关系数据用于指示中间骨骼与根骨骼的位置关系,如不同坐标系之间的空间转换数据。In this embodiment, the spatial relationship data is used to indicate the positional relationship between the intermediate bones and the root bone, such as spatial transformation data between different coordinate systems.
本实施例的代理骨骼可以设置中间骨骼的根空间,也可以同时设置在中间骨骼的根(Root)空间和父(Parent)空间。The proxy skeleton of this embodiment can be set in the root space of the intermediate skeleton, or can be set in the root space and parent space of the intermediate skeleton at the same time.
可选的,代理骨骼还存储有中间骨骼相对父骨骼的空间关系数据。Optionally, the proxy bone also stores spatial relationship data of the intermediate bone relative to the parent bone.
步骤S206,将旋转数据写入代理骨骼;Step S206, writing the rotation data into the proxy skeleton;
步骤S208,确定对应于第一部件的骨骼遮罩来控制代理骨骼,以实现包括第一部件的局部动画。Step S208: Determine a bone mask corresponding to the first component to control the proxy bone to implement a local animation including the first component.
本实施例的骨骼遮罩(Mask)可以是预先采用Unity等类似软件创建好的,骨骼遮罩与代理骨骼绑定,在动画表现时,骨骼遮罩控制代理骨
骼,而不是控制真实的中间骨骼。The skeleton mask (Mask) of this embodiment can be pre-created by using Unity or other similar software. The skeleton mask is bound to the proxy skeleton. When the animation is performed, the skeleton mask controls the proxy skeleton. bones instead of controlling the real intermediate bones.
在本实施例中,方案还包括:确定对应于第二部件的骨骼遮罩来控制中间骨骼,以实现包括第二部件的局部动画,第二部件的骨骼遮罩可以是全身遮罩,也可以是覆盖第二部件的部分遮罩,若是全身遮罩,则第一部件的骨骼遮罩设置在最上层并在第一部件的位置覆盖全身遮罩。In this embodiment, the solution also includes: determining a bone mask corresponding to the second component to control the intermediate bone to achieve local animation including the second component. The bone mask of the second component can be a full-body mask or a partial mask covering the second component. If it is a full-body mask, the bone mask of the first component is set at the top layer and covers the full-body mask at the position of the first component.
通过上述步骤,获取角色骨骼模型的中间骨骼的旋转数据,其中,角色骨骼模型包括第一部件和第二部件,第一部件和第二部件通过中间骨骼连接;查找中间骨骼的代理骨骼,其中,代理骨骼存储有中间骨骼相对根骨骼的空间关系数据,将旋转数据写入代理骨骼,确定对应于第一部件的骨骼遮罩来控制代理骨骼,以实现包括第一部件的局部动画,通过获取真实的中间骨骼的旋转数据并写入中间骨骼的代理骨骼,并通过骨骼遮罩来控制控制代理骨骼,而不是控制真实的中间骨骼,可以防止第二部件中的父骨骼通过中间骨骼将旋转数据传导至第一部件,实现了第一部件与第二部件分离的局部动画,避免了第二部件运动时第一部件来回摇摆的问题,实现了局部稳定的动画表现效果。Through the above steps, the rotation data of the middle bone of the character skeleton model is obtained, wherein the character skeleton model includes a first component and a second component, and the first component and the second component are connected through the middle bone; the proxy bone of the middle bone is searched, wherein the proxy bone stores the spatial relationship data of the middle bone relative to the root bone, the rotation data is written into the proxy bone, and the bone mask corresponding to the first component is determined to control the proxy bone to realize the local animation including the first component, by obtaining the rotation data of the real middle bone and writing it into the proxy bone of the middle bone, and controlling the proxy bone through the bone mask instead of controlling the real middle bone, it is possible to prevent the parent bone in the second component from transmitting the rotation data to the first component through the middle bone, thereby realizing the local animation of the first component separated from the second component, avoiding the problem of the first component swaying back and forth when the second component moves, and realizing the local stable animation performance effect.
在本实施例的一个实施方式中,将旋转数据写入代理骨骼包括:确定中间骨骼在根空间的第一旋转数据和在父空间的第二旋转数据;将第一旋转数据写入中间骨骼在根空间的第一代理骨骼,将第二旋转数据写入中间骨骼在父空间的第二代理骨骼。In one implementation of this embodiment, writing rotation data to the proxy bone includes: determining the first rotation data of the intermediate bone in the root space and the second rotation data in the parent space; writing the first rotation data to the first proxy bone of the intermediate bone in the root space, and writing the second rotation data to the second proxy bone of the intermediate bone in the parent space.
在一个示例中,将旋转数据写入代理骨骼包括:确定中间骨骼在根空间的第一旋转数据;将第一旋转数据写入中间骨骼在根空间的第一代理骨骼。In one example, writing the rotation data to the proxy bone includes: determining first rotation data of the intermediate bone in the root space; and writing the first rotation data to the first proxy bone of the intermediate bone in the root space.
以中间骨骼为脊椎骨为例,通过编写Bake工具,在FBX动画文件中的根骨骼下额外创构建若干根Root空间的代理脊椎骨骼,和若干根Parent空间的代理脊椎骨骼。并且将真实脊椎骨在Root空间和Parent空间中的旋转数据分别写入相应的代理骨骼。Taking the middle bone as the spine as an example, by writing the Bake tool, several proxy spine bones in the root space and several proxy spine bones in the parent space are created under the root bone in the FBX animation file. And the rotation data of the real spine in the root space and the parent space are written into the corresponding proxy bones respectively.
在本实施例的一个实施场景中,确定对应于第一部件的骨骼遮罩来控制代理骨骼包括:确定对应于第一部件的骨骼遮罩;采用骨骼遮罩在中间骨骼的根空间控制代理骨骼。
In an implementation scenario of this embodiment, determining the bone mask corresponding to the first component to control the proxy bone includes: determining the bone mask corresponding to the first component; and using the bone mask to control the proxy bone in the root space of the intermediate bone.
在本实施例的另一个实施场景中,确定对应于第一部件的骨骼遮罩来控制代理骨骼包括:确定对应于第一部件的骨骼遮罩;采用骨骼遮罩在中间骨骼的根空间控制代理骨骼,以及在中间骨骼的父空间控制代理骨骼。In another implementation scenario of this embodiment, determining the bone mask corresponding to the first component to control the proxy bone includes: determining the bone mask corresponding to the first component; using the bone mask to control the proxy bone in the root space of the intermediate bone, and controlling the proxy bone in the parent space of the intermediate bone.
本实施例还可以同时在父空间设置代理骨骼,并根据动画表现的需求来选择采用在中间骨骼的根空间控制代理骨骼或者才根空间和父空间联合控制代理骨骼,因为有些动画表现需求,不需要完全的Root空间动画,而是希望在Root空间和Parent空间中按指定的系数进行混合,得到混合动画。This embodiment can also set the proxy skeleton in the parent space at the same time, and choose to use the root space of the intermediate skeleton to control the proxy skeleton or the root space and parent space to jointly control the proxy skeleton according to the needs of animation performance. This is because some animation performance requirements do not require complete Root space animation, but rather hope to mix the Root space and Parent space according to the specified coefficient to obtain a mixed animation.
基于上述两个实施场景,中间骨骼包括多个代理骨骼,采用骨骼遮罩在中间骨骼的根空间控制代理骨骼包括:获取多个代理骨骼的转换系数矩阵,其中,转换系数矩阵包括多个转换系数,每个转换系数对应一个代理骨骼;采用转换系数矩阵分别对多个代理骨骼的旋转数据分别进行插值处理,对应得到多个平滑过渡的根空间数据;采用多个根空间数据在中间骨骼的根空间分别控制多个代理骨骼。Based on the above two implementation scenarios, the intermediate skeleton includes multiple proxy bones, and using bone masks to control the proxy bones in the root space of the intermediate skeleton includes: obtaining conversion coefficient matrices of the multiple proxy bones, wherein the conversion coefficient matrix includes multiple conversion coefficients, and each conversion coefficient corresponds to a proxy bone; using the conversion coefficient matrix to interpolate the rotation data of the multiple proxy bones respectively, and correspondingly obtaining multiple smoothly transitioned root space data; using multiple root space data to control the multiple proxy bones in the root space of the intermediate skeleton.
在本实施例中,设置多根代理骨骼,以中间骨骼为脊椎骨为例,设置前端,中间和末端三个相邻的脊椎骨,使用多根代理骨骼,为每根代理骨骼分别配置不同的权重,例如,前端,中间和末端代理骨骼分别配置0.2,0.5,1.0的权重,其对应的骨骼最终结果数据的计算依据如下公式进行:最终结果=代理骨骼A’的数据*weight+下半身动画骨骼A的数据*(1–weight),其中weight是对应的代理骨骼权重。借由不同的权重实现插值效果,最终使拼接更加平滑的过渡到Root空间数据,从而实现更平滑的局部动画。In this embodiment, multiple proxy bones are set. Taking the middle bone as the spine, three adjacent spines are set at the front, middle and end. Multiple proxy bones are used, and different weights are configured for each proxy bone. For example, the front, middle and end proxy bones are configured with weights of 0.2, 0.5, and 1.0 respectively. The calculation of the corresponding bone final result data is performed according to the following formula: Final result = proxy bone A’ data * weight + lower body animation bone A data * (1-weight), where weight is the corresponding proxy bone weight. The interpolation effect is achieved by different weights, and finally the splicing is more smoothly transitioned to the root space data, thereby achieving smoother local animation.
在一个示例中,查找中间骨骼的代理骨骼包括:定位中间骨骼在骨骼模型中的目标层级;在骨骼模型中的目标层级中查找中间骨骼的代理骨骼。In one example, finding a proxy bone for the intermediate bone includes: locating a target level of the intermediate bone in the skeleton model; and finding a proxy bone for the intermediate bone in the target level in the skeleton model.
可选的,在骨骼模型中的目标层级中查找中间骨骼的代理骨骼包括:在骨骼模型中的目标层级中查找中间骨骼在根空间的代理骨骼,在骨骼模型中的目标层级中查找中间骨骼在父空间的代理骨骼。当然,也可以
只在骨骼模型中的目标层级中查找中间骨骼在根空间的代理骨骼。Optionally, searching for a proxy bone of an intermediate bone in a target hierarchy in a skeleton model includes: searching for a proxy bone of an intermediate bone in a root space in a target hierarchy in a skeleton model, and searching for a proxy bone of an intermediate bone in a parent space in a target hierarchy in a skeleton model. Only look for root-space proxy bones for intermediate bones in the target hierarchy in the skeleton model.
可选的,本实施例的骨骼模型可以采用Bip骨骼***构建。Optionally, the skeleton model of this embodiment can be constructed using the Bip skeleton system.
在本实施例的一个示例中,在将旋转数据写入代理骨骼之后,还包括:读取代理骨骼在根空间的代理旋转数据,以及获取中间骨骼的父骨骼的实时旋转数据;采用代理旋转数据和实时旋转数据计算中间骨骼在父空间的旋转偏移量;基于旋转偏移量更新中间骨骼的父空间的实时旋转数据。In an example of this embodiment, after the rotation data is written to the proxy bone, it also includes: reading the proxy rotation data of the proxy bone in the root space, and obtaining the real-time rotation data of the parent bone of the intermediate bone; using the proxy rotation data and the real-time rotation data to calculate the rotation offset of the intermediate bone in the parent space; updating the real-time rotation data of the parent space of the intermediate bone based on the rotation offset.
在该示例中,可以通过编写Unity脚本,采用代理骨骼在Root空间的数据反推出真实脊椎骨需要的Parent空间数据,并赋值,保证真实脊椎骨的旋转数据因为其父骨骼而变化但代理骨骼的旋转数据不变,从而实时得到不随骨盆扭动的稳定上半身动画。In this example, you can write a Unity script to use the data of the proxy bone in the Root space to infer the Parent space data required by the real spine and assign values to ensure that the rotation data of the real spine changes due to its parent bone but the rotation data of the proxy bone remains unchanged, thereby obtaining a stable upper body animation that does not twist with the pelvis in real time.
图3是本发明实施例实现上下半身动画分离的流程示意图,包括:制作动画并导出为FBX文件,使用Bake工具处理并生成新的FBX文件,Unity中制作相应的Mask和Animator Controller资源,使用代码,根据Bake信息修正骨骼位置。3 is a schematic diagram of the process of separating the upper and lower body animations according to an embodiment of the present invention, including: making an animation and exporting it as an FBX file, using the Bake tool to process and generate a new FBX file, making corresponding Mask and Animator Controller resources in Unity, and using code to correct the bone position according to the Bake information.
采用本实施例的方案,在FBX文件中,添加若干根代理脊椎骨(Proxy Spines),用于对应真实的脊椎骨(Original Spines),然后将Original Spines每一帧的Rotation数据转换到骨架的Root骨骼空间,并且记录到Proxy Spines骨骼的旋转曲线上,使得上半身不会随着胯部扭动。还可以通过多根骨骼对上半身和下半身的过渡进行平滑,可以在Parent空间动画和Root空间动画之间按比例混合,得到更稳定自然的上下半身动画,使效果更好,可以将现有动画进行拼接,节省开发成本。Using the solution of this embodiment, several proxy spines (Proxy Spines) are added to the FBX file to correspond to the real spines (Original Spines), and then the Rotation data of each frame of the Original Spines is converted to the Root bone space of the skeleton and recorded on the rotation curve of the Proxy Spines bone, so that the upper body will not twist with the hips. The transition between the upper and lower body can also be smoothed by multiple bones, and the Parent space animation and the Root space animation can be mixed in proportion to obtain a more stable and natural upper and lower body animation, which makes the effect better, and the existing animations can be spliced to save development costs.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根据上述实施例的方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本发明各个
实施例所述的方法。Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, or by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk), including a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute various functions of the present invention. The method described in the embodiment.
实施例2Example 2
在本实施例中还提供了一种角色局部动画实现装置,用于实现上述实施例及优选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。In this embodiment, a device for realizing local animation of a character is also provided, which is used to realize the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can realize a combination of software and/or hardware of a predetermined function. Although the device described in the following embodiments is preferably realized by software, the realization of hardware, or a combination of software and hardware is also possible and conceived.
图4是根据本发明实施例的一种角色局部动画实现装置的结构框图,如图4所示,该装置包括:获取模块40,查找模块42,写入模块44,控制模块46,其中,FIG4 is a structural block diagram of a device for realizing local animation of a character according to an embodiment of the present invention. As shown in FIG4 , the device includes: an acquisition module 40, a search module 42, a writing module 44, and a control module 46, wherein:
获取模块40,用于获取骨骼模型的中间骨骼的旋转数据,其中,所述骨骼模型包括第一部件和第二部件,所述第一部件和所述第二部件通过所述中间骨骼连接;An acquisition module 40 is used to acquire rotation data of an intermediate skeleton of a skeleton model, wherein the skeleton model includes a first component and a second component, and the first component and the second component are connected through the intermediate skeleton;
查找模块42,用于查找所述中间骨骼的代理骨骼,其中,所述代理骨骼存储有所述中间骨骼相对根骨骼的空间关系数据;A search module 42, configured to search for a proxy skeleton of the intermediate skeleton, wherein the proxy skeleton stores spatial relationship data of the intermediate skeleton relative to the root skeleton;
写入模块44,用于将所述旋转数据写入所述代理骨骼;A writing module 44, used for writing the rotation data into the proxy skeleton;
控制模块46,用于确定对应于所述第一部件的骨骼遮罩来控制所述代理骨骼,以实现包括所述第一部件的局部动画。The control module 46 is used to determine the bone mask corresponding to the first component to control the proxy bone to achieve local animation including the first component.
可选的,所述写入模块包括:确定单元,用于确定所述中间骨骼在根空间的第一旋转数据和在父空间的第二旋转数据;写入单元,用于将所述第一旋转数据写入所述中间骨骼在根空间的第一代理骨骼,将所述第二旋转数据写入所述中间骨骼在父空间的第二代理骨骼。Optionally, the writing module includes: a determination unit, used to determine the first rotation data of the intermediate skeleton in the root space and the second rotation data in the parent space; a writing unit, used to write the first rotation data into the first proxy bone of the intermediate skeleton in the root space, and write the second rotation data into the second proxy bone of the intermediate skeleton in the parent space.
可选的,所述控制模块包括:确定单元,用于确定对应于所述第一部件的骨骼遮罩;第一控制单元,用于采用所述骨骼遮罩在所述中间骨骼的根空间控制所述代理骨骼。Optionally, the control module includes: a determination unit, used to determine a bone mask corresponding to the first component; and a first control unit, used to control the proxy bone in the root space of the intermediate bone using the bone mask.
可选的,所述控制模块包括:确定单元,用于确定对应于所述第一部件的骨骼遮罩;第二控制单元,用于采用所述骨骼遮罩在所述中间骨骼的根空间控制所述代理骨骼,以及在所述中间骨骼的父空间控制所述代理骨骼。
Optionally, the control module includes: a determination unit, used to determine a bone mask corresponding to the first component; and a second control unit, used to use the bone mask to control the proxy bone in the root space of the intermediate bone, and to control the proxy bone in the parent space of the intermediate bone.
可选的,所述第一控制单元或所述第二控制单元包括:获取子单元,用于获取所述多个代理骨骼的转换系数矩阵,其中,所述转换系数矩阵包括多个转换系数,每个转换系数对应一个代理骨骼;处理子单元,用于采用所述转换系数矩阵分别对所述多个代理骨骼的旋转数据分别进行插值处理,对应得到多个平滑过渡的根空间数据;控制子单元,用于采用所述多个根空间数据在所述中间骨骼的根空间分别控制所述多个代理骨骼。Optionally, the first control unit or the second control unit includes: an acquisition subunit, used to acquire a conversion coefficient matrix of the multiple proxy bones, wherein the conversion coefficient matrix includes multiple conversion coefficients, and each conversion coefficient corresponds to a proxy bone; a processing subunit, used to use the conversion coefficient matrix to interpolate the rotation data of the multiple proxy bones respectively, and obtain multiple smoothly transitioned root space data; a control subunit, used to use the multiple root space data to control the multiple proxy bones in the root space of the intermediate bone respectively.
可选的,所述查找模块包括:定位单元,用于定位所述中间骨骼在所述骨骼模型中的目标层级;查找单元,用于在所述骨骼模型中的所述目标层级中查找所述中间骨骼的代理骨骼。Optionally, the search module includes: a positioning unit, used to locate the target level of the intermediate skeleton in the skeleton model; and a search unit, used to search for a proxy skeleton of the intermediate skeleton in the target level in the skeleton model.
可选的,所述查找单元包括:查找子单元,用于在所述骨骼模型中的所述目标层级中查找所述中间骨骼在根空间的代理骨骼,在所述骨骼模型中的所述目标层级中查找所述中间骨骼在父空间的代理骨骼。Optionally, the search unit includes: a search subunit, used to search for a proxy bone of the intermediate bone in the root space in the target level in the skeleton model, and to search for a proxy bone of the intermediate bone in the parent space in the target level in the skeleton model.
可选的,所述装置还包括:读取模块,用于在所述写入模块将所述旋转数据写入所述代理骨骼之后,读取所述代理骨骼在根空间的代理旋转数据,以及获取所述中间骨骼的父骨骼的实时旋转数据;计算模块,用于采用所述代理旋转数据和所述实时旋转数据计算所述中间骨骼在父空间的旋转偏移量;更新模块,用于基于所述旋转偏移量更新所述中间骨骼的父空间的实时旋转数据。Optionally, the device also includes: a reading module, used to read the proxy rotation data of the proxy bone in the root space and obtain the real-time rotation data of the parent bone of the intermediate bone after the writing module writes the rotation data into the proxy bone; a calculation module, used to calculate the rotation offset of the intermediate bone in the parent space using the proxy rotation data and the real-time rotation data; and an updating module, used to update the real-time rotation data of the parent space of the intermediate bone based on the rotation offset.
需要说明的是,上述各个模块是可以通过软件或硬件来实现的,对于后者,可以通过以下方式实现,但不限于此:上述模块均位于同一处理器中;或者,上述各个模块以任意组合的形式分别位于不同的处理器中。It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
本发明的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本发明实施例的角色局部动画实现装置中的一些或者全部部件的一些或者全部功能。本发明还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置的程序/指令(例如,计算机程序/指令和计算机程序产品)。这样的实现本发明的程序/指令可以存储在计算机
可读介质上,或者可以一个或者多个信号的形式存在,这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。The various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art should understand that a microprocessor or a digital signal processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components of the device for implementing local character animation according to an embodiment of the present invention. The present invention may also be implemented as a program/instruction (e.g., a computer program/instruction and a computer program product) for executing a part or all of the methods described herein. Such a program/instruction for implementing the present invention may be stored in a computer program or instructions. The invention may be stored on a readable medium, or may be in the form of one or more signals, such signals may be downloaded from an Internet website, or provided on a carrier signal, or in any other form.
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带、磁盘存储、量子存储器、基于石墨烯的存储介质或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, modules of programs or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage, quantum memory, graphene-based storage media or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.
图5示意性地示出了可以实现根据本发明的一种角色局部动画实现方法的计算机设备的框图,该计算机设备包括处理器510和以存储器520形式的计算机可读介质。存储器520是计算机可读介质的一个示例,其具有用于存储计算机程序/指令531的存储空间530。当所述计算机程序/指令531由处理器510执行时,可实现上文所描述的角色局部动画实现方法中的各个步骤。FIG5 schematically shows a block diagram of a computer device that can implement a method for implementing a local character animation according to the present invention, and the computer device includes a processor 510 and a computer-readable medium in the form of a memory 520. The memory 520 is an example of a computer-readable medium, which has a storage space 530 for storing a computer program/instruction 531. When the computer program/instruction 531 is executed by the processor 510, each step in the method for implementing the local character animation described above can be implemented.
图6示意性地示出了实现根据本发明的角色局部动画实现方法的计算机程序产品的框图。所述计算机程序产品包括计算机程序/指令610,当所述计算机程序/指令610被诸如图5所示的处理器510之类的处理器执行时,可实现上文所描述的角色局部动画实现方法中的各个步骤。Fig. 6 schematically shows a block diagram of a computer program product for implementing the method for implementing local character animation according to the present invention. The computer program product includes a computer program/instruction 610, and when the computer program/instruction 610 is executed by a processor such as the processor 510 shown in Fig. 5, each step in the method for implementing local character animation described above can be implemented.
上文对本说明书特定实施例进行了描述,其与其它实施例一并涵盖于所附权利要求书的范围内。在一些情况下,在权利要求书中记载的动作或步骤可以按照不同于实施例中的顺序来执行并且仍然可以实现期望的结果。另外,在附图中描绘的过程不一定遵循示出的特定顺序或者连续顺序才能实现期望的结果。在某些实施方式中,多任务处理和并行处理也是可行的或者有利的。
The above describes a specific embodiment of the specification, which is included in the scope of the appended claims together with other embodiments. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the process depicted in the accompanying drawings does not necessarily follow the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also feasible or advantageous.
还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、商品或者设备中还存在另外的相同要素。It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
应可理解,以上所述实施例仅为举例说明本发明之目的而并非对本发明进行限制。在不脱离本发明基本精神及特性的前提下,本领域技术人员还可以通过其他方式来实施本发明。本发明的范围当以后附的权利要求为准,凡在本说明书一个或多个实施例的精神和原则之内所做的任何修改、等同替换、改进等,皆应涵盖其中。
It should be understood that the above-described embodiments are only for the purpose of illustrating the present invention and are not intended to limit the present invention. Without departing from the basic spirit and characteristics of the present invention, those skilled in the art may also implement the present invention in other ways. The scope of the present invention shall be subject to the appended claims, and any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of one or more embodiments of this specification shall be included therein.
Claims (11)
- 一种角色局部动画实现方法,包括:A method for realizing local animation of a character, comprising:获取角色骨骼模型的中间骨骼的旋转数据,其中,所述角色骨骼模型包括第一部件和第二部件,所述第一部件和所述第二部件通过所述中间骨骼连接;Obtaining rotation data of an intermediate skeleton of a character skeleton model, wherein the character skeleton model includes a first component and a second component, and the first component and the second component are connected through the intermediate skeleton;查找所述中间骨骼的代理骨骼,其中,所述代理骨骼存储有所述中间骨骼相对根骨骼的空间关系数据;Finding a proxy bone of the intermediate bone, wherein the proxy bone stores spatial relationship data of the intermediate bone relative to the root bone;将所述旋转数据写入所述代理骨骼;Writing the rotation data to the proxy skeleton;确定对应于所述第一部件的骨骼遮罩来控制所述代理骨骼,以实现包括所述第一部件的局部动画。A bone mask corresponding to the first component is determined to control the proxy bone to achieve a local animation including the first component.
- 根据权利要求1所述的方法,其中所述将所述旋转数据写入所述代理骨骼包括:The method according to claim 1, wherein writing the rotation data to the proxy skeleton comprises:确定所述中间骨骼在根空间的第一旋转数据和在父空间的第二旋转数据;Determine first rotation data of the intermediate bone in the root space and second rotation data in the parent space;将所述第一旋转数据写入所述中间骨骼在根空间的第一代理骨骼,将所述第二旋转数据写入所述中间骨骼在父空间的第二代理骨骼。The first rotation data is written into a first proxy bone of the intermediate bone in the root space, and the second rotation data is written into a second proxy bone of the intermediate bone in the parent space.
- 根据权利要求1所述的方法,其中所述代理骨骼包括在根空间的代理骨骼,确定对应于所述第一部件的骨骼遮罩来控制所述代理骨骼包括:The method according to claim 1, wherein the proxy skeleton comprises a proxy skeleton in a root space, and determining a bone 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 the skeleton mask.
- 根据权利要求1所述的方法,其中所述代理骨骼包括在根空间的代理骨骼和在父空间的代理骨骼,确定对应于所述第一部件的骨骼遮罩来控制所述代理骨骼包括: The method according to claim 1, wherein the proxy skeleton includes a proxy skeleton in a root space and a proxy skeleton in a parent space, and 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 bone mask is used to control the proxy bone in the root space of the intermediate bone, and the proxy bone is controlled in the parent space of the intermediate bone.
- 根据权利要求3或4所述的方法,其中所述中间骨骼包括多个代理骨骼,采用所述骨骼遮罩在所述中间骨骼的根空间控制所述代理骨骼包括:The method according to claim 3 or 4, wherein the intermediate skeleton includes a plurality of proxy skeletons, and using the skeleton mask to control the proxy skeleton in the root space of the intermediate skeleton comprises:获取所述多个代理骨骼的转换系数矩阵,其中,所述转换系数矩阵包括多个转换系数,每个转换系数对应一个代理骨骼;Acquire a conversion coefficient matrix of the plurality of proxy bones, wherein the conversion coefficient matrix includes a plurality of conversion coefficients, and each conversion coefficient corresponds to a proxy bone;采用所述转换系数矩阵分别对所述多个代理骨骼的旋转数据分别进行插值处理,对应得到多个平滑过渡的根空间数据;Using the conversion coefficient matrix to perform interpolation processing on the rotation data of the plurality of proxy bones respectively, so as to obtain a plurality of smoothly transitioned root space data;采用所述多个根空间数据在所述中间骨骼的根空间分别控制所述多个代理骨骼。The plurality of root space data are used to respectively control the plurality of proxy bones in the root space of the intermediate bones.
- 根据权利要求1所述的方法,其中所述查找所述中间骨骼的代理骨骼包括:The method according to claim 1, wherein the finding of a proxy skeleton for the intermediate skeleton comprises:定位所述中间骨骼在所述骨骼模型中的目标层级;Positioning the intermediate skeleton at a target level in the skeleton model;在所述骨骼模型中的所述目标层级中查找所述中间骨骼的代理骨骼。A proxy bone for the intermediate bone is searched in the target level in the skeletal model.
- 根据权利要求1所述的方法,其中所述在将所述旋转数据写入所述代理骨骼之后,所述方法还包括:The method according to claim 1, wherein after writing the rotation data to the proxy skeleton, the method further comprises:读取所述代理骨骼在根空间的代理旋转数据,以及获取所述中间骨骼的父骨骼的实时旋转数据;Read the proxy rotation data of the proxy skeleton in the root space, and obtain the real-time rotation data of the parent skeleton of the intermediate skeleton;采用所述代理旋转数据和所述实时旋转数据计算所述中间骨骼在父空间的旋转偏移量;Calculating the rotation offset of the intermediate skeleton in the parent space using the proxy rotation data and the real-time rotation data;基于所述旋转偏移量更新所述中间骨骼的父空间的实时旋转数据。The real-time rotation data of the parent space of the intermediate bone is updated based on the rotation offset.
- 一种角色局部动画实现装置,包括: A device for realizing local animation of a character, comprising:获取模块,用于获取骨骼模型的中间骨骼的旋转数据,其中,所述骨骼模型包括第一部件和第二部件,所述第一部件和所述第二部件通过所述中间骨骼连接;An acquisition module, configured to acquire rotation data of an intermediate skeleton of a skeleton model, wherein the skeleton model comprises a first component and a second component, and the first component and the second component are connected via the intermediate skeleton;查找模块,用于查找所述中间骨骼的代理骨骼,其中,所述代理骨骼存储有所述中间骨骼相对根骨骼的空间关系数据;A search module, used for searching a proxy bone of the intermediate bone, wherein the proxy bone stores spatial relationship data of the intermediate bone relative to the root bone;写入模块,用于将所述旋转数据写入所述代理骨骼;A writing module, used for writing the rotation data into the proxy skeleton;控制模块,用于确定对应于所述第一部件的骨骼遮罩来控制所述代理骨骼,以实现包括所述第一部件的局部动画。The control module is used to determine a bone mask corresponding to the first component to control the proxy bone to achieve a local animation including the first component.
- 一种计算机设备,包括存储器、处理器及存储在存储器上的计算机程序/指令,所述处理器执行所述计算机程序/指令时实现根据权利要求1-7中任一项所述的角色局部动画实现方法的步骤。A computer device comprises a memory, a processor and a computer program/instruction stored in the memory, wherein the processor implements the steps of the method for realizing local character animation according to any one of claims 1 to 7 when executing the computer program/instruction.
- 一种计算机可读介质,其上存储有计算机程序/指令,所述计算机程序/指令被处理器执行时实现根据权利要求1-7中任一项所述的角色局部动画实现方法的步骤。A computer-readable medium having a computer program/instruction stored thereon, wherein the computer program/instruction, when executed by a processor, implements the steps of the method for realizing local character animation according to any one of claims 1 to 7.
- 一种计算机程序产品,包括计算机程序/指令,所述计算机程序/指令被处理器执行时实现根据权利要求1-7中任一项所述的角色局部动画实现方法的步骤。 A computer program product comprises a computer program/instruction, wherein when the computer program/instruction is executed by a processor, the steps of the method for realizing local animation of a character are realized according to any one of claims 1 to 7.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211615413.1 | 2022-12-15 | ||
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 |
---|---|
WO2024125388A1 true WO2024125388A1 (en) | 2024-06-20 |
Family
ID=91455062
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2023/137132 WO2024125388A1 (en) | 2022-12-15 | 2023-12-07 | Character partial animation implementation method and apparatus, computer device, and storage medium |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN118212327A (en) |
WO (1) | WO2024125388A1 (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20180096510A1 (en) * | 2016-09-30 | 2018-04-05 | 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 |
CN112090076A (en) * | 2020-08-14 | 2020-12-18 | 深圳中清龙图网络技术有限公司 | Game character action control method, device, equipment and medium |
CN112999659A (en) * | 2021-02-22 | 2021-06-22 | 网易(杭州)网络有限公司 | Game data processing method, 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 |
-
2022
- 2022-12-15 CN CN202211615413.1A patent/CN118212327A/en active Pending
-
2023
- 2023-12-07 WO PCT/CN2023/137132 patent/WO2024125388A1/en unknown
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20180096510A1 (en) * | 2016-09-30 | 2018-04-05 | 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 |
CN112090076A (en) * | 2020-08-14 | 2020-12-18 | 深圳中清龙图网络技术有限公司 | Game character action control method, device, equipment and medium |
CN112999659A (en) * | 2021-02-22 | 2021-06-22 | 网易(杭州)网络有限公司 | Game data processing method, 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 |
---|---|
CN118212327A (en) | 2024-06-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US12017145B2 (en) | Method and system of automatic animation generation | |
US11615570B2 (en) | Virtual object display method and apparatus, electronic device, and storage medium | |
CN107632824B (en) | A kind of generation method of augmented reality module, generating means and generate system | |
CN108881227B (en) | Operation control method and device of remote whiteboard system and remote whiteboard system | |
CN109147022A (en) | VR data rendering method and system, computer equipment, computer storage medium | |
CN111325819A (en) | Motion data processing method, device, equipment and storage medium | |
CN106503477A (en) | The control method of virtual objects and relevant apparatus | |
US20240095998A1 (en) | Virtual scene playback method and apparatus, electronic device, and storage medium | |
WO2022213615A1 (en) | Animation state machine implementation method and apparatus, and storage medium and electronic device | |
CN109639582A (en) | A kind of network node treatment method and device based on distributed hashtable | |
CN114053696B (en) | Image rendering processing method and device and electronic equipment | |
CN107483284A (en) | The method of testing and device of the network equipment | |
WO2024125388A1 (en) | Character partial animation implementation method and apparatus, computer device, and storage medium | |
CN114116481A (en) | Kubernetes system-based artificial intelligence algorithm model testing method and system | |
CN112988306A (en) | Animation processing method and device | |
CN108241696A (en) | Obtain the method, apparatus and system of map datum | |
CN116820651A (en) | Interface display method and device, electronic equipment and storage medium | |
CN110458928A (en) | AR animation producing method, device, medium based on unity3d | |
CN114331808A (en) | Action posture storage method, device, medium and electronic equipment | |
JP2002197490A (en) | Device for displaying three-dimensional graph | |
CN113289342A (en) | Action data processing method and device, storage medium and electronic equipment | |
CN114816408A (en) | Information processing method and device | |
CN114429511A (en) | Fusion rendering method and device, computer equipment and storage medium | |
CN113209625A (en) | Data processing method and device | |
CN107347082A (en) | The implementation method and device of video effect |