Animation processing method and device, equipment, storage medium and program product

By extracting and mounting object skeletons with bone slots, the method enhances animation realism and reduces costs by allowing dynamic interaction between objects, addressing the high-cost and uniform-effect issues of existing animation technologies.

CN120318386APending Publication Date: 2025-07-15TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510439395.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-30
Publication Date
2025-07-15

AI Technical Summary

Technical Problem

In the prior art, virtual objects have poor mount animation effects and high production costs, so it is impossible to effectively realize the animation logic of multiple mount postures.

Method used

By extracting the skeleton of the virtual object and adding a bone slot therein, the bones of the second virtual object are mounted to the slot, and the bone slot is used to control the second virtual object to move with the bones of the first virtual object to achieve real interaction of the animation effect.

Benefits of technology

It improves the authenticity of the animation effect and reduces the cost of animation production. It only needs to adjust the position or mount position of the bone slot to achieve mount in different postures, without the need to create multiple animation assets and logic.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120318386A_ABST
    Figure CN120318386A_ABST
Patent Text Reader

Abstract

The invention provides an animation processing method and device, equipment, a storage medium and a program product. The method comprises the following steps: acquiring a first animation file of a first virtual object and a second animation file of a second virtual object; extracting a first object skeleton of the first virtual object from the first animation file, and extracting a second object skeleton of the second virtual object from the second animation file; adding a skeleton slot on a first skeleton of the first object skeleton; mounting a second skeleton of the second object skeleton to the skeleton slot; when a mounting animation file of a second virtual object mounted on the first virtual object is played, controlling a second skeleton to move along with the first skeleton based on the skeleton slot, so that an object part bound with the second skeleton in the second virtual object moves along with an object part bound with the first skeleton in the first virtual object; according to the invention, the animation effect can be improved and the animation production cost can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of a patent application with an application date of November 30, 2023, a Chinese patent application number of 202311638505.6, and an invention title of "Animation Processing Method, Device, Equipment, Storage Medium and Program Product". Technical Field

[0002] This application relates to the field of computer technologies, and in particular, to an animation processing method, device, equipment, storage medium and program product. Background Art

[0003] In the scenes of film and television animations and virtual scenes (such as games), there is often a virtual object (i.e., the object to be mounted) mounted on another virtual object (i.e., the carrier object) to achieve the animation effect of the two virtual objects moving together. For example, a virtual object rides on another virtual object. In related technologies, (1) for the carrier object and the object to be mounted, different animation assets and animation logics are separately produced. Although this can achieve various different mounting postures, the production cost is very high; (2) for the carrier object and the object to be mounted, only one set of animation assets and animation logics are produced, but this makes the mounting postures highly unified and the animation effect very poor. Summary of the Invention

[0004] Embodiments of this application provide an animation processing method, device, electronic equipment, computer-readable storage medium and computer program product, which can improve the animation effect and reduce the animation production cost.

[0005] The technical solution of the embodiments of this application is implemented as follows:

[0006] Embodiments of this application provide an animation processing method, including:

[0007] Obtaining a first animation file of a first virtual object and a second animation file of a second virtual object;

[0008] Extracting a first object skeleton of the first virtual object from the first animation file, and extracting a second object skeleton of the second virtual object from the second animation file;

[0009] Adding a bone slot to a first bone of the first object skeleton;

[0010] Mounting a second bone of the second object skeleton to the bone slot;

[0011] When playing the mounting animation file in which the second virtual object is mounted on the first virtual object, based on the bone slot, control the second bone to move following the first bone, so that the object part in the second virtual object bound to the second bone moves following the object part in the first virtual object bound to the first bone.

[0012] The embodiment of the present application further provides an animation processing device, including:

[0013] An acquisition module, configured to acquire a first animation file of a first virtual object and a second animation file of a second virtual object;

[0014] An extraction module, configured to extract a first object skeleton of the first virtual object from the first animation file, and extract a second object skeleton of the second virtual object from the second animation file;

[0015] An addition module, configured to add a bone slot to a first bone of the first object skeleton;

[0016] A mounting module, configured to mount a second bone of the second object skeleton to the bone slot;

[0017] A playing module, configured to, when playing the mounting animation file in which the second virtual object is mounted on the first virtual object, based on the bone slot, control the second bone to move following the first bone, so that the object part in the second virtual object bound to the second bone moves following the object part in the first virtual object bound to the first bone.

[0018] The embodiment of the present application further provides an electronic device, including:

[0019] A memory, configured to store computer-executable instructions;

[0020] A processor, configured to implement the animation processing method provided by the embodiment of the present application when executing the computer-executable instructions stored in the memory.

[0021] The embodiment of the present application further provides a computer-readable storage medium, storing computer-executable instructions or a computer program, where when the computer-executable instructions or the computer program are executed by a processor, the animation processing method provided by the embodiment of the present application is implemented.

[0022] The embodiment of the present application further provides a computer program product, including computer-executable instructions or a computer program, where when the computer-executable instructions or the computer program are executed by a processor, the animation processing method provided by the embodiment of the present application is implemented.

[0023] The embodiment of the present application has the following beneficial effects:

[0024] Applying the above embodiments of the present application, first obtain the first animation file of the first virtual object and the second animation file of the second virtual object; then extract the first object skeleton of the first virtual object from the first animation file, and extract the second object skeleton of the second virtual object from the second animation file; then add a bone slot to the first bone of the first object skeleton, and mount the second bone of the second object skeleton to the bone slot; thus, when playing the mounting animation file in which the second virtual object is mounted on the first virtual object, based on the bone slot, control the second bone to move following the first bone, so that the object part in the second virtual object bound to the second bone moves following the object part in the first virtual object bound to the first bone.

[0025] Here, (1) The second bone of the second virtual object can move following the first bone of the first virtual object based on the bone slot, so that the object part in the second virtual object bound to the second bone moves following the object part in the first virtual object bound to the first bone. In this way, the first virtual object and the second virtual object interact during the mounting movement, making the animation effect more realistic and improving the animation effect; (2) Since the second virtual object is mounted on the first virtual object and moves following it by adding a bone slot, only the addition position (the first bone) or the mounting position (the second bone) of the bone slot needs to be adjusted to achieve mounting in different postures through the bone slot, without making animation assets and animation logics for different mounting postures, reducing the animation production cost. Description of the Drawings

[0026] Figure 1 is a schematic diagram of the architecture of the animation processing system provided by the embodiments of the present application;

[0027] Figure 2 is a schematic diagram of the structure of the electronic device provided by the embodiments of the present application;

[0028] Figure 3 is a schematic flowchart of the animation processing method provided by the embodiments of the present application;

[0029] Figures 4A - 4C is a schematic diagram of the display of the mounting animation file provided by the embodiments of the present application;

[0030] Figure 5 is a schematic flowchart of the animation processing method provided by the embodiments of the present application;

[0031] Figure 6 is a schematic diagram of the second object skeleton of the second virtual object provided by the embodiments of the present application;

[0032] Figures 7A - 7B is a schematic flowchart of the creation process of the mounting animation blueprint provided by the embodiments of the present application;

[0033] Figures 8A - 8G It is a schematic diagram of the creation process of the second animation blueprint provided by an embodiment of the present application;

[0034] Figures 9A - 9E It is a schematic diagram of the creation process of the second animation blueprint provided by an embodiment of the present application;

[0035] Figures 10A - 10D It is a schematic diagram of the creation process of the first animation blueprint provided by an embodiment of the present application;

[0036] Figures 11A - 11C It is a schematic diagram of the creation process of the mounted animation blueprint provided by an embodiment of the present application. Detailed implementation manners

[0037] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be construed as limitations on the present application. All other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of the present application.

[0038] In the following description, reference is made to "some embodiments", which describe a subset of all possible embodiments. However, it can be understood that "some embodiments" can be the same subset or different subsets of all possible embodiments, and can be combined with each other without conflict.

[0039] In the following description, the terms "first / second / third" are only used to distinguish similar objects and do not represent a specific order for the objects. It can be understood that "first / second / third" can be interchanged in a specific order or sequence when allowed, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0040] In an embodiment of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program with a predetermined function, which works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as a processing circuit or a memory), or a combination thereof. Similarly, one processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be a part of an overall module or unit including the functions of the module or unit.

[0041] Unless otherwise defined, all technical and scientific terms used in the embodiments of the present application have the same meaning as commonly understood by those of ordinary skill in the art to which the present application belongs. The terms used in the embodiments of the present application are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.

[0042] Before further elaborating on the embodiments of the present application, the nouns and terms involved in the embodiments of the present application are described. The nouns and terms involved in the embodiments of the present application are applicable to the following explanations.

[0043] 1) Client: An application program running on a terminal for providing various services, such as a client supporting animation processing.

[0044] 2) In response to: Used to represent the conditions or states on which the executed operations depend. When the dependent conditions or states are met, one or more executed operations can be real-time or have a set delay; without special instructions, there is no limit on the execution order of multiple executed operations.

[0045] 3) Mounting: It means that the object to be mounted enhances its own mobility by using carrier objects such as mounts or animals.

[0046] 4) Digital Content Creation (DCC) software: A general term for a class of software used in the production of animated characters, including 3D Studio Max, Maya, Blender, Houdini, etc. Among them, 3D StudioMax (abbreviated as 3d Max or 3ds MAX) is a 3D animation rendering and production software based on a computer system.

[0047] 5) Skeleton: It contains bones and joints. A bone is a coordinate space, and the bone hierarchy is a nested coordinate space. A joint describes the position of a bone (i.e., the origin of the bone coordinate space) in its parent space. Rotation around a joint means the rotation of the bone coordinate space (including all sub-spaces) itself.

[0048] 6) Bone animation: Each animated character contains at least two main types of data: bones and models. In the process of game / film and television animation production, the process of driving the model (changing the appearance of the character model) by the pose of the bones is called bone animation.

[0049] 7) Skinning: It means attaching (binding) the vertices in a model (Mesh) to the bones, and each vertex can be controlled by multiple bones. In this way, the vertices at the joints change their positions due to the pulling of the parent and child bones at the same time, eliminating cracks.

