Virtual object control method and device, electronic equipment and storage medium

By splitting virtual objects into multiple body parts and controlling animation behaviors independently, only loading changed appearance resources solves the problem of low virtual object loading efficiency and long rendering time in game applications, achieving more efficient resource loading and rendering. .

CN118587330APending Publication Date: 2024-09-03TENCENT TECH (CHENGDU) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310245141.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-02
Publication Date
2024-09-03

AI Technical Summary

Technical Problem

Game applications load complex virtual object appearance resources in each frame, resulting in low loading efficiency, long rendering time, and prone to lags.

Method used

Split the virtual object into multiple body parts, create separate skeletal resources for the parts, use the part animation information to independently control the animation behavior, load only the changed appearance resources, and optimize the resource loading logic.

Benefits of technology

It improves the loading efficiency of virtual objects, shortens the rendering time, reduces the probability of lag, and optimizes the loading burden of the terminal.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118587330A
    Figure CN118587330A
Patent Text Reader

Abstract

The invention discloses a virtual object control method and device, electronic equipment and a storage medium, and belongs to the technical field of computers. According to the method, the virtual object is divided into the plurality of body parts, the part skeleton resource is independently created for each body part, and the body parts are independently controlled to carry out animation behaviors by utilizing the part animation information; the animation behavior of each body part is kept consistent with the animation behavior of the whole body, then the appearance resources are loaded by taking each body part as a unit, and after posture adaptation is carried out on the appearance resources by utilizing part animation information, the appearance resources of all the body parts are assembled to form the appearance resources of the whole body of the virtual object. Therefore, the loading burden of the terminal is reduced, the loading efficiency of the virtual object is improved, the rendering time consumption of the virtual object is shortened, and the probability of lagging is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a control method, device, electronic device and storage medium for a virtual object. Background Art

[0002] With the development of computer technology, users can open game applications on their terminals at any time to play games. Game applications provide virtual scenes, and users can manipulate virtual objects to move in the virtual scenes. The same virtual object can show different appearances by wearing different skins.

[0003] In the process of real-time display of game screen frames in game applications, it is necessary to load the appearance resources of all virtual objects within the field of view in each frame, and control the appearance resources of each virtual object to change with the skeleton posture of the virtual object. In this way, as the appearance resources become more and more abundant, game applications need to load a large number of complex appearance resources in each frame, and the loading efficiency of virtual objects in game applications is low, the rendering takes a long time, and it is easy to get stuck. Summary of the invention

[0004] The embodiments of the present application provide a control method, device, electronic device and storage medium for a virtual object, which can improve the loading efficiency of virtual objects, reduce rendering time, and reduce the probability of freezes. The technical solution is as follows:

[0005] In one aspect, a method for controlling a virtual object is provided, the method comprising:

[0006] Load the whole body skeleton resource of the virtual object and the respective part skeleton resources of multiple body parts;

[0007] For each of the body parts, based on the whole body animation information of the whole body skeleton resource, part animation information of the part skeleton resource of the body part is configured, and the part animation information inherits the animation behavior of the body part in the whole body animation information;

[0008] Based on the appearance resource indication information of the body part, loading the appearance resource of the body part, the appearance resource indication information indicates the appearance resource of the body part;

[0009] The whole body skeleton resource is hidden, and based on the part animation information, the appearance resource is controlled to follow the part skeleton resource to perform animation behavior.

[0010] In one aspect, a control device for a virtual object is provided, the device comprising:

[0011] A skeleton resource loading module is used to load the whole body skeleton resources of the virtual object and the skeleton resources of each of the multiple body parts;

[0012] A configuration module, configured to configure, for each of the body parts, part animation information of the part skeleton resource of the body part based on the whole body animation information of the whole body skeleton resource, wherein the part animation information inherits the animation behavior of the body part in the whole body animation information;

[0013] An appearance resource loading module, configured to load the appearance resource of the body part based on the appearance resource indication information of the body part, wherein the appearance resource indication information indicates the appearance resource of the body part;

[0014] The control module is used to hide the whole body skeleton resource and control the appearance resource to follow the part skeleton resource to perform animation behavior based on the part animation information.

[0015] In some embodiments, the skeleton resource loading module is used to:

[0016] Create a parent skeleton component, and import the whole body skeleton resource into the parent skeleton component;

[0017] For each of the body parts, a child skeleton component of the body part is mounted on the parent skeleton component, and the body part skeleton resource is imported into the child skeleton component.

[0018] In some embodiments, the configuration module is used to:

[0019] Creating a full-body animation state machine, and mounting the full-body animation state machine on the parent skeleton component, wherein the full-body animation state machine is used to control the animation behavior of the virtual object;

[0020] Creating a part animation state machine for the body part, and mounting the part animation state machine on the child skeleton component, wherein the part animation state machine is used to control the animation behavior of the body part of the virtual object;

[0021] The whole body animation information carried by the whole body animation state machine is transferred to the part animation state machine to generate the part animation information.

[0022] In some embodiments, the control module is used to:

[0023] For each of the body parts, binding the appearance resource of the body part to the child skeleton component of the body part;

[0024] Determine the rendering posture information of the appearance resource in the current picture frame based on the part animation information mounted on the child skeleton component;

[0025] According to the rendering posture information of each of the body parts, the appearance resources of the body parts are rendered in the current picture frame, wherein the appearance resources of the multiple body parts are assembled to constitute the animation behavior of the virtual object in the current picture frame.

[0026] In some embodiments, the control module is further configured to:

[0027] The rendering posture information of the parent skeleton component is hidden, where the rendering posture information of the parent skeleton component is determined based on the full-body animation information.

[0028] In some embodiments, the apparatus further comprises:

[0029] A division module, configured to divide the virtual object into the plurality of body parts based on the division mode indication information;

[0030] The creation module is used to create, for each of the body parts, at least one appearance resource adapted to the body part.

[0031] In some embodiments, the skeleton resource loading module is used to:

[0032] Based on the species type of the virtual object, determining an initial bone resource of the species type;

[0033] The initial skeleton resource is configured based on the body parameters of the virtual object to obtain the whole body skeleton resource.

[0034] In some embodiments, the appearance resource loading module is used to:

[0035] Determining a resource address of the appearance resource based on the appearance resource indication information;

[0036] The resource address is accessed, and the appearance resource stored in the resource address is loaded.

[0037] In some embodiments, the appearance resource loading module is further used to:

[0038] In the current frame, determining, from the multiple body parts of the virtual object, a body part that has undergone a change in appearance relative to that in the previous frame;

[0039] Based on the dressing resource indication information of the dressing body part, the dressing appearance resource of the dressing body part is loaded, and the dressing resource indication information indicates the appearance resource of the dressing body part after dressing.

[0040] On the one hand, an electronic device is provided, which includes one or more processors and one or more memories, wherein at least one computer program is stored in the one or more memories, and the at least one computer program is loaded and executed by the one or more processors to implement a method for controlling a virtual object such as any possible implementation method described above.

[0041] On the one hand, a computer-readable storage medium is provided, in which at least one computer program is stored. The at least one computer program is loaded and executed by a processor to implement a control method for a virtual object as described in any possible implementation manner.

[0042] In one aspect, a computer program product is provided, the computer program product comprising one or more computer programs, the one or more computer programs being stored in a computer-readable storage medium. One or more processors of an electronic device can read the one or more computer programs from the computer-readable storage medium, and the one or more processors execute the one or more computer programs, so that the electronic device can perform the control method of a virtual object in any possible implementation manner described above.

[0043] The beneficial effects brought by the technical solution provided by the embodiment of the present application include at least:

[0044] By splitting the virtual object into multiple body parts, creating a part skeleton resource for each body part separately, and using the part animation information to independently control the animation behavior of the body part, and because the part animation information is inherited from the whole body animation information, the animation behavior of each body part remains consistent with the animation behavior of the whole body, and then loading the appearance resources based on each body part, and after using the part animation information to adapt the appearance resources to the posture, the appearance resources of each body part are assembled to form the appearance resources of the whole body of the virtual object. In this way, in each frame of the real-time game screen stream, only the appearance resources with appearance changes need to be loaded as required, which optimizes the resource loading logic of each frame, reduces the loading burden of the terminal, improves the loading efficiency of virtual objects, shortens the rendering time of virtual objects, and reduces the probability of freezes. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0046] Figure 1It is a schematic diagram of an implementation environment of a virtual object control method provided in an embodiment of the present application;

[0047] Figure 2 is a flow chart of a method for controlling a virtual object provided in an embodiment of the present application;

[0048] Figure 3 is a flow chart of a method for controlling a virtual object provided in an embodiment of the present application;

[0049] Figure 4 is a schematic diagram of a skeleton component configuration interface provided in an embodiment of the present application;

[0050] Figure 5 is a schematic diagram of a parent skeleton component provided in an embodiment of the present application;

[0051] Figure 6 It is a creation interaction diagram of a full-body animation state machine provided in an embodiment of the present application;

[0052] Figure 7 This is a schematic diagram of dividing the body parts of a virtual object provided in an embodiment of the present application;

[0053] Figure 8 is a schematic diagram of a part animation state machine provided in an embodiment of the present application;

[0054] Fig. 9 is a schematic diagram of a game engine configuration interface provided in an embodiment of the present application;

[0055] Fig.10 It is a schematic diagram of a blueprint interface of a torso animation state machine provided in an embodiment of the present application;

[0056] Fig.11 is a schematic diagram of an appearance resource management interface provided by an embodiment of the present application;

[0057] Fig.12 is a schematic diagram of an Avatar system assembly configuration interface provided in an embodiment of the present application;

[0058] Fig.13 is a schematic diagram of another Avatar system assembly configuration interface provided in an embodiment of the present application;

[0059] Fig.14 It is an assembly rendering effect diagram of body parts of a virtual object provided in an embodiment of the present application;

[0060] Fig.15 is a principle flow chart of a method for controlling a virtual object provided in an embodiment of the present application;

[0061] Fig.16It is an animation inheritance logic framework diagram of a virtual object provided in an embodiment of the present application;

[0062] Fig.17 This is a skeleton component architecture diagram of a virtual object provided by an embodiment of the present application;

[0063] Fig.18 is a structural schematic diagram of a virtual object control device provided in an embodiment of the present application;

[0064] Fig.19 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0065] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

[0066] In this application, the terms "first", "second", etc. are used to distinguish identical or similar items with basically the same effects and functions. It should be understood that there is no logical or temporal dependency between "first", "second", and "nth", nor is there any limitation on quantity and execution order.

[0067] In the present application, the term "at least one" means one or more, and the meaning of "plurality" means two or more. For example, a plurality of first positions means two or more first positions.

[0068] In this application, the term "including at least one of A or B" refers to the following situations: including only A, including only B, and including both A and B.

