Animation processing method, device, equipment, storage medium and program product
By adding bone slots between virtual objects and controlling the synchronized movement of the bones, the problems of poor animation effects and high costs of virtual object mounting were solved, thereby improving the animation effects and reducing the cost.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- TENCENT TECHNOLOGY (SHENZHEN) CO LTD
- Filing Date
- 2023-11-30
- Publication Date
- 2026-07-24
AI Technical Summary
In existing technologies, virtual object mounting animation effects are poor and production costs are high, making it impossible to achieve uniformity in animation logic and cost control for various mounting postures.
By extracting the skeletons of the first and second virtual objects, adding bone slots, and attaching the second bone to the slots, the second bone is controlled to follow the movement of the first bone, thus synchronizing the animation effects of the second virtual object with those of the first virtual object.
It improves the realism of animation effects and reduces animation production costs. Different poses can be achieved simply by adjusting the bone slots and mounting positions, without the need to create multiple animation assets and logic.
Smart Images

Figure CN119273817B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to an animation processing method, apparatus, device, storage medium, and program product. Background Technology
[0002] In film and television animation and virtual scenes (such as games), there is often a virtual object (i.e., the object being mounted) mounted on another virtual object (i.e., the carrier object) to achieve the animation effect of the two virtual objects moving together, such as one virtual object riding another virtual object. In related technologies, (1) different animation assets and animation logic are made separately for the carrier object and the object being mounted. 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 made for the carrier object and the object being mounted. However, this makes the mounting posture highly uniform and the animation effect is very poor. Summary of the Invention
[0003] This application provides an animation processing method, apparatus, electronic device, computer-readable storage medium, and computer program product, which can improve animation effects and reduce animation production costs.
[0004] The technical solution of this application embodiment is implemented as follows:
[0005] This application provides an animation processing method, including:
[0006] Obtain the first animation file of the first virtual object and the second animation file of the second virtual object;
[0007] 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;
[0008] Add a bone slot to the first bone of the first object skeleton;
[0009] The second bone of the second object skeleton is attached to the bone slot;
[0010] When playing the mounting animation file of the second virtual object attached to the first virtual object, based on the bone slot, the second bone is controlled to move with the first bone, so that the object part of the second virtual object bound to the second bone moves with the object part of the first virtual object bound to the first bone.
[0011] This application embodiment also provides an animation processing apparatus, including:
[0012] The acquisition module is used to acquire the first animation file of the first virtual object and the second animation file of the second virtual object;
[0013] The extraction module is used to extract the first object skeleton of the first virtual object from the first animation file, and to extract the second object skeleton of the second virtual object from the second animation file;
[0014] Add a module to add bone slots to the first bone of the first object skeleton;
[0015] A mounting module is used to mount the second bone of the second object skeleton to the bone slot;
[0016] The playback module is used to control the second bone to follow the first bone when playing the mounting animation file of the second virtual object mounted on the first virtual object, based on the bone slot, so that the object part of the second virtual object bound to the second bone moves with the object part of the first virtual object bound to the first bone.
[0017] This application also provides an electronic device, including:
[0018] Memory is used to store executable instructions for a computer;
[0019] The processor, when executing computer-executable instructions stored in the memory, implements the animation processing method provided in the embodiments of this application.
[0020] This application also provides a computer-readable storage medium storing computer-executable instructions or computer programs, which, when executed by a processor, implement the animation processing method provided in this application.
[0021] This application also provides a computer program product, including computer-executable instructions or a computer program, which, when executed by a processor, implements the animation processing method provided in this application.
[0022] The embodiments of this application have the following beneficial effects:
[0023] Applying the above embodiments of this application, firstly, a first animation file of the first virtual object and a second animation file of the second virtual object are obtained; then, the first object skeleton of the first virtual object is extracted from the first animation file, and the second object skeleton of the second virtual object is extracted from the second animation file; then, a bone slot is added to the first bone of the first object skeleton, and the second bone of the second object skeleton is attached to the bone slot; thus, when the mounting animation file of the second virtual object attached to the first virtual object is played, the second bone is controlled to move with the first bone based on the bone slot, so that the object part of the second virtual object bound to the second bone moves with the object part of the first virtual object bound to the first bone.
[0024] Here, (1) the second bone of the second virtual object is based on the bone slot and can move with the first bone of the first virtual object, so that the object part of the second virtual object bound to the second bone moves with the object part of 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 and moving process, 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 with it by adding bone slots, it is only necessary to adjust the addition position (first bone) or mounting position (second bone) of the bone slots to achieve different postures of mounting through bone slots. There is no need to create animation assets and animation logic for different mounting postures, which reduces the animation production cost. Attached Figure Description
[0025] Figure 1 This is a schematic diagram of the architecture of the animation processing system provided in the embodiments of this application;
[0026] Figure 2 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application;
[0027] Figure 3 This is a flowchart illustrating the animation processing method provided in an embodiment of this application;
[0028] Figures 4A-4C This is a schematic diagram showing the mounting of animation files provided in an embodiment of this application;
[0029] Figure 5 This is a flowchart illustrating the animation processing method provided in an embodiment of this application;
[0030] Figure 6 This is a schematic diagram of the second object skeleton of the second virtual object provided in the embodiments of this application;
[0031] Figures 7A-7B This is a schematic diagram of the creation process of the mounting animation blueprint provided in the embodiments of this application;
[0032] Figures 8A-8G This is a schematic diagram of the creation process of the second animation blueprint provided in the embodiments of this application;
[0033] Figures 9A-9E This is a schematic diagram of the creation process of the second animation blueprint provided in the embodiments of this application;
[0034] Figures 10A-10D This is a schematic diagram of the creation process of the first animation blueprint provided in the embodiments of this application;
[0035] Figures 11A-11C This is a schematic diagram illustrating the creation process of the mounting animation blueprint provided in this application embodiment. Detailed Implementation
[0036] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0037] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0038] In the following description, the terms "first, second, third" are used merely to distinguish similar objects and do not represent a specific ordering of objects. It is understood that "first, second, third" may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.
[0039] In this application embodiment, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.
[0040] Unless otherwise defined, all technical and scientific terms used in the embodiments of this application have the same meaning as commonly understood by one of ordinary skill in the art. The terminology used in the embodiments of this application is for the purpose of describing the embodiments of this application only and is not intended to limit this application.
[0041] Before providing a further detailed description of the embodiments of this application, the nouns and terms involved in the embodiments of this application will be explained, and the nouns and terms involved in the embodiments of this application shall be interpreted as follows.
[0042] 1) Client: An application running in the terminal that provides various services, such as a client that supports animation processing.
[0043] 2) Responding to: used to indicate the conditions or states on which the operation is performed. When the conditions or states on which the operation is performed are met, one or more operations may be performed in real time or with a set delay. Unless otherwise specified, there is no restriction on the order in which the multiple operations are performed.
[0044] 3) Riding: refers to the purpose of enhancing one's own mobility by riding on a vehicle, animal or other carrier.
[0045] 4) Digital Content Creation (DCC) software: A general term for software used in the production of animated characters, including 3D Studio Max, Maya, Blender, Houdini, etc. Among them, 3D Studio Max (abbreviated as 3ds Max or 3ds MAX) is a computer-based 3D animation rendering and production software.
[0046] 5) Skeleton: Contains bones and joints. Bones are coordinate spaces, and the bone hierarchy consists of nested coordinate spaces. Joints describe the position of a bone (i.e., the position of the bone at the origin of the bone's coordinate space) within its parent space. Rotation about a joint refers to the rotation of the bone's coordinate space (including all its subspaces) itself.
[0047] 6) Skeletal animation: Each animated character contains at least two main types of data: bones and models. In the production of game / film animation, the process of using the posture of the bones to drive the model (changing the appearance of the character model) is called skeletal animation.
[0048] 7) Skinning: This refers to attaching (binding) vertices in a model (mesh) to bones, and each vertex can be controlled by multiple bones. In this way, vertices at joints change position due to the simultaneous pulling of parent and child bones, thus eliminating cracks.
[0049] 8) Blueprint: A special type of resource in Unreal Engine (UE) that provides an intuitive, node-based interface for creating new types of Actors and level script events. It provides level designers and game developers with a tool to quickly create and iterate on game playability in the Unreal Editor without writing a single line of code.
[0050] 9) Animation Blueprint: Performs animation blending, directly controls the skeleton's bones, or sets the logic that will ultimately define the final animation pose of the skeletal mesh objects to be used for each frame of animation.
[0051] 10) Slot (i.e., bone slot): This is the name in Unreal Engine. It works similarly to a bone and can be added to a skeleton mesh to serve as a locator for attachment points of virtual props, effects, etc.
[0052] 11) ControlRig: An animation tool provided by Unreal Engine that allows users to equip and animate animated characters directly within Unreal Engine, known as "Control Rig". Using Control Rig bypasses the need for external tools for equipment and animation creation, allowing users to create animations directly within the Unreal Editor.
[0053] 12) Full Body Inverse Kinematics (FBIK): Utilizing the FBIK functionality within the Control Rig, this approach allows for the construction of highly controllable and flexible rigs. The overall solver method is built upon a position-based IK framework, enabling faster rig performance, per-bone settings, preferred angles, compression, and stretching. FBIK is designed to act as a procedural adjustment tool within the Control Rig, such as for ground alignment or arm extension behavior.
[0054] Based on the foregoing description of the nouns and terms used 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, apparatus, electronic device, computer-readable storage medium, and computer program product, which can improve animation effects and reduce animation production costs.
[0055] It should be noted that the data collection and processing described in this application should be strictly in accordance with the requirements of relevant laws and regulations, obtaining the informed consent or separate consent of the personal information subject, and conducting subsequent data use and processing within the scope of laws and regulations and the authorization of the personal information subject.
[0056] The animation processing system provided in the embodiments of this application is described below. See also Figure 1 , Figure 1This is a schematic diagram of the architecture of the animation processing system provided in this application embodiment. To support an exemplary application, the animation processing system 100 includes: a server 200, a network 300, and a terminal 400. The terminal 400 is connected to the server 200 via the network 300, which can be a wide area network (WAN), a local area network (LAN), or a combination of both, using wireless or wired links for data transmission.
[0057] Here, terminal 400 (e.g., running a client that supports animation processing) responds to an animation processing instruction by sending an animation acquisition request to server 200. This animation acquisition request instructs the acquisition of a first animation file for a first virtual object and a second animation file for a second virtual object. Server 200 receives the animation acquisition request sent by terminal 400. In response to the animation acquisition request, server 200 returns the first animation file for the first virtual object and the second animation file for the second virtual object to terminal 400. Terminal 400 receives the first animation file for the first virtual object and the second animation file for the second virtual object returned by server 200. From the first animation file, it extracts the first object skeleton of the first virtual object and from the second animation file, it extracts the second object skeleton of the second virtual object. It adds a bone slot to the first bone of the first object skeleton. It attaches the second bone of the second object skeleton to the bone slot. When playing the mounting animation file of the second virtual object attached to the first virtual object, based on the bone slot, it controls the second bone to move with the first bone, so that the object part of the second virtual object bound to the second bone moves with the object part of the first virtual object bound to the first bone. This allows the first and second virtual objects to interact, making the animation effect of the second virtual object being attached to the first virtual object and moving more realistic.
[0058] In some embodiments, the animation processing method provided in this application is implemented by an electronic device. For example, it can be implemented by a terminal alone, by a server alone, or by a terminal and a server working together. This application can be applied to various scenarios, including but not limited to cloud technology, artificial intelligence, smart transportation, assisted driving, video, instant messaging, games, and the metaverse.
[0059] In some embodiments, the electronic device implementing the animation processing method provided in this application can be various types of terminals or servers. The server (e.g., server 200) can be a standalone physical server, a server cluster consisting of multiple physical servers, or a distributed system. The terminal (e.g., terminal 400) can be a laptop, tablet, desktop computer, smartphone, smart voice interaction device (e.g., smart speaker), smart home appliance (e.g., smart TV), smartwatch, in-vehicle terminal, wearable device, virtual reality (VR) device, aircraft, etc., but is not limited thereto. The terminal and server can be directly or indirectly connected via wired or wireless communication, and this application does not impose any limitations on this.
[0060] In some embodiments, the animation processing method provided in this application can be implemented using artificial intelligence (AI). Artificial intelligence is a comprehensive technology in computer science that studies the design principles and implementation methods of various intelligent machines, enabling them to possess perception, reasoning, and decision-making functions. AI technology is researched and applied in multiple fields, such as AI-generated content (AIGC) and game AI. In this application embodiment, the aforementioned 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 aforementioned animation file can also be automatically generated based on artificial intelligence.
[0061] In some embodiments, the animation processing method provided in this application can be implemented using 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 local area network to realize data computation, storage, processing, and sharing. Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, and application technology applied based on the cloud computing business model. It can form a resource pool, be used on demand, and is flexible and convenient. Cloud computing technology will become an important support. The backend services of the technology network system require a large amount of computing and storage resources. As an example, the server (e.g., 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 communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms.
[0062] In some embodiments, the terminal or server can implement the animation processing method provided in this application by running various computer-executable instructions or computer programs. For example, computer-executable instructions can be microprogram-level commands, machine instructions, or software instructions. Computer programs can be native programs or software modules in an operating system; they can be native applications (APPs), i.e., programs that need to be installed in the operating system to run; or they can be applets that can be embedded in any APP, i.e., programs that only need to be downloaded to a browser environment to run. In summary, the aforementioned computer-executable instructions can be any form of instruction, and the aforementioned computer programs can be any form of application, module, or plugin.
[0063] The following describes an electronic device implementing the animation processing method provided in an embodiment of this application. See also... Figure 2 , Figure 2 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device 500 provided in this embodiment can be a terminal or a server. Figure 2 As shown, electronic device 500 includes at least one processor 510, memory 550, at least one network interface 520, and user interface 530. The various components in electronic device 500 are coupled together via a bus system 540. It is understood that the bus system 540 is used to implement communication between these components. In addition to a data bus, the bus system 540 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in… Figure 2 The general labeled all buses as Bus System 540.
[0064] The processor 510 can 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. The general-purpose processor can be a microprocessor or any conventional processor, etc.
[0065] User interface 530 includes one or more output devices 531 that enable the presentation of media content, including one or more speakers and / or one or more visual displays. User interface 530 also includes one or more input devices 532, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.
[0066] Memory 550 may be removable, non-removable, or a combination thereof. Memory 550 may include one or more storage devices physically located away from processor 510. Memory 550 may include volatile memory or non-volatile memory, or both. Non-volatile memory may be read-only memory (ROM), and volatile memory may be random access memory (RAM). The memory 550 described in this application embodiment is intended to include any suitable type of memory.
[0067] In some embodiments, memory 550 is capable of storing data to support various operations, examples of which include programs, modules, and data structures or subsets or supersets thereof, as illustrated below.
[0068] Operating system 551 includes system programs for handling various basic system services and performing hardware-related tasks, such as the framework layer, core library layer, driver layer, etc., for implementing various basic business functions and handling hardware-based tasks;
[0069] 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 including: Bluetooth, WiFi, and Universal Serial Bus (USB), etc.
[0070] Presentation module 553 is configured to enable the presentation of information (e.g., a user interface for operating peripheral devices and displaying content and information) via one or more output devices 531 (e.g., a display screen, a speaker, etc.) associated with user interface 530;
[0071] The input processing module 554 is used to detect and translate one or more user inputs or interactions from one or more input devices 532.
[0072] In some embodiments, the animation processing apparatus provided in this application can be implemented in software. Figure 2 An animation processing device 555 stored in memory 550 is shown. It can be software in the form of programs and plug-ins, including the following software modules: acquisition module 5551, extraction module 5552, addition module 5553, mounting module 5554, and playback module 5555. These modules are logical and can therefore be arbitrarily combined or further split according to the functions they implement. The functions of each module will be described below.
[0073] The animation processing method provided in the embodiments of this application is described below. As mentioned above, the animation processing method provided in the embodiments of this application is implemented by an electronic device, such as a server or terminal alone, or a server and terminal working together. Therefore, the executing entity of each step will not be described again below. See Figure 3 , Figure 3 This is a flowchart illustrating the animation processing method provided in this application embodiment. The animation processing method provided in this application embodiment includes:
[0074] Step 101: Obtain the first animation file of the first virtual object and the second animation file of the second virtual object.
[0075] In step 101, in practical applications, a user can trigger an animation processing command on an electronic device. The electronic device then responds to the command by acquiring a first animation file for the first virtual object and a second animation file for the second virtual object. These first and second animation files can be pre-made and imported into a client that supports animation processing when needed.
[0076] 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: obtaining the first standby animation file and the 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 the 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 a target pose, and the target pose is the pose adopted by the second virtual object when it is attached to the first virtual object.
[0077] Here, the first animation file of the first virtual object includes a first idle animation file and a motion animation file. The first idle animation file is a pre-made animation file of the first virtual object in a specific posture (e.g., standing still), including at least one animation frame (at least one animation frame forms an animation sequence). The motion animation file is a pre-made animation file showcasing the movement of the first virtual object (e.g., 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 idle animation file of the second virtual object. This second idle animation file is a pre-made animation file of the second virtual object in a target posture, including at least one animation frame (at least one animation frame forms an animation sequence); wherein, the target posture can be the posture adopted by the second virtual object when it is attached to the first virtual object, such as riding on the first virtual object, lying on the first virtual object, etc., thus facilitating the attachment of the second virtual object to the first virtual object. It should be noted that the first animation file and the second animation file can be combined into a mounted animation file (that is, the first animation file and the second animation file can be obtained from the mounted animation file). In this mounted animation file, the second virtual object is mounted on the first virtual object, and the second virtual object moves with the first virtual object. Through the bone slot added by the embodiment of this application, when the second virtual object moves with the first virtual object, the second bone of the second virtual object moves with the first bone of the first virtual object.
[0078] 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.
[0079] In step 102, after obtaining the first animation file and the second animation file, the first animation file and the second animation file are parsed respectively, thereby extracting the first object skeleton of the first virtual object from the first animation file, and the second object skeleton of the second virtual object from the second animation file. Here, the first object skeleton includes multiple bones and bone joints between the bones, and the second object skeleton also includes multiple bones and bone joints between the bones.
[0080] In practical applications, the first animation file includes not only the skeleton of the first object, but also the animation sequence and skeletal mesh of the first virtual object (which can also be understood as the 3D object model of the first virtual object). Similarly, the second animation file includes not only the skeleton of the second object, but also the animation sequence and skeletal mesh of the second virtual object (which can also be understood as the 3D object model of the second virtual object).
[0081] Step 103: Add a bone slot to the first bone of the first object skeleton.
[0082] In step 103, for the extracted first object skeleton of the first virtual object, a first bone to which a bone slot is to be added is determined from the first object skeleton. Here, the first bone can be any bone in the first object skeleton that is pre-set according to the animation requirements of the mounted animation file, such as the pelvic bone, shoulder bone, etc. of the first object skeleton. After determining the first bone to which the bone slot is to be added, a bone slot is added to the first bone. This bone slot is used to mount the second bone of the second object skeleton of the second virtual object.
[0083] In some embodiments, a bone slot can be added to a first bone of a first object skeleton by performing the following steps: adding a first bone slot to a first sub-bone of the first object skeleton, the first bone slot indicating the 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, the second bone slot indicating the indirect mounting position of the second virtual object relative to the first virtual object, the second bone slot being used to constrain the movement of the target bone in the second bone; wherein, the first bone includes a first sub-bone and a second sub-bone, and the bone slot includes a first bone slot and a second bone slot.
[0084] Here, a first bone slot is first added to the first sub-bone of the first object's 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, which is the direct contact position between the two virtual objects. 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 will be different. Continuing, a second bone slot is added to the second sub-bone of the first object's 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 is not in direct contact with the first virtual object at the position of this second bone slot. However, the second sub-bone of the first virtual object can constrain the movement of the target bone in the second virtual object through the second bone slot, so that the target bone of the second virtual object moves with the second sub-bone of the first virtual object. In this way, the second virtual object can be attached to the first virtual object through the first bone slot, and the bones of the second virtual object directly attached to the first bone slot can move with the first sub-bone; the bones of the second virtual object that are not in direct contact with the first virtual object can also move with the bones of the first virtual object through the second bone slot; thus, the first and second virtual objects can interact at both direct contact and indirect contact positions (e.g., the direct contact position "pelvic bone position", the indirect contact position "limbs and head"), making the animation effect of attachment and movement more realistic.
[0085] Step 104: Attach the second bone of the second object skeleton to the bone slot.
[0086] In step 104, after adding a bone slot to the first bone of the first object skeleton, the second bone of the second object skeleton can be mounted onto the bone slot, thereby making the second virtual object mounted onto the first virtual object. This second bone can be any bone in the second object skeleton pre-set according to the animation requirements of the mounting animation file, such as the head bone, hip bone, limb bones, etc. of the second object skeleton. The mounting animation file indicating that the second virtual object is mounted onto the first virtual object indicates that the second virtual object is mounted onto the first virtual object, and the second virtual object moves with the first virtual object. It can be understood that when the second virtual object moves with the first virtual object, the second bone of the second virtual object moves with the first bone of the first virtual object through the bone slot.
[0087] In some embodiments, before mounting the second bone of the second object skeleton to the bone slot, the following steps are 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, wherein 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 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.
[0088] Here, we first create 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. Then, we add a first skeletal mesh corresponding to the first virtual object and a second skeletal mesh corresponding to the second virtual object to the mounting animation blueprints. The first skeletal mesh is used for displaying the first virtual object, and the second skeletal mesh is used for displaying the second virtual object. The first and second skeletal meshes have a hierarchical relationship, with the first skeletal mesh being the parent of the second skeletal mesh and the second skeletal mesh being the child of the first skeletal mesh; this ensures that the second virtual object is mounted on the first virtual object. Next, we obtain the first object model of the first virtual object and the second object model of the second virtual object. The first object model can be a 3D object model of the first virtual object, obtained by skinning the skeleton of the first object; the second object model can also be a 3D object model of the second virtual object, obtained by skinning the skeleton of the second object. Finally, the first object model and the first animation blueprint are placed in the first skeletal mesh to display the first virtual object, resulting in the third skeletal mesh; and the second object model and the second animation blueprint are placed in the second skeletal mesh to display the second virtual object, resulting in the fourth skeletal mesh.
[0089] In some embodiments, the third bone mesh includes a first object skeleton, and the fourth bone mesh includes a second object skeleton; thus, the second bone of the second object skeleton can be mounted to a 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 mounted object, a second pin indicating the mounted object, 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.
[0090] Here, since the first object model is obtained by skinning the first object skeleton, the third bone mesh includes the first object skeleton; similarly, the second object model is obtained by skinning the second object skeleton, so the fourth bone mesh includes the second object skeleton. Based on this, after obtaining the third and fourth bone meshes, blueprint nodes can be created in the mounting animation blueprint. Here, the created blueprint node includes a first pin indicating the mounted object (i.e., the carrier), a second pin indicating the mounted object, and a slot pin; thus, the third bone mesh (corresponding to the first virtual object) can be controlled to connect to the first pin, the fourth bone mesh (corresponding to the second virtual object) can be controlled to connect to the second pin, and the slot pin can be controlled to indicate the bone slot (e.g., associating the slot pin with the slot name of the bone slot) to mount the second bone of the second object skeleton to the bone slot. In practical applications, an animation run control node can also be created in the mounted animation blueprint, and then the animation run control node can be connected to the blueprint node. This ensures that when the mounted animation blueprint is run by controlling the animation run control node, the second virtual object is mounted on the bone slot of the first virtual object. This allows the second bone to follow the first bone based on the bone slot, so that the part of the second virtual object that is bound to the second bone follows the part of the first virtual object that is bound to the first bone.
[0091] In some embodiments, the first virtual object can have multiple motion postures, such as walking on land, running, swimming, floating, flying, surfing, etc. Therefore, different mounting postures can be used to mount the second virtual object onto the first virtual object for different motion postures. Specifically, the motion posture of the first virtual object can be obtained first; based on the motion posture, the first bone in the skeleton of the first object to which a bone slot is to be added is determined, and the second bone in the skeleton of the second object to which it is to be mounted to the bone slot is determined. Here, the first and second bones determined for different motion postures of the first virtual object can be different. Therefore, when mounting the second virtual object onto the first virtual object, the mounting posture and the bone constraint method based on the bone slot can also be different. Based on this, by adding a bone slot to the first bone determined based on the motion posture and mounting the second bone determined based on the motion posture to the bone slot, the second virtual object can be mounted onto the first virtual object using a mounting posture that matches the motion posture. This increases the diversity of mounting postures in the mounting animation, making the mounting posture more suitable for the motion posture of the first virtual object, and the animation effect more realistic.
[0092] For example, in a virtual scene (such as a game scene), if a second virtual object is attached to a first virtual object using different attachment postures for different movement postures of the first virtual object, then during the switching of the first virtual object's movement posture in the virtual scene, the attachment posture will also switch accordingly based on the change in the first virtual object's movement posture. For instance, if the first virtual object switches from a first movement posture (such as running) to a second movement posture (such as swimming), then the second virtual object can be attached to the first virtual object using a different attachment posture, switching from the first attachment posture (such as riding) to the second attachment posture (such as lying down). The first attachment posture is adapted to the first movement posture; the first bone added to the bone slot and the second bone attached to the bone slot are both determined based on the first movement posture. Similarly, the second attachment posture is adapted to the second movement posture; the first bone added to the bone slot and the second bone attached to the bone slot are both determined based on the second movement posture. This improves the animation effects and the overall experience of the virtual scene.
[0093] Step 105: When playing the mounting animation file of the second virtual object attached to the first virtual object, based on the bone slot, control the second bone to follow the first bone to move, so that the object part of the second virtual object bound to the second bone moves with the object part of the first virtual object bound to the first bone.
[0094] In step 105, when playing the mounting animation file of the second virtual object attached to the first virtual object, the second bone of the second virtual object can be controlled to move along with the first bone of the first virtual object based on the bone slots. This allows the object portion of the second virtual object bound to the second bone to move along with the object portion of the first virtual object bound to the first bone. It should be noted that the object portion is obtained by binding the model vertices of the corresponding bones to the corresponding bones and then skinning them. Specifically, when the first bone includes a first sub-bone and a second sub-bone, and the first sub-bone has a first bone slot and the second sub-bone has a second bone slot, the first bone slot allows control to mount the second virtual object onto the first virtual object, and the bones of the second virtual object directly mounted to the first bone slot move along with the first sub-bone. The second bone slot allows control to move the bones of the second virtual object that are not in direct contact with the first virtual object, also following the bones of the first virtual object. This allows the first and second virtual objects to interact at both direct and indirect contact positions (e.g., the direct contact position "pelvic bone position," the indirect contact position "limbs and head"), making the mounting and movement animation more realistic.
[0095] In this way, the bone slot is added to the first bone of the first object skeleton, and the second bone of the second object skeleton is attached to the bone slot. 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 attachment position of the bone slot (i.e., which first bone of the first object skeleton to add to, and which second bone of the second object skeleton to use for attachment), different postures can be achieved through the bone slot. There is no need to create animation assets and animation logic for different attachment postures, which reduces the animation production cost.
[0096] In some embodiments, a first animation blueprint for a first virtual object can be created by performing the following steps: creating a first animation blueprint file for the first virtual object based on the first object skeleton; displaying a blueprint editing interface for the first animation blueprint file in response to a file open operation on the first animation blueprint file; receiving first editing information for an event graph and second editing information for an animation graph in the first animation blueprint file based on the blueprint editing interface; and generating the first animation blueprint based on the first and second editing information. 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 can be implemented using the relevant implementation method for S7 described below.
[0097] In some embodiments, a second animation blueprint for a second virtual object can be created by performing the following steps: creating a second animation blueprint file for the second virtual object based on the skeleton of the second object; displaying a blueprint editing interface for the second animation blueprint file in response to a file open operation on the second animation blueprint file; receiving third editing information for the event graph and fourth editing information for the animation graph in the second animation blueprint file based on the blueprint editing interface; and generating the second animation blueprint based on the third and fourth editing information. 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 can be implemented using the relevant implementation method for S6 described below.
[0098] In some embodiments, based on a bone slot, the second bone can be controlled to follow the movement of the first bone by performing the following steps: acquiring rotation and displacement information of the bone slot; determining the bone rotation angle of the second bone based on the rotation and displacement information; and adjusting the bone position and orientation of the second bone based on the bone rotation angle, thereby controlling the second bone to follow the movement of the first bone. Here, firstly, the rotation and displacement information of the bone slot are acquired, and then the bone rotation angle of the second bone is determined based on the rotation and displacement information. Based on the bone rotation angle, the bone position and orientation of the second bone are adjusted through bone transformation to achieve control of the second bone to follow the movement of the first bone.
[0099] In some embodiments, based on the bone slot, the second bone can be controlled to follow the movement of the first bone by performing the following steps: acquiring the rotation and displacement information of the bone slot; determining the bone point positions of each bone point on the second bone using inverse kinematics based on the rotation 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 movement of the first bone. Alternatively, the bone slot can be considered as a bone point, and the bone point positions of each bone point on the second bone associated with that bone point (i.e., the bone slot) can be determined using inverse kinematics principles (e.g., the FullbodyIK algorithm) based on the rotation and displacement information of the bone slot. This allows for the determination of the bone position of the second bone based on the bone point positions of each bone point on the second bone, thereby adjusting the position of the second bone to control its movement to follow the first bone.
[0100] In some embodiments, the second virtual object that mounts the animation file is mounted to the first virtual object using a first mounting posture; correspondingly, the following steps may also be performed: receiving a mounting posture adjustment instruction, the mounting posture adjustment instruction including 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 posture adjustment instruction, controlling the second virtual object to be mounted to the first virtual object using a second mounting posture, the second mounting posture being different from the first mounting posture.
[0101] Specifically, (1) when the mounting posture adjustment command is the first command, in response to the mounting posture adjustment command, 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 to the first virtual object in the second mounting posture; (2) when the mounting posture adjustment command is the second command, in response to the mounting posture adjustment command, by mounting the fourth bone to the bone slot, the second virtual object is controlled to be mounted to the first virtual object in the second mounting posture; (3) when the mounting posture adjustment command includes the first command and the second command, in response to the mounting posture adjustment command, 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 to the first virtual object in the second mounting posture.
[0102] Applying the above embodiments of this application, firstly, a first animation file of the first virtual object and a second animation file of the second virtual object are obtained; then, the first object skeleton of the first virtual object is extracted from the first animation file, and the second object skeleton of the second virtual object is extracted from the second animation file; then, a bone slot is added to the first bone of the first object skeleton, and the second bone of the second object skeleton is attached to the bone slot; thus, when the mounting animation file of the second virtual object attached to the first virtual object is played, the second bone is controlled to move with the first bone based on the bone slot, so that the object part of the second virtual object bound to the second bone moves with the object part of the first virtual object bound to the first bone.
[0103] Here, (1) the second bone of the second virtual object is based on the bone slot and can move with the first bone of the first virtual object, so that the object part of the second virtual object bound to the second bone moves with the object part of 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 and moving process, 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 with it by adding bone slots, it is only necessary to adjust the addition position (first bone) or mounting position (second bone) of the bone slots to achieve different postures of mounting through bone slots. There is no need to create animation assets and animation logic for different mounting postures, which reduces the animation production cost.
[0104] The following describes an exemplary application of the embodiments of this application in a real-world application scenario. In related technologies, (1) different animation assets and animation logic are created 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 created for the carrier object and the mounted object, but this makes the mounting posture highly uniform and the animation effect very poor.
[0105] Based on this, embodiments of this application provide an animation processing method to at least solve the aforementioned problems. In embodiments of this application, a general logic is provided to achieve the effect of a second virtual object (i.e., the mounted object) and a first virtual object (i.e., the carrier object) moving in the same direction. Specifically, through hierarchical constraints, a mounting relationship is formed between the first and second virtual objects. Using only one animation asset, combined with FullBodyIK and 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). This also enables the linkage between the limbs, head, and other parts of the second virtual object and the body parts of the first virtual object. Furthermore, the debugging cost for a single first virtual object is very low; only the position of the slot needs to be adjusted. Thus, 1) only one animation asset needs to be created for the second virtual object, resulting in very low production costs; 2) each first virtual object can have its movement speed, turning speed, and other parameters adjusted independently, giving each first virtual object independent movement characteristics; 3) it has extremely high scalability when applied to virtual scenes (such as games), bringing more possibilities to designing effects where the second virtual object travels alongside the first virtual object (e.g., the second virtual object rides the first virtual object, or the second virtual object lies on top of the first virtual object); 4) if a new first virtual object needs to be added for mounting, only the position of the slot and movement parameters need to be adjusted, saving production costs; 5) using FullBodyIK allows the limbs, head, and other parts of the second virtual object to interact with the first virtual object, making the mounting animation effect more realistic; 6) the mounting posture supports personalized customization, requiring only the adjustment of the slot position. A detailed explanation follows.
[0106] The following describes the embodiments of this application from the product perspective. Since the second skeleton of the second virtual object is attached to the first skeleton of the first virtual object via a slot, it is possible to define which bone of the second virtual object follows which bone of the first virtual object. The actual motion effect brought about 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 the first virtual object (such as a virtual sprite in a game) to move, the second virtual object will also have a corresponding skeletal movement effect as the first virtual object moves. The embodiments of this application also have the advantage of versatility; the second virtual object can perfectly adapt to the riding of the first virtual object of any body type with various action postures. For example... Figure 4B As shown in (1) and (2), the riding posture of the second virtual object is different for different first virtual objects. This application embodiment, besides being applied to the second virtual object riding the first virtual object, can also be applied to the situation where the second virtual object (such as a virtual sprite) lies on top of the first virtual object (such as a player's virtual object), i.e., "riding together." Figure 4C As shown in (1) and (2), when the first virtual object moves, the second virtual object lying on the body of the first virtual object will also move (such as the tail of the second virtual object moving up and down).
[0107] The embodiments of this application are described below from a technical perspective. The process of the embodiments of this application is as follows: Figure 5 As shown:
[0108] 1. Create animation files. This includes creating animation files for the first virtual object and the second virtual object. In 3ds Max, create the idle animation file and motion animation file for the first virtual object, and the idle animation file for the second virtual object in the target pose (e.g., riding pose).
[0109] 2. Export animation files. In 3ds Max, export the idle animation file, motion animation file, and idle animation file of the first virtual object. 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.
[0110] 3. Import animation files. Import animation files A, B, and C into UE4. After importing the animation files, you will get the following seven files, in order:
[0111] The skeletal mesh file of the first virtual object is denoted as "SKM_PET";
[0112] The first skeleton file of the first virtual object is denoted as "SK_Pet";
[0113] The standby animation sequence of the first virtual object is denoted as "Pet__Anim_Idle";
[0114] The motion animation sequence of the first virtual object is denoted as "Pet__Anim_Run";
[0115] The skeletal mesh file of the second virtual object is denoted as "SKM_PC1";
[0116] The second skeleton file of the second virtual object is denoted as "SK_PC1";
[0117] The standby animation sequence of the second virtual object is denoted as "PC1__Anim_Ride".
[0118] 5. Create the first animation blueprint for the first virtual object. Create the first animation blueprint based on "SK_Pet", denoted as "ABP_Pet", which will be used to play the animations "Pet__Anim_Idle" and "Pet__Anim_Run".
[0119] 6. Add slots to the skeleton of the first virtual object. Add slots in "SK_Pet". These slots are used to 1) set the mount position of the second virtual object relative to the first virtual object; and 2) constrain the target skeleton of the second virtual object (e.g., bones of limbs, head, etc.). For example, the name of the slot used to constrain the target skeleton could be as follows:
[0120] The slot that constrains the head skeleton of the second virtual object is denoted as "Socket_Head";
[0121] The slot that constrains the left-hand bone of the second virtual object is denoted as "Socket_Hand_L";
[0122] The slot that constrains the right-hand bone of the second virtual object is denoted as "Socket_Hand_R";
[0123] The slot that constrains the left foot bone of the second virtual object is denoted as "Socket_Foot_L";
[0124] The slot that constrains the right foot bone of the second virtual object is denoted as "Socket_Foot_R";
[0125] Mounting slot, denoted as "Ride".
[0126] 7. Create a second animation blueprint for the second virtual object. Based on "SK_PC1", create a second animation blueprint, denoted as "ABP_PC1", to play the animation "PC1__Anim_Ride" of the second virtual object and to constrain the second virtual object to the slot of the first virtual object, enabling interaction between them. Specifically, obtain the "slot position and rotation data" from the animation of the first virtual object; then assign the obtained "slot position and rotation data" to FBIK; FBIK will constrain the target skeleton of the second virtual object to the slot position of the first virtual object based on the input "slot position and rotation data".
[0127] 8. Create a mount animation blueprint. Create a blueprint for a moving component with a second virtual object, 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)". Component A contains "SKM_Pet" and "ABP_Pet"; Component B contains "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" contained in Component A.
[0128] First, explain how to create the animation file (i.e., the idle animation file of the second virtual object in the target pose (e.g., riding pose)). 1. Open 3ds Max; 2. Open the skeleton file of the second virtual object; 3. Rotate the skeleton and control the rotation and displacement of the skeletons (such as the pelvis, arms, thighs, etc.) so that the skeleton is in the target pose (e.g., riding pose). Figure 6 4. Export the skeleton of the target pose as an FBX animation file, and denot it as the idle animation file of the second virtual object.
[0129] Second, explain the logic of mounting the second virtual object to the first virtual object through UE4, including:
[0130] S1, Run UE4.
[0131] S2, such as Figure 7A As shown. In the blank space of the "Content Browser" in the Engine Assets panel, click to display the shortcut menu and select "Blueprint Class" from the shortcut menu; in the newly popped-up "Select Parent Class" window, select "Role". At this time, a new blueprint file will be created in the "Content Browser", named "BP_RideAll". In this way, the mount animation blueprint "BP_RideAll" is created, which can play the mount animation of the second virtual object being mounted on the first virtual object.
[0132] S3. In the "Content Browser", open "BP_RideAll" by clicking.
[0133] S4, such as Figure 7B As shown in (1), in the "Components" tab in the upper left corner of the "BP_RideAll" window, select "Mesh (CharacterMesh0) (Inheritance)". This adds the first bone mesh (CharacterMesh0) to the mounting animation blueprint for displaying the first virtual object; Figure 7BAs shown in (2), click the "Add Component" button, and select "SkeletalMesh" in the newly popped-up tab. In this way, a second SkeletalMesh is added to the mounting animation blueprint for the display of the second virtual object.
[0134] S5. Check if the "SkeletalMesh Component" is below the "CharacterMesh0 (Inheritance)" hierarchy. Specifically, check if there is a triangle symbol before the name "CharacterMesh0 (Inheritance)". Figure 7B As shown in (3). If there is a triangle symbol, it means that "SkeletalMesh" and "CharacterMesh0 (inherited)" form a hierarchical constraint, and "SkeletalMesh" is below the hierarchy of "CharacterMesh0 (inherited)".
[0135] S6. The creation of the second animation blueprint for the second virtual object follows the process as follows:
[0136] 6.1 Import the standby animation file of the second virtual object.
[0137] 6.2 Create a second animation blueprint file for the second virtual object. For example... Figure 8A As shown, in the Content Browser, click the second skeleton file of the second virtual object. In the displayed shortcut menu, select "Create" and then "Animation Blueprint". A new animation blueprint file, named "ABP_PC1_RideAll", will be created in the Content Browser. Here, the second animation blueprint is used to call the standby animation file of the second virtual object.
[0138] 6.3 Write the logic for the event chart in the second animation blueprint.
[0139] 6.3.1 As Figure 8B As shown in (1), open "ABP_PC1_RideAll". In the newly popped-up window, find the "My Blueprints" tab in the lower left corner and double-click "Event Chart". You can see the "Event Chart" tab opened in the middle of the window. This step is to find and open the event chart, because we will write the logic in the chart next.
[0140] 6.3.2 Triggering events by clicking in a blank area of the event chart, such as... Figure 8B The text box shown in (2) is displayed. Enter "try get pawn" in the text box, and click "Try to get Pawn owner" in the search results to create a pawn. Figure 8BThe rightmost blueprint node shown in (2) is “Attempt to acquire Pawn owner”. This step is to create the blueprint node “Attempt to acquire Pawn owner” to acquire the user “BP_RideAll” who uses the second animation blueprint.
[0141] 6.3.3 such as Figure 8C As shown in (1), click the "ReturnValue" pin in the Blueprint node "Attempt to Get Pawn Owner" and hold it down. Then move it to a blank area and release it. In the pop-up search box, enter "BP_RideALL". In the search results, select "Type to BP_RideAll" to create the Blueprint node "Type to BP_RideAll". This step is to create the Blueprint node "Type to BP_RideAll", which is used to obtain "BP_RideAll".
[0142] 6.3.4 According to as follows Figure 8C As shown in (2), the blueprint nodes created in the second animation blueprint are connected, and the "Event Blueprint Update Animation" is linked to "BP_RideALL" so that the rotation and displacement information of the slot can be obtained in real time from "BP_RideALL" when the engine is running.
[0143] 6.3.5 such as Figure 8D As shown in (1), click the "As BPRide All" pin in the Blueprint node "Type to BP_RideAll" without releasing it, move it to a blank area and then release it. Enter "get socket rotation" in the search box and select "Get socket rotation (Mesh)" in the search results. This step is to create the Blueprint node "get socketrotation" to obtain the socket rotation information from "BP_RideALL".
[0144] 6.3.6 such as Figure 8D As shown in (2), click the "As BPRide All" pin in the "Type to BP_RideAll" blueprint node without releasing it, move it to a blank area, and then release it. Enter "get socket location" in the search box, and select "Get socket location (Mesh)" in the search results. This step is to create the "get socket location" blueprint node to obtain the socket's displacement information.
[0145] Example 6.3.7 shows that you can create 6 "get socket rotation" blueprint nodes and 5 "get socketlocation" blueprint nodes, which can be created by copying.
[0146] In the "In Socket Name" text boxes of the six "get socket rotation" blueprint nodes, enter the following in sequence: "Root", "Socket_Head", "Socket_Hand_L", "Socket_Hand_R", "Socket_Foot_L", and "Socket_Foot_R". Similarly, in the "In Socket Name" text boxes of the five "get socket location" nodes, enter the following in sequence: "Socket_Head", "Socket_Hand_L", "Socket_Hand_R", "Socket_Foot_L", and "Socket_Foot_R".
[0147] The "Socket_Head", "Socket_Hand_L", "Socket_Hand_R", "Socket_Foot_L", and "Socket_Foot_R" mentioned above are the names of the slots that need to be added to the skeleton of the first virtual object. They 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, you will get the following... Figure 8E A schematic diagram of the blueprint nodes shown.
[0148] In these 11 blueprint nodes, for each blueprint node, click the "Return Value" pin and select "Promote to Variable" (e.g., ...). Figure 8G As shown in the image, this creates a variable to store rotation or displacement information for that blueprint node. The variables needed for these 11 blueprint nodes are created sequentially, renamed according to their information content, and then... Figure 8F Connect the diagram shown.
[0149] Step 6.3.7 is to obtain the rotation and displacement information of the slots in the skeleton of the first virtual object and store it in the variables of the second animation blueprint of the second virtual object.
[0150] 6.4 Write the logic for the animation charts in the second animation blueprint.
[0151] 6.4.1 As Figure 9AAs shown in (1), open the skeleton of the second virtual object, click 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: "Bip001-L-Hand", "Bip001-R-Hand", "Bip001-Head", "Bip001-L-Calf", and "Bip001-R-Calf". The five bones created in this step will be used by fullbodyik for interaction between the second and first virtual objects.
[0152] 6.4.2 such as Figure 9A As shown in (2), return to the animation chart of the second animation blueprint, click on the blank area of the animation chart, enter "transform bone" in the pop-up search box, and select "transform (modify) bone" in the search results. This step is to create the "transform (modify) bone" node, which is used to modify the rotation and displacement information of the bones of the second virtual object.
[0153] 6.4.3 Since the above example created a total of 5 bones, we also need to create 5 "Transform (Modify) Bones" here. Each bone should have the same translation and rotation modes: translation mode is "Replace Existing Item," translation space is "World Scene," and all pins should be set to public, such as... Figure 9B As shown in (1). In this step: the exposed pin is so that the blueprint node can be assigned a value using a variable; because the slot position of the first virtual object needs to be assigned 100% to the skeleton of the attached second virtual object, the translation mode and rotation are both "replace existing items"; in 6.3.7, the rotation and displacement of the slot are obtained from the scene component, so in this step, the rotation space and translation space are both set to "world scene space".
[0154] 6.4.4 Change the "Bone to be Modified" in each of the five "Transform (Modify) Bones" nodes to the added bones; then, in the "My Blueprints" tab, drag and drop the corresponding variables to the "Transform (Modify) Bones" nodes; drag the imported second virtual object's idle animation file from the Content Browser into this animation graph. This step uses the created single-frame animation file as a base, and then modifies the position and rotation information of the bones by connecting blueprint nodes based on this animation file.
[0155] 6.4.5 Click the skeleton file of the second virtual object, select "Create Binding Control" from the pop-up shortcut menu, create a "Create Binding Control" file, and name it "CtrlRig_PC1_RideAll". Figure 9BAs shown in (2). This step is to create the file required to use Fullbodyik: the controlrig file.
[0156] 6.4.6 Open the "CtrlRig_PC1_RideAll" file. In the newly opened "RigGraph" window, right-click in the blank space of the graph and search to add a "fullbodyik" node, then follow the steps... Figure 9C The settings are shown in the diagram. This step is to link the position of the bone with the position of the skinned bone, using the "bone of the second virtual object" which is already controlled by the "slot of the first virtual object" to constrain the "skinned bone of the second virtual object".
[0157] 6.4.7 such as Figure 9D As shown, return to the animation graph of the second animation blueprint "ABP_PC1_RideAll" window for the second virtual object. Click in a blank area of the graph, enter "controlrig" in the pop-up search box, and select "Binding Control" from the search results. Select the "Binding Control" node, and in the "Details" tab, mount the ControlRig file you just created: "CtrlRig_PC1_RideAll". This step is to create the "Binding Control" animation blueprint node to mount the controlrig file, enabling the constraints of the second virtual object's limbs through the slots of the first virtual object.
[0158] 6.4.8 The final connection status of the animated charts is as follows: Figure 9E As shown.
[0159] S7. The creation of the first animation blueprint for the first virtual object follows the process as follows:
[0160] 7.1 Create the first animation blueprint file for the first virtual object. For example... Figure 10A As shown, in the Content Browser, click the skeleton file of the first virtual object. In the newly popped-up shortcut menu, select "Create" and then "Animation Blueprint". A new animation blueprint file, named "ABP_Pet_001", will be created in the Content Browser. Here, the first animation blueprint is used to call the animation file of the first virtual object.
[0161] 7.2 Logic writing for the first animation blueprint of the first virtual object.
[0162] 7.2.1 As Figure 10B As shown in (1), open "ABP_Pet_001". In the newly popped-up window, find the "My Blueprints" tab in the lower left corner and double-click "Event Chart". You can see that the "Event Chart" tab has been opened in the middle of the window. In the blank area of the event chart, trigger the following by clicking: Figure 10B The text box shown in (2) is displayed. Enter "try get pawn" in the text box, and click "Try to get Pawn owner" in the search results to create a pawn. Figure 10B The rightmost blueprint node shown in (2) is “Attempt to acquire Pawn owner”. This step creates the blueprint node to acquire the user “BP_RideAll” who uses the first animation blueprint.
[0163] 7.2.2 As Figure 10C As shown in (1), click the “Return Value” pin in the “Try to get Pawn Owner” node without releasing it, then move it to a blank space and release it. Enter “get velocity” in the pop-up search box, select “Get Velocity” in the search results, and you can create the blueprint node “Get Velocity”.
[0164] like Figure 10C As shown in (2), click the “Return Value” pin in the “Get Speed” node without releasing it, then move it to a blank area and release it. Enter “length” in the pop-up search box, and select “Vector Length” in the search results to create the blueprint node “Vector Length”.
[0165] like Figure 10C As 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 to obtain the movement speed of the first virtual object.
[0166] 7.2.3 As Figure 10D As shown in (1), click the "Return Value" pin in the "Speed" variable node without releasing it, then move it to a blank area and release it. In the pop-up search box, enter ">", select "Floating Point > Floating Point" in the search results, and in the newly created "Floating Point > Floating Point" node, enter "a specific value (e.g., 10)" in the second text box. This step is to compare the speed variable of the first virtual object with a specific value (e.g., 10) to determine whether the current speed is greater than 10cm / s.
[0167] 7.2.4 such as Figure 10DAs shown in (2), click the pin in the "Floating Point > Floating Point" node, select "Promote to Variable" in the pop-up shortcut menu, and rename the newly created variable to "isMoving". This step is to create the isMoving variable to detect whether the first virtual object is in a moving state. For example, if the speed is greater than 10cm / s, it is in a moving state, and the value of this boolean variable is True, otherwise it is False.
[0168] 7.2.5 such as Figure 10D As shown in (3), in the "My Blueprints" tab on the left side of the current window, double-click "AnimGraph" to open the animation graph. Right-click in the blank area of the animation graph, enter "blend poses by bool" in the pop-up search box, and select "blend poses by bool" in the search results. This step is to create a "blend poses by bool" node, which is used to select whether to play a standby animation or a motion animation based on the movement state of the first virtual object.
[0169] 7.2.6 In the "Asset Browser" tab, drag the idle animation file and motion animation file into the animation graph, and connect the animations to the "blend poses by bool" node. Connect the motion animation file to the True pin and the idle animation file to the False pin. In the "My Blueprints" 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 connects the animation file of the first virtual object to the "blend poses by bool" node. If the ismoving variable is True, the motion animation file will play; otherwise, the idle animation file will play.
[0170] S8. Logic for mounting the animation blueprint "BP_RideAll".
[0171] 8.1 Open "BP_RideAll".
[0172] 8.2 In the "Components" tab at the top left, select "Mesh (CharacterMesh0) Inheritance". In the Details panel, select the "Bone Mesh" corresponding to the first virtual object in the Bone Mesh category. In the Animation class, select the first animation blueprint "ABP_Pet_001" that was created. Figure 11AAs shown. This step is to place the first object model and the first animation blueprint of the first virtual object within the skeletal mesh. This operation allows the first virtual object to "run".
[0173] 8.3 In the "Components" tab at the top left, select "SkeletalMesh". In the Details panel, select the "Skeletal Mesh" of the second virtual object in the Skeletal Mesh category. In the Animation class, select the created second animation blueprint "ABP_PC1_RideAll", as shown below. Figure 11B As shown. This step is to place the second object model and the second animation blueprint of the second virtual object within the skeletal mesh.
[0174] 8.4 In the blank area of the event chart, a click operation can trigger the display of, as shown below. Figure 11C In the search box shown in (1), enter "attach component to component" in the pop-up search box, and select "attach component to component (Mesh)" in the search results. The blueprint node created in this step is to allow the skeletal mesh "SkeletalMesh" used by the second virtual object to be attached to a slot on the skeletal mesh "CharacterMesh0 inheritance" used by the first virtual object.
[0175] 8.5 In the top-left "Components" tab, drag the "Mesh (CharacterMesh0) Inheritance" component to the "Parent" pin of the "Attach Component to Component" node. Similarly, in the "Components" tab, drag the "SkeletalMesh" component to the "Target" pin of the "Attach Component to Component" node. Then, enter "Ride" in the "Socket Name" text box, and connect the "Event Starts Running" event's run node to the "Attach Component to Component" node. This step is to ensure that when the mounting animation blueprint starts running, the second virtual object's skeletal mesh component "SkeletalMesh" is attached to the "Ride" slot of the first virtual object's skeletal mesh component "Mesh (CharacterMesh0) Inheritance". See the connection diagram below. Figure 11C As shown in (2).
[0176] S9. Add slots to the skeleton of the first virtual object.
[0177] 9.1 Open the skeleton file of the first virtual object.
[0178] 9.2. Observe the motion animation of the first virtual object. Taking the second virtual object riding the first virtual object as an example, it can be found that most skeletons can be driven by the pelvis. 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 "Bip001" (pelvis bone), select "Add Slot" in the pop-up shortcut menu, and rename it to "Ride". This step is to create the "Ride" slot, which will allow the skeleton mesh component of the second virtual object to be attached to the "Ride" slot so that it moves with the pelvis bone of the first virtual object.
[0179] 9.3 Continue observing the motion animation of the first virtual object and add slots to appropriate bones, such as "Socket_Head", "Socket_Hand_L", "Socket_Hand_R", "Socket_Foot_L", and "Socket_Foot_R". This step is to add slots to appropriate bones of the first virtual object. For example, if the positions of these slots correspond to the movement of the limbs and head of the second virtual object, these slots will move with a bone of the first virtual object, so the limbs and head of the second virtual object will also move with those bones of the first virtual object.
[0180] It should be noted that it is not limited to 3ds Max and UE4 engines. Other DCC software or engines that can create animations and implement mounting interaction logic are also acceptable. FullBodyIK is a collection of IK algorithms. Any software that can implement mounting interaction using the IK algorithm is also acceptable.
[0181] Applying the above embodiments of this application, 1) only one animation asset needs to be created for the second virtual object, resulting in very low production costs; 2) each first virtual object can have its movement speed, turning speed, and other parameters adjusted individually, giving each first virtual object independent movement characteristics; 3) it has extremely high scalability when applied to virtual scenes (such as games), bringing more possibilities for designing effects where the second virtual object travels alongside the first virtual object (such as the second virtual object riding the first virtual object, or the second virtual object lying on top of the first virtual object); 4) if a new first virtual object needs to be added for mounting, only the position of the slot and movement parameters need to be adjusted, saving production costs; 5) using FullBodyIK allows the limbs, head, and other parts of the second virtual object to interact with the first virtual object, making the mounting animation effect more realistic; 6) the mounting posture supports personalized customization, requiring only the adjustment of the slot position.
[0182] The following description continues to illustrate the exemplary structure of the animation processing device 555 provided in the embodiments of this application as a software module. In some embodiments, such as... Figure 2 As shown, the software modules stored in the animation processing device 555 in the memory 550 may include: an acquisition module 5551, used 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, used 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, used to add a bone slot to the first bone of the first object skeleton; a mounting module 5554, used to mount the second bone of the second object skeleton to the bone slot; and a playback module 5555, used to control the second bone to follow the first bone to move based on the bone slot when playing the mounting animation file of the second virtual object mounted on the first virtual object, so that the object part of the second virtual object bound to the second bone moves with the object part of the first virtual object bound to the first bone.
[0183] 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 a target posture, and the target posture is the posture adopted by the second virtual object when it is attached to the first virtual object.
[0184] In some embodiments, the adding module 5553 is further configured to add a first bone slot to a first sub-bone of the first object skeleton, the first bone slot indicating the direct mounting position of the second virtual object relative to the first virtual object; and add a second bone slot to a second sub-bone of the first object skeleton, the second bone slot indicating the indirect mounting position of the second virtual object relative to the first virtual object, the second bone slot being used to constrain the movement of the target bone in the second bone; wherein, 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.
[0185] In some embodiments, the mounting module 5554 is further configured to: create a mounting animation blueprint for the mounting animation file, create a first animation blueprint for the first virtual object, and create a second animation blueprint for 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, wherein 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 the 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 the 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.
[0186] 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 a blueprint node in the mounting animation blueprint, the blueprint node including a first pin indicating the mounted object, a second pin indicating the mounted object, 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.
[0187] In some embodiments, the mounting module 5554 is further configured to: create a first animation blueprint file for the first virtual object based on the first object skeleton; display a blueprint editing interface for the first animation blueprint file in response to a file open operation on the first animation blueprint file; receive first editing information for an event chart in the first animation blueprint file and second editing information for an animation chart in the first animation blueprint file based on the blueprint editing interface; and generate the first animation blueprint based on the first editing information and the second editing information.
[0188] In some embodiments, the mounting module 5554 is further configured to: create a second animation blueprint file for the second virtual object based on the second object skeleton; display a blueprint editing interface for the second animation blueprint file in response to a file open operation on the second animation blueprint file; receive third editing information for an event chart in the second animation blueprint file and fourth editing information for an animation chart in the second animation blueprint file based on the blueprint editing interface; and generate the second animation blueprint based on the third editing information and the fourth editing information.
[0189] In some embodiments, the playback module 5555 is further configured to acquire rotation information and displacement information of the bone slot; determine the bone rotation angle of the second bone based on the rotation information and displacement information; and adjust the bone position and bone direction of the second bone based on the bone rotation angle to control the second bone to follow the movement of the first bone.
[0190] In some embodiments, the playback module 5555 is further configured to acquire rotation information and displacement information of the bone slot; determine the bone point position of each bone point on the second bone using inverse kinematics based on the rotation information and displacement information; and adjust the bone position of the second bone based on the position of each bone point on the second bone to control the second bone to follow the movement of the first bone.
[0191] In some embodiments, the second virtual object in the mounting animation file is mounted to the first virtual object using a first mounting posture; the mounting module 5554 is further configured to receive a mounting posture adjustment instruction, the mounting posture adjustment instruction including 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 posture adjustment instruction, controlling the second virtual object to be mounted to the first virtual object using a second mounting posture, the second mounting posture being different from the first mounting posture.
[0192] In some embodiments, the mounting module 5554 is further configured to: when the mounting posture adjustment instruction is the first instruction, in response to the mounting posture adjustment instruction, adjust the bone slot from the first bone to the third bone; control the second virtual object to be mounted to the first virtual object in a second mounting posture by mounting the second bone to the bone slot located in the third bone; when the mounting posture adjustment instruction is the second instruction, in response to the mounting posture adjustment instruction, control the second virtual object to be mounted to the first virtual object in a second mounting posture by mounting the fourth bone to the bone slot; when the mounting posture adjustment instruction includes both the first instruction and the second instruction, in response to the mounting posture adjustment instruction, adjust the bone slot from the first bone to the third bone; control the second virtual object to be mounted to the first virtual object in a second mounting posture by mounting the fourth bone to the bone slot located in the third bone.
[0193] 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 the first bone of the first object skeleton; based on the motion posture, determine the first bone in the first object skeleton to which the bone slot is to be added, and determine the second bone in the second object skeleton to which it is 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.
[0194] It should be noted that the description of the device embodiments in this application is similar to the description of the method embodiments described above, and has similar beneficial effects as the method embodiments, so it will not be repeated here. Any technical details not covered in the animation processing device provided in the embodiments of this application can be understood based on the description of the technical details in the above method embodiments.
[0195] This application also provides a computer program product, which includes computer-executable instructions or a computer program stored in a computer-readable storage medium. The processor of an electronic device reads the computer-executable instructions or computer program from the computer-readable storage medium and executes the computer-executable instructions or computer program, causing the electronic device to perform the animation processing method provided in this application.
[0196] This application also provides a computer-readable storage medium storing computer-executable instructions or computer programs. When the computer-executable instructions or computer programs are executed by a processor, the processor will execute the animation processing method provided in this application.
[0197] In some embodiments, the computer-readable storage medium may be a memory such as RAM, ROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or it may be a variety of devices including one or any combination of the above-mentioned memories.
[0198] In some embodiments, computer-executable instructions may take the form of programs, software, software modules, scripts, 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 as stand-alone programs or as modules, components, subroutines, or other units suitable for use in a computing environment.
[0199] As an example, computer-executable instructions may, but do not necessarily, correspond to files in a file system. They 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 in question, or in multiple co-located files (e.g., files that store one or more modules, subroutines, or code sections).
[0200] As an example, computer-executable instructions can be deployed to execute on a single electronic device, or on multiple electronic devices located at one location, or on multiple electronic devices distributed across multiple locations and interconnected via a communication network.
[0201] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, and improvements made within the spirit and scope of this application are included within the scope of protection of this application.
Claims
1. An animation processing method, characterized in that, The method includes: Obtain the first animation file of the first virtual object and the second animation file of the second virtual object; 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, wherein the first object skeleton includes a first bone, the first bone includes a first sub-bone and a second sub-bone, and the second object skeleton includes a second bone; Add a first bone slot to the first sub-bone, the first bone slot indicating the direct mounting position of the second virtual object relative to the first virtual object; A second bone slot is added to the second sub-bone. The second bone slot indicates the indirect mounting position of the second virtual object relative to the first virtual object. The second bone slot is used to constrain the movement of the target bone in the second bone. The second bone is attached to a bone slot, wherein the bone slot includes the first bone slot and the second bone slot; When playing the mounting animation file of the second virtual object attached to the first virtual object, based on the bone slot, the second bone is controlled to move with the first bone, so that the object part of the second virtual object bound to the second bone moves with the object part of the first virtual object bound to the first bone.
2. The method as described in claim 1, characterized in that, The step of obtaining the first animation file of the first virtual object and the second animation file of the second virtual object includes: Obtain the first standby animation file and the 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 the second standby animation file of the second virtual object, and use the second standby animation file as the second animation file; In the second standby animation file, the second virtual object is the target pose, which is the pose adopted by the second virtual object when it is attached to the first virtual object.
3. The method as described in claim 1, characterized in that, Before attaching the second bone to the bone slot, the method further includes: Create a mount animation blueprint for the mount animation file, create a first animation blueprint for the first virtual object, and create a second animation blueprint for the second virtual object; Add a first skeletal mesh and a second skeletal mesh to the mounting animation blueprint. The first skeletal mesh and the second skeletal mesh have a hierarchical relationship, and the first skeletal mesh is the parent of the second skeletal mesh. Obtain the first object model of the first virtual object, and place the first object model and the first animation blueprint on the first skeletal mesh to obtain the third skeletal mesh. Obtain the second object model of the second virtual object, and place the second object model and the second animation blueprint on the second skeletal mesh to obtain the fourth skeletal mesh.
4. The method as described in claim 3, characterized in that, The third skeletal mesh includes the first object skeleton, and the fourth skeletal mesh includes the second object skeleton; The step of attaching the second bone to the bone slot includes: Create a blueprint node in the mount animation blueprint. The blueprint node includes a first pin indicating the mount object, a second pin indicating the mount object, and a slot pin. The system controls the third bone mesh to connect to the first pin, controls the fourth bone mesh to connect to the second pin, and controls the slot pin to indicate the bone slot, so as to mount the second bone of the second object skeleton to the bone slot.
5. The method as described in claim 3, characterized in that, The first animation blueprint for creating the first virtual object includes: Based on the skeleton of the first object, create the first animation blueprint file of the first virtual object; In response to a file open operation on the first animation blueprint file, the blueprint editing interface of the first animation blueprint file is displayed; Based on the blueprint editing interface, the system receives first editing information for the event chart in the first animation blueprint file and second editing information for the animation chart in the first animation blueprint file. The first animation blueprint is generated based on the first editing information and the second editing information.
6. The method as described in claim 3, characterized in that, The second animation blueprint for creating the second virtual object includes: Based on the skeleton of the second object, create a second animation blueprint file for the second virtual object; In response to a file open operation on the second animation blueprint file, the blueprint editing interface of the second animation blueprint file is displayed; Based on the blueprint editing interface, third editing information for the event chart in the second animation blueprint file and fourth editing information for the animation chart in the second animation blueprint file are received; The second animation blueprint is generated based on the third and fourth editing information.
7. The method as described in claim 1, characterized in that, The step of controlling the second bone to follow the movement of the first bone based on the bone slot includes: Obtain the rotation and displacement information of the bone slot; Based on the rotation and displacement information, the bone rotation angle of the second bone is determined; Based on the bone rotation angle, the bone position and bone direction of the second bone are adjusted to control the second bone to follow the movement of the first bone.
8. The method as described in claim 1, characterized in that, The step of controlling the second bone to follow the movement of the first bone based on the bone slot includes: Obtain the rotation and displacement information of the bone slot; Based on the rotation and displacement information, the bone point positions of each bone point on the second bone are determined by inverse kinematics. Based on the positions of each bone point on the second bone, the bone position of the second bone is adjusted to control the second bone to follow the movement of the first bone.
9. The method as described in claim 1, characterized in that, In the mounting animation file, the second virtual object is mounted to the first virtual object using a first mounting posture; The method further includes: Upon receiving a mounting posture adjustment instruction, 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; In response to the mounting posture adjustment command, the second virtual object is controlled to be mounted on the first virtual object using a second mounting posture, which is different from the first mounting posture.
10. The method as described in claim 9, characterized in that, When the mounting posture adjustment command is the first command, the step of responding to the mounting posture adjustment command by controlling the second virtual object to be mounted on the first virtual object using the second mounting posture includes: In response to the mounting posture adjustment command, the bone slot is adjusted from the first bone to the third bone; by mounting the second bone to the bone slot located on the third bone, the second virtual object is controlled to be mounted on the first virtual object in a second mounting posture; When the mounting posture adjustment command is the second command, the step of responding to the mounting posture adjustment command by controlling the second virtual object to be mounted on the first virtual object using the second mounting posture includes: In response to the mounting posture adjustment command, by mounting the fourth bone to the bone slot, the second virtual object is controlled to be mounted on the first virtual object in a second mounting posture; When the mounting posture adjustment command includes the first command and the second command, the step of controlling the second virtual object to be mounted on the first virtual object using the second mounting posture in response to the mounting posture adjustment command includes: In response to the mounting posture adjustment command, the bone slot is adjusted from the first bone to the third bone; by mounting the fourth bone to the bone slot located on the third bone, the second virtual object is controlled to be mounted on the first virtual object in a second mounting posture.
11. The method as described in claim 1, characterized in that, Before adding the first bone slot to the first sub-bone, the method further includes: Obtain the motion posture of the first virtual object; Based on the motion posture, the first bone in the first object skeleton to be added to the bone slot is determined, and the second bone in the second object skeleton to be attached to the bone slot is determined. The step of attaching the second bone to the bone slot includes: The second bone of the second object skeleton is attached to the bone slot, so that the second virtual object is attached to the first virtual object in a mounting posture that is adapted to the motion posture.
12. An animation processing device, characterized in that, The device includes: The acquisition module is used to acquire the first animation file of the first virtual object and the second animation file of the second virtual object; An extraction module is used 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, wherein the first object skeleton includes a first bone, the first bone includes a first sub-bone and a second sub-bone, and the second object skeleton includes a second bone. An addition module is used to add a first bone slot to the first sub-bone, the first bone slot indicating the direct mounting position of the second virtual object relative to the first virtual object; and to add a second bone slot to the second sub-bone, the second bone slot indicating the indirect mounting position of the second virtual object relative to the first virtual object, the second bone slot being used to constrain the movement of the target bone in the second bone; A mounting module is used to mount the second bone to a bone slot, wherein the bone slot includes the first bone slot and the second bone slot; The playback module is used to control the second bone to follow the first bone when playing the mounting animation file of the second virtual object mounted on the first virtual object, based on the bone slot, so that the object part of the second virtual object bound to the second bone moves with the object part of the first virtual object bound to the first bone.
13. The apparatus as claimed in claim 12, characterized in that, The acquisition module 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 a target posture, and the target posture is the posture adopted by the second virtual object when it is attached to the first virtual object.
14. The apparatus as claimed in claim 12, characterized in that, The mounting module is further configured to: create a mounting animation blueprint for the mounting animation file, create a first animation blueprint for the first virtual object, and create a second animation blueprint for the second virtual object before mounting the second bone to the bone slot; add a first bone mesh and a second bone mesh to the mounting animation blueprint, wherein 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 the 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 the 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.
15. The apparatus as claimed in claim 14, characterized in that, The third skeletal mesh includes the first object skeleton, and the fourth skeletal mesh includes the second object skeleton; The mounting module is also used to create a blueprint node in the mounting animation blueprint. The blueprint node includes a first pin indicating the mounting object, a second pin indicating the mounted object, and a slot pin. It controls the third bone mesh to connect to the first pin, controls the fourth bone mesh to connect to the second pin, and controls the slot pin to indicate the bone slot, so as to mount the second bone of the second object skeleton to the bone slot.
16. The apparatus as claimed in claim 14, characterized in that, The mounting module is further configured to create a first animation blueprint file for the first virtual object based on the first object skeleton; display a blueprint editing interface for the first animation blueprint file in response to a file open operation on the first animation blueprint file; and receive first editing information for an event chart in the first animation blueprint file and second editing information for an animation chart in the first animation blueprint file based on the blueprint editing interface. The first animation blueprint is generated based on the first editing information and the second editing information.
17. The apparatus as claimed in claim 14, characterized in that, The mounting module is further configured to create a second animation blueprint file for the second virtual object based on the second object skeleton; in response to a file open operation on the second animation blueprint file, display a blueprint editing interface for the second animation blueprint file; and based on the blueprint editing interface, receive third editing information for the event chart in the second animation blueprint file and fourth editing information for the animation chart in the second animation blueprint file. The second animation blueprint is generated based on the third and fourth editing information.
18. The apparatus as claimed in claim 12, characterized in that, The playback module is also used to acquire the rotation information and displacement information of the bone slot; and to determine the bone rotation angle of the second bone based on the rotation information and displacement information. Based on the bone rotation angle, the bone position and bone direction of the second bone are adjusted to control the second bone to follow the movement of the first bone.
19. The apparatus as claimed in claim 12, characterized in that, The playback module is further configured to acquire rotation and displacement information of the bone slot; based on the rotation and displacement information, determine the bone point position of each bone point on the second bone using inverse kinematics; and adjust the bone position of the second bone based on the position of each bone point on the second bone to control the second bone to follow the movement of the first bone.
20. The apparatus as claimed in claim 12, characterized in that, In the mounting animation file, the second virtual object is mounted to the first virtual object using a first mounting posture; The mounting module is also configured to receive mounting posture adjustment instructions, which include 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 posture adjustment command, the second virtual object is controlled to be mounted on the first virtual object using a second mounting posture, which is different from the first mounting posture.
21. The apparatus as claimed in claim 20, characterized in that, The mounting module is further configured to: when the mounting posture adjustment instruction is the first instruction, in response to the mounting posture adjustment instruction, adjust the bone slot from the first bone to the third bone; control the second virtual object to be mounted to the first virtual object in a second mounting posture by mounting the second bone to the bone slot located on the third bone; when the mounting posture adjustment instruction is the second instruction, in response to the mounting posture adjustment instruction, control the second virtual object to be mounted to the first virtual object in a second mounting posture by mounting the fourth bone to the bone slot; when the mounting posture adjustment instruction includes both the first instruction and the second instruction, in response to the mounting posture adjustment instruction, adjust the bone slot from the first bone to the third bone; control the second virtual object to be mounted to the first virtual object in a second mounting posture by mounting the fourth bone to the bone slot located on the third bone.
22. The apparatus as claimed in claim 12, characterized in that, The adding module is further configured to obtain the motion posture of the first virtual object before adding the first bone slot to the first sub-bone; based on the motion posture, determine the first bone in the first object skeleton to which the bone slot is to be added, and determine the second bone in the second object skeleton to which the bone slot is to be attached; The mounting module 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 on the first virtual object in a mounting posture that is adapted to the motion posture.
23. An electronic device, characterized in that, The electronic device includes: Memory is used to store executable instructions for a computer; A processor, when executing computer-executable instructions stored in the memory, implements the animation processing method according to any one of claims 1 to 11.
24. 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 a processor, the animation processing method according to any one of claims 1 to 11 is implemented.
25. 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 a processor, the animation processing method according to any one of claims 1 to 11 is implemented.
Citation Information
Patent Citations
CN107137927A
CN110992495A