[0050] 8) Blueprint: A special type of resource in the Unreal Engine (UE) that provides an intuitive, node-based interface for creating new types of Actors and level scripting events; it offers a tool for level designers and game developers to quickly create and iterate on game playability in the Unreal Editor without writing a single line of code.

[0051] 9) Animation Blueprint: Performs animation blending, directly controls the bones of a skeleton, or sets the logic that will ultimately define the final animation pose of the skeletal mesh to be used for each frame of the animation.

[0052] 10) Socket (i.e., bone socket): This is what it's called in the Unreal Engine. It has an effect similar to a bone and can be added to a skeletal mesh as a locator for attachment points for virtual props, effects, etc.

[0053] 11) ControlRig: An animation tool provided by the Unreal Engine that allows users to directly rig and animate animated characters in the Unreal Engine, known as "control rigging". Using Control Rig, the need to rig and animate in external tools can be bypassed, and animation can be directly performed in the Unreal Editor.

[0054] 12) FullBody Inverse Kinematics (FBIK). Use the FBIK feature of Control Rig to build a highly controllable and flexible rig in Control Rig. The global solver method is built on a position-based IK framework, which enables faster rigging performance, per-bone settings, preferred angles, squash and stretch, etc. FBIK is designed to act as a procedural adjustment tool within Control Rig, such as ground alignment or arm stretching behavior.

[0055] Based on the above explanations of the nouns and terms involved in the embodiments of this application, the embodiments of this application will be described in detail below. The embodiments of this application provide an animation processing method, device, electronic device, computer-readable storage medium, and computer program product, which can improve the animation effect and reduce the animation production cost.

[0056] It should be noted that when collecting and processing relevant data in this application book during actual application, it should strictly comply with the requirements of relevant laws and regulations, obtain the informed consent or separate consent of the personal information subject, and carry out subsequent data use and processing behaviors within the scope authorized by laws and regulations and the personal information subject.

[0057] The following describes the animation processing system provided by the embodiments of this application. Refer to Figure 1 , Figure 1It is a schematic architecture diagram of the animation processing system provided by an embodiment of the present application. To support an exemplary application, the animation processing system 100 includes: a server 200, a network 300, and a terminal 400. Among them, the terminal 400 is connected to the server 200 through the network 300. The network 300 can be a wide area network, a local area network, or a combination of the two, and uses wireless or wired links to achieve data transmission.

[0058] Here, the terminal 400 (for example, running a client that supports animation processing) sends an animation acquisition request to the server 200 in response to an animation processing instruction. The animation acquisition request indicates to acquire the first animation file of the first virtual object and the second animation file of the second virtual object; the server 200 receives the animation acquisition request sent by the terminal 400; in response to the animation acquisition request, returns the first animation file of the first virtual object and the second animation file of the second virtual object to the terminal 400; the terminal 400 receives the first animation file of the first virtual object and the second animation file of the second virtual object returned by the server 200; extracts the first object skeleton of the first virtual object from the first animation file, and extracts the second object skeleton of the second virtual object from the second animation file; adds a bone slot to the first bone of the first object skeleton; mounts the second bone of the second object skeleton to the bone slot; when playing the mounting animation file in which the second virtual object is mounted on the first virtual object, based on the bone slot, controls the second bone to move following the first bone, so that the object part in the second virtual object that binds to the second bone moves following the object part in the first virtual object that binds to the first bone. In this way, it can enable the first virtual object and the second virtual object to interact, making the animation effect of the second virtual object mounted on the first virtual object and moving more realistic.

[0059] In some embodiments, the animation processing method provided by the embodiments of the present application is implemented by an electronic device. For example, it can be implemented by the terminal alone, or by the server alone, or by the cooperation of the terminal and the server. The embodiments of the present application can be applied to various scenarios, including but not limited to cloud technology, artificial intelligence, intelligent transportation, assisted driving, video, instant communication, games, the metaverse, etc.

[0060] In some embodiments, the electronic device for implementing the animation processing method provided in the embodiments of the present application can be various types of terminals or servers. Among them, the server (such as server 200) can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. The terminal (such as terminal 400) can be a laptop computer, a tablet computer, a desktop computer, a smart phone, a smart voice interaction device (such as a smart speaker), a smart home appliance (such as a smart TV), a smart watch, a vehicle-mounted terminal, a wearable device, a virtual reality (VR) device, an aircraft, etc., but is not limited thereto. The terminal and the server can be directly or indirectly connected through wired or wireless communication methods, and the embodiments of the present application do not limit this.

[0061] In some embodiments, the animation processing method provided in the embodiments of the present application can be implemented with the help of artificial intelligence (AI). Artificial intelligence is a comprehensive technology in computer science. By studying the design principles and implementation methods of various intelligent machines, the machine is enabled to have the functions of perception, reasoning, and decision-making. Artificial intelligence technology conducts research and applications in multiple fields, such as artificial intelligence generated content (AIGC), game AI, etc. In the embodiments of the present application, the above-mentioned first virtual object and second virtual object can be virtual objects automatically generated based on artificial intelligence (such as virtual characters, virtual animals, etc.); the above-mentioned animation file can also be automatically generated based on artificial intelligence.

[0062] In some embodiments, the animation processing method provided in the embodiments of the present application can be implemented with the help of cloud technology. Cloud technology refers to a hosting technology that unifies a series of resources such as hardware, software, and networks within a wide area network or a local area network to achieve data calculation, storage, processing, and sharing. Cloud technology is the general term for network technology, information technology, integration technology, management platform technology, and application technology based on the cloud computing business model, and can form a resource pool, which can be used on demand, flexibly and conveniently. Cloud computing technology will become an important support. The background services of the technical network system require a large amount of computing resources and storage resources. As an example, the server (such as server 200) can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery network (CDN), and big data and artificial intelligence platforms.

[0063] In some embodiments, a terminal or a server may implement the animation processing method provided in the embodiments of the present application by running various computer-executable instructions or computer programs. For example, the computer-executable instructions may be commands at the microprogram level, machine instructions, or software instructions. The computer program may be a native program or a software module in an operating system; it may be a native application (APP), that is, a program that needs to be installed in the operating system to run; or it may be a small program that can be embedded in any APP, that is, a program that only needs to be downloaded into a browser environment to run. In short, the above computer-executable instructions may be instructions in any form, and the above computer programs may be application programs, modules, or plugins in any form.

[0064] The following describes the electronic device for implementing the animation processing method provided in the embodiments of the present application. Refer to Figure 2 , Figure 2 which is a schematic structural diagram of the electronic device provided in the embodiments of the present application. The electronic device 500 provided in the embodiments of the present application may be a terminal or a server. As Figure 2 shown, the electronic device 500 includes: at least one processor 510, a memory 550, at least one network interface 520, and a user interface 530. Each component in the electronic device 500 is coupled together through a bus system 540. It can be understood that the bus system 540 is used to realize the connection and communication between these components. In addition to including a data bus, the bus system 540 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clear illustration, in Figure 2 all kinds of buses are labeled as the bus system 540.

[0065] The processor 510 may be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or any conventional processor, etc.

[0066] The user interface 530 includes one or more output devices 531 capable of presenting media content, including one or more speakers and / or one or more visual display screens. The user interface 530 also includes one or more input devices 532, including user interface components that facilitate user input, such as a keyboard, a mouse, a microphone, a touch screen display, a camera, and other input buttons and controls.

[0067] The memory 550 can be removable, non-removable, or a combination thereof. The memory 550 can include one or more storage devices that are physically remote from the processor 510. The memory 550 includes volatile memory or non-volatile memory, and can also include both volatile memory and non-volatile memory. The non-volatile memory can be Read Only Memory (ROM), and the volatile memory can be Random Access Memory (RAM). The memory 550 described in the embodiments of the present application is intended to include any suitable type of memory.

[0068] In some embodiments, the memory 550 is capable of storing data to support various operations. Examples of such data include programs, modules, and data structures, or subsets or supersets thereof, which are illustratively described below.

[0069] The operating system 551 includes system programs for processing various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks;

[0070] The network communication module 552 is used to reach other electronic devices via one or more (wired or wireless) network interfaces 520. Exemplary network interfaces 520 include: Bluetooth, Wireless Fidelity (WiFi), and Universal Serial Bus (USB), etc.;

[0071] The presentation module 553 is used to enable the presentation of information (such as a user interface for operating peripheral devices and displaying content and information) via one or more output devices 531 associated with the user interface 530 (such as a display screen, a speaker, etc.);

[0072] The input processing module 554 is used to detect and translate one or more user inputs or interactions from one of one or more input devices 532.

[0073] In some embodiments, the animation processing device provided by the embodiments of the present application can be implemented in software. Figure 2 Shown is the animation processing device 555 stored in the memory 550, which can be software in the form of programs and plugins, etc., and includes the following software modules: an acquisition module 5551, an extraction module 5552, an addition module 5553, a mounting module 5554, and a playback module 5555. These modules are logical, and thus can be arbitrarily combined or further split according to the functions to be implemented. The functions of each module will be described below.

[0074] The animation processing method provided by the embodiments of the present application will be described below. As mentioned above, the animation processing method provided by the embodiments of the present application is implemented by an electronic device, for example, it can be implemented by a server or a terminal alone, or by the server and the terminal in cooperation. Therefore, the execution entity of each step will not be repeated below. Refer to Figure 3 , Figure 3 which is a schematic flowchart of the animation processing method provided by the embodiments of the present application. The animation processing method provided by the embodiments of the present application includes:

[0075] Step 101: Obtain a first animation file of a first virtual object and a second animation file of a second virtual object.

[0076] In step 101, in practical applications, the user can trigger an animation processing instruction on the electronic device. At this time, the electronic device responds to the animation processing instruction and obtains the first animation file of the first virtual object and the second animation file of the second virtual object. The first animation file and the second animation file can be pre-produced. When needed, the first animation file and the second animation file can be imported into a client that supports animation processing.

[0077] In some embodiments, the first animation file of the first virtual object and the second animation file of the second virtual object can be obtained by performing the following steps: Obtain a first standby animation file and a motion animation file of the first virtual object, and use the first standby animation file and the motion animation file as the first animation file; Obtain a second standby animation file of the second virtual object, and use the second standby animation file as the second animation file; wherein, the second virtual object in the second standby animation file is in a target posture, and the target posture is the posture adopted when the second virtual object is mounted on the first virtual object.