[0069] The user-related information (including but not limited to the user's device information, personal information, behavior information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals involved in this application, when applied to specific products or technologies in the manner of the embodiments of this application, are all permitted, agreed, authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant information, data and signals must comply with the relevant laws, regulations and standards of the relevant countries and regions. For example, the skeletal resources and appearance resources of each body part in the virtual object involved in this application are obtained with full authorization.

[0070] The following is an explanation of the terms involved in the embodiments of the present application.

[0071] MOBA (Multiplayer Online Battle Arena) game: a game that provides several strongholds in a virtual scene, and users in different camps control virtual objects to compete in the virtual scene, occupying strongholds or destroying strongholds of the opposing camp. For example, a MOBA game can divide users into at least two camps, and different teams belonging to at least two camps occupy their own map areas respectively, and compete with a certain victory condition as the goal. The victory condition includes but is not limited to: occupying a stronghold or destroying a stronghold of the opposing camp, defeating the virtual object of the opposing camp, ensuring one's own survival in a specified scene and time, grabbing a certain resource, and exceeding the interactive score of the opponent within a specified time. At least one of the following. For example, a MOBA game can divide users into two camps, and scatter the virtual objects controlled by users in a virtual scene to compete with each other, with the destruction or occupation of the target building / stronghold / base / crystal deep in the opponent's area as a victory condition. Optionally, each team includes one or more virtual objects, such as 1, 2, 3 or 5. According to the number of virtual objects in each team participating in the game, tactical competition can be divided into 1V1 competition, 2V2 competition, 3V3 competition, 5V5 competition, etc., where 1V1 means "1 to 1". Optionally, MOBA games are played in units of games (or rounds), and the scene maps selected in each game can be the same or different. The duration of each MOBA game is from the start of the game to the moment when any team or camp reaches the victory condition.

[0072] Virtual scene: a virtual environment displayed (or provided) when the application is running on the terminal. The virtual scene can be a simulation environment of the real world, a semi-simulated and semi-fictitious virtual environment, or a purely fictitious virtual environment. The virtual scene can be any one of a two-dimensional virtual scene, a 2.5-dimensional virtual scene, or a three-dimensional virtual scene. The embodiment of the present application does not limit the dimension of the virtual scene. For example, the virtual scene may include the sky, land, ocean, etc., and the land may include environmental elements such as deserts and cities. Users can control virtual objects to move in the virtual scene. Optionally, the virtual scene can also be used for virtual scene confrontation between at least two virtual objects, and there are virtual resources in the virtual scene that can be used by at least two virtual objects.

[0073] Virtual object: refers to an movable object in a virtual scene. The movable object may be a virtual person, a virtual animal, a cartoon character, etc., such as a person, an animal, a plant, an oil drum, a wall, a stone, etc. displayed in a virtual scene. The virtual object may be a virtual image in the virtual scene that is used to represent the user. The virtual scene may include multiple virtual objects, each of which has its own shape and volume in the virtual scene and occupies a part of the space in the virtual scene. Optionally, when the virtual scene is a three-dimensional virtual scene, the virtual object may be a three-dimensional stereo model, which may be a three-dimensional character built based on three-dimensional human skeleton technology. The same virtual object may show different external images by wearing different skins. In some embodiments, the virtual object may also be implemented using a 2.5-dimensional or 2-dimensional model, which is not limited in the embodiments of the present application.

[0074] Optionally, the virtual object can be a player character controlled by operations on the client, or a non-player character (NPC) set in a virtual scene that can interact, a neutral virtual object (such as a wild monster that provides buffs, experience points and other resources), or a game robot set in a virtual scene (such as a companion robot). Schematically, the virtual object is a virtual character competing in a virtual scene. Optionally, the number of virtual objects participating in the interaction in the virtual scene can be pre-set or dynamically determined according to the number of clients joining the interaction.

[0075] Body Part: The virtual object can be divided into multiple body parts according to the preset division method indication information. For example, the virtual object is divided into the following body parts: torso, head, hairstyle, limbs, etc.

[0076] Game engine: refers to some pre-written editable computer game systems or core components of some interactive real-time graphics applications. These systems provide game designers with various tools needed to write games, with the aim of allowing game designers to easily and quickly create game programs without having to start from scratch. Game engines include the following systems: animation engine, rendering engine, physics engine, collision detection system, sound effects, script engine, artificial intelligence, network engine, and scene management.

[0077] Unreal Engine (UE): An industry-leading game engine developed by the game company EPIC. It is a complete game development platform for next-generation game consoles and DirectX 9 personal computers, providing a large number of core technologies, data generation tools and basic support required by game developers.

[0078] Animation: Record the state of an object at a certain moment in a time frame, and then switch it in a certain order and time interval. The animation principle of all software is similar. In the Unity engine, the behavior of each virtual object (also called animation behavior) is controlled by the animation state machine to which it belongs.

[0079] Animator Controller: A manager used to manage multiple animation playback states in the Unity engine. It is a state machine that can manage the action changes of virtual objects in virtual scenes and control the generation of action animations of virtual objects. In the animation engine, the animation state machine connects to the animation logic layer upwards and controls the animation pipeline downwards.

[0080] The animation state machine allows users to manage the animation sequence and trigger conditions of virtual objects by customizing the animation nodes of the animation state machine to achieve complex animation or interaction effects. In the animation state machine, each animation state of the virtual object indicates an animation behavior. For example, if the animation state includes the standing state, the confrontation state, the elimination state, etc., the corresponding animation behaviors include the standing behavior, the confrontation behavior, the falling behavior, etc. For example, in the process of generating an animation of a behavior, the animation node corresponding to the behavior is created on the animation state machine in the animation engine, and different behaviors require the creation of different animation nodes on the animation state machine.

[0081] Rendering engine: In the field of image technology, a rendering engine refers to rendering a 3D model of a virtual object into a 2D image, so that the 3D effect of the 3D model is still maintained in the 2D image. In particular, in the field of game technology, the virtual scene itself and all virtual objects in the virtual scene are rendered by the rendering engine after the model data of the 3D model is imported into the rendering engine, which drives the rendering pipeline in the GPU to render, so as to visualize the object indicated by the 3D model on the terminal display screen.

[0082] Graphics Processing Unit (GPU): A dedicated chip used in modern personal computers, servers, mobile devices, game consoles, etc. specifically for graphics image processing.

[0083] Graphics API (Application Programming Interface): The process of CPU (Central Processing Unit) communicating with GPU is carried out according to a specific standard graphics API. The mainstream graphics APIs include OpenGL, OpenGL ES, Direct X, Metal, Vulkan, etc. GPU manufacturers will implement certain standardized interfaces when producing GPUs. When developing graphics, you can call the GPU according to the methods defined by the interface.

[0084] Rendering pipeline: The graphics rendering process running in the GPU. In the image rendering process, the following rendering pipelines are usually involved: vertex shader, rasterizer, pixel shader. By writing code in the shader, the GPU can be controlled to render the rendering components.

[0085] Game Thread: One of the threads when multi-threading technology is used in the operation of game applications. It is used to maintain the main game business logic and can be used to implement the creation / destruction logic of virtual objects, virtual objects, etc.

[0086] Render Thread: One of the threads when multi-threading technology is used in game application running, used for non-hardware level rendering instruction processing logic.

[0087] Avatar system: The Avatar system is a system used in games to increase the number of character appearances by subdividing character models or images and recombining them.

[0088] The following is a brief introduction to the technical concepts of the embodiments of the present application.

[0089] In the game screen rendering scenario, when the game application is running, each frame of the game screen needs to be rendered in real time. The actions made by the virtual object in each frame are called animation behaviors. At each moment, the rendering posture information of the virtual object can be determined based on the animation behavior of the virtual object. Then, the rendering posture information can be used to render the multimedia resources of the virtual object, so that the virtual object can be displayed in the virtual scene, realizing the visualization of the virtual object and its appearance.

[0090] Usually, virtual objects can show different external images by wearing different skins, and in some game applications with a high degree of freedom in appearance matching, users can freely choose face shape, head shape, etc. to realize face pinching of virtual objects, or users can also freely match clothes, pants, shoes, headwear, facial ornaments, waist ornaments, ear ornaments, back ornaments, necklaces, bracelets, gloves and other appearances to realize the change of virtual objects, or users can also freely match the appearance of props and prop pendants held by virtual objects to realize the dressing of virtual props, or users can also equip virtual objects with tails, purchase special skill effects, etc. Therefore, with the product iteration of game applications, users' demand for the appearance of virtual objects will continue to increase.

[0091] Since the game application needs to load the appearance resources of all virtual objects within the field of view in each frame, and control the appearance resources of each virtual object to change with the skeleton posture of the virtual object, as the demand for appearance performance increases, the appearance resources will become more and more abundant. If the game application loads a large number of complex appearance resources in each frame, the appearance resources of a large number of virtual objects will have a bloated reference relationship problem, and the loading efficiency of the game application for virtual objects is low, the rendering takes a long time, and it is easy to be stuck.

[0092] In view of this, an embodiment of the present application provides a control method for a virtual object, which can split the body parts of the virtual object and then dynamically assemble them, so as to ensure that a configuration scheme for dynamically loading and unloading appearance resources that supports flexible dressing is formed without affecting the rendering effect. In real-time rendering, since each virtual object is dynamically assembled from multiple body parts, if the user only changes the appearance resources of certain body parts (such as changing the headdress or replacing the waist ornaments), in the streaming resource loading, it is not necessary to reload the appearance resources of the entire body of the general virtual object, but only the appearance resources of the changed body parts need to be loaded. Each body part of the virtual object can be replaced separately according to user needs, fully meeting the needs of the virtual object in different detailed appearance performances, and reducing the loading burden and performance overhead on the terminal side, improving the loading efficiency of the virtual object, reducing the rendering time of the virtual object, and reducing the probability of jamming. The following embodiments will be used to explain in detail.

[0093] The following is an introduction to the system architecture involved in this application.

[0094] Figure 1 Schematic diagram of an implementation environment of a virtual object control method provided by an embodiment of the present application. Figure 1 The implementation environment includes: a first terminal 120, a server 140 and a second terminal 160.

[0095] The first terminal 120 is installed and runs an application that supports virtual scenes, and the application includes any one of: MOBA games, first-person shooter games, third-person shooter games, virtual reality applications, three-dimensional map programs, or multiplayer machine survival games. In some embodiments, the first terminal 120 is a terminal used by the first user. When the first terminal 120 runs the application, the user interface of the application is displayed on the screen of the first terminal 120, and based on the opening operation of the first user in the user interface, the virtual scene is loaded and displayed in the application. The first user uses the first terminal 120 to operate the first virtual object in the virtual scene to perform animation behavior, and the animation behavior includes but is not limited to: adjusting body posture, crawling, walking, running, riding, jumping, driving, picking up, shooting, attacking, throwing, and fighting. Schematically, the first virtual object is a first virtual character, such as a simulated character or an anime character.

[0096] The first terminal 120 and the second terminal 160 are directly or indirectly connected to the server 140 via wired or wireless communication.

[0097] The server 140 includes at least one of a single server, multiple servers, a cloud computing platform, or a virtualization center. The server 140 is used to provide background services for applications that support virtual scenes. Optionally, the server 140 undertakes the main computing work, and the first terminal 120 and the second terminal 160 undertake the secondary computing work; or, the server 140 undertakes the secondary computing work, and the first terminal 120 and the second terminal 160 undertake the main computing work; or, the server 140, the first terminal 120 and the second terminal 160 adopt a distributed computing architecture for collaborative computing.

[0098] Optionally, server 140 is an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.

[0099] The second terminal 160 is installed and runs an application that supports virtual scenes, and the application includes any one of: MOBA games, first-person shooter games, third-person shooter games, virtual reality applications, three-dimensional map programs, or multiplayer machine survival games. In some embodiments, the second terminal 160 is a terminal used by the second user. When the second terminal 160 runs the application, the user interface of the application is displayed on the screen of the second terminal 160, and based on the opening operation of the second user in the user interface, the virtual scene is loaded and displayed in the application. The second user uses the second terminal 160 to operate the second virtual object in the virtual scene to perform animation behavior, and the animation behavior includes but is not limited to: adjusting body posture, crawling, walking, running, riding, jumping, driving, picking up, shooting, attacking, throwing, and fighting. Schematically, the second virtual object is a second virtual character, such as a simulated character or an anime character.

[0100] Optionally, the first virtual object controlled by the first terminal 120 and the second virtual object controlled by the second terminal 160 are in the same virtual scene. In this case, the first virtual object can interact with the second virtual object in the virtual scene.

[0101] Schematically, the first virtual object and the second virtual object are in a hostile relationship, for example, the first virtual object and the second virtual object belong to different camps or teams, and the virtual objects in the hostile relationship can interact in a confrontational manner on land, such as firing shooting props at each other, or throwing throwing props, etc. In other embodiments, the first virtual object and the second virtual object are teammates, for example, the first virtual object and the second virtual object belong to the same camp, the same team, have a friend relationship, or have temporary communication permissions.

[0102] Optionally, the applications installed on the first terminal 120 and the second terminal 160 are the same, or the applications installed on the two terminals are the same type of applications on different operating system platforms. The first terminal 120 and the second terminal 160 both refer to one of a plurality of terminals, and the embodiments of the present application only take the first terminal 120 and the second terminal 160 as examples.

[0103] The first terminal 120 and the second terminal 160 are of the same or different device types, and the device types include at least one of: a smart phone, a tablet computer, a smart speaker, a smart watch, a smart handheld game device, a vehicle-mounted terminal, a laptop computer, and a desktop computer, but are not limited thereto. For example, the first terminal 120 and the second terminal 160 are both smart phones, or other handheld portable game devices. The following embodiments are illustrated by taking the terminal including a smart phone as an example.

[0104] Those skilled in the art will appreciate that the number of the above terminals may be more or less. For example, the above terminal may be only one, or the above terminals may be dozens or hundreds, or more. The embodiment of the present application does not limit the number of terminals and device types.

[0105] The following describes the basic process of the virtual object control method provided in the embodiment of the present application.

[0106] Figure 2 is a flow chart of a method for controlling a virtual object provided by an embodiment of the present application. Figure 2 This embodiment is executed by an electronic device and is described by taking the electronic device as a terminal as an example. This embodiment includes the following steps:

[0107] 201. The terminal loads the whole body skeleton resource of the virtual object and the respective part skeleton resources of multiple body parts.

[0108] In some embodiments, a user starts a game application on a terminal, loads and displays a virtual scene in the game application, and since the virtual scene contains one or more virtual objects and environmental elements, for any virtual object in the virtual scene, the method provided in the embodiments of the present application can be used to control the animation behavior of the virtual object at any time, so as to display the virtual object executing the animation behavior in the virtual scene.

[0109] In some embodiments, for the current picture frame in the game picture stream, the current picture frame refers to the picture frame displayed on the screen at the current moment. The terminal needs to determine that the technician has pre-divided the virtual object into several body parts, and then load the whole body skeleton resources of the virtual object, and load the part skeleton resources of each body part. It should be noted that the part skeleton resources of each body part are assembled to form the whole body skeleton resource, which can avoid missing the skeleton resources of the virtual object and avoid errors in the rendering effect.

[0110] It should be noted that the skeleton resources involved in the embodiments of the present application refer to the point cloud data of the object model of the virtual object, the whole body skeleton resources refer to the point cloud data of the entire object model of the virtual object, and the part skeleton resources refer to the point cloud data of the specified body part separated from the whole body skeleton resources. The technicians can predefine the virtual object to be split into several body parts, and the position of each body part in the object model of the virtual object, and the embodiments of the present application do not specifically limit this.

[0111] 202. The terminal configures part animation information of the part skeleton resource of each body part based on the whole body animation information of the whole body skeleton resource, and the part animation information inherits the animation behavior of the body part in the whole body animation information.

[0112] The full-body animation information is used to indicate the animation behavior performed by the full body of the virtual object in the current picture frame.

[0113] The part animation information is used to indicate the animation behavior performed by a certain body part of the virtual object in the current picture frame, and the animation behavior of the body part indicated by the part animation information is inherited from the animation behavior of the whole body indicated in the whole body animation information.

[0114] In some embodiments, the animation behavior includes but is not limited to: standing behavior, confrontation behavior, sprinting behavior, falling behavior, etc. The embodiment of the present application does not specifically limit the type of animation behavior.

[0115] In some embodiments, whether it is full-body animation information or part animation information, the above animation information can be implemented as an animation node in the animation state machine of the animation engine, and the animation node represents an animation state in the animation state machine, which essentially indicates the animation behavior performed by the whole body or a certain body part of the virtual object in the current picture frame.

[0116] In some embodiments, for each body part split from the virtual object, the part animation information of the part skeleton resource of the body part can be configured according to the whole-body animation information of the whole-body skeleton resource. For example, the animation state recorded in the animation node of the whole-body animation information is directly assigned to the animation node created in the part animation information. This ensures that the part animation information can inherit the whole-body animation information, avoiding the inconsistency between the animation behavior of each body part split from the virtual object and the animation behavior of the whole body, and indirectly ensuring that after the virtual object is split into multiple body parts, the rendering effect of the combination of the multiple body parts is consistent with the global overall rendering effect.

[0117] 203. The terminal loads the appearance resource of the body part based on the appearance resource indication information of the body part, where the appearance resource indication information indicates the appearance resource of the body part.

[0118] In some embodiments, since the virtual object has been divided into multiple body parts, when storing the appearance resources of the virtual object, the appearance resources of the whole body (such as skin) will not be stored in units of each virtual object. Instead, the appearance resources of each body part of the virtual object will be stored as units, and the appearance resources will be indicated by appearance resource indication information. This greatly optimizes the management and storage methods of the appearance resources.

[0119] In some embodiments, in the current screen frame, the terminal can determine the appearance resource indication information to be loaded. For example, the appearance resource indication information to be loaded only includes the dressing resource indication information of the body part that has undergone a change in appearance in the previous screen frame. In this way, for body parts that have not undergone a change in appearance, there is no need to repeatedly load new appearance resources. Only the new appearance resources after the dressing of the body parts that have undergone a change in appearance need to be loaded. This optimizes the resource loading logic of each screen frame in the real-time game screen stream, reduces the loading burden of the terminal, improves the loading efficiency of virtual objects, shortens the rendering time of virtual objects, and reduces the probability of freezes.

[0120] In some embodiments, the appearance resource indication information of each body part is provided as a resource ID (Identification) of the corresponding appearance resource. The terminal can read the appearance resource indicated by each resource ID from the cache according to one or more resource IDs to be loaded, or use one or more resource IDs to be loaded to apply to the game server for the appearance resource indicated by each resource ID. The embodiment of the present application does not specifically limit the loading method of the appearance resource.

[0121] In other embodiments, the appearance resource indication information of each body part is provided as the resource address of the corresponding appearance resource. The terminal accesses one or more resource addresses to be loaded, and can download the appearance resources stored in each resource address. The embodiments of the present application do not specifically limit the information type of the appearance resource indication information.

[0122] In one example, for the body part "waist ornament", 10 styles are provided for wearing, then 10 appearance resources of each of the 10 styles will be stored, and 10 different resource IDs will be assigned to the 10 appearance resources. In this way, when the user controls the virtual object to wear a waist ornament of a specified style A, it is not necessary to load the whole body appearance resource of the virtual object wearing the waist ornament of style A, but to keep the appearance resources of other body parts of the virtual object unchanged, and only use the resource ID of the waist ornament of style A to load the appearance resource of the body part "waist ornament" that is specific to style A, which obviously saves the cost of loading the appearance resources of other body parts.

[0123] 204. The terminal hides the whole body skeleton resource, and based on the part animation information, controls the appearance resource to follow the part skeleton resource to perform animation behavior.

[0124] In some embodiments, when the terminal draws the virtual object that executes the animation behavior in the virtual scene, since the whole-body skeleton resource is essentially to provide a whole-body animation information, thereby controlling the part animation information of each part skeleton resource (because the part animation information inherits the whole-body animation information), but the whole-body skeleton resource itself does not need to load or bind any appearance resources, the whole-body skeleton resource is directly hidden. This can save the performance overhead of rendering the whole-body skeleton resource, and also avoid ghosting of the virtual object rendered in the current picture frame, thereby ensuring a good rendering effect.

[0125] In some embodiments, on the basis of hiding the whole body skeleton resources, for each split body part, the part animation information of the body part is used to control the appearance resource of the body part to follow the part skeleton resources of the body part to perform the corresponding animation behavior. This is to avoid the appearance resources not performing actions with the skeleton resources, and to ensure that the appearance resources of each body part can adapt to the animation behavior of the body part to change posture. For example, when the virtual object performs the animation behavior of "sprinting" throughout the body, the animation behavior of the body part "headwear" will inherit the animation behavior of "sprinting" of the whole body. Then, in the stage of this step 204, it is necessary to control the appearance resources of the body part "headwear" (that is, the headwear resources of the specified style) to present the posture change under the "sprinting" behavior (such as the hair accessories shaking according to the sprinting direction).

[0126] In some embodiments, for each separated body part, the above-mentioned method is used to control the appearance resources to adapt the posture of the animation behavior, and then the appearance resources of each body part after the posture adaptation are rendered, so that the appearance resources of each body part can be assembled to form the appearance resources of the whole body of the virtual object, and the appearance resources of the whole body all execute an overall, global, and consistent animation behavior, and there will be no behavioral separation of the virtual object in different body parts, ensuring smooth and natural transition and connection of the animation behavior.

[0127] It should be noted that the control method of virtual objects involved in the embodiments of the present application can be applied to control the animation behavior of any virtual object in a virtual scene at any time, so that the virtual object performing the animation behavior is displayed in the game screen. Therefore, any game screen frame in the game screen stream can apply this solution to control the animation behavior of all virtual objects and display the appearance of the character, which has a wide range of applicable scenarios.

[0128] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present disclosure, and will not be described in detail here.

[0129] The method provided in the embodiment of the present application splits the virtual object into multiple body parts, creates a part skeleton resource for each body part separately, and uses the part animation information to independently control the animation behavior of the body part. Since the part animation information is inherited from the whole-body animation information, the animation behavior of each body part remains consistent with the animation behavior of the whole body, and then loads the appearance resources based on each body part. After the appearance resources are adapted to the posture using the part animation information, the appearance resources of each body part are assembled to form the appearance resources of the whole body of the virtual object. In this way, in each frame of the real-time game screen stream, only the appearance resources with appearance changes need to be loaded as required, which optimizes the resource loading logic of each frame, reduces the loading burden of the terminal, improves the loading efficiency of the virtual object, shortens the rendering time of the virtual object, and reduces the probability of freezes.

[0130] In the above embodiment, the basic process of the control method of the virtual object is briefly introduced, and in the embodiment of the present application, the detailed process of the control method of the virtual object is exemplified. Figure 3 As shown, Figure 3 1 is a flowchart of a method for controlling a virtual object provided in an embodiment of the present application. The embodiment is executed by an electronic device and is described by taking the electronic device as a terminal as an example. The embodiment includes the following steps:

[0131] 301. The terminal creates a parent skeleton component, and imports the whole body skeleton resource of the virtual object into the parent skeleton component.

[0132] In some embodiments, the user starts a game application on the terminal and creates a game thread GameThread and a rendering thread RenderThread for the game application. The game thread GameThread is used to maintain the main game business logic, and the rendering thread RenderThread is used for non-hardware level rendering instruction processing logic. The game thread GameThread reads the scene resources of the virtual scene from the cache, or pulls the scene resources of the virtual scene from the server; then, the game thread GameThread submits the scene resources of the virtual scene to the rendering thread RenderThread, thereby loading and displaying the virtual environment in the game application.

[0133] Since one or more virtual objects and environmental elements are included in the virtual scene, for any virtual object in the virtual scene, the method provided by the embodiment of the present application can be used to control the animation behavior of the virtual object at any time, so as to display the virtual object that performs the animation behavior in the virtual scene. For the current picture frame in the game screen stream, the current picture frame refers to the picture frame displayed on the screen at the current moment. The terminal can first load the whole body skeleton resource of the virtual object, and then create a parent skeleton component in the game engine, and import the whole body skeleton resource into the parent skeleton component. Among them, the whole body skeleton resource refers to the point cloud data of the entire object model of the virtual object, and the parent skeleton component refers to a mesh (Mesh) data generated according to the whole body skeleton resource, which can be regarded as a kind of skinning data, used to characterize the epidermis data of the entire object model of the virtual object.

[0134] In some embodiments, during the process of loading the whole body skeleton resource, the terminal can determine the initial skeleton resource of the species type based on the species type of the virtual object; and configure the initial skeleton resource based on the body parameters of the virtual object to obtain the whole body skeleton resource. For example, for each virtual object in the current screen frame, the game thread GameThread of the game application on the terminal determines the species type and body parameters of the virtual object, then accesses the initial skeleton resource of the species type, and uses the body parameters to fine-tune the initial skeleton resource to obtain the whole body skeleton resource.

[0135] Among them, the species type indicates the virtual species to which the virtual object belongs, for example, the species types include human type, animal type, pet type, etc., and the species type can be provided as a species ID. The body shape parameters indicate the body shape of the virtual object, for example, the body shape parameters include gender, height, shortness, fatness, thinness, limb length, etc. The embodiment of the present application does not specifically limit the species type and body shape parameters.

[0136] In the above process, by configuring different initial bone resources for virtual objects of different species types, and allowing virtual objects of the same species type to reuse the same set of initial bone resources, there is no need to configure a set of full-body bone resources for each virtual object separately. Instead, only one set of initial bone resources needs to be configured for each species type, and then each virtual object is configured with its own body parameters. This can optimize the storage logic and configuration logic of bone resources, save storage overhead on the terminal side, and save the loading burden of game applications.

[0137] In other embodiments, a set of whole body skeleton resources may be configured for each virtual object separately, so that the whole body skeleton resources can be loaded only according to the object ID of the virtual object, which simplifies the loading process of the whole body skeleton resources.

[0138] In some embodiments, even for virtual objects of the same species type, they can be pre-divided into multiple character groups, and the initial skeleton resources can be reused in units of character groups. In this way, the initial skeleton resources need to be found according to the species ID and the character group ID during loading. In this way, by defining the division logic of the character group, such as ensuring that virtual objects with relatively small differences in body size are divided into the same character group, and designing the initial skeleton resources for virtual objects with typical body shapes under the same species type, each typical body shape corresponds to a character group, and virtual objects with similar body shapes are assigned to corresponding character groups to realize the reuse of initial skeleton resources, so that the initial skeleton resources are more targeted to the body shape of the virtual object, thereby improving the adaptability of the initial skeleton resources to the body shape of the virtual object.

[0139] In some embodiments, after the whole body skeleton resource is loaded, a parent skeleton component is created in the game engine, and the whole body skeleton resource is imported into the parent skeleton component, so that the skin data of the virtual object that has not yet presented the appearance style (skin, outerwear, accessories, etc.) can be previewed.

[0140] like Figure 4 As shown, a method of importing full-body skeleton resources into a parent skeleton component is shown. In the skeleton component configuration interface 400, the user can select the full-body skeleton resources to be imported into the parent skeleton component in the skeleton resource (Skeleton) option 401, so that after the import is completed, a FBX format model file is generated for the virtual object. FBX is a file type.

[0141] like Figure 5 As shown, a parent skeleton component of a virtual object is shown. It can be seen that the parent skeleton component 501 and the rotation view 502 of the parent skeleton component can convert the whole body skeleton resources from relatively original low-level point cloud data into Mesh mesh data that can be visualized.

[0142] In the above step 301, a possible implementation method of loading the whole body skeleton resource of the virtual object in the terminal is provided. By importing the whole body skeleton resource into the parent skeleton component, it is convenient to use the parent skeleton component to record the animation behavior of the whole body of the virtual object, avoiding the tedious calculation of setting the animation behavior of different child skeleton components separately. It is only necessary to make each child skeleton component inherit the animation behavior of the parent skeleton component, thereby ensuring the consistency of the animation behavior of different body parts of the virtual object.

[0143] 302. The terminal creates a full-body animation state machine and mounts the full-body animation state machine on the parent skeleton component. The full-body animation state machine is used to control the animation behavior of the virtual object.

[0144] In some embodiments, an animation state machine is used in a game engine to control the animation behavior of a virtual object. After a full-body skeleton resource is imported into a parent skeleton component, a full-body animation state machine can be created for the parent skeleton component, so that the full-body animation state machine serves as a carrier of the full-body animation information of the virtual object to control the full-body animation behavior of the virtual object, that is, the full-body animation behavior of the virtual object in each game screen frame is all implemented in the full-body animation state machine.

[0145] like Figure 6 As shown, an interactive method for creating a full-body animation state machine is shown. The user can select the Create option 601 in the menu bar 600 of the game engine, and then select the Anim Blueprint option 602 of the animation state machine in the expanded submenu of the Create option 601. In this way, a full-body animation state machine can be newly created, and then the full-body animation state machine can be mounted on the parent skeleton component to realize the control and switching of the basic animation behavior of the whole body of the virtual object through the full-body animation state machine.

[0146] 303. For each body part of the virtual object, the terminal mounts the child skeleton component of the body part on the parent skeleton component, and imports the body part skeleton resource into the child skeleton component.

[0147] In certain embodiments, the technician can predefine that the virtual object is split into several body parts, and the position of each body part in the object model of the virtual object, and generate the position bone resource of each body part according to the whole body bone resource, and the position bone resource of each body part is associated and stored according to the position ID. Like this for each body part of the virtual object, the game thread GameThread of the game application on the terminal can first load the position bone resource of this body part according to the position ID, then, in the game engine, a sub-bone component is created for each body part, and the sub-bone component is mounted on the parent bone component created in step 301, and then the position bone resource of each body part is imported into the sub-bone component of this body part. Repeat the above operation, until all the body parts of the virtual object are traversed, at this moment, just can load the position bone resource of all body parts, and each position bone resource is imported into the corresponding sub-bone component.

[0148] It should be noted that the assembly of the skeleton resources of multiple body parts of the virtual object must be able to form the whole body skeleton resources of the virtual object, so as to avoid missing the skeleton resources of the virtual object and avoid errors in the rendering effect. Among them, the skeleton resource refers to the point cloud data of the specified body part separated from the whole body skeleton resource, and the sub-skeleton component refers to a Mesh mesh data generated based on the skeleton resource of the part, which is used to represent the skin data of the specified body part in the object model of the virtual object.

[0149] In some embodiments, at the stage of producing part skeleton resources, a technician can configure the division method indication information of the virtual object, and then specify that the virtual object is divided into multiple body parts based on the division method indication information, and for each of the body parts, create a part skeleton resource that is adapted to the body part.

[0150] like Figure 7 As shown, a method of dividing the body parts of a virtual object is shown. For example, the virtual object is divided into five body parts: head 701, face 702, upper body 703, lower body 704 and feet 705. This concise and clear division method does not require the splitting and deployment of too many part bone resources, thereby reducing the overhead of configuring part bone resources.

[0151] As shown in Table 1, another way of dividing the body parts of virtual objects is shown. For example, the virtual objects are divided into 6 categories of body parts: regular parts, handheld parts, external parts, reserved parts, special effect parts, and special parts. Each category of body parts is carefully divided into specific details of body parts. In this way, the virtual objects can be finely divided, which facilitates the subsequent loading of appearance resources for each split body part separately, and the appearance resources of each body part can be replaced independently, realizing a high degree of freedom transformation of the appearance display of the virtual objects.

[0152] Table 1

[0153]

[0154] Above Figure 7 Table 1 and Table 1 only provide two different ways of dividing virtual objects. The technicians can configure a simpler or more detailed division method according to different business requirements. The embodiments of the present application do not specifically limit this.

[0155] In some embodiments, different virtual objects may have the same or different division methods. For example, virtual objects that reuse the same set of initial skeleton resources have the same division method indication information, while virtual objects with different initial skeleton resources have different division method indication information. Or, even virtual objects that reuse the same set of initial skeleton resources have different division method indication information. The embodiments of the present application do not specifically limit this.

[0156] In the above step 303, a possible implementation method of loading the part skeleton resources of each of the multiple body parts of the virtual object is provided. By importing the part skeleton resources of each body part into the child skeleton component, each child skeleton component inherits the animation behavior of the parent skeleton component, so that the animation behaviors of different child skeleton components of the same virtual object can be guaranteed to be consistent, avoiding inconsistent animation behaviors of different body parts resulting in an uncoordinated display effect.

[0157] 304. The terminal creates a part animation state machine for the body part and mounts the part animation state machine on the child skeleton component. The part animation state machine is used to control the animation behavior of the body part of the virtual object.

[0158] In some embodiments, for each body part of the virtual object, a part animation state machine is created for the sub-skeletal component of the body part, so that the part animation state machine serves as a carrier of the part animation information of the body part in the virtual object to control the animation behavior of the body part in the virtual object, that is, the animation behavior of the body part in the virtual object is all implemented in the part animation state machine, and finally the part animation state machine is mounted on the sub-skeletal component to realize the control and switching of the animation behavior of the body part of the virtual object through the part animation state machine. Repeat the above operation until all the body parts of the virtual object are traversed, at which time corresponding part animation state machines can be created for all the body parts. The creation process of the part animation state machine is the same as the creation process of the whole body animation state machine in step 302, and will not be repeated.

[0159] like Figure 8 As shown, taking the body part "head" as an example, a head animation state machine 801 is created, and the head animation state machine 801 carries the head animation information (i.e., controlling the facial expression animation and head shaking of the virtual object); similarly, taking the body part "torso" as an example, a torso animation state machine 802 is created, and the torso animation state machine 802 carries the torso animation information (such as the animation information of the fabric of the clothes).

[0160] like Fig. 9As shown, a schematic diagram of an interface in which the animation state machines of various parts of a virtual object are assembled is shown. In the game engine configuration interface 900, the body part table 910 in the upper part shows the part IDs of the multiple body parts of the virtual object, the storage addresses of the part skeleton resources and other attribute information. In the lower body part assembly area 920, you can see that the component type of the parent skeleton component is Base, and it displays the imported full-body skeleton resource 921 and the bound full-body animation state machine ABP_BaseCharacter; and the component type of the "hair style" child skeleton component is Hair, and it displays the imported hairstyle skeleton resource 922 and the bound hairstyle animation state machine ABP_HairCharacter; and the component type of the "head" child skeleton component is Head, and it displays the imported head skeleton resource 923 and the bound head animation state machine ABP_FaceCharacter; and the component type of the "torso" child skeleton component is Body, and it displays the imported torso skeleton resource 924 and the bound torso animation state machine ABP_BodyCharacter.

[0161] 305. The whole-body animation information carried by the whole-body animation state machine is transferred to the part animation state machine to generate part animation information of the body part, and the part animation information inherits the animation behavior of the body part in the whole-body animation information.

[0162] In some embodiments, for each body part of the virtual object, the whole body animation information carried in the whole body animation state machine can be copied in real time to generate the part animation information of the body part. For example, a custom animation node is newly created in the part animation state machine, and the whole body animation information of the whole body animation state machine is copied to the animation node in real time, so as to calculate and generate the local part animation information of the body part through the underlying C++ function. The above operation is repeated until all body parts of the virtual object are traversed, and at this time, the respective part animation information can be generated for all body parts.

[0163] like Fig.10 As shown, assuming that in a certain frame, the animation behavior at the corresponding moment in the full-body animation state machine is "standing", then for the body part "torso", in the blueprint of the torso animation state machine, an animation node will be created at this moment, and the animation node will be controlled to copy the full-body animation information "standing" recorded in the full-body animation state machine. For example, the inheritance of the animation node is realized through "CopyParentPose". After the torso animation information of the torso animation state machine is assigned to "standing", the torso part 1000 of the virtual object presenting the "standing" animation behavior is displayed in the left area.

[0164] In some embodiments, the whole body animation information of the virtual object at each moment in the whole body animation state machine may be provided as the animation state ID recorded in the animation node at that moment, such as animation state ID 01 represents "standing", animation state ID 02 represents "confrontation", animation state ID 03 represents "sprinting", animation state ID 04 represents "falling down", etc. Therefore, each part animation state machine actually records the animation state ID (i.e. part animation information) copied from the whole body animation state machine in the newly created animation node, but the action information of the part skeleton resource of the body part needs to be calculated by calling the underlying C++ function according to the part animation information.

[0165] In the above steps 302, 304-305, for each body part of the virtual object, full-body animation information based on the full-body skeleton resource is provided, and a possible implementation method is used to configure the part animation information of the part skeleton resource of the body part. By controlling the part animation information of each body part to directly inherit the full-body animation information, the consistency of the animation behaviors of different body parts of the virtual object is guaranteed (all inherited from the full-body animation information, so they must be consistent), which saves the tedious calculation of setting animation behaviors for different sub-skeleton components separately, thereby improving the calculation efficiency of the part animation information of each body part of the virtual object.

[0166] 306. The terminal loads the appearance resource of the body part based on the appearance resource indication information of the body part, where the appearance resource indication information indicates the appearance resource of the body part.

[0167] In some embodiments, after the virtual object is divided into the multiple body parts based on the division method indication information as described in step 303, for each body part of the virtual object, the technician can pre-provide and create at least one appearance resource adapted to the body part. For example, in one example, for the body part "waist ornament", 10 styles are provided for wear, then 10 appearance resources for each of the 10 styles will be stored, which can fully meet the increasing business needs of appearance performance. When a new style of a body part is added, it is only necessary to create the appearance resource of the new style separately.

[0168] like Fig.11As shown, an appearance resource management interface 1100 is provided. It can be seen that in the appearance resource management interface 1100, two appearance resources 1101-1102 are provided for the body part "hairstyle", two appearance resources 1103-1104 are provided for the body part "head", five appearance resources 1105, 1108, 1111, 1114, 1117 are provided for the body part "upper body", three appearance resources 1106, 1109, 1112, 1115, 1118 are provided for the body part "lower body", and four appearance resources 1107, 1110, 1113, 1116 are provided for the body part "shoes". Each appearance resource can have its own unique appearance resource indication information, which is used to uniquely identify the corresponding appearance resource and can be provided as the resource ID or resource address of the appearance resource.

[0169] On this basis, since the virtual object has been divided into multiple body parts, when storing the appearance resources of the virtual object, the appearance resources of the whole body (such as skin) will not be stored in units of each virtual object, but the appearance resources of each body part of the virtual object will be stored in units of each body part. Therefore, in order to facilitate the loading of appearance resources, the appearance resources can be indicated by the appearance resource indication information, which greatly optimizes the management and storage methods of the appearance resources.

[0170] In some embodiments, when loading the appearance resource of each body part in the current picture frame, the terminal can determine the indication information of the appearance resource to be loaded on the body part, determine the resource address of the appearance resource based on the indication information of the appearance resource, and then access the resource address to load the appearance resource stored in the resource address. Repeat the above operation until all body parts of the virtual object are traversed, at which time the appearance resources of all body parts can be loaded.

[0171] Schematically, the appearance resource indication information of each body part is provided as the resource ID of the corresponding appearance resource. The terminal can determine the local resource address of the corresponding appearance resource based on the resource ID to be loaded on each body part, and retrieve the appearance resource indicated by the resource ID from the local resource address, or use the resource ID to be loaded to apply to the game server for the appearance resource indicated by the resource ID. The embodiment of the present application does not specifically limit the loading method of the appearance resource.

[0172] Schematically, the appearance resource indication information of each body part is provided as the resource address of the corresponding appearance resource, so that the terminal can directly access the resource address of the appearance resource to be loaded, and can download the appearance resource stored in each resource address. The resource address can be a local storage path or an external URL (Uniform Resource Locator). The embodiment of the present application does not specifically limit the information type of the appearance resource indication information.

[0173] In some embodiments, in the current screen frame, the terminal can also determine, from the multiple body parts of the virtual object, the body part that has undergone a change in appearance relative to the previous screen frame, and then, based on the dressing resource indication information of the body part, only load the dressing appearance resource of the body part, and the dressing resource indication information indicates the appearance resource of the body part after the dressing. In this way, for body parts that have not undergone changes in appearance, there is no need to repeatedly load new appearance resources. Only for the body parts that have undergone changes in appearance, it is only necessary to load their new appearance resources after the dressing. This optimizes the resource loading logic of each screen frame in the real-time game screen stream, reduces the loading burden of the terminal, improves the loading efficiency of virtual objects, shortens the rendering time of virtual objects, and reduces the probability of freezes.

[0174] In one example, for the body part "waist ornament", 10 styles are provided for wearing, then 10 appearance resources of each of the 10 styles will be stored, and 10 different resource IDs will be assigned to the 10 appearance resources. In this way, when the user controls the virtual object to wear a waist ornament of a specified style A, it is not necessary to load the whole body appearance resource of the virtual object wearing the waist ornament of style A, but to keep the appearance resources of other body parts of the virtual object unchanged, and only use the resource ID of the waist ornament of style A to load the appearance resource of the body part "waist ornament" that is specific to style A, which obviously saves the cost of loading the appearance resources of other body parts.

[0175] In some embodiments, since there may be multiple appearance resources for multiple body parts that need to be loaded in the current picture frame, the multiple appearance resources can be loaded asynchronously. This avoids the blocking problem caused by waiting timeout during synchronous loading, and further improves the efficiency of loading appearance resources.

[0176] 307. The terminal binds the appearance resource of the body part to the child skeleton component of the body part.

[0177] In some embodiments, in the case of asynchronous loading, a coroutine can be suspended on the game thread GameThread to realize asynchronous loading of appearance resources. The coroutine adds the indication information of each appearance resource to be loaded to a waiting queue. For each body part of the virtual object, after the coroutine has loaded the appearance resource of the body part based on the appearance resource indication information, the coroutine can call back to notify the game thread GameThread. After receiving the callback notification, the game thread GameThread can bind the loaded appearance resource to the sub-skeletal component of the body part. Repeat the above operation until all body parts of the virtual object are traversed, at which time the appearance resources of all body parts can be bound to their corresponding sub-skeletal components.

[0178] like Fig.12 As shown, in the Avatar system assembly configuration interface 1200, in the virtual object assembly logic framework, the parent skeleton component 1201 of the virtual object, the child skeleton component 1202 of the torso, the child skeleton component 1203 of the head, and the child skeleton component 1204 of the hairstyle are displayed. The technicians can divide more or fewer body parts according to business needs. Expanding the child skeleton component 1202 of the torso, it can be seen that the part type of the body part is "Body", and the visibility option is checked to indicate that the body part is visible, and the loaded appearance resource of the torso is displayed. The user clicks on the appearance resource to view the project directory 1210 of the appearance resource.

[0179] 308. The terminal determines the rendering posture information of the appearance resource in the current picture frame based on the part animation information mounted on the child skeleton component.

[0180] In some embodiments, since each body part of the virtual object, its part skeleton resources, part animation state machine and appearance resources are bound to the child skeleton components of the body part, in this way, several body parts are divided, and several child skeleton components are hung on the parent skeleton component. For each child skeleton component, since the part animation state machine will generate the local part animation information of the body part according to the whole body animation information in the whole body animation state machine, then the underlying C++ function can be driven to calculate the rendering posture information that the appearance resource should present in the current frame according to the animation behavior (or animation state) indicated by the part animation information. For example, if the part animation information is "sprinting", then for the torso part, it is necessary to calculate the rendering posture information of the torso part's appearance resources (such as clothes) in the current frame in real time according to the part animation information "sprinting" (the displacement, rotation, deformation, etc. that the clothes should present in the "sprinting" state relative to the previous frame). Repeat the above operations until all body parts of the virtual object are traversed, and then the rendering posture information of the appearance resources of all body parts can be calculated.

[0181] 309. The terminal hides the whole body skeleton resource.

[0182] In some embodiments, the terminal can refer to the same method as in step 308, determine the rendering posture information of the parent skeleton component based on the full-body animation information mounted by the parent skeleton component, and then hide the rendering posture information of the parent skeleton component. In this way, since the parent skeleton component itself is not bound to or loaded with any full-body appearance resources, it is only to ensure the consistency of the animation behavior of different child skeleton components. By hiding the rendering posture information of the parent skeleton component when drawing the game screen, it is possible to avoid ghosting of virtual objects, save rendering performance overhead, and ensure good rendering effects.

[0183] like Fig.13 As shown, in the body part assembly area 1300 of the Avatar system, it can be seen that the visibility option of the parent bone component of the Base type is not checked, that is, the parent bone component is invisible, and the child bone component of the torso part of the Body type has the visibility option checked, that is, the child bone component of the torso part is visible. By checking the optional options of the child bone components of all body parts and not checking the visibility option of the parent bone component, it is possible to control the hiding of the rendering posture information of the parent bone component and control the drawing of the rendering posture information of all child bone components.

[0184] 310. The terminal renders the appearance resource of each body part in the current picture frame according to the rendering posture information of the body part, so as to control the appearance resource to follow the skeleton resource of the body part to perform animation behavior.

[0185] The appearance resources of the multiple body parts are assembled to form the animation behavior of the virtual object in the current picture frame.

[0186] In some embodiments, for each body part of the virtual object, the appearance resource of the body part can be rendered in the current picture frame according to the rendering posture information of the body part, so as to achieve the visual effect that the appearance resource follows the skeleton resource of the body part to perform the corresponding animation behavior. The above operation is repeated until all the body parts of the virtual object are traversed. At this time, the appearance resources of all the body parts can be drawn in the current picture frame, and it is ensured that these appearance resources follow the rendering posture information of the corresponding body part. The combination and assembly of the appearance resources of each body part can constitute the visual effect that the whole body of the virtual object performs the corresponding animation behavior.

[0187] In some embodiments, for the current frame, since there may be multiple virtual objects in the virtual scene, but not all virtual objects are necessarily visible, the rendering thread RenderThread performs OC (Occlusion Cull) detection on each virtual object in the virtual scene, and submits the skeleton resources, appearance resources and rendering posture information of each body part of the virtual object to the RHIThread (Render Hardware Interface Thread) for the virtual objects that pass the OC detection (representing that they are visible within the field of view of the current frame), and the RHIThread calls the Draw Call (DC) interface provided by the graphics API supported by the GPU, and the DC interface commands the GPU to drive the rendering pipeline to render the appearance resources of each body part of the virtual object to obtain the current frame. The rendering pipeline includes: a vertex shader, a rasterizer and a pixel shader.

[0188] The following will illustrate the rendering pipeline process for a certain body part. RHIThread calls the DC interface to pass the rendering posture information of the body part into the vertex shader, so as to calculate the vertex attributes (such as coordinates, color, material, texture, etc.) of each vertex in the bone resource of the body part one by one, and input the result of the vertex shader output into the rasterizer, which rasterizes it, and configures the result of the vertex shader output into discrete pixels and inputs them into the pixel shader. The pixel shader performs shading calculations on the rasterized pixels and outputs the shaded pixels to the frame buffer, so that the shaded pixels will be displayed in the current screen frame, and the above operations are repeated until all pixels of the entire current screen frame are drawn.

[0189] In the above steps 307-310, a possible implementation method is provided for hiding the whole body skeleton resources and controlling the appearance resources to follow the skeleton resources of the part to perform animation behavior based on the animation information of the part. This ensures that the appearance resources of each body part can adapt to the animation behavior of the body part to change posture. Since the appearance resources of various body parts are assembled to form the appearance resources of the whole body of the virtual object, and the appearance resources of the whole body perform an overall, global and consistent animation behavior, there will be no behavioral separation of the virtual object in different body parts, ensuring smooth and natural transition and connection of animation behavior.

[0190] like Fig.14 As shown, a full-body rendering effect is formed by splitting a virtual object into multiple body parts, drawing appearance resources for each body part one by one, and assembling the body parts after all the body parts are drawn. It can be seen that each body part in the full-body rendering effect follows the animation behavior of "standing", and the animation behaviors of each body part remain consistent. There will be no behavior separation of the virtual object in different body parts, ensuring a smooth and natural transition and connection of the animation behaviors.

[0191] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present disclosure, and will not be described in detail here.

[0192] The method provided in the embodiment of the present application splits the virtual object into multiple body parts, creates a part skeleton resource for each body part separately, and uses the part animation information to independently control the animation behavior of the body part. Since the part animation information is inherited from the whole-body animation information, the animation behavior of each body part remains consistent with the animation behavior of the whole body, and then loads the appearance resources based on each body part. After the appearance resources are adapted to the posture using the part animation information, the appearance resources of each body part are assembled to form the appearance resources of the whole body of the virtual object. In this way, in each frame of the real-time game screen stream, only the appearance resources with appearance changes need to be loaded as required, which optimizes the resource loading logic of each frame, reduces the loading burden of the terminal, improves the loading efficiency of the virtual object, shortens the rendering time of the virtual object, and reduces the probability of freezes.

[0193] In the above embodiment, the processing flow of drawing any virtual object in any frame of the game screen stream is introduced in detail, by first splitting the whole body skeleton resources of the virtual object into the respective part skeleton resources of multiple body parts, and creating a sub-skeleton component and a part animation state machine for each body part separately, and binding the appearance resources, in the real-time rendering stage, only the appearance resources of multiple body parts need to be dynamically assembled, so that the appearance expression of the virtual object can be dynamically assembled according to the appearance resource indication information of each body part, and a smooth assembly display can be performed.

[0194] Next, we will combine Fig.15 The Avatar system solution for dynamic assembly of body parts of virtual objects provided in the embodiments of the present application is illustrated by way of example, and the dynamic assembly of various body parts involved in the above embodiments is achieved through the Avatar system.

[0195] In step 1501, the appearance resource and the part skeleton resource of each body part of the virtual object are constructed.

[0196] Before obtaining, the technical staff needs to first determine the division method indication information, and determine the multiple body parts that the virtual object needs to be split into according to the division method indication information, and then produce the part skeleton posture for each body part and produce multiple styles of appearance resources for each body part based on the body part.

[0197] In the production stage, for example, artists use DCC (Digital Content Creation) tools to produce appearance resources based on body parts.

[0198] In step 1502, a complete skeleton resource of the virtual object is constructed.

[0199] In step 1503, the whole body skeleton resource, the part skeleton resource of each body part, and the appearance resource are imported into the game engine.

[0200] The game engine may be a UE engine or a Unity engine, or other engines, and the engine type is not limited here.

[0201] In the generation phase, for example, artists produce basic skeleton resource files: full-body skeleton resources and part-skeleton resources for each body part, and import the above resources into the game engine.

[0202] In step 1504, the data structure of the resource table is planned and designed. In order to configure the resources into the table for easy management, the data structure can be configured for each body part (or the whole body): Mesh resources, bone resources, animation state machine resources, material resources (such as appearance resources).

[0203] In step 1505, based on the loading system, asynchronous loading of various resources in the above-mentioned design resource table is implemented, such as adding various resources to the asynchronous loading queue and waiting for the resource loading callback notification of the loading system.

[0204] Taking appearance resources as an example, in the loading system, the appearance resources of each body part can be asynchronously loaded according to the appearance resource indication information (such as resource ID). After the asynchronous loading of the appearance resource of any body part is completed, the loading system will call back to notify the game thread.

[0205] In step 1506, in each picture frame, the Avatar system performs bottom-level refresh settings for various loaded resources notified by the loading system callback, replacing the original resources of the old body parts to achieve dynamic assembly of the Avatar system.

[0206] It should be noted that in the process of dynamic assembly of the Avatar system, it is necessary to solve the problem of setting the animation state machine of each body part. In the embodiment of the present application, the child skeleton component of each body part in the animation system needs to ensure that it can copy the skeleton matrix data of the parent skeleton component.

[0207] Next, we will introduce the animation inheritance process for each body part of the assembly, involving the following steps A1 to A5:

[0208] A1. Construct a parent skeleton component BaseMeshComponent as the base skeleton of the virtual object. This base skeleton is used to carry all the actual data information of the virtual object, such as animation behavior, basic body parameters of the character, etc.

[0209] like Fig.16 As shown in the assembly logic framework of the virtual object, it can be seen that the parent skeleton component BaseMeshComponent of the virtual object is used as a basic skeleton, and the remaining child skeleton components are mounted on the parent skeleton component BaseMeshComponent.

[0210] A2. According to each body part separated from the virtual object, construct the corresponding child skeleton component respectively, and mount the child skeleton component to the parent skeleton component BaseMeshComponent.

[0211] Still Fig.16For example, assuming that the body is divided into three parts: torso, head, and hairstyle, then the child skeletal component BodyComp for the torso, the child skeletal component HeadComp for the head, and the child skeletal component HairComp for the hairstyle will be created, forming a parent skeletal component BaseMeshComponent on which three child skeletal components are mounted: BodyComp, HeadComp, and HairComp. Among them, the Avatar component that carries the appearance resource of each body part will also be bound to the corresponding child skeletal component (equivalent to being attached to the child skeletal component bound to itself, and then mounted to the parent skeletal component BaseMeshComponent).

[0212] A3. Mount the full-body ABP (full-body animation state machine) carrying full-body animation information to the parent skeleton component BaseMeshComponent to realize complete full-body animation information based on the basic skeleton.

[0213] like Fig.17 As shown, taking the virtual object BP_BasePlayerCharacter (self) controlled by the player as an example, in the skeleton component architecture 1710 of the virtual object, in the CapsuleComponent (component container), there is a parent skeleton component BaseMeshComponent, on which three child skeleton components are mounted: BodyComp, HeadComp and HairComp.

[0214] Furthermore, in the parameter configuration bar 1720 of the parent skeleton component BaseMeshComponent, the position (Location), rotation (Rotation) and size (Scale) of the parent skeleton component BaseMeshComponent in the three directions of x, y and z can be configured, and the animation information (Animation) of the parent skeleton component BaseMeshComponent can also be configured, such as selecting "Use Animation Blueprint" in the animation mode (Animation Mode), and configuring the animation state machine parameters (Anim Class) to the full-body animation state machine "ABP_BaseCharacter".

[0215] A4. Customize the animation node in the part animation state machine of the child skeleton component, copy the full body animation information of the full body animation state machine in real time, and pass it to the blueprint of the part animation state machine.

[0216] The animation node of this part's animation state machine needs to be implemented in the underlying C++ because it carries the calculation of basic bone information.

[0217] Still Fig.16 Take this as an example, the three child skeleton components BodyComp, HeadComp and HairComp all copy the full body animation information (Copy Pose) from the parent skeleton component BaseMeshComponent.

[0218] A5. Hide the rendering posture information of the whole body animation state machine, and display the rendering posture information of each split part animation state machine.

[0219] Still Fig.16 Taking this as an example, hide the parent skeleton component BaseMeshComponent, and draw the appearance resources of the three child skeleton components BodyComp, HeadComp and HairComp respectively, so as to show the overall appearance of the virtual object.

[0220] By hiding the rendering posture information of the whole body skeleton posture and drawing the rendering posture information of the appearance resource of each body part, it is possible to implement a whole body animation state machine based on the parent skeleton component to carry the actual animation information, and use the part animation state machine of the child skeleton component to inherit the part animation information and assemble the complete appearance performance of the virtual object.

[0221] In an embodiment of the present application, the parent skeleton component, which is a basic skeleton with skeletal information, is used as the main object, and the child skeleton components of other split body parts are used as child objects. Under this framework, the main object has basic animation information, and the child object does not have basic animation information. However, when rendering, the child object will inherit and use the basic animation information of the basic skeleton, and all linked child skeleton components will use the basic animation information of the parent skeleton component to form a lightweight skeletal system. Each body part will asynchronously load the appearance resources through the Avatar system at runtime, and dynamically set the assembly method to achieve smooth connection of each body part. Not only does it improve the flexibility of generating virtual objects, but it also greatly improves the rendering performance. In addition, this method of inheriting the basic animation information of the basic skeleton also solves the problem of bloated blueprint resource references for a large number of virtual objects. Various resources of each body part can be dynamically and synchronously loaded to achieve smooth assembly display in real-time rendering.

[0222] Fig.18 This is a schematic diagram of a virtual object control device provided in an embodiment of the present application. Fig.18 , the device comprises:

[0223] The skeleton resource loading module 1801 is used to load the whole body skeleton resource of the virtual object and the respective part skeleton resources of multiple body parts;

[0224] A configuration module 1802 is used to configure the part animation information of the part skeleton resource of each body part based on the whole body animation information of the whole body skeleton resource, and the part animation information inherits the animation behavior of the body part in the whole body animation information;

[0225] An appearance resource loading module 1803 is used to load the appearance resource of the body part based on the appearance resource indication information of the body part, where the appearance resource indication information indicates the appearance resource of the body part;

[0226] The control module 1804 is used to hide the whole body skeleton resource and control the appearance resource to follow the skeleton resource of the part to perform animation behavior based on the animation information of the part.

[0227] The device provided in the embodiment of the present application splits the virtual object into multiple body parts, creates a part skeleton resource for each body part separately, and uses the part animation information to independently control the animation behavior of the body part. Since the part animation information is inherited from the whole-body animation information, the animation behavior of each body part remains consistent with the animation behavior of the whole body, and then loads the appearance resources based on each body part. After the appearance resources are adapted to the posture using the part animation information, the appearance resources of each body part are assembled to form the appearance resources of the whole body of the virtual object. In this way, in the real-time game screen stream, each frame only needs to load the appearance resources with appearance changes as required, which optimizes the resource loading logic of each frame, reduces the loading burden of the terminal, improves the loading efficiency of the virtual object, shortens the rendering time of the virtual object, and reduces the probability of freezes.

[0228] In some embodiments, the skeleton resource loading module 1801 is used to:

[0229] Create a parent skeleton component and import the whole body skeleton resource into the parent skeleton component;

[0230] For each body part, mount the child bone component of the body part on the parent bone component, and import the body part bone resource into the child bone component.

[0231] In some embodiments, the configuration module 1802 is used to:

[0232] Create a full-body animation state machine, and mount the full-body animation state machine on the parent skeleton component, where the full-body animation state machine is used to control the animation behavior of the virtual object;

[0233] Create a part animation state machine for the body part, and mount the part animation state machine on the child skeleton component, where the part animation state machine is used to control the animation behavior of the body part of the virtual object;

[0234] The whole body animation information carried by the whole body animation state machine is transferred to the part animation state machine to generate the part animation information.

[0235] In some embodiments, the control module 1804 is used to:

[0236] For each body part, bind the appearance resource of the body part to the child bone component of the body part;

[0237] Based on the part animation information mounted on the child skeleton component, determine the rendering posture information of the appearance resource in the current picture frame;

[0238] According to the rendering posture information of each body part, the appearance resource of the body part is rendered in the current picture frame, wherein the appearance resources of the multiple body parts are assembled to constitute the animation behavior of the virtual object in the current picture frame.

[0239] In some embodiments, the control module 1804 is further configured to:

[0240] The rendering posture information of the parent skeleton component is hidden, where the rendering posture information of the parent skeleton component is determined based on the full-body animation information.

[0241] In some embodiments, based on Fig.18 The device is composed of:

[0242] A division module, configured to divide the virtual object into the plurality of body parts based on the division mode indication information;

[0243] The creation module is used to create, for each of the body parts, at least one appearance resource adapted to the body part.

[0244] In some embodiments, the skeleton resource loading module 1801 is used to:

[0245] Based on the species type of the virtual object, determining the initial bone resources of the species type;

[0246] Based on the body parameters of the virtual object, the initial skeleton resource is configured to obtain the whole body skeleton resource.

[0247] In some embodiments, the appearance resource loading module 1803 is used to:

[0248] Determine a resource address of the appearance resource based on the appearance resource indication information;

[0249] Access the resource address and load the appearance resource stored in the resource address.

[0250] In some embodiments, the appearance resource loading module 1803 is further used to:

[0251] In the current frame, determining, from the multiple body parts of the virtual object, a body part that has undergone a change in appearance relative to that in the previous frame;

[0252] Based on the dressing resource indication information of the dressing body part, the dressing appearance resource of the dressing body part is loaded, and the dressing resource indication information indicates the appearance resource of the dressing body part after the dressing.

[0253] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present disclosure, and will not be described in detail here.

[0254] It should be noted that: the control device for virtual objects provided in the above embodiments only uses the division of the above functional modules as an example when controlling and displaying virtual objects. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the electronic device is divided into different functional modules to complete all or part of the functions described above. In addition, the control device for virtual objects provided in the above embodiments and the control method embodiment of virtual objects belong to the same concept. The specific implementation process is detailed in the control method embodiment of virtual objects, which will not be repeated here.

[0255] Fig.19 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application, such as Fig.19 As shown, the electronic device is taken as terminal 1900 for example. Optionally, the device type of the terminal 1900 includes: a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III, Moving Picture Experts Group Audio Layer 3), an MP4 (Moving Picture Experts Group Audio Layer IV, Moving Picture Experts Group Audio Layer 4) player, a laptop computer or a desktop computer. The terminal 1900 may also be called a user device, a portable terminal, a laptop terminal, a desktop terminal or other names.