[0078] Here, the first animation file of the first virtual object includes the first standby animation file and the motion animation file of the first virtual object. The first standby animation file is an animation file of the first virtual object in a specific pose (such as standing still) pre-made, including at least one animation frame (at least one animation frame forms an animation sequence). The motion animation file is an animation file pre-made to show the motion process of the first virtual object (such as running, flying, jumping, crawling, etc.), including multiple animation frames (multiple animation frames form an animation sequence). The second animation file of the second virtual object is the second standby animation file of the second virtual object. The second standby animation file is an animation file of the second virtual object in a target pose pre-made, including at least one animation frame (at least one animation frame forms an animation sequence); wherein, the target pose can be the pose adopted when the second virtual object is mounted on the first virtual object, such as the pose of riding on the first virtual object, the pose of lying prone on the first virtual object, etc., so as to facilitate mounting the second virtual object on the first virtual object. It should be noted that the first animation file and the second animation file can form a mounting animation file (that is, the first animation file and the second animation file can be obtained from the mounting animation file), in which the second virtual object is mounted on the first virtual object, and when the first virtual object moves, the second virtual object moves following the first virtual object; through the bone slot added in the embodiment of the present application, when the second virtual object moves following the first virtual object, the second bone of the second virtual object moves following the first bone of the first virtual object.

[0079] Step 102: Extract the first object skeleton of the first virtual object from the first animation file, and extract the second object skeleton of the second virtual object from the second animation file.

[0080] In step 102, after obtaining the first animation file and the second animation file, the first animation file and the second animation file are respectively parsed, so as to extract the first object skeleton of the first virtual object from the first animation file, and extract the second object skeleton of the second virtual object from the second animation file. Here, the first object skeleton includes multiple bones and the bone joints between the bones, and the second object skeleton also includes multiple bones and the bone joints between the bones.

[0081] In practical applications, in addition to including the first object skeleton, the first animation file also includes the animation sequence of the first virtual object and the bone mesh (which can also be understood as the three-dimensional object model of the first virtual object). Similarly, in addition to including the second object skeleton, the second animation file also includes the animation sequence of the second virtual object and the bone mesh (which can also be understood as the three-dimensional object model of the second virtual object).

[0082] Step 103: Add a bone socket to the first bone of the first object skeleton.

[0083] In step 103, for the first object skeleton of the first virtual object obtained by extraction, determine the first bone in the first object skeleton where the bone socket is to be added. Here, the first bone can be any bone in the first object skeleton preset according to the animation requirements of the attached animation file. For example, it can be the pelvic bone or shoulder bone of the first object skeleton. After determining the first bone where the bone socket is to be added, add a bone socket to the first bone. The bone socket is used to mount the second bone of the second object skeleton of the second virtual object.

[0084] In some embodiments, the bone socket can be added to the first bone of the first object skeleton by performing the following steps: Add a first bone socket to the first sub-bone of the first object skeleton, and the first bone socket indicates the direct mounting position of the second virtual object relative to the first virtual object; Add a second bone socket to the second sub-bone of the first object skeleton, and the second bone socket indicates the indirect mounting position of the second virtual object relative to the first virtual object. The second bone socket is used to constrain the movement of the target bone in the second bone; where the first bone includes the first sub-bone and the second sub-bone, and the bone socket includes the first bone socket and the second bone socket.

[0085] Here, first, a first bone slot is added to the first sub-bone of the first object skeleton. This first bone slot actually indicates the direct mounting position of the second virtual object relative to the first virtual object, that is, the second virtual object is mounted on the first virtual object through this first bone slot, and this first bone slot is the direct contact position between the second virtual object and the second virtual object. It can be understood that if the first sub-bone corresponding to the first bone slot is different, then the position where the second virtual object is mounted on the first virtual object is different. Subsequently, a second bone slot is added to the second sub-bone of the first object skeleton. This second bone slot actually indicates the indirect mounting position of the second virtual object relative to the first virtual object, that is, the second virtual object does not directly contact the first virtual object at the position of this second bone slot; however, the second sub-bone of the first virtual object can restrict the movement of the target bone in the second virtual object through the second bone slot, that is, the target bone of the second virtual object follows the movement of the second sub-bone of the first virtual object. In this way, through the first bone slot, the second virtual object can be mounted on the first virtual object, and the bone of the second virtual object directly mounted through the first bone slot follows the movement of the first sub-bone; through the second bone slot, the bone of the second virtual object that does not directly contact the first virtual object can also follow the movement of the bone of the first virtual object; in this way, it can enable the first virtual object and the second virtual object to interact at both the direct contact position and the non-direct contact position (such as the "pelvic bone position" at the direct contact position and the "limbs and head" at the non-direct contact position), making the animation effect of the mounted movement more realistic.

[0086] Step 104: Mount the second bone of the second object skeleton to the bone slot.

[0087] In step 104, after adding the bone slot to the first bone of the first object skeleton, the second bone of the second object skeleton can be mounted to the bone slot, so that the second virtual object is mounted on the first virtual object. This second bone can be any bone in the second object skeleton preset according to the animation requirements of the mounting animation file. For example, it can be the head bone, hip bone, limb bones, etc. of the second object skeleton. The mounting animation file for the second virtual object to be mounted on the first virtual object indicates that the second virtual object is mounted on the first virtual object and the second virtual object follows the movement of the first virtual object when the first virtual object moves. It can be understood that when the second virtual object follows the movement of the first virtual object, through the bone slot, the second bone of the second virtual object follows the movement of the first bone of the first virtual object.

[0088] In some embodiments, before mounting the second bone of the second object skeleton to the bone slot, the following steps are further performed: creating a mounting animation blueprint for the mounting animation file, creating a first animation blueprint for the first virtual object, and creating a second animation blueprint for the second virtual object; adding a first bone mesh and a second bone mesh to the mounting animation blueprint, the first bone mesh and the second bone mesh having a hierarchical relationship, and the first bone mesh being the parent of the second bone mesh; obtaining the first object model of the first virtual object, and placing the first object model and the first animation blueprint on the first bone mesh to obtain a third bone mesh; obtaining the second object model of the second virtual object, and placing the second object model and the second animation blueprint on the second bone mesh to obtain a fourth bone mesh.

[0089] Here, first, a mounting animation blueprint for the mounting animation file, a first animation blueprint for the first virtual object, and a second animation blueprint for the second virtual object are created. Further, a first bone mesh corresponding to the first virtual object and a second bone mesh of the second virtual object are added to the mounting animation blueprint; the first bone mesh is used for the display of the first virtual object, and the second bone mesh is used for the display of the second virtual object. Among them, the first bone mesh and the second bone mesh have a hierarchical relationship, and the first bone mesh is the parent of the second bone mesh, and the second bone mesh is the child of the first bone mesh; in this way, it can be ensured that the second virtual object is mounted on the first virtual object. Subsequently, the first object model of the first virtual object and the second object model of the second virtual object are obtained. The first object model may be a three-dimensional object model of the first virtual object, which is obtained by skinning the first object skeleton; the second object model may be a three-dimensional object model of the second virtual object, which is obtained by skinning the second object skeleton. Finally, the first object model and the first animation blueprint are placed in the first bone mesh to achieve the purpose of being able to display the first virtual object, obtaining a third bone mesh; and the second object model and the second animation blueprint are placed in the second bone mesh to achieve the purpose of being able to display the second virtual object, obtaining a fourth bone mesh.

[0090] In some embodiments, the third bone mesh includes the first object skeleton, and the fourth bone mesh includes the second object skeleton; thus, the second bone of the second object skeleton can be mounted to the bone slot by performing the following steps: creating a blueprint node in the mounting animation blueprint, the blueprint node including a first pin indicating the mounting object, a second pin indicating the object to be mounted, and a slot pin; controlling the third bone mesh to connect to the first pin, controlling the fourth bone mesh to connect to the second pin, and controlling the slot pin to indicate the bone slot to mount the second bone of the second object skeleton to the bone slot.

[0091] Here, since the first object model is obtained by skinning the first object skeleton, the third bone mesh body includes the first object skeleton. Similarly, since the second object model is obtained by skinning the second object skeleton, the fourth bone mesh body includes the second object skeleton. Based on this, after obtaining the third bone mesh body and the fourth bone mesh body, blueprint nodes can be created in the attachment animation blueprint. Here, the created blueprint nodes include a first pin indicating the attachment object (i.e., the carrier), a second pin indicating the attached object, and a socket pin. Thus, it is possible to control the third bone mesh body (corresponding to the first virtual object) to connect to the first pin, control the fourth bone mesh body (corresponding to the second virtual object) to connect to the second pin, and control the socket pin to indicate the bone socket (for example, associating the socket pin with the socket name of the bone socket) to attach the second bone of the second object skeleton to the bone socket. In practical applications, an animation running control node can also be created in the attachment animation blueprint, and then control the animation running control node to connect to the blueprint node. In this way, it can be ensured that when the attachment animation blueprint is controlled to run through the animation running control node, the second virtual object is attached to the bone socket of the first virtual object, so as to realize controlling the second bone to move following the first bone based on the bone socket, so that the object part in the second virtual object that binds to the second bone moves following the object part in the first virtual object that binds to the first bone.

[0092] In some embodiments, the first virtual object can have various motion postures. For example, walking on land, running, swimming, floating, flying, surfing, etc. Therefore, for different motion postures of the first virtual object, different attachment postures can be adopted to attach the second virtual object to the first virtual object. Specifically, the motion posture of the first virtual object can be obtained first. Based on the motion posture, the first bone in the first object skeleton where the bone socket is to be added is determined, and the second bone in the second object skeleton to be attached to the bone socket is determined. Here, for different motion postures of the first virtual object, the determined first bone and second bone can be different. Therefore, when attaching the second virtual object to the first virtual object, the attachment posture and the bone constraint method based on the bone socket can also be different. Based on this, by adding a bone socket to the first bone determined based on the motion posture and attaching the second bone determined based on the motion posture to the bone socket, it is possible to make the second virtual object be attached to the first virtual object with an attachment posture adapted to the motion posture. In this way, the diversity of the attachment postures of the attachment animation can be increased, making the attachment posture more adapted to the motion posture of the first virtual object and the animation effect more realistic.