[0256] Typically, the terminal 1900 includes: a processor 1901 and a memory 1902 .

[0257] Optionally, the processor 1901 includes one or more processing cores, such as a 4-core processor, an 8-core processor, etc. Optionally, the processor 1901 is implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). In some embodiments, the processor 1901 includes a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 1901 is integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 1901 also includes an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.

[0258] In some embodiments, the memory 1902 includes one or more computer-readable storage media, and optionally, the computer-readable storage medium is non-transitory. Optionally, the memory 1902 also includes a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 1902 is used to store at least one program code, and the at least one program code is used to be executed by the processor 1901 to implement the control method of the virtual object provided in each embodiment of the present application.

[0259] In some embodiments, the terminal 1900 may also optionally include: a peripheral device interface 1903 and at least one peripheral device. The processor 1901, the memory 1902 and the peripheral device interface 1903 may be connected via a bus or a signal line. Each peripheral device may be connected to the peripheral device interface 1903 via a bus, a signal line or a circuit board. Specifically, the peripheral device includes: at least one of a radio frequency circuit 1904, a display screen 1905, a camera assembly 1906, an audio circuit 1907 and a power supply 1908.

[0260] The peripheral device interface 1903 may be used to connect at least one peripheral device related to I / O (Input / Output) to the processor 1901 and the memory 1902. In some embodiments, the processor 1901, the memory 1902, and the peripheral device interface 1903 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 1901, the memory 1902, and the peripheral device interface 1903 are implemented on a separate chip or circuit board, which is not limited in this embodiment.

[0261] The radio frequency circuit 1904 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 1904 communicates with the communication network and other communication devices through electromagnetic signals. The radio frequency circuit 1904 converts the electrical signal into an electromagnetic signal for transmission, or converts the received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 1904 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, and the like. Optionally, the radio frequency circuit 1904 communicates with other terminals through at least one wireless communication protocol. The wireless communication protocol includes, but is not limited to: a metropolitan area network, various generations of mobile communication networks (2G, 3G, 4G and 5G), a wireless local area network and / or a WiFi (Wireless Fidelity) network. In some embodiments, the radio frequency circuit 1904 also includes circuits related to NFC (Near Field Communication), which is not limited in this application.

[0262] The display screen 1905 is used to display a UI (User Interface). Optionally, the UI includes graphics, text, icons, videos, and any combination thereof. When the display screen 1905 is a touch display screen, the display screen 1905 also has the ability to collect touch signals on the surface or above the surface of the display screen 1905. The touch signal can be input to the processor 1901 as a control signal for processing. Optionally, the display screen 1905 is also used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments, the display screen 1905 is one, and the front panel of the terminal 1900 is set; in other embodiments, the display screen 1905 is at least two, which are respectively set on different surfaces of the terminal 1900 or are folded; in some embodiments, the display screen 1905 is a flexible display screen, which is set on the curved surface or folded surface of the terminal 1900. Even, optionally, the display screen 1905 is set to a non-rectangular irregular shape, that is, a special-shaped screen. Optionally, the display screen 1905 is made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).