[0093] Exemplarily, in a virtual scenario (such as a game scenario), if different mounting postures are adopted to mount a second virtual object on a first virtual object for different motion postures of the first virtual object, then during the process of switching the motion posture of the first virtual object in the virtual scenario, the corresponding mounting posture will also be switched according to the change in the motion posture of the first virtual object. For example, if the first virtual object switches from a first motion posture (such as running) to a second motion posture (such as swimming), then the mounting posture for mounting the second virtual object on the first virtual object can be switched from a first mounting posture (such as riding) to a second mounting posture (such as lying prone). Among them, the first mounting posture is adapted to the first motion posture, and the first bone added to the bone slot and the second bone mounted on the bone slot are both determined based on the first motion posture; the second mounting posture is adapted to the second motion posture, and the first bone added to the bone slot and the second bone mounted on the bone slot are both determined based on the second motion posture. In this way, the animation effect in the virtual scenario and the experience of the virtual scenario can be improved.

[0094] Step 105: When playing the mounting animation file of the second virtual object mounted on the first virtual object, based on the bone slot, control the second bone to move following the first bone, so that the object part in the second virtual object bound to the second bone moves following the object part in the first virtual object bound to the first bone.

[0095] In step 105, when playing the mounting animation file of the second virtual object mounted on the first virtual object, the second bone of the second virtual object can be controlled to move following the first bone of the first virtual object based on the bone slot, so that the object part in the second virtual object bound to the second bone moves following the object part in the first virtual object bound to the first bone. It should be noted that the object part is obtained by skinning the model vertices corresponding to the respective bones to the respective bones. Specifically, when the first bone includes a first sub-bone and a second sub-bone, and the first sub-bone is added with a first bone slot and the second sub-bone is added with a second bone slot, the control of mounting the second virtual object on the first virtual object can be achieved through the first bone slot, and the bone of the second virtual object directly mounted on the first bone slot can be made to move following the first sub-bone; the control of the bone of the second virtual object not in direct contact with the first virtual object to move following the bone of the first virtual object can be achieved through the second bone slot. In this way, interactions can be generated at both the direct contact position and the non-direct contact position between the first virtual object and the second virtual object (such as the "pelvic bone position" at the direct contact position and the "limbs and head" at the non-direct contact position), making the animation effect of the mounting movement more realistic.

[0096] In this way, the bone socket is added to the first bone of the first object skeleton, and the second bone of the second object skeleton is mounted on the bone socket. It can be understood that the first bone can be any bone of the first object skeleton, and the second bone can be any bone of the second object skeleton. Therefore, only by adjusting the addition position or the mounting position of the bone socket (that is, on which first bone of the first object skeleton it is added and which second bone of the second object skeleton is used for mounting), different pose mountings can be achieved through the bone socket, without creating animation assets and animation logics for different mounting poses, reducing the animation production cost.

[0097] In some embodiments, the first animation blueprint of the first virtual object can be created by performing the following steps: based on the first object skeleton, create the first animation blueprint file of the first virtual object; in response to a file opening operation for the first animation blueprint file, display the blueprint editing interface of the first animation blueprint file; based on the blueprint editing interface, receive the first editing information for the event graph in the first animation blueprint file and the second editing information for the animation graph in the first animation blueprint file; based on the first editing information and the second editing information, generate the first animation blueprint. Here, the process of receiving the first editing information for the event graph and the second editing information for the animation graph based on the blueprint editing interface will be described below, and the relevant implementation method regarding S7 in the following text can be adopted for implementation.

[0098] In some embodiments, the second animation blueprint of the second virtual object can be created by performing the following steps: based on the second object skeleton, create the second animation blueprint file of the second virtual object; in response to a file opening operation for the second animation blueprint file, display the blueprint editing interface of the second animation blueprint file; based on the blueprint editing interface, receive the third editing information for the event graph in the second animation blueprint file and the fourth editing information for the animation graph in the second animation blueprint file; based on the third editing information and the fourth editing information, generate the second animation blueprint. Here, the process of receiving the third editing information for the event graph and the fourth editing information for the animation graph based on the blueprint editing interface will be described below, and the relevant implementation method regarding S6 in the following text can be adopted for implementation.

[0099] In some embodiments, based on the bone socket, the movement of the second bone following the first bone can be controlled by performing the following steps: obtaining the rotation information and displacement information of the bone socket; determining the bone rotation angle of the second bone based on the rotation information and displacement information; and adjusting the bone position and bone orientation of the second bone based on the bone rotation angle to control the second bone to follow the first bone. Here, first, the rotation information and displacement information of the bone socket are obtained, and then, based on the rotation information and displacement information, the bone rotation angle of the second bone is determined. Thus, based on the bone rotation angle, by means of bone transformation, the bone position and bone orientation of the second bone are adjusted to achieve controlling the second bone to follow the first bone.

[0100] In some embodiments, based on the bone socket, the movement of the second bone following the first bone can also be controlled by performing the following steps: obtaining the rotation information and displacement information of the bone socket; determining the bone point positions of each bone point on the second bone in an inverse kinematics manner based on the rotation information and displacement information; and adjusting the bone position of the second bone based on the positions of each bone point on the second bone to control the second bone to follow the first bone. Here, it is also possible to determine the bone point positions of each bone point on the second bone associated with the bone socket (i.e., the bone socket is regarded as a bone point) based on the rotation information and displacement information of the bone socket by using the inverse dynamics principle (such as the FullbodyIK algorithm). Thus, based on the bone point positions of each bone point on the second bone, the bone position of the second bone is determined, and then the position of the second bone is adjusted to control the second bone to follow the first bone.

[0101] In some embodiments, the second virtual object mounted with the animation file is mounted on the first virtual object in a first mounting posture; correspondingly, the following steps can also be performed: receiving a mounting posture adjustment instruction, where the mounting posture adjustment instruction includes at least one of the following instructions: a first instruction to adjust the bone socket from the first bone to the third bone of the first object skeleton, and a second instruction to adjust the second bone to the fourth bone of the second object skeleton; and in response to the mounting posture adjustment instruction, controlling the second virtual object to be mounted on the first virtual object in a second mounting posture, where the second mounting posture is different from the first mounting posture.

[0102] Specifically, (1) when the mounting posture adjustment instruction is the first instruction, in response to the mounting posture adjustment instruction, the bone slot is adjusted from the first bone to the third bone; by mounting the second bone to the bone slot located in the third bone, the second virtual object is controlled to be mounted on the first virtual object in the second mounting posture; (2) when the mounting posture adjustment instruction is the second instruction, in response to the mounting posture adjustment instruction, by mounting the fourth bone to the bone slot, the second virtual object is controlled to be mounted on the first virtual object in the second mounting posture; (3) when the mounting posture adjustment instruction includes the first instruction and the second instruction, in response to the mounting posture adjustment instruction, the bone slot is adjusted from the first bone to the third bone; by mounting the fourth bone to the bone slot located in the third bone, the second virtual object is controlled to be mounted on the first virtual object in the second mounting posture.

[0103] Applying the above embodiments of the present application, first obtain the first animation file of the first virtual object and the second animation file of the second virtual object; then, from the first animation file, extract the first object skeleton of the first virtual object, and from the second animation file, extract the second object skeleton of the second virtual object; then add a bone slot to the first bone of the first object skeleton, and mount the second bone of the second object skeleton to the bone slot; thus, when playing the mounting animation file in which the second virtual object is mounted on the first virtual object, based on the bone slot, the second bone is controlled to move following the first bone, so that the object part in the second virtual object bound to the second bone moves following the object part in the first virtual object bound to the first bone.

[0104] Here, (1) the second bone of the second virtual object can move following the first bone of the first virtual object based on the bone slot, so that the object part in the second virtual object bound to the second bone moves following the object part in the first virtual object bound to the first bone. In this way, the first virtual object and the second virtual object interact during the mounting movement, making the animation effect more realistic and improving the animation effect; (2) since the second virtual object is mounted on the first virtual object and moves following it by means of the added bone slot, only the addition position (the first bone) or the mounting position (the second bone) of the bone slot needs to be adjusted to achieve mounting in different postures through the bone slot, without the need to produce animation assets and animation logics for different mounting postures, reducing the animation production cost.

[0105] The following describes an exemplary application of the embodiment of the present application in an actual application scenario. In the related art, (1) different animation assets and animation logics are produced separately for the carrier object and the mounted object. Although this can achieve a variety of different mounting postures, the production cost is very high; (2) only one set of animation assets and animation logic is produced for the carrier object and the mounted object, but this makes the mounting posture highly unified and the animation effect is very poor.

[0106] Based on this, the embodiment of the present application provides an animation processing method to at least solve the above-mentioned problems. In the embodiment of the present application, a set of general logic for realizing the same effect of the second virtual object (i.e. the mounted object) and the first virtual object (i.e. the carrier object) is provided. Specifically: through hierarchical constraints, the first virtual object and the second virtual object form a mounting relationship, and only one animation asset is used. In combination with FullBodyIK and the slots added to the skeleton of the first virtual object, the mounted object is mounted on the carrier object in a reasonable posture (customization is supported), and the limbs, head and other parts of the second virtual object can be linked with the body parts of the first virtual object. The debugging cost of a single first virtual object is very low, and only the position of the slot needs to be debugged. In this way, 1) only one animation asset needs to be made for the second virtual object, and the production cost is very low; 2) each first virtual object can individually adjust the parameters such as movement rate and turning rate, so that each first virtual object has independent movement characteristics; 3) it has extremely deep extensibility when applied to virtual scenes (such as games), which brings more possibilities for designing the effect of the second virtual object traveling with the first virtual object (such as the second virtual object riding the first virtual object, the second virtual object lying on the first virtual object); 4) if a new first virtual object needs to be mounted, only the position and movement parameters of the slot need to be debugged, saving production costs; 5) using FullBodyIK to allow the limbs, head and other parts of the second virtual object to interact with the first virtual object, making the mounting animation effect closer to reality; 6) the mounting posture supports personalized customization, and only the position of the slot needs to be debugged. The following is a detailed description.