[0263] The camera assembly 1906 is used to capture images or videos. Optionally, the camera assembly 1906 includes a front camera and a rear camera. Typically, the front camera is arranged on the front panel of the terminal, and the rear camera is arranged on the back of the terminal. In some embodiments, there are at least two rear cameras, which are any one of a main camera, a depth of field camera, a wide-angle camera, and a telephoto camera, so as to realize the fusion of the main camera and the depth of field camera to realize the background blur function, the fusion of the main camera and the wide-angle camera to realize panoramic shooting and VR (Virtual Reality) shooting function or other fusion shooting functions. In some embodiments, the camera assembly 1906 also includes a flash. Optionally, the flash is a monochrome temperature flash, or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm light flash and a cold light flash, which is used for light compensation at different color temperatures.

[0264] In some embodiments, the audio circuit 1907 includes a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, and convert the sound waves into electrical signals and input them into the processor 1901 for processing, or input them into the radio frequency circuit 1904 to achieve voice communication. For the purpose of stereo acquisition or noise reduction, there are multiple microphones, which are respectively arranged at different parts of the terminal 1900. Optionally, the microphone is an array microphone or an omnidirectional acquisition microphone. The speaker is used to convert the electrical signal from the processor 1901 or the radio frequency circuit 1904 into sound waves. Optionally, the speaker is a traditional film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert the electrical signal into sound waves audible to humans, but also convert the electrical signal into sound waves inaudible to humans for purposes such as ranging. In some embodiments, the audio circuit 1907 also includes a headphone jack.