[0107] The following is an explanation of the embodiment of the present application from the product side. Since the second skeleton of the second virtual object is mounted on the first skeleton of the first virtual object through a slot, you can define which skeleton of the second virtual object follows which skeleton of the first virtual object. The actual action effect brought by skeleton following will be very vivid, such as Figure 4AAs shown in (1) and (2), during the process of the second virtual object (such as the player's virtual object) riding on the first virtual object (such as a virtual sprite in the game) and moving, when the first virtual object moves, there will also be corresponding bone movement effects on the second virtual object. The embodiments of the present application also have the advantage of versatility, and the second virtual object can perfectly adapt to riding on the first virtual object of any body type with various action postures. For example Figure 4B As shown in (1) and (2), for different first virtual objects, the riding postures of the second virtual object are different. In addition to being applied to the second virtual object riding on the first virtual object, the embodiments of the present application can also be applied to the situation where the second virtual object (such as a virtual sprite) lies prone on the first virtual object (such as the player's virtual object), that is, "traveling together". For example Figure 4C As shown in (1) and (2), when the first virtual object moves, the second virtual object lying prone on the first virtual object will also move (such as the tail of the second virtual object moving up and down).

[0108] The following is an explanation of the embodiments of the present application from a technical perspective. The process of the embodiments of the present application is as Figure 5 shown:

[0109] 1. Produce animation files. Here, it includes producing the animation files of the first virtual object and the second virtual object. Produce the idle animation file and the motion animation file of the first virtual object in 3dsmax, and produce the idle animation file of the second virtual object in the target posture (such as the riding posture).

[0110] 2. Export the animation files. Export the idle animation file, the motion animation file of the first virtual object and the idle animation file of the second virtual object in 3dsmax. Denote the idle animation file of the first virtual object as file A, the motion animation file of the first virtual object as file B, and the idle animation file of the second virtual object as file C.

[0111] 3. Import the animation files. Import animation files A, B, and C in UE4, and after importing the animation files, the following seven files are obtained in sequence:

[0112] The skeletal mesh body file of the first virtual object, denoted as "SKM_PET";

[0113] The first skeleton file of the first virtual object, denoted as "SK_Pet";

[0114] The idle animation sequence of the first virtual object, denoted as "Pet__Anim_Idle";

[0115] The motion animation sequence of the first virtual object, denoted as "Pet__Anim_Run";

[0116] The skeletal mesh file of the second virtual object, denoted as "SKM_PC1";

[0117] The second skeleton file of the second virtual object, denoted as "SK_PC1";

[0118] The idle animation sequence of the second virtual object, denoted as "PC1__Anim_Ride".

[0119] 5. Create the first animation blueprint of the first virtual object. Create the first animation blueprint based on "SK_Pet", denoted as "ABP_Pet", for playing the animations "Pet__Anim_Idle" and "Pet__Anim_Run".

[0120] 6. Add slots to the skeleton of the first virtual object. Add slots in "SK_Pet", and the slots are used for 1) setting the mounting position of the second virtual object relative to the first virtual object; 2) constraining the target bones of the second virtual object (such as the bones of the limbs, head, etc.). For example, the names of the slots for constraining the target bones can be as follows:

[0121] The slot for constraining the head bone of the second virtual object, denoted as "Socket_Head";

[0122] The slot for constraining the left hand bone of the second virtual object, denoted as "Socket_Hand_L";

[0123] The slot for constraining the right hand bone of the second virtual object, denoted as "Socket_Hand_R";

[0124] The slot for constraining the left foot bone of the second virtual object, denoted as "Socket_Foot_L";

[0125] The slot for constraining the right foot bone of the second virtual object, denoted as "Socket_Foot_R";

[0126] The mounting slot, denoted as "Ride".

[0127] 7. Create the second animation blueprint of the second virtual object. Create the second animation blueprint based on "SK_PC1", denoted as "ABP_PC1", for playing the animation "PC1__Anim_Ride" of the second virtual object, and for making the second virtual object be constrained by the slots of the first virtual object so as to interact with the first virtual object. Specifically, obtain the "position and rotation data of the slots" from the animation of the first virtual object; then assign the obtained "position and rotation data of the slots" to FBIK; FBIK will, according to the input "position and rotation data of the slots", constrain the target bones of the second virtual object at the positions of the slots of the first virtual object.

[0128] 8. Create a mounting animation blueprint. Create a blueprint with a moving component that has a second virtual object, and then add two skeletal mesh components, denoted as "Component A (corresponding to the first virtual object)" and "Component B (corresponding to the second virtual object)". Among them, Component A carries "SKM_Pet" and "ABP_Pet"; Component B carries "SKM_PC1" and "ABP_PC1". Set the hierarchy of Component B to be a child of Component A, making Component B a child of Component A, and "Component B" is constrained by the slot "Ride" in "SKM_PET" included in "Component A".

[0129] First, explain the production of the animation file (i.e., the standby animation file of the second virtual object in the target pose (such as the riding pose)). 1. Open 3dsMax; 2. Open the skeletal file of the second virtual object; 3. Rotate the bones and control the rotation and displacement of the bones (such as the pelvis, arms, thighs, etc.) so that the bones are in the target pose (such as Figure 6 the riding pose shown); 4. Export the bones in the target pose as an FBX animation file, denoted as the standby animation file of the second virtual object.

[0130] Second, explain the logic of attaching the second virtual object to the first virtual object through UE4, including:

[0131] S1. Run UE4.

[0132] S2. As shown in Figure 7A . In the blank area of the "Content Browser" in the engine asset panel, display the shortcut menu through a click operation and select "Blueprint Class" in the shortcut menu; in the newly popped-up "Select Parent Class" window, select "Character", at this time, a new blueprint file will be created in the "Content Browser", denoted as "BP_RideAll". In this way, the mounting animation blueprint "BP_RideAll" is created, which can play the mounting animation of the second virtual object attached to the first virtual object.

[0133] S3. In the "Content Browser", open "BP_RideAll" through a click operation.

[0134] S4. As shown in (1) of Figure 7B , in the "Components" tab in the upper left corner of the "BP_RideAll" window, select "Mesh (CharacterMesh0) (Inherited)", so that the first skeletal mesh (CharacterMesh0) is added to the mounting animation blueprint for the display of the first virtual object; as shown in Figure 7BAs shown in (2), click the "Add Component" button, and in the newly popped-up tab, select "SkeletalMesh". In this way, a second SkeletalMesh is added to the mounted animation blueprint for the display of the second virtual object.

[0135] S5. Check whether the "SkeletalMesh" is under the hierarchy of "CharacterMesh0 (Inherited)". Specifically, you can check whether there is a triangular symbol in front of the name of "CharacterMesh0 (Inherited)". As Figure 7B shown in (3). If there is a triangular symbol, it means that the "SkeletalMesh" and "CharacterMesh0 (Inherited)" form a hierarchical constraint, and the "SkeletalMesh" is under the hierarchy of "CharacterMesh0 (Inherited)".

[0136] S6. The creation process of the second animation blueprint for the second virtual object is as follows:

[0137] 6.1 Import the idle animation file of the second virtual object.

[0138] 6.2 Create the second animation blueprint file for the second virtual object. As Figure 8A shown, in the "Content Browser", click the second skeleton file of the second virtual object. In the displayed shortcut menu, select "Animation Blueprint" in "Create". At this time, a new animation blueprint file will be created in the "Content Browser", denoted as "ABP_PC1_RideAll". Here, the second animation blueprint is used to call the idle animation file of the second virtual object.

[0139] 6.3 Write the logic of the event graph in the second animation blueprint.

[0140] 6.3.1 As Figure 8B shown in (1), open "ABP_PC1_RideAll". In the newly popped-up window, find the "My Blueprint" tab in the lower left corner, double-click "Event Graph", and you can see that the "Event Graph" tab is opened in the middle of the window. This step is to find and open the event graph because the logic will be written in this graph next.

[0141] 6.3.2 In the blank area of the event graph, trigger the display of the text box as Figure 8B shown in (2) by clicking. Enter "try get pawn" in the text box, and click "Try to Get Pawn Owner" in the search results to create as Figure 8BThe rightmost blueprint node "Try to get Pawn owner" shown in (2). This step is to create the blueprint node "Try to get Pawn owner" for obtaining the user "BP_RideAll" using the second animation blueprint.

[0142] 6.3.3 As Figure 8C As shown in (1), hold down the "ReturnValue" pin in the blueprint node "Try to get Pawn owner" without releasing, then move to a blank area and release. Enter "BP_RideALL" in the pop-up search box, and select "Cast to BP_RideAll" from the search results to create the blueprint node "Cast to BP_RideAll". This step is to create the blueprint node "Cast to BP_RideAll" which is used to obtain "BP_RideAll".

[0143] 6.3.4 According to Figure 8C As shown in (2), connect the created blueprint nodes in the second animation blueprint, and make "Event Blueprint Update Animation" link to "BP_RideALL" so that when the engine runs, the rotation information and displacement information of the socket can be obtained in real time from "BP_RideALL".

[0144] 6.3.5 As Figure 8D As shown in (1), hold down the "As BPRide All" pin in the blueprint node "Cast to BP_RideAll" without releasing, move to a blank area and then release. Enter "get socket rotation" in the search box, and select "Get Socket Rotation (Mesh)" from the search results. This step is to create the blueprint node "get socketrotation" for obtaining the rotation information of the socket from "BP_RideALL".

[0145] 6.3.6 As Figure 8D As shown in (2), hold down the "As BPRide All" pin in the blueprint node "Cast to BP_RideAll" without releasing, move to a blank area and then release. Enter "get socket location" in the search box, and select "Get Socket Location (Mesh)" from the search results. This step is to create the blueprint node "get socket location" for obtaining the displacement information of the socket.

[0146] 6.3.7 For example, 6 "get socket rotation" blueprint nodes and 5 "get socketlocation" blueprint nodes can be created, and they can be created by copying.

[0147] Among them, in the "In Socket Name" text boxes of these 6 "get socket rotation" blueprint nodes, fill in successively: "Root", "Socket_Head", "Socket_Hand_L", "Socket_Hand_R", "Socket_Foot_L", "Socket_Foot_R". In the "In Socket Name" text boxes of these 5 "get socket location" nodes, fill in successively: "Socket_Head", "Socket_Hand_L", "Socket_Hand_R", "Socket_Foot_L", "Socket_Foot_R".

[0148] "Socket_Head", "Socket_Hand_L", "Socket_Hand_R", "Socket_Foot_L", "Socket_Foot_R" mentioned above are the names of the sockets that need to be added to the skeleton of the first virtual object, and also represent the positions where the limbs of the second virtual object interact with the body of the first virtual object. After creating the above blueprint nodes and filling in the information as described above, a schematic diagram of the blueprint nodes as shown in Figure 8E is obtained.

[0149] Among these 11 blueprint nodes, for each blueprint node, click the "Return Value" pin and select "Promote to Variable" (as shown in Figure 8G ), thereby creating a variable that is used to store rotation information or displacement information for this blueprint node. Create the variables required for these 11 blueprint nodes successively, rename them according to the information content, and connect them according to the schematic diagram shown in Figure 8F .

[0150] Step 6.3.7 is to obtain the rotation information and displacement information of the sockets in the skeleton of the first virtual object and store them in the variables of the second animation blueprint of the second virtual object.

[0151] 6.4 Write the logic of the animation graph in the second animation blueprint.

[0152] 6.4.1 As shown in Figure 9AAs shown in (1), open the skeleton of the second virtual object, click on the root bone named "Root", and select "Add Bone" in the pop-up shortcut menu. For example, enter and add the following in the search box in sequence: "Bip001-L-Hand", "Bip001-R-Hand", "Bip001-Head", "Bip001-L-Calf", "Bip001-R-Calf". The five bones created in this step will be used by fullbodyik for the interaction between the second virtual object and the first virtual object later.

[0153] 6.4.2 As Figure 9A As shown in (2), go back to the animation graph of the second animation blueprint, click on the blank area of the animation graph, enter "transform bone" in the pop-up search box, and select "Transform (Modify) Bone" from the search results. This step is to create a "Transform (Modify) Bone" node for modifying the rotation information and displacement information of the bones of the second virtual object.

[0154] 6.4.3 Since a total of 5 bones are created in the above example, 5 "Transform (Modify) Bones" also need to be created here. Among them, the translation mode and rotation mode of each bone are the same: the translation mode is "Replace Existing Item", the translation space is "World Scene", and the pins are all set to public, as Figure 9B shown in (1). In this step: Making the pins public is for blueprint nodes to be able to assign values using variables; because the socket position of the first virtual object needs to be assigned to the bones of the attached second virtual object 100%, so both the translation mode and rotation are "Replace Existing Item"; in 6.3.7, the rotation and displacement of the socket are obtained from the scene component, so corresponding to this step, both the rotation space and translation space are set to "World Scene Space".

[0155] 6.4.4 Modify the "Bone to Modify" in the 5 "Transform (Modify) Bone" nodes to the added bones in sequence; then in the "My Blueprint" tab, drag and connect the corresponding variables to the "Transform (Modify) Bone" nodes; drag the imported animation file of the second virtual object to be animated from the Content Browser into this animation graph. This step takes the single-frame animation file produced as the basis, and then, based on this animation file, modifies the position information and rotation information of the bones by connecting blueprint nodes.

[0156] 6.4.5 Click on the skeleton file of the second virtual object, select "Create Binding Control" in the pop-up shortcut menu, and create a "Create Binding Control" file, denoted as "CtrlRig_PC1_RideAll", as Figure 9BAs shown in (2) of the figure. This step is to create the files required for using fullbodyik: the controlrig file.

[0157] 6.4.6 Open the "CtrlRig_PC1_RideAll" file. In the blank area of the "RigGraph" chart in the newly popped-up window, right-click to search and add the "fullbodyik" node, and set it according to the Figure 9C figure shown. This step is to perform a linkage constraint on the position of the skeleton and the position of the skinned skeleton, using the "bones of the second virtual object" that have been controlled by the "slot of the first virtual object" to constrain the "skinned bones of the second virtual object".

[0158] 6.4.7 As Figure 9D shown, go back to the animation graph in the second animation blueprint "ABP_PC1_RideAll" window of the second virtual object. Click on the blank area of the graph. In the pop-up search box, enter "controlrig", and select "Bind Control" from the search results. Select the "Bind Control" node, and in the "Details" tab, mount the just-created ControlRig file: "CtrlRig_PC1_RideAll". This step is to create an "animation blueprint node for binding control" for mounting and using the controlrig file to achieve constraining the limbs of the second virtual object through the slot of the first virtual object.

[0159] 6.4.8 The final connection of the animation graph is as Figure 9E shown.

[0160] S7. Creation of the first animation blueprint of the first virtual object, the process is as follows:

[0161] 7.1 Create the first animation blueprint file of the first virtual object. As Figure 10A shown, in the "Content Browser", click on the skeleton file of the first virtual object. In the newly popped-up shortcut menu, select "Create" -> "Animation Blueprint". At this time, a new animation blueprint file will be created in the "Content Browser", denoted as "ABP_Pet_001". Here, the first animation blueprint is used to call the animation file of the first virtual object.

[0162] 7.2 Logic writing for the first animation blueprint of the first virtual object.

[0163] 7.2.1 As Figure 10B shown in (1) of the figure, open "ABP_Pet_001". In the newly popped-up window, find the "My Blueprint" tab in the lower left corner, double-click on the "Event Graph", and it can be seen that the "Event Graph" tab has been opened in the middle of the window. In the blank area of the event graph, trigger through click operations asFigure 10B As shown in (2), display the text box, enter "try get pawn" in the text box, click "Try to Get Pawn Owner" in the search results, and create the rightmost blueprint node "Try to Get Pawn Owner" as shown in Figure 10B (2). This step creates this blueprint node for obtaining the user "BP_RideAll" who uses the first animation blueprint.

[0164] 7.2.2 As Figure 10C shown in (1), click and hold the "Return Value" pin in the "Try to Get Pawn Owner" node, then move it to a blank area and release. Enter "get velocity" in the pop-up search box, and select "Get Velocity" in the search results to create the blueprint node "Get Velocity".

[0165] As Figure 10C shown in (2), click and hold the "Return Value" pin in the "Get Velocity" node, then move it to a blank area and release. Enter "length" in the pop-up search box, and select "Vector Length" in the search results to create the blueprint node "Vector Length".

[0166] As Figure 10C shown in (3), click the "Return Value" pin in the "Vector Length" node, select "Promote to Variable" in the pop-up shortcut menu, and rename the newly created variable to "Speed". This step is to create the Speed variable for obtaining the moving speed of the first virtual object.

[0167] 7.2.3 As Figure 10D shown in (1), click and hold the "Return Value" pin in the "Speed" variable node, then move it to a blank area and release. Enter ">" in the pop-up search box, select "Float > Float" in the search results, and enter "Specific value (such as 10)" in the second text box of the newly created "Float > Float" node. This step is to compare the moving speed speed variable of the first virtual object with a specific value (for example, 10) to determine whether the current speed is greater than 10 cm / s.

[0168] 7.2.4 As Figure 10DAs shown in (2), click on the pin in the "Float > Float" node, and in the pop-up shortcut menu, select "Promote to Variable". Rename the newly created variable to "isMoving". This step is to create the isMoving variable, which is used to detect whether the first virtual object is in a moving state. For example, if the speed is greater than 10 cm / s, it is in a moving state, and then the value of this boolean variable is True; otherwise, it is False.

[0169] 7.2.5 As Figure 10D As shown in (3), in the "My Blueprint" tab on the left side of the current window, double-click on "AnimGraph" to open the animation graph. Right-click in the blank area of the animation graph, and in the pop-up search box, enter "blend poses by bool", and select "Blend Poses by Bool" from the search results. This step is to create the "Blend Poses by Bool" node, which is used to select and play the idle animation or the movement animation according to the moving state of the first virtual object.

[0170] 7.2.6 In the "Asset Browser" tab, drag the idle animation file and the movement animation file into the animation graph, and connect the animations to the "blend poses by bool" node. Among them, the movement animation file is connected to the True pin, and the idle animation file is connected to the False pin. In the "My Blueprint" tab, click and hold the ismoving variable, drag it to the "Active Value" pin of the "blend poses by bool" node, and then connect the output pin of the "blend poses by bool" node to the "Output Pose" node. This step is to connect the animation files of the first virtual object to the "blend poses by bool" node. If the variable ismoving is True, then the movement animation file will be played; otherwise, the idle animation file will be played.

[0171] S8. Writing the logic for mounting the animation blueprint "BP_RideAll".

[0172] 8.1 Open "BP_RideAll".

[0173] 8.2 In the "Components" tab in the upper left corner, select "Mesh (CharacterMesh0) Inheritance", and in the Details panel, in the skeletal mesh, select the "skeletal mesh" corresponding to the first virtual object, and in the animation class, select the created first animation blueprint "ABP_Pet_001", as Figure 11AAs shown. This step is to place the first object model and the first animation blueprint of the first virtual object in the skeletal mesh. This operation enables the first virtual object to "run".

[0174] 8.3 In the "Components" tab in the upper left corner, select "SkeletalMesh". In the Details panel, in the skeletal mesh, select the "Skeletal Mesh" of the second virtual object, and in the animation class, select the created second animation blueprint "ABP_PC1_RideAll", as Figure 11B shown. This step is to place the second object model and the second animation blueprint of the second virtual object in the skeletal mesh.

[0175] 8.4 In the blank area of the Event Graph, trigger the display of the search box as shown in Figure 11C (1) below by clicking. In the popped-up search box, enter "attach component to component", and in the search results, select "Attach Component to Component (Mesh)". The blueprint node created in this step is to mount the skeletal mesh "SkeletalMesh" used by the second virtual object on a certain socket of the skeletal mesh "Mesh (CharacterMesh0 Inheritance)" used by the first virtual object.

[0176] 8.5 Drag the "Mesh (CharacterMesh0 Inheritance)" component from the "Components" tab in the upper left corner to the "Parent" pin of the "Attach Component to Component" node. Similarly, drag the "SkeletalMesh" component from the "Components" tab to the "Target" pin of the "Attach Component to Component" node. Then, enter "Ride" in the "Socket Name" text box, and connect the execution node of the "Event Begin Play" event to the "Attach Component to Component" node. This step is to make the skeletal mesh component "SkeletalMesh" of the second virtual object mount on the "Ride" socket of the skeletal mesh component "Mesh (CharacterMesh0 Inheritance)" of the first virtual object when the mounted animation blueprint starts running. The specific connection diagram is as shown in Figure 11C (2) below.

[0177] S9. Add a socket to the skeleton of the first virtual object.

[0178] 9.1 Open the skeleton file of the first virtual object.

[0179] 9.2 Open the motion animation of the first virtual object for observation. Taking the second virtual object riding on the first virtual object as an example, it can be found that most of the skeletons can basically be driven by the pelvis to drive the entire skeleton. Since the first virtual object drives the second virtual object, a "Ride" slot can be added to the pelvis bone. The operation steps are as follows: Click on "Bip001" (the pelvis bone), select "Add Slot" in the pop-up shortcut menu, and rename it to "Ride". This step is to create a "Ride" slot for the bone mesh component of the second virtual object to be mounted on the "Ride" slot to move along with the pelvis bone of the first virtual object.

[0180] 9.3 Continue to observe the motion animation of the first virtual object and add slots to the appropriate bones, such as: "Socket_Head", "Socket_Hand_L", "Socket_Hand_R", "Socket_Foot_L", "Socket_Foot_R". This step is to add slots to an appropriate bone of the first virtual object. For example, if the positions of these slots correspond to the movements of the limbs and head of the second virtual object, these slots will move along with a certain bone of the first virtual object, so the limbs and head of the second virtual object will also move along with these bones of the first virtual object.

[0181] It should be noted that it is not limited to 3dsmax and UE4 engines. Other DCC software or engines that can produce animations and implement mounting interaction logic are also acceptable; FullBodyIK is a collection of IK algorithms, and as long as the mounting interaction can be achieved using the IK algorithm, it is also acceptable.

[0182] Applying the above embodiments of the present application, 1) The second virtual object only needs to produce one animation asset, and the production cost is very low; 2) Each first virtual object can independently debug parameters such as the movement speed and turning speed, so that each first virtual object has independent movement characteristics; 3) When applied to a virtual scene (such as a game), it has extremely deep extensibility, bringing more possibilities for designing the effect of the second virtual object and the first virtual object walking together (such as the second virtual object riding on the first virtual object, the second virtual object lying prone on the first virtual object); 4) If a new first virtual object needs to be added for mounting, only the position and movement parameters of the slot need to be debugged, saving production costs; 5) Using FullBodyIK enables the limbs, head, etc. of the second virtual object to interact with the first virtual object, making the mounting animation effect closer to reality; 6) The mounting posture supports personalized customization, and only the position of the slot needs to be debugged.

[0183] Next, continue to describe the exemplary structure of the animation processing device 555 provided by the embodiments of the present application as software modules. In some embodiments, such asFigure 2 As shown, the software modules stored in the animation processing device 555 of the memory 550 may include: an acquisition module 5551, configured to acquire a first animation file of a first virtual object and a second animation file of a second virtual object; an extraction module 5552, configured to extract a first object skeleton of the first virtual object from the first animation file, and extract a second object skeleton of the second virtual object from the second animation file; an addition module 5553, configured to add a bone slot to a first bone of the first object skeleton; a mounting module 5554, configured to mount a second bone of the second object skeleton to the bone slot; and a playback module 5555, configured to, when playing a mounting animation file in which the second virtual object is mounted on the first virtual object, control the second bone to move following the first bone based on the bone slot, so that an object part of the second virtual object to which the second bone is bound moves following an object part of the first virtual object to which the first bone is bound.

[0184] In some embodiments, the acquisition module 5551 is further configured to acquire a first standby animation file and a motion animation file of the first virtual object, and use the first standby animation file and the motion animation file as the first animation file; acquire a second standby animation file of the second virtual object, and use the second standby animation file as the second animation file; wherein the second virtual object in the second standby animation file is in a target pose, and the target pose is the pose adopted when the second virtual object is mounted on the first virtual object.

[0185] In some embodiments, the addition module 5553 is further configured to add a first bone slot to a first sub-bone of the first object skeleton, where the first bone slot indicates a direct mounting position of the second virtual object relative to the first virtual object; add a second bone slot to a second sub-bone of the first object skeleton, where the second bone slot indicates an indirect mounting position of the second virtual object relative to the first virtual object, and the second bone slot is used to constrain the movement of a target bone in the second bone; wherein the first bone includes the first sub-bone and the second sub-bone, and the bone slots include the first bone slot and the second bone slot.

[0186] In some embodiments, the mounting module 5554 is further configured to create a mounting animation blueprint of the mounting animation file, create a first animation blueprint of the first virtual object, and create a second animation blueprint of the second virtual object before mounting the second bone of the second object skeleton to the bone slot; add a first bone mesh and a second bone mesh to the mounting animation blueprint, where the first bone mesh and the second bone mesh have a hierarchical relationship, and the first bone mesh is the parent of the second bone mesh; obtain a first object model of the first virtual object, and place the first object model and the first animation blueprint on the first bone mesh to obtain a third bone mesh; obtain a second object model of the second virtual object, and place the second object model and the second animation blueprint on the second bone mesh to obtain a fourth bone mesh.

[0187] In some embodiments, the third bone mesh includes the first object skeleton, and the fourth bone mesh includes the second object skeleton; the mounting module 5554 is further configured to create blueprint nodes in the mounting animation blueprint, where the blueprint nodes include a first pin indicating the mounted object, a second pin indicating the object to be mounted, and a slot pin; control the third bone mesh to connect to the first pin, control the fourth bone mesh to connect to the second pin, and control the slot pin to indicate the bone slot, so as to mount the second bone of the second object skeleton to the bone slot.

[0188] In some embodiments, the mounting module 5554 is further configured to create a first animation blueprint file of the first virtual object based on the first object skeleton; in response to a file opening operation on the first animation blueprint file, display a blueprint editing interface of the first animation blueprint file; based on the blueprint editing interface, receive first editing information for an event graph in the first animation blueprint file and second editing information for an animation graph in the first animation blueprint file; generate the first animation blueprint based on the first editing information and the second editing information.

[0189] In some embodiments, the mounting module 5554 is further configured to create a second animation blueprint file of the second virtual object based on the second object skeleton; in response to a file opening operation on the second animation blueprint file, display a blueprint editing interface of the second animation blueprint file; based on the blueprint editing interface, receive third editing information for an event graph in the second animation blueprint file and fourth editing information for an animation graph in the second animation blueprint file; generate the second animation blueprint based on the third editing information and the fourth editing information.

[0190] In some embodiments, the playback module 5555 is further configured to obtain the rotation information and displacement information of the bone slot; based on the rotation information and displacement information, determine the bone rotation angle of the second bone; and based on the bone rotation angle, adjust the bone position and bone direction of the second bone to control the second bone to move following the first bone.

[0191] In some embodiments, the playback module 5555 is further configured to obtain the rotation information and displacement information of the bone slot; based on the rotation information and displacement information, determine the bone point positions of each bone point on the second bone in an inverse kinematics manner; and based on the positions of each bone point on the second bone, adjust the bone position of the second bone to control the second bone to move following the first bone.

[0192] In some embodiments, the second virtual object in the mounted animation file is mounted on the first virtual object in a first mounting posture; the mounting module 5554 is further configured to receive a mounting posture adjustment instruction, where the mounting posture adjustment instruction includes at least one of the following instructions: a first instruction to adjust the bone slot from the first bone to the third bone of the first object skeleton, and a second instruction to adjust the second bone to the fourth bone of the second object skeleton; and in response to the mounting posture adjustment instruction, control the second virtual object to be mounted on the first virtual object in a second mounting posture, where the second mounting posture is different from the first mounting posture.

[0193] In some embodiments, when the mounting posture adjustment instruction is the first instruction, in response to the mounting posture adjustment instruction, the mounting module 5554 adjusts the bone slot from the first bone to the third bone; and by mounting the second bone on the bone slot located at the third bone, controls the second virtual object to be mounted on the first virtual object in a second mounting posture; when the mounting posture adjustment instruction is the second instruction, in response to the mounting posture adjustment instruction, controls the second virtual object to be mounted on the first virtual object in a second mounting posture by mounting the fourth bone on the bone slot; and when the mounting posture adjustment instruction includes the first instruction and the second instruction, in response to the mounting posture adjustment instruction, adjusts the bone slot from the first bone to the third bone; and by mounting the fourth bone on the bone slot located at the third bone, controls the second virtual object to be mounted on the first virtual object in a second mounting posture.

[0194] In some embodiments, the adding module 5553 is further configured to obtain the motion posture of the first virtual object before adding a bone slot to a first bone of the first object skeleton; based on the motion posture, determine the first bone in the first object skeleton where the bone slot is to be added, and determine the second bone in the second object skeleton to be mounted to the bone slot; the mounting module 5554 is further configured to mount the second bone of the second object skeleton to the bone slot, so that the second virtual object is mounted to the first virtual object in a mounting posture adapted to the motion posture.

[0195] It should be noted that the description of the device embodiments in this application book is similar to the description of the above method embodiments, and has similar beneficial effects to the method embodiments, which will not be elaborated here. For the technical details not covered in the animation processing device provided in the embodiments of this application, they can be understood based on the description of the technical details in the above method embodiments.

[0196] The embodiments of this application also provide a computer program product, which includes computer-executable instructions or a computer program. The computer-executable instructions or the computer program are stored in a computer-readable storage medium. The processor of the electronic device reads the computer-executable instructions or the computer program from the computer-readable storage medium, and the processor executes the computer-executable instructions or the computer program, so that the electronic device executes the animation processing method provided in the embodiments of this application.