[0265] The power supply 1908 is used to power various components in the terminal 1900. Optionally, the power supply 1908 is an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power supply 1908 includes a rechargeable battery, the rechargeable battery supports wired charging or wireless charging. The rechargeable battery is also used to support fast charging technology.

[0266] In some embodiments, the terminal 1900 further includes one or more sensors 1910 . The one or more sensors 1910 include, but are not limited to, an acceleration sensor 1911 , a gyroscope sensor 1912 , a pressure sensor 1913 , an optical sensor 1914 , and a proximity sensor 1915 .

[0267] In some embodiments, the acceleration sensor 1911 detects the magnitude of acceleration on the three coordinate axes of the coordinate system established by the terminal 1900. For example, the acceleration sensor 1911 is used to detect the components of gravity acceleration on the three coordinate axes. Optionally, the processor 1901 controls the display screen 1905 to display the user interface in a horizontal view or a vertical view according to the gravity acceleration signal collected by the acceleration sensor 1911. The acceleration sensor 1911 is also used to collect motion data of games or users.

[0268] In some embodiments, the gyroscope sensor 1912 detects the body direction and rotation angle of the terminal 1900, and the gyroscope sensor 1912 and the acceleration sensor 1911 cooperate to collect the user's 3D actions on the terminal 1900. The processor 1901 implements the following functions based on the data collected by the gyroscope sensor 1912: motion sensing (such as changing the UI according to the user's tilt operation), image stabilization during shooting, game control, and inertial navigation.

[0269] Optionally, the pressure sensor 1913 is arranged on the side frame of the terminal 1900 and / or the lower layer of the display screen 1905. When the pressure sensor 1913 is arranged on the side frame of the terminal 1900, it can detect the user's holding signal of the terminal 1900, and the processor 1901 performs left and right hand recognition or shortcut operation according to the holding signal collected by the pressure sensor 1913. When the pressure sensor 1913 is arranged on the lower layer of the display screen 1905, the processor 1901 controls the operability controls on the UI interface according to the user's pressure operation on the display screen 1905. The operability controls include at least one of a button control, a scroll bar control, an icon control, and a menu control.

[0270] The optical sensor 1914 is used to collect the ambient light intensity. In one embodiment, the processor 1901 controls the display brightness of the display screen 1905 according to the ambient light intensity collected by the optical sensor 1914. Specifically, when the ambient light intensity is high, the display brightness of the display screen 1905 is increased; when the ambient light intensity is low, the display brightness of the display screen 1905 is decreased. In another embodiment, the processor 1901 also dynamically adjusts the shooting parameters of the camera assembly 1906 according to the ambient light intensity collected by the optical sensor 1914.

[0271] The proximity sensor 1915, also called a distance sensor, is usually arranged on the front panel of the terminal 1900. The proximity sensor 1915 is used to collect the distance between the user and the front of the terminal 1900. In one embodiment, when the proximity sensor 1915 detects that the distance between the user and the front of the terminal 1900 is gradually decreasing, the processor 1901 controls the display screen 1905 to switch from the screen-on state to the screen-off state; when the proximity sensor 1915 detects that the distance between the user and the front of the terminal 1900 is gradually increasing, the processor 1901 controls the display screen 1905 to switch from the screen-off state to the screen-on state.