[0197] The embodiments of this application also provide a computer-readable storage medium, in which computer-executable instructions or a computer program are stored. When the computer-executable instructions or the computer program are executed by a processor, the processor will be caused to execute the animation processing method provided in the embodiments of this application.

[0198] In some embodiments, the computer-readable storage medium may be a memory such as RAM, ROM, flash memory, magnetic surface memory, optical disc, or CD-ROM; it may also be various devices including one or any combination of the above memories.

[0199] In some embodiments, the computer-executable instructions may be in the form of a program, software, software module, script, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including being deployed as an independent program or being deployed as a module, component, subroutine, or other unit suitable for use in a computing environment.

[0200] By way of example, the computer-executable instructions may or may not correspond to a file in a file system, and may be stored as part of a file that holds other programs or data, for example, in one or more scripts in a Hyper Text Markup Language (HTML) document, in a single file dedicated to the program being discussed, or in multiple cooperating files (such as files that store one or more modules, subroutines, or portions of code).

[0201] By way of example, the computer-executable instructions may be deployed to execute on one electronic device, or on multiple electronic devices located at one site, or alternatively, on multiple electronic devices distributed across multiple sites and interconnected by a communication network.

[0202] As described above, the foregoing are only embodiments of the present application and are not intended to limit the protection scope of the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and scope of the present application are all included within the protection scope of the present application.

Claims

1. An animation processing method, characterized in that, The method includes: Displaying a first virtual object and a second virtual object included in a mounting animation file, wherein the second virtual object is mounted on a bone slot of a first bone of the first virtual object through a second bone of the second virtual object; In response to the first virtual object moving, based on the bone slot, controlling the second bone to move following the first bone, so that an object part of the second virtual object bound to the second bone moves following an object part of the first virtual object bound to the first bone.

2. The method according to claim 1, wherein The displaying the first virtual object and the second virtual object included in the mounting animation file includes: Displaying the first virtual object in a first motion posture, and displaying the second virtual object mounted on the first virtual object in a first mounting posture, where the first mounting posture is adapted to the first motion posture; The method further includes: In response to the motion posture of the first virtual object switching from the first motion posture to a second motion posture, switching the mounting posture of the second virtual object from the first mounting posture to a second mounting posture, where the second mounting posture is adapted to the second motion posture, and the second motion posture is different from the first motion posture.

3. The method according to claim 1, wherein Before the displaying the first virtual object and the second virtual object included in the mounting animation file, the method further includes: Obtaining a first animation file of the first virtual object and a second animation file of the second virtual object; Extracting a first object skeleton of the first virtual object from the first animation file, and extracting a second object skeleton of the second virtual object from the second animation file; Adding the bone slot to a first bone of the first object skeleton; Mounting a second bone of the second object skeleton to the bone slot, so that the second bone can move following the first bone based on the bone slot.

4. The method according to claim 3, characterized in that, The obtaining the first animation file of the first virtual object and the second animation file of the second virtual object includes: Obtaining a first standby animation file and a motion animation file of the first virtual object, and using the first standby animation file and the motion animation file as the first animation file; Obtaining a second standby animation file of the second virtual object, and using the second standby animation file as the second animation file; Wherein, the second virtual object in the second standby animation file is in a target posture, and the target posture is the posture adopted when the second virtual object is mounted on the first virtual object.

5. The method according to claim 3, wherein The adding the bone slot to the first bone of the first object skeleton includes: Adding a first bone slot to a first sub-bone of the first object skeleton, where the first bone slot indicates a direct mounting position of the second virtual object relative to the first virtual object; Adding a second bone slot to a second sub-bone of the first object skeleton, where the second bone slot indicates an indirect mounting position of the second virtual object relative to the first virtual object, and the second bone slot is used to constrain the motion of a target bone in the second bone. Among them, the first bone includes the first sub-bone and the second sub-bone, and the bone slot includes the first bone slot and the second bone slot.

6. The method according to claim 3, characterized in that, Before mounting the second bone of the second object skeleton to the bone slot, the method further includes: Creating a mounting animation blueprint for the mounting animation file, creating a first animation blueprint for the first virtual object, and creating a second animation blueprint for the second virtual object; Adding a first bone mesh and a second bone mesh to the mounting animation blueprint, where the first bone mesh and the second bone mesh have a hierarchical relationship, and the first bone mesh is the parent of the second bone mesh; Obtaining a first object model of the first virtual object, and placing the first object model and the first animation blueprint on the first bone mesh to obtain a third bone mesh; Obtaining a second object model of the second virtual object, and placing the second object model and the second animation blueprint on the second bone mesh to obtain a fourth bone mesh.

7. The method according to claim 6, characterized in that, The third bone mesh includes the first object skeleton, and the fourth bone mesh includes the second object skeleton; The mounting of the second bone of the second object skeleton to the bone slot includes: Creating a blueprint node in the mounting animation blueprint, where the blueprint node includes a first pin indicating the mounted object, a second pin indicating the object to be mounted, and a slot pin; Controlling the third bone mesh to connect to the first pin, controlling the fourth bone mesh to connect to the second pin, and controlling the slot pin to indicate the bone slot, so as to mount the second bone of the second object skeleton to the bone slot.

8. The method according to claim 6, wherein The creating of the first animation blueprint for the first virtual object includes: Creating a first animation blueprint file for the first virtual object based on the first object skeleton; In response to a file opening operation on the first animation blueprint file, displaying a blueprint editing interface for the first animation blueprint file; Based on the blueprint editing interface, receiving first editing information for an event graph in the first animation blueprint file and second editing information for an animation graph in the first animation blueprint file; Generating the first animation blueprint based on the first editing information and the second editing information.

9. The method according to claim 6, wherein The creating of the second animation blueprint for the second virtual object includes: Creating a second animation blueprint file for the second virtual object based on the second object skeleton; In response to a file opening operation on the second animation blueprint file, displaying a blueprint editing interface for the second animation blueprint file; Based on the blueprint editing interface, receiving third editing information for an event graph in the second animation blueprint file and fourth editing information for an animation graph in the second animation blueprint file; Generating the second animation blueprint based on the third editing information and the fourth editing information.

10. The method according to claim 3, wherein In the mounting animation file, the second virtual object is mounted on the first virtual object in a first mounting posture; The method further includes: A mounting pose adjustment instruction is received, and the mounting pose adjustment instruction includes at least one of the following instructions: a first instruction to adjust the bone slot from the first bone to the third bone of the first object skeleton, and a second instruction to adjust the second bone to the fourth bone of the second object skeleton; In response to the mounting pose adjustment instruction, control the second virtual object to be mounted on the first virtual object in a second mounting pose, where the second mounting pose is different from the first mounting pose.

11. The method according to claim 10, wherein When the mounting pose adjustment instruction is the first instruction, the controlling the second virtual object to be mounted on the first virtual object in a second mounting pose in response to the mounting pose adjustment instruction includes: In response to the mounting pose adjustment instruction, adjust the bone slot from the first bone to the third bone; control the second virtual object to be mounted on the first virtual object in a second mounting pose by mounting the second bone to the bone slot located at the third bone; When the mounting pose adjustment instruction is the second instruction, the controlling the second virtual object to be mounted on the first virtual object in a second mounting pose in response to the mounting pose adjustment instruction includes: In response to the mounting pose adjustment instruction, control the second virtual object to be mounted on the first virtual object in a second mounting pose by mounting the fourth bone to the bone slot; When the mounting pose adjustment instruction includes the first instruction and the second instruction, the controlling the second virtual object to be mounted on the first virtual object in a second mounting pose in response to the mounting pose adjustment instruction includes: In response to the mounting pose adjustment instruction, adjust the bone slot from the first bone to the third bone; control the second virtual object to be mounted on the first virtual object in a second mounting pose by mounting the fourth bone to the bone slot located at the third bone.

12. The method according to claim 3, wherein Before adding the bone slot on the first bone of the first object skeleton, the method further includes: Obtain the motion pose of the first virtual object; Based on the motion pose, determine the first bone in the first object skeleton where the bone slot is to be added, and determine the second bone in the second object skeleton to be mounted to the bone slot; The mounting the second bone of the second object skeleton to the bone slot includes: Mount the second bone of the second object skeleton to the bone slot so that the second virtual object is mounted on the first virtual object in a mounting pose adapted to the motion pose.

13. The method according to claim 1, characterized in that The controlling the second bone to follow the first bone to move based on the bone slot includes: Obtain the rotation information and displacement information of the bone slot; Based on the rotation information and displacement information, determine the bone rotation angle of the second bone; Based on the bone rotation angle, adjust the bone position and bone direction of the second bone to control the second bone to follow the first bone to move.

14. The method according to claim 1, characterized in that, The controlling the second bone to follow the first bone to move based on the bone slot includes: Obtain the rotation information and displacement information of the bone slot; Based on the rotation information and displacement information, determine the bone point positions of each bone point on the second bone by using inverse kinematics; Based on the positions of each bone point on the second bone, adjust the bone position of the second bone to control the second bone to move following the first bone.

15. An animation processing device, characterized in that, The device includes: A playing module, configured to display a first virtual object and a second virtual object included in a mounted animation file, wherein the second virtual object is mounted on a bone slot of a first bone of the first virtual object through a second bone of the second virtual object; and, in response to the movement of the first virtual object, control the second bone to move following the first bone based on the bone slot, so that an object part of the second virtual object bound to the second bone moves following an object part of the first virtual object bound to the first bone.

16. An electronic device, characterized in that, The electronic device includes: A memory, configured to store computer-executable instructions; A processor, configured to implement the animation processing method according to any one of claims 1 to 14 when executing the computer-executable instructions stored in the memory.

17. A computer-readable storage medium storing computer-executable instructions or a computer program, characterized in that, When the computer-executable instructions or computer program are executed by the processor, the animation processing method according to any one of claims 1 to 14 is implemented.

18. A computer program product, comprising computer-executable instructions or a computer program, characterized in that, When the computer-executable instructions or computer program are executed by the processor, the animation processing method according to any one of claims 1 to 14 is implemented.

Citation Information

Cited By

  • Performance optimization method based on UE5 modular role

    CN120953451A