[0272] Those skilled in the art will understand that Fig.19 The structure shown in the figure does not constitute a limitation on the terminal 1900, and the terminal 1900 may include more or less components than those shown in the figure, or combine some components, or adopt a different component arrangement.

[0273] In an exemplary embodiment, a computer-readable storage medium is also provided, such as a memory including at least one computer program, and the at least one computer program can be executed by a processor in an electronic device to complete the control method of the virtual object in each of the above embodiments. For example, the computer-readable storage medium includes ROM (Read-Only Memory), RAM (Random-Access Memory), CD-ROM (Compact Disc Read-Only Memory), magnetic tape, floppy disk, and optical data storage device, etc.

[0274] In an exemplary embodiment, a computer program product is also provided, including one or more computer programs, which are stored in a computer-readable storage medium. One or more processors of an electronic device can read the one or more computer programs from the computer-readable storage medium, and the one or more processors execute the one or more computer programs, so that the electronic device can execute to complete the control method of the virtual object in the above embodiment.

[0275] A person of ordinary skill in the art will understand that all or part of the steps to implement the above embodiments can be completed by hardware, or can be completed by instructing related hardware through a program. Optionally, the program is stored in a computer-readable storage medium. Optionally, the above-mentioned storage medium is a read-only memory, a disk or an optical disk, etc.

[0276] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A method for controlling a virtual object, characterized in that: The method comprises: Load the whole body skeleton resource of the virtual object and the respective part skeleton resources of multiple body parts; For each of the body parts, based on the whole body animation information of the whole body skeleton resource, part animation information of the part skeleton resource of the body part is configured, and the part animation information inherits the animation behavior of the body part in the whole body animation information; Based on the appearance resource indication information of the body part, loading the appearance resource of the body part, the appearance resource indication information indicates the appearance resource of the body part; The whole body skeleton resource is hidden, and based on the part animation information, the appearance resource is controlled to follow the part skeleton resource to perform animation behavior.

2. The method according to claim 1, characterized in that The whole body skeleton resource and the respective part skeleton resources of the multiple body parts of the virtual object are loaded as follows: Create a parent skeleton component, and import the whole body skeleton resource into the parent skeleton component; For each of the body parts, a child skeleton component of the body part is mounted on the parent skeleton component, and the body part skeleton resource is imported into the child skeleton component.

3. The method according to claim 2, characterized in that The configuring the part animation information of the part skeleton resource of the body part based on the whole body animation information of the whole body skeleton resource comprises: Creating a full-body animation state machine, and mounting the full-body animation state machine on the parent skeleton component, wherein the full-body animation state machine is used to control the animation behavior of the virtual object; Creating a part animation state machine for the body part, and mounting the part animation state machine on the child skeleton component, wherein the part animation state machine is used to control the animation behavior of the body part of the virtual object; The whole body animation information carried by the whole body animation state machine is transferred to the part animation state machine to generate the part animation information.

4. The method according to claim 2, characterized in that: The controlling the appearance resource to follow the part skeleton resource to perform animation behavior based on the part animation information includes: For each of the body parts, binding the appearance resource of the body part to the child skeleton component of the body part; Determine the rendering posture information of the appearance resource in the current picture frame based on the part animation information mounted on the child skeleton component; According to the rendering posture information of each of the body parts, the appearance resources of the body parts are rendered in the current picture frame, wherein the appearance resources of the multiple body parts are assembled to constitute the animation behavior of the virtual object in the current picture frame.

5. The method according to claim 4, characterized in that The hiding of the whole body skeleton resources includes: The rendering posture information of the parent skeleton component is hidden, where the rendering posture information of the parent skeleton component is determined based on the full-body animation information.

6. The method according to claim 1, characterized in that The method further comprises: Dividing the virtual object into the plurality of body parts based on the division manner indication information; For each of the body parts, at least one appearance resource adapted to the body part is created.

7. The method according to claim 1, characterized in that The whole body skeleton resource of the virtual object loaded includes: Based on the species type of the virtual object, determining an initial bone resource of the species type; The initial skeleton resource is configured based on the body parameters of the virtual object to obtain the whole body skeleton resource.

8. The method according to claim 1, characterized in that The loading of the appearance resource of the body part based on the appearance resource indication information of the body part comprises: Determining a resource address of the appearance resource based on the appearance resource indication information; The resource address is accessed, and the appearance resource stored in the resource address is loaded.

9. The method according to claim 1, characterized in that: The method further comprises: In the current frame, determining, from the multiple body parts of the virtual object, a body part that has undergone a change in appearance relative to that in the previous frame; Based on the dressing resource indication information of the dressing body part, the dressing appearance resource of the dressing body part is loaded, and the dressing resource indication information indicates the appearance resource of the dressing body part after dressing.

10. A control device for a virtual object, characterized in that: The device comprises: A skeleton resource loading module is used to load the whole body skeleton resources of the virtual object and the skeleton resources of each of multiple body parts; A configuration module, configured to configure, for each of the body parts, part animation information of the part skeleton resource of the body part based on the whole body animation information of the whole body skeleton resource, wherein the part animation information inherits the animation behavior of the body part in the whole body animation information; An appearance resource loading module, configured to load the appearance resource of the body part based on the appearance resource indication information of the body part, wherein the appearance resource indication information indicates the appearance resource of the body part; The control module is used to hide the whole body skeleton resource and control the appearance resource to follow the part skeleton resource to perform animation behavior based on the part animation information.

11. An electronic device, characterized in that: The electronic device includes one or more processors and one or more memories, wherein at least one computer program is stored in the one or more memories, and the at least one computer program is loaded and executed by the one or more processors to implement the virtual object control method as described in any one of claims 1 to 9.

12. A computer-readable storage medium, characterized in that: At least one computer program is stored in the computer-readable storage medium, and the at least one computer program is loaded and executed by the processor to implement the control method of the virtual object according to any one of claims 1 to 9.

13. A computer program product, characterized in that The computer program product comprises at least one computer program, and the at least one computer program is loaded and executed by a processor to implement the method for controlling a virtual object according to any one of claims 1 to 9.