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

By splitting virtual objects into multiple parts and loading appearance resources independently, the problem of low loading efficiency and long rendering time of virtual object appearance resources in game applications is solved, achieving efficient resource management and smooth animation performance.

WO2024179178A1PCT designated stage expired Publication Date: 2024-09-06TENCENT TECHNOLOGY (SHENZHEN) CO LTD

Patent Information

Application Number
PCT/CN2024/070112
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-03-02
Filing Date
2024-01-02
Publication Date
2024-09-06

AI Technical Summary

Technical Problem

Existing game applications load complex virtual object appearance resources in each frame, resulting in low loading efficiency, long rendering time, prone to lagging, and bloated appearance resource reference relationships.

Method used

Split the virtual object into multiple parts, load the part skeletal resources separately, and use the part animation information to independently control the animation behavior. Inherit the whole body animation information through the part animation information to ensure the consistency of the animation behavior, and then load the appearance in units of each part. Resources, loading changed appearance resources only when needed.

Benefits of technology

The resource loading logic is optimized, reducing the loading burden of the terminal, improving the loading efficiency of virtual objects, shortening the rendering time, reducing the probability of lag, and achieving flexible appearance and efficient rendering performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024070112_06092024_PF_FP
    Figure CN2024070112_06092024_PF_FP
Patent Text Reader

Abstract

The present application relates to the technical field of computers, and discloses a virtual object control method and apparatus, an electronic device, and a storage medium. According to the present application, a virtual object is split into a plurality of parts, a part skeleton resource is separately loaded for each part, and the part is independently controlled by part animation information to carry out an animated behavior; the part animation information is from whole-body animation information, so that the animated behaviors of the parts are kept consistent with the animated behaviors of the whole body, and then appearance resources are loaded by taking each part as a unit; the part animation information is used to perform pose adaptation on the appearance resources, and then the appearance resources of the parts are assembled to form an appearance resource of the whole body of the virtual object, so that the loading burden of a terminal is reduced, the loading efficiency of the virtual object is improved, the time consumed for rendering the virtual object is shortened, and the probability of stuttering is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

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

[0001] This application claims priority to Chinese patent application number 202310245141.9, filed on March 2, 2023, entitled “Method, device, electronic device and storage medium for controlling virtual objects”, the entire contents of which are incorporated herein by reference. Technical Field

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

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

[0004] In the process of displaying game screen frames in real time in a game application, 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 skeletal posture of the virtual object.

[0005] Summary of the Invention

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

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

[0008] The electronic device loads the whole body skeleton resource of the virtual object and the respective part skeleton resources of the multiple parts;

[0009] For each of the parts, the electronic device configures part animation information of the part skeleton resource of the 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 part in the whole-body animation information;

[0010] The electronic device loads the appearance resource of the part based on the appearance resource indication information of the part, where the appearance resource indication information indicates the appearance resource of the part;

[0011] The electronic device hides the whole body skeleton resource and controls the appearance resource to follow the part skeleton resource to perform animation behavior based on the part animation information.

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

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

[0014] A configuration module configured to configure, for each of the parts, part animation information of the part skeleton resource of the 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 part in the whole-body animation information;

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

[0016] 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.

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

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

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

[0020] In some embodiments, the configuration module is configured to:

[0021] 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;

[0022] Creating a part animation state machine for the 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 part of the virtual object;

[0023] 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.

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

[0025] For each of the parts, bind the appearance resource of the part to the child skeleton component of the part;

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

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

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

[0029] Hiding rendering pose information of the parent skeleton component, where the rendering pose information of the parent skeleton component is determined based on the full-body animation information.

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

[0031] a division module, configured to divide the virtual object into the plurality of parts based on the division method indication information;

[0032] The creation module is used to create at least one appearance resource adapted to each of the parts.

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

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

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

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

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

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

[0039] In some embodiments, the appearance resource loading module is further configured to:

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

[0041] Based on the dressing resource indication information of the dressing part, the dressing appearance resource of the dressing part is loaded, wherein the dressing resource indication information indicates the appearance resource of the dressing part after the dressing.

[0042] On the one hand, an electronic device is provided, which includes one or more processors and one or more memories, wherein the one or more memories store at least one computer program, 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 as described in any possible implementation method.

[0043] 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 method for controlling a virtual object as described in any possible implementation manner.

[0044] In one aspect, a computer program product is provided, comprising one or more computer programs 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 can execute the one or more computer programs, so that the electronic device can perform the virtual object control method of any of the possible implementations described above.

[0045] By splitting the virtual object into multiple parts, loading the part skeleton resource for each part separately, and using the part animation information to independently control the animation behavior of the part, and since the part animation information inherits the whole-body animation information, the animation behavior of each part remains consistent with the animation behavior of the whole body, and then loading the appearance resource for each part. After using the part animation information to adapt the appearance resource to the posture, the appearance resources of each part are assembled to form the appearance resource of the whole body of the virtual object. In this way, in each frame of the real-time picture stream, only the appearance resource with appearance changes needs to be loaded according to demand, 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. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. 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 any creative work.

[0047] FIG1 is a schematic diagram of an implementation environment of a virtual object control method provided by an embodiment of the present application;

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

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

[0050] FIG4 is a schematic diagram of a skeleton component configuration interface provided in an embodiment of the present application;

[0051] FIG5 is a schematic diagram of a parent skeleton component provided in an embodiment of the present application;

[0052] FIG6 is an interaction diagram for creating a full-body animation state machine provided by an embodiment of the present application;

[0053] FIG7 is a schematic diagram of dividing parts of a virtual object provided in an embodiment of the present application;

[0054] FIG8 is a schematic diagram of a part animation state machine provided in an embodiment of the present application;

[0055] FIG9 is a schematic diagram of a game engine configuration interface provided in an embodiment of the present application;

[0056] FIG10 is a schematic diagram of a blueprint interface of a torso animation state machine provided in an embodiment of the present application;

[0057] FIG11 is a schematic diagram of an appearance resource management interface provided in an embodiment of the present application;

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

[0059] FIG13 is a schematic diagram of another Avatar system assembly configuration interface provided in an embodiment of the present application;

[0060] FIG14 is an assembly rendering effect diagram of parts of a virtual object provided in an embodiment of the present application;

[0061] FIG15 is a principle flow chart of a method for controlling a virtual object provided in an embodiment of the present application;

[0062] FIG16 is a diagram of a logic framework of animation inheritance of a virtual object provided by an embodiment of the present application;

[0063] FIG17 is a diagram of a skeleton component architecture of a virtual object provided by an embodiment of the present application;

[0064] FIG18 is a schematic structural diagram of a virtual object control device provided in an embodiment of the present application;

[0065] FIG19 is a schematic structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

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

[0067] In this application, the terms "first", "second", etc. are used to distinguish identical or similar items with substantially 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 the quantity and execution order.

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

[0069] 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.

[0070] The user-related information (including but not limited to the user's device information, personal information, behavioral 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 part of the virtual object involved in this application are obtained with full authorization.

[0071] The following explains the terms involved in the embodiments of the present application.

[0072] A MOBA (Multiplayer Online Battle Arena) game is a game that features several locations within a virtual world. Users from different factions control virtual objects and compete within the virtual world, aiming to capture or destroy the opposing faction's locations. For example, a MOBA game may divide users into at least two factions, with teams from each faction occupying their own map area and competing to achieve a specific victory condition. This victory condition includes, but is not limited to, capturing or destroying a location within the opposing faction's territory, defeating the opposing faction's virtual objects, maintaining one's own survival within a specified scenario and timeframe, seizing certain resources, or achieving a higher interactive score than the opposing team within a specified timeframe. For example, a MOBA game may divide users into two factions, with user-controlled virtual objects scattered throughout the virtual world, competing to destroy or capture a target building / location / base / crystal deep within the opposing faction's territory 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 meets the victory conditions.

[0073] 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-simulation 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. The user can control the virtual object to move in the virtual scene. Optionally, the virtual scene can also be used for a 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.

[0074] Virtual object: refers to an movable object in a virtual scene. The movable object can be a virtual person, a virtual animal, an animated 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 can be a virtual image in the virtual scene that is used to represent the user. The virtual scene can 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 can be a three-dimensional stereo model, and the three-dimensional stereo model can be a three-dimensional character built based on three-dimensional human skeleton technology. The same virtual object can show different external images by wearing different skins. In some embodiments, the virtual object can also be implemented using a 2.5-dimensional or 2-dimensional model, which is not limited in the embodiments of the present application.

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

[0076] BodyPart: This function divides a virtual object into multiple parts according to the pre-defined division method. For example, a virtual object can be divided into the following parts: torso, head, hairstyle, limbs, etc.

[0077] Game engines are pre-programmed, editable computer game systems or the core components of interactive real-time graphics applications. These systems provide game designers with the tools they need to easily and quickly create games without having to start from scratch. Game engines include the following systems: animation engine, rendering engine, physics engine, collision detection system, sound effects, scripting engine, artificial intelligence, networking engine, and scene management.

[0078] 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.

[0079] Animation: Recording the state of an object at a specific moment in time using timeframes, then switching between them in a specific sequence and at specific intervals. The principles of animation in all software are similar. In the Unity engine, the behavior of each virtual object (also known as animation behavior) is controlled by its associated animation state machine.

[0080] Animator Controller: A manager used in the Unity engine to manage multiple animation playback states. It manages the movement of virtual objects in a virtual scene and controls the generation of their animations. Within the animation engine, the Animator Controller interfaces with the animation logic layer and controls the animation pipeline.

[0081] The animation state machine allows users to manage the animation sequence and trigger conditions of virtual objects by customizing the animation state machine's animation nodes, thereby achieving complex animation or interaction effects. In the animation state machine, each animation state of a virtual object indicates an animation behavior. For example, if the animation states include standing state, confrontation state, and elimination state, the corresponding animation behaviors include standing behavior, confrontation behavior, and falling behavior. For example, when generating an animation for a behavior, the corresponding animation node for that behavior is created in the animation state machine within the animation engine. Different behaviors require different animation nodes to be created in the animation state machine.

[0082] Rendering engine: In the field of graphics technology, a rendering engine is a system that renders a completed 3D model of a virtual object into a 2D image, maintaining the 3D effect of the 3D model. Specifically, in gaming technology, the virtual scene itself and all virtual objects in the virtual scene are rendered by importing the model data of the completed 3D model into the rendering engine. This engine then drives the rendering pipeline in the GPU to render the object, visually presenting the object indicated by the 3D model on the terminal's display screen.

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

[0084] Graphics API (Application Programming Interface): The process of communication between the CPU (Central Processing Unit) and the GPU is carried out according to a specific standard graphics API. 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.

[0085] Rendering pipeline: The graphics rendering process that runs on the GPU. The image rendering process typically involves the following rendering pipelines: vertex shader, rasterizer, and pixel shader. By writing code in the shader, you can control the GPU to render the rendering components.

[0086] 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.

[0087] Render Thread: One of the threads when a game application uses multi-threading technology, used for non-hardware level rendering instruction processing logic.

[0088] 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.

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

[0090] In the game screen rendering scenario, when the game application is running, it is necessary to render each frame of the game screen in real time. The action performed by the virtual object in each frame is called animation behavior. 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 is 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.

[0091] Virtual objects can show different external images by wearing different skins. 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, earrings, back ornaments, necklaces, bracelets, gloves and other appearances to realize the dressing 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.

[0092] Game applications need to load the appearance resources of all virtual objects within their field of view in every frame, and control the changes in each virtual object's appearance resources based on the virtual object's skeletal posture. As the demand for appearance performance increases, the appearance resources will become increasingly rich. If game applications load a large number of appearance resources in every frame, the reference relationships of these numerous virtual objects will become bloated, resulting in low virtual object loading efficiency, long rendering times, and prone to lag.

[0093] In view of this, an embodiment of the present application provides a control method for a virtual object, which can split the 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 parts, if the user only changes the appearance resources of certain 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 virtual object. Instead, only the appearance resources of the changed parts need to be loaded. Each part of the virtual object can be replaced separately according to user needs, fully meeting the needs of the virtual object in different details of appearance performance, 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.

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

[0095] FIG1 is a schematic diagram of an implementation environment of a virtual object control method provided by an embodiment of the present application. Referring to FIG1 , the implementation environment includes: a first terminal 120 , a server 140 , and a second terminal 160 .

[0096] The first terminal 120 has an application installed and running that supports a virtual scene. The application may include any of a MOBA game, a first-person shooter game, a third-person shooter game, a virtual reality application, a three-dimensional map program, or a multiplayer machine-based survival game. In some embodiments, the first terminal 120 is used by a first user. The first terminal 120 runs the application, and the application's user interface is displayed on the screen of the first terminal 120. Based on the first user's opening operation in the user interface, the virtual scene is loaded and displayed in the application. The first user uses the first terminal 120 to manipulate a first virtual object in the virtual scene to perform an animated behavior, including but not limited to adjusting body posture, crawling, walking, running, riding, jumping, driving, picking up, shooting, attacking, throwing, and fighting. Illustratively, the first virtual object is a first virtual character, such as a humanoid character or an anime character.

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

[0098] Server 140 includes at least one of a single server, multiple servers, a cloud computing platform, or a virtualization center. Server 140 provides backend services for applications supporting virtual scenarios. Optionally, server 140 performs primary computing tasks, while first terminal 120 and second terminal 160 perform secondary computing tasks. Alternatively, server 140 performs secondary computing tasks, while first terminal 120 and second terminal 160 perform primary computing tasks. Alternatively, server 140, first terminal 120, and second terminal 160 utilize a distributed computing architecture for collaborative computing.

[0099] 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.

[0100] Second terminal 160 has an application installed and running that supports virtual scenes. This application includes any one of: a MOBA game, a first-person shooter game, a third-person shooter game, a virtual reality application, a 3D map program, or a multiplayer machine-based survival game. In some embodiments, second terminal 160 is used by a second user. Second terminal 160 runs the application, and the application's user interface is displayed on the screen of second terminal 160. Based on the second user's initial actions in the user interface, the application loads and displays the virtual scene. The second user uses second terminal 160 to manipulate a second virtual object in the virtual scene to perform animated behaviors, including but not limited to: adjusting body posture, crawling, walking, running, riding, jumping, driving, picking up, shooting, attacking, throwing, and fighting. Illustratively, the second virtual object is a second virtual character, such as a realistic or anime character.

[0101] 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.

[0102] Illustratively, the first virtual object and the second virtual object are in a hostile relationship, for example, they belong to different factions or teams. These hostile virtual objects can interact on land in a confrontational manner, such as firing shooting props at each other or throwing throwing props. In other embodiments, the first virtual object and the second virtual object are teammates, for example, they belong to the same faction, the same team, are friends, or have temporary communication permissions.

[0103] 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 generally refer to one of multiple terminals. In the embodiments of the present application, only the first terminal 120 and the second terminal 160 are used as examples.

[0104] The first terminal 120 and the second terminal 160 may be of the same or different device types, including but not limited to at least one of a smartphone, a tablet computer, a smart speaker, a smartwatch, a smart handheld game console, a portable gaming device, an in-vehicle terminal, a laptop computer, and a desktop computer. For example, the first terminal 120 and the second terminal 160 may both be smartphones or other handheld portable gaming devices.

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

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

[0107] FIG2 is a flow chart of a method for controlling a virtual object provided by an embodiment of the present application. Referring to FIG2 , this embodiment is executed by an electronic device, and is described using the electronic device as a terminal as an example. This embodiment includes the following steps:

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

[0109] In some embodiments, the user starts a game application on the terminal, loads and displays a virtual scene in the game application. 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 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 performing the animation behavior in the virtual scene.

[0110] In some embodiments, for the current frame in the game screen stream, the current frame refers to the 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 parts, and then load the whole body skeleton resources of the virtual object, and load the part skeleton resources of each part. It should be noted that the part skeleton resources of each part are assembled to form the whole body skeleton resources, which can avoid missing the skeleton resources of the virtual object and avoid errors in the rendering effect.

[0111] It should be noted that the skeleton resource involved in the embodiments of the present application refers to the point cloud data of the object model of the virtual object, the whole-body skeleton resource refers to the point cloud data of the entire object model of the virtual object, and the part skeleton resource refers to the point cloud data of the parts separated from the whole-body skeleton resource. The technician can predefine the number of parts into which the virtual object is divided and the position of each part in the object model of the virtual object, and the embodiments of the present application do not limit this.

[0112] Another point worth noting is that, in addition to gaming applications, the embodiments of the present application can also be applied to other applications that require displaying virtual objects, such as displaying virtual objects corresponding to accounts in chat applications, or displaying virtual objects in live broadcast images in live broadcast applications. The processing procedures in other applications are similar to those in gaming applications, and will not be repeated in the embodiments of the present application.

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

[0114] 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.

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

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

[0117] 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. 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 part of the virtual object in the current picture frame.

[0118] In some embodiments, for each part of the virtual object split out, the part animation information of the part skeleton resource of the 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 part split out of the virtual object and the animation behavior of the whole body, and indirectly ensures that after the virtual object is split into multiple parts, the rendering effect of the combination of multiple parts is consistent with the global overall rendering effect.

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

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

[0121] In some embodiments, in the current picture frame, the terminal determines 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 dressing part that has undergone appearance changes in the previous picture frame. In this way, for the parts that have not undergone appearance changes, there is no need to repeatedly load new appearance resources. It is only necessary to load the new appearance resources after the dressing part that has undergone appearance changes. This optimizes the resource loading logic of each picture frame in the real-time picture 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.

[0122] In some embodiments, the appearance resource indication information of each 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 based on one or more resource IDs to be loaded, or use one or more resource IDs to be loaded to apply to the 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.

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

[0124] In one example, for the "waist ornament" part, 10 styles are available. Therefore, 10 appearance resources corresponding to these 10 styles will be stored, and each of these 10 appearance resources will be assigned 10 unique resource IDs. This way, when the user controls a virtual object to wear a specific waist ornament of style A, there's no need to load the entire appearance resource for the virtual object wearing style A. Instead, the appearance resources for the rest of the virtual object remain unchanged. Using the resource ID for style A's waist ornament, the appearance resource specific to style A for the "waist ornament" part can be loaded separately, significantly saving the overhead of loading the appearance resources for other parts.

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

[0126] In some embodiments, when the terminal draws the virtual object that performs 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 the ghosting of the virtual object rendered in the current picture frame, thereby ensuring a good rendering effect.

[0127] In some embodiments, on the basis of hiding the whole body skeleton resources, for each split part, the part animation information of the part is used to control the appearance resource of the part to follow the part skeleton resources of the part to perform the corresponding animation behavior. This is to avoid the appearance resource not performing actions with the skeleton resources, and to ensure that the appearance resource of each part can adapt to the animation behavior of the part to change posture. For example, when the virtual object performs the animation behavior of "sprinting" on the whole body, the animation behavior of the 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 resource of the part "headwear" (that is, the headwear resource of the specified style) to show the posture change under the "sprinting" behavior (such as the hair accessories shaking according to the sprinting direction).

[0128] In some embodiments, for each split part, the appearance resources are controlled in the above-mentioned manner to adapt to the posture of the animation behavior, and then the appearance resources of each part after posture adaptation are rendered, so that the appearance resources of each part can be assembled to form the appearance resources of the entire body of the virtual object, and the appearance resources of the entire body all perform an overall, global, and consistent animation behavior, and there will be no behavioral separation of the virtual object in different parts, ensuring a smooth and natural transition and connection of the animation behavior.

[0129] It should be noted that the virtual object control method involved in the embodiments of this application can be applied to control the animation behavior of any virtual object in a virtual scene at any moment, so that the virtual object performing the animation behavior is displayed on the screen. Therefore, any frame in the image stream can be applied to 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.

[0130] 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.

[0131] The method provided in the embodiment of the present application splits the virtual object into multiple parts, loads the part skeleton resource for each part separately, and uses the part animation information to independently control the animation behavior of the part. Since the part animation information is inherited from the whole-body animation information, the animation behavior of each part remains consistent with the animation behavior of the whole body. Then, the appearance resource is loaded based on each part, and the posture of the appearance resource is adapted using the part animation information, so that the appearance resources of each part are assembled to form the appearance resource of the whole body of the virtual object. In this way, in each frame of the real-time picture stream, only the appearance resource with appearance changes needs to be loaded according to demand, 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.

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

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

[0134] In some embodiments, a user launches a game application on a terminal and creates a GameThread and a RenderThread for the game application. The GameThread maintains the main game business logic, while the RenderThread processes non-hardware rendering instructions. The GameThread reads the scene resources of the virtual scene from a cache or pulls them from a server. The GameThread then submits the scene resources to the RenderThread, which loads and displays the virtual scene in the game application.

[0135] 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 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 based on the whole body skeleton resource, which can be regarded as a skin data for characterizing the epidermis data of the entire object model of the virtual object.

[0136] In some embodiments, during the process of loading the full-body skeletal resource, the terminal may determine the initial skeletal resource of the species type of the virtual object based on the species type of the virtual object; and configure the initial skeletal resource based on the body parameters of the virtual object to obtain the full-body skeletal resource. For example, for each virtual object in the current 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 skeletal resource of the species type and fine-tunes the initial skeletal resource using the body parameters to obtain the full-body skeletal resource.

[0137] Among them, the species type indicates the virtual species to which the virtual object belongs, for example, species types include human type, animal type, pet type, etc. The species type can be provided as a species ID, and the body shape parameter indicates the body shape of the virtual object, for example, 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.

[0138] 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, it is only necessary to configure a set of initial bone resources for each species type, and then configure each virtual object with its own body parameters. This can optimize the storage logic and configuration logic of the bone resources, save storage overhead on the terminal side, and save the loading burden of the game application.

[0139] 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, simplifying the whole-body skeleton resource loading process.

[0140] 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 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 body size differences 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.

[0141] 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.

[0142] As shown in Figure 4, 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.

[0143] As shown in FIG5 , 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.

[0144] In above-mentioned step 301, a possible implementation method of the whole body skeleton resource of the terminal loading virtual object is provided. By importing the whole body skeleton resource into the father skeleton component, it is convenient to use the father skeleton component to record the animation behavior of the virtual object whole body, avoiding the tedious calculation of setting the animation behavior of different child skeleton components separately, only needing to make each child skeleton component inherit the animation behavior of the father skeleton component, thus ensuring the consistency of the animation behavior of different parts of the virtual object. In another embodiment, other possible implementation methods can also be adopted to load the whole body skeleton resource of the virtual object.

[0145] It should be noted that, in addition to gaming applications, the embodiments of the present application can also be applied to other applications that require displaying virtual objects, such as displaying virtual objects corresponding to accounts in chat applications, or displaying virtual objects in live broadcast images in live broadcast applications. The processing procedures in other applications are similar to those in gaming applications, and will not be repeated in the embodiments of the present application.

[0146] 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.

[0147] 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 frame is all implemented in the full-body animation state machine.

[0148] As shown in FIG6 , 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 new full-body animation state machine can be 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 virtual object's whole body through the full-body animation state machine.

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

[0150] The parts of the virtual object include parts on the body of the virtual object, or parts outside the body of the virtual object, such as decorations worn on the body of the virtual object, clothes worn, the ground on which the virtual object stands, etc.

[0151] In certain embodiments, technicians can predefine that virtual object is split into several positions, and the position of each position in the object model of virtual object, and generate the position bone resource of each position according to whole body skeleton resource, the position bone resource of each position is carried out associated storage according to position ID.Like this for each position of virtual object, the game thread GameThread of game application on terminal can first load the position bone resource of this position according to position ID, then, in game engine, all create a sub-skeleton component for each position, the sub-skeleton component is mounted on the father skeleton component that creates in step 301, then by the position bone resource of each position, import in the sub-skeleton component of this position.Repeat above operation, until all positions of traversal virtual object, just can load the position bone resource of all positions now, and each position bone resource is imported in the corresponding sub-skeleton component.

[0152] It's important to note that the assembly of the skeleton resources for multiple parts of a virtual object must be able to form the virtual object's full-body skeleton resource. This prevents missing skeleton resources and rendering errors. A skeleton resource refers to the point cloud data of a specific part separated from the full-body skeleton resource, while a sub-skeleton component refers to the mesh data generated from that skeleton resource, which is used to represent the skin data of a specific part of the virtual object's object model.

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

[0154] As shown in Figure 7, a method for dividing the parts of a virtual object is shown. For example, the virtual object is divided into five 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, reducing the overhead of configuring part bone resources.

[0155] As shown in Table 1, another method for dividing the parts of virtual objects is shown. For example, virtual objects are divided into six categories of parts: regular parts, handheld parts, external parts, reserved parts, special effects parts, and special parts. Each category of parts is carefully divided into specific details. This enables fine-grained splitting of virtual objects, facilitates the subsequent separate loading of appearance resources for each split part, and the appearance resources of each part can be independently replaced, achieving high-degree-of-freedom transformation of the appearance display of virtual objects.

[0156] Table 1

[0157] The above Figure 7 and Table 1 only provide two different ways of dividing virtual objects. Technicians can configure simpler or more detailed division methods according to different business needs. The embodiments of the present application do not specifically limit this.

[0158] 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.

[0159] In the above-mentioned step 303, a possible implementation method of loading the position skeleton resources of each of the multiple parts of the virtual object is provided. By importing the position skeleton resources of each part into the child skeleton component, after each child skeleton component inherits the animation behavior of the parent skeleton component, it is possible to ensure that the animation behavior of different child skeleton components of the same virtual object is consistent, avoiding the inconsistent animation behavior of different parts and causing an uncoordinated display effect. In another embodiment, other possible implementation methods can also be adopted to load the position skeleton resources of the parts of the virtual object.

[0160] 304. The terminal creates a part animation state machine for the 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 part of the virtual object.

[0161] In some embodiments, for each part of the virtual object, a part animation state machine is created for the sub-skeletal component of the part, so that the part animation state machine serves as a carrier of the part animation information of the part in the virtual object to control the animation behavior of the part in the virtual object, that is, the animation behavior of the 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 part of the virtual object through the part animation state machine. The above operations are repeated until all parts of the virtual object are traversed, at which time corresponding part animation state machines can be created for all 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 here.

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

[0163] As shown in Figure 9, a schematic diagram of an interface showing the assembly of animation state machines for various parts of a virtual object is shown. In the game engine configuration interface 900, the part table 910 in the upper part shows the part IDs, storage paths of part skeleton resources and other attribute information of multiple parts of the virtual object. In the part assembly area 920 in the lower part, 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; the component type of the "hairstyle" child skeleton component is Hair, and it displays the imported hairstyle skeleton resource 922 and the bound hairstyle animation state machine ABP_HairCharacter; 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.

[0164] 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 part. The part animation information inherits the animation behavior of the part in the whole-body animation information.

[0165] In some embodiments, for each part of a virtual object, the part animation state machine can replicate the full-body animation information from the full-body animation state machine in real time to generate the part animation information for that part. For example, a custom animation node can be created in the part animation state machine, and the full-body animation information from the full-body animation state machine can be replicated to this animation node in real time. This allows the calculation of the local part animation information for that part using underlying C++ functions. This process is repeated until all parts of the virtual object have been traversed, at which point the part animation information for each part can be generated.

[0166] As shown in Figure 10, 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 part "torso", an animation node will be created at this moment in the blueprint of the torso animation state machine, and the animation node will be controlled to copy the full-body animation information "standing" recorded in the full-body animation state machine, such as through "CopyParentPose (copy the pose of the parent skeleton component)" to realize the inheritance of the animation node. 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.

[0167] In some embodiments, the full-body animation state machine may provide the full-body animation information of a virtual object at each moment as the animation state ID recorded in the animation node at that moment. For example, animation state ID 01 represents "standing," animation state ID 02 represents "confrontation," animation state ID 03 represents "sprinting," and animation state ID 04 represents "falling down." Therefore, each part animation state machine actually records the animation state ID (i.e., part animation information) copied from the full-body animation state machine in its newly created animation node. However, the motion information of the part's skeleton resource must be calculated by calling the underlying C++ function based on the part animation information.

[0168] In the above steps 302, 304-305, for each part of the virtual object, full-body animation information based on the full-body skeleton resource is provided, and a possible implementation method of configuring the part animation information of the part skeleton resource of the part is provided. By controlling the part animation information of each part to directly inherit the full-body animation information, the consistency of the animation behavior of different parts of the virtual object is guaranteed (all inherited from the full-body animation information, and therefore must have consistency), which saves the tedious calculation of setting the animation behavior of different sub-skeleton components separately, thereby improving the calculation efficiency of the part animation information of each part of the virtual object. In another embodiment, other possible implementation methods can also be adopted to configure the part animation information of the part skeleton resource of the part based on the full-body animation information of the full-body skeleton resource.

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

[0170] In some embodiments, after the virtual object is divided into the multiple parts based on the division method indication information as described in step 303, a technician can pre-provision and create at least one appearance resource that matches each part of the virtual object. For example, in one example, if there are 10 wearable styles for the "waist ornament" part, 10 appearance resources corresponding to each of the 10 styles will be stored. This fully meets the growing demand for appearance presentation services. When adding a new style for a particular part, only the appearance resource for the new style needs to be created.

[0171] As shown in FIG11 , an appearance resource management interface 1100 is provided. It can be seen that in appearance resource management interface 1100, two appearance resources 1101 and 1102 are provided for the "hairstyle" part, two appearance resources 1103 and 1104 are provided for the "head" part, five appearance resources 1105, 1108, 1111, 1114, and 1117 are provided for the "upper torso" part, three appearance resources 1106, 1109, 1112, 1115, and 1118 are provided for the "lower torso" part, and four appearance resources 1107, 1110, 1113, and 1116 are provided for the "shoes" part. 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.

[0172] Furthermore, since virtual objects are divided into multiple parts, when storing the appearance resources of virtual objects, the entire body appearance resources (such as skin) are not stored per virtual object. Instead, the appearance resources of each virtual object are stored separately. Therefore, to facilitate the loading of appearance resources, appearance resource indication information can be used to indicate appearance resources, which greatly optimizes the management and storage of appearance resources.

[0173] In some embodiments, when loading the appearance resource for each part in the current frame, the terminal may determine indication information of the appearance resource to be loaded for that part, determine the resource address of the appearance resource based on the indication information, then access the resource address and load the appearance resource stored at the resource address. This operation is repeated until all parts of the virtual object are traversed, at which point the appearance resources for all parts are loaded.

[0174] Schematically, the appearance resource indication information of each 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 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 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.

[0175] Schematically, the appearance resource indication information of each 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 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.

[0176] In some embodiments, in the current picture frame, the terminal can also determine the dressing part that has undergone an appearance change relative to the previous picture frame from multiple parts of the virtual object, and then, based on the dressing resource indication information of the dressing part, only load the dressing appearance resource of the dressing part. The dressing resource indication information indicates the appearance resource of the dressing part after the dressing. In this way, for the parts whose appearance has not changed, there is no need to repeatedly load new appearance resources. It is only necessary to load the new appearance resource after the dressing part whose appearance has changed. This optimizes the resource loading logic of each picture frame in the real-time picture 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.

[0177] In one example, for the "waist ornament" part, 10 styles are available. Therefore, 10 appearance resources corresponding to these 10 styles will be stored, and each of these 10 appearance resources will be assigned 10 unique resource IDs. This way, when the user controls a virtual object to wear a specific waist ornament of style A, there's no need to load the entire appearance resource for the virtual object wearing style A. Instead, the appearance resources for the rest of the virtual object remain unchanged. Using the resource ID for style A's waist ornament, the appearance resource specific to style A for the "waist ornament" part can be loaded separately, significantly saving the overhead of loading the appearance resources for other parts.

[0178] In some embodiments, since the appearance resources of multiple parts may need to be loaded in the current screen frame, 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 appearance resource loading.

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

[0180] In some embodiments, in the case of asynchronous loading, a coroutine can be suspended on the game thread GameThread to implement asynchronous loading of appearance resources. The coroutine adds the indication information of each appearance resource to be loaded to a waiting queue. For each part of the virtual object, after the coroutine has loaded the appearance resource of the part based on the appearance resource indication information, the coroutine can callback 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 part. Repeat the above operation until all parts of the virtual object are traversed. At this time, the appearance resources of all parts can be bound to their corresponding sub-skeletal components.

[0181] As shown in Figure 12, 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 technician can divide more or fewer parts according to business needs. Expanding the child skeleton component 1202 of the torso, it can be seen that the part type is "Body". The visibility option is checked to indicate that the part is visible, and the loaded appearance resource of the torso is displayed. The user can click on the appearance resource to view the project directory 1210 of the appearance resource.

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

[0183] In some embodiments, each part of a virtual object has its part skeleton resource, part animation state machine, and appearance resource bound to that part's child skeleton component. This means that each divided part has several child skeleton components attached to its parent skeleton component. For each child skeleton component, the part animation state machine generates local animation information for that part based on the full-body animation information in the full-body animation state machine. This then drives the underlying C++ function to calculate the rendering pose information that the appearance resource should present in the current frame based on the animation behavior (or animation state) indicated by the part animation information. For example, if the part animation information is "sprint," then for the torso part, the rendering pose information of the torso's appearance resource (e.g., clothing) in the current frame needs to be calculated in real time based on the part animation information (the displacement, rotation, and deformation that the clothing should present in the "sprinting" state relative to the previous frame). This process is repeated until all parts of the virtual object have been traversed, at which point the rendering pose information for the appearance resources of all parts can be calculated.

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

[0185] In some embodiments, the terminal can determine the rendering pose information of the parent skeletal component based on the full-body animation information mounted by the parent skeletal component in a manner similar to that used in step 308, and then hide the rendering pose information of the parent skeletal component. In this way, since the parent skeletal component itself is not bound to or loaded with any full-body appearance resources, and is only used to ensure the consistency of animation behavior of different child skeletal components, hiding the rendering pose information of the parent skeletal component during game rendering can avoid ghosting of virtual objects, saving rendering performance overhead and ensuring good rendering effects.

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

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

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

[0189] In some embodiments, for each part of the virtual object, the appearance resource of that part can be rendered in the current frame according to the rendering pose information of that part, thereby achieving the visual effect of the appearance resource following the skeletal resource of the part to execute the corresponding animation behavior. The above operation is repeated until all parts of the virtual object are traversed. At this point, the appearance resources of all parts can be drawn in the current frame, and these appearance resources are guaranteed to follow the rendering pose information of the corresponding part. The combination and assembly of the appearance resources of each part can create the visual effect of the virtual object's entire body executing the corresponding animation behavior.

[0190] 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. For virtual objects that pass the OC detection (indicating that they are visible within the field of view of the current frame), the skeleton resources, appearance resources, and rendering posture information of each part of the virtual object are submitted to the RHIThread (Render Hardware Interface Thread). 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 part of the virtual object to obtain the current frame. The rendering pipeline includes: a vertex shader, a rasterizer, and a pixel shader.

[0191] The following will illustrate the rendering pipeline process of a certain part. RHIThread calls the DC interface and passes the rendering posture information of the part into the vertex shader to calculate the vertex attributes (such as coordinates, color, material, texture, etc.) of each vertex in the bone resource of the part one by one. The result of the vertex shader output is input into the rasterizer, which rasterizes it. The result of the vertex shader output is configured into discrete pixels and input 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 frame. Repeat the above operations until all pixels of the entire current frame are drawn.

[0192] 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 behaviors based on the animation information of the part. This ensures that the appearance resources of each part can adapt to the animation behavior of the part to change posture. Since the appearance resources of each part 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 fragmentation of the virtual object in different parts, ensuring a smooth and natural transition and connection of the animation behavior. In another embodiment, other possible implementation methods can also be used to control the appearance resources to follow the skeleton resources of the part to perform animation behaviors based on the animation information of the part.

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

[0194] 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.

[0195] The method provided in the embodiment of the present application splits the virtual object into multiple parts, loads the part skeleton resource for each part separately, and uses the part animation information to independently control the animation behavior of the part. Since the part animation information is inherited from the whole-body animation information, the animation behavior of each part remains consistent with the animation behavior of the whole body. Then, the appearance resources are loaded based on each part. After the appearance resources are adapted to the posture using the part animation information, the appearance resources of each 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 picture 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.

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

[0197] Below, the Avatar system solution for dynamic assembly of parts of virtual objects provided in an embodiment of the present application will be illustrated with reference to FIG15 , and the dynamic assembly of the various parts involved in the above embodiment is achieved through the Avatar system.

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

[0199] Before construction, technical personnel need to first determine the division method indication information, and determine the multiple parts that the virtual object needs to be divided into according to the division method indication information. Then, based on the parts, part skeleton resources are produced for each part, and multiple styles of appearance resources are produced for each part.

[0200] During the production phase, for example, artists use DCC (Digital Content Creation) tools to produce appearance resources in units of parts.

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

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

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

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

[0205] 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, each part (or the whole body) can be configured in the data structure: Mesh resources, bone resources, animation state machine resources, and material resources (such as appearance resources).

[0206] 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.

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

[0208] In step 1506, within each screen frame, the Avatar system performs bottom-level refresh settings on various loaded resources notified by the loading system callback, replacing the original resources of the old parts to achieve dynamic assembly of the Avatar system.

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

[0210] The following describes the animation inheritance process for each part of the assembly, involving steps A1 to A5:

[0211] 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 and basic body parameters of the character.

[0212] As shown in Figure 16, in the assembly logic framework of the virtual object, it can be seen that the virtual object's parent skeleton component BaseMeshComponent serves as a base skeleton, and the remaining child skeleton components are all mounted on the parent skeleton component BaseMeshComponent.

[0213] A2. Construct corresponding child skeleton components for each part split from the virtual object, and attach the child skeleton components to the parent skeleton component BaseMeshComponent.

[0214] Using Figure 16 as an example, assuming the mesh is divided into three parts: torso, head, and hairstyle, we create a child skeletal component, BodyComp, for the torso, HeadComp, and HairComp for the head, forming a parent skeletal component, BaseMeshComponent, with three child skeletal components mounted on it: BodyComp, HeadComp, and HairComp. Each Avatar component, which carries the appearance resource for each part, is also bound to its corresponding child skeletal component (equivalent to being attached to its own bound child skeletal component and subsequently mounted on the parent skeletal component, BaseMeshComponent).

[0215] A3. Mount the full-body ABP (full-body animation state machine) that carries the full-body animation information to the parent skeleton component BaseMeshComponent to achieve complete full-body animation information based on the basic skeleton.

[0216] As shown in Figure 17, 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.

[0217] In the parameter configuration bar 1720 of the parent skeleton component BaseMeshComponent, you can configure the position (Location), rotation (Rotation) and size (Scale) of the parent skeleton component BaseMeshComponent in the x, y, and z directions. You can also configure the animation information (Animation) of the parent skeleton component BaseMeshComponent. For example, select "Use Animation Blueprint" in the animation mode (Animation Mode) and configure the animation state machine parameters (Anim Class) to the full-body animation state machine "ABP_BaseCharacter".

[0218] 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.

[0219] 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.

[0220] Still taking Figure 16 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.

[0221] 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.

[0222] Still taking Figure 16 as an example, hide the parent skeleton component BaseMeshComponent, and draw the appearance resources of the three child skeleton components BodyComp, HeadComp, and HairComp to display the overall appearance of the virtual object.

[0223] By hiding the rendering pose information of the whole-body skeleton pose and drawing the rendering pose information of the appearance resource of each 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 of the virtual object.

[0224] In an embodiment of the present application, the basic skeleton with skeletal information, i.e., the parent skeletal component, is used as the main object, and the child skeletal components of other split 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, during rendering, the child object will inherit and use the basic animation information of the basic skeleton, and all linked child skeletal components will use the basic animation information of the parent skeletal component to form a lightweight skeletal system. Each 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 part. It not only improves the flexibility of generating virtual objects, but 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 part can be dynamically and synchronously loaded to achieve smooth assembly display in real-time rendering.

[0225] FIG18 is a schematic diagram of the structure of a virtual object control device provided in an embodiment of the present application. Referring to FIG18 , the device includes:

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

[0227] Configuration module 1802, configured to configure the part animation information of the part skeleton resource of each 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 part in the whole-body animation information;

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

[0229] 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 part animation information.

[0230] The device provided in the embodiment of the present application splits a virtual object into multiple parts, loads part skeleton resources for each part separately, and uses part animation information to independently control the animation behavior of the part. Since the part animation information is inherited from the whole-body animation information, the animation behavior of each part remains consistent with the animation behavior of the whole body. Then, the appearance resources are loaded based on each part. After the appearance resources are adapted to the posture using the part animation information, the appearance resources of each 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 picture 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.

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

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

[0233] For each part, mount the child skeleton component of the part on the parent skeleton component, and import the part skeleton resource of the part into the child skeleton component.

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

[0235] Create a full-body animation state machine and attach it to the parent skeleton component. The full-body animation state machine is used to control the animation behavior of the virtual object.

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

[0237] 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.

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

[0239] For each part, bind the appearance resource of the part to the child skeleton component of the part;

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

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

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

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

[0244] In some embodiments, based on the device composition of FIG18 , the device further includes:

[0245] a division module, configured to divide the virtual object into the plurality of parts based on the division method indication information;

[0246] The creation module is used to create at least one appearance resource adapted to each part.

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

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

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

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

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

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

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

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

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

[0256] 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.

[0257] It should be noted that the virtual object control device provided in the above embodiment only uses the division of the above functional modules as an example to illustrate the control and display of 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 can be divided into different functional modules to complete all or part of the functions described above. In addition, the virtual object control device provided in the above embodiment and the virtual object control method embodiment are based on the same concept. The specific implementation process is detailed in the virtual object control method embodiment and will not be repeated here.

[0258] FIG19 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. As shown in FIG19 , the electronic device is described using terminal 1900 as an example. Optionally, the device type of terminal 1900 includes: a smartphone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III), an MP4 player (Moving Picture Experts Group Audio Layer IV), a laptop computer, or a desktop computer. Terminal 1900 may also be referred to as a user device, a portable terminal, a laptop terminal, a desktop terminal, or other names.

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

[0260] 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), or 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.

[0261] In some embodiments, the memory 1902 includes one or more computer-readable storage media, optionally, the computer-readable storage medium is non-transitory. Optionally, the memory 1902 also includes high-speed random access memory and 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, which is executed by the processor 1901 to implement the virtual object control method provided in each embodiment of the present application.

[0262] In some embodiments, terminal 1900 may optionally include a peripheral device interface 1903 and at least one peripheral device. The processor 1901, memory 1902, and peripheral device interface 1903 may be connected via a bus or signal lines. Each peripheral device may be connected to peripheral device interface 1903 via a bus, signal lines, or circuit boards. Specifically, the peripheral device may include 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.

[0263] The peripheral device interface 1903 can be used to connect at least one I / O (Input / Output)-related peripheral device 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 separate chips or circuit boards, which is not limited in this embodiment.

[0264] RF circuit 1904 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. RF circuit 1904 communicates with communication networks and other communication devices via electromagnetic signals. RF circuit 1904 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals. RF circuit 1904 optionally 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. RF circuit 1904 optionally communicates with other terminals via at least one wireless communication protocol. Such wireless communication protocols include, but are not limited to, metropolitan area networks, various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and / or WiFi (Wireless Fidelity) networks. In some embodiments, RF circuit 1904 also includes circuitry related to NFC (Near Field Communication), which is not limited in this application.

[0265] 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 screen display, 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 as a control signal to the processor 1901 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, there is one display screen 1905, which is set on the front panel of the terminal 1900; in other embodiments, there are at least two display screens 1905, which are respectively set on different surfaces of the terminal 1900 or in a folding design; in some embodiments, the display screen 1905 is a flexible display screen, which is set on the curved surface or folding surface of the terminal 1900. Even, optionally, the display screen 1905 is set into 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).

[0266] 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.

[0267] 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 to be input into the processor 1901 for processing, or input into the radio frequency circuit 1904 to achieve voice communication. For the purpose of stereo sound collection or noise reduction, there are multiple microphones, which are respectively arranged in different parts of the terminal 1900. Optionally, the microphone is an array microphone or an omnidirectional collection 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 thin 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.

[0268] Power supply 1908 is used to power various components in terminal 1900. Optionally, power supply 1908 is AC power, DC power, a disposable battery, or a rechargeable battery. When power supply 1908 includes a rechargeable battery, the rechargeable battery supports wired charging or wireless charging. The rechargeable battery is also configured to support fast charging technology.

[0269] 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 .

[0270] In some embodiments, the accelerometer 1911 detects the magnitude of acceleration along the three coordinate axes of the coordinate system established by the terminal 1900. For example, the accelerometer 1911 is used to detect the components of gravity acceleration along the three coordinate axes. Optionally, the processor 1901 controls the display screen 1905 to display the user interface in a landscape or portrait view based on the gravity acceleration signal collected by the accelerometer 1911. The accelerometer 1911 is also used to collect game or user motion data.

[0271] In some embodiments, the gyroscope sensor 1912 detects the orientation and rotation angle of the terminal 1900. The gyroscope sensor 1912 and the accelerometer sensor 1911 work together to collect the user's 3D movements on the terminal 1900. The processor 1901 implements the following functions based on the data collected by the gyroscope sensor 1912: motion sensing (for example, changing the UI based on the user's tilt operation), image stabilization during shooting, game control, and inertial navigation.

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

[0273] Optical sensor 1914 is used to detect ambient light intensity. In one embodiment, processor 1901 controls the display brightness of display screen 1905 based on the ambient light intensity detected by optical sensor 1914. Specifically, when the ambient light intensity is high, the display brightness of display screen 1905 is increased; when the ambient light intensity is low, the display brightness of display screen 1905 is decreased. In another embodiment, processor 1901 also dynamically adjusts the capture parameters of camera assembly 1906 based on the ambient light intensity detected by optical sensor 1914.

[0274] Proximity sensor 1915, also known as a distance sensor, is typically located on the front panel of terminal 1900. Proximity sensor 1915 is used to detect the distance between the user and the front of terminal 1900. In one embodiment, when proximity sensor 1915 detects that the distance between the user and the front of terminal 1900 is gradually decreasing, processor 1901 controls display screen 1905 to switch from the screen-on state to the screen-off state. When proximity sensor 1915 detects that the distance between the user and the front of terminal 1900 is gradually increasing, processor 1901 controls display screen 1905 to switch from the screen-off state to the screen-on state.

[0275] Those skilled in the art will understand that the structure shown in FIG19 does not constitute a limitation on the terminal 1900 , and it may include more or fewer components than shown in the figure, or combine certain components, or adopt a different component arrangement.

[0276] In an exemplary embodiment, a computer-readable storage medium is also provided, such as a memory including at least one computer program. The at least one computer program can be executed by a processor in an electronic device to implement the virtual object control method described 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.

[0277] In an exemplary embodiment, a computer program product is also provided, comprising one or more computer programs 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 virtual object control method of the above-described embodiment.

[0278] Those skilled 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 relevant 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.

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

Claims

1. A method for controlling a virtual object, the method comprising: The electronic device loads the whole body skeleton resource of the virtual object and the respective part skeleton resources of the multiple parts; For each of the parts, the electronic device configures part animation information of the part skeleton resource of the 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 part in the whole body animation information; The electronic device loads the appearance resource of the part based on the appearance resource indication information of the part, wherein the appearance resource indication information indicates the appearance resource of the part; The electronic device 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.

2. The method according to claim 1, wherein: The electronic device loads the whole body skeleton resources of the virtual object and the respective part skeleton resources of the multiple parts, including: The electronic device creates a parent skeleton component, and imports the whole body skeleton resource into the parent skeleton component; For each of the parts, the electronic device mounts the child skeleton component of the part on the parent skeleton component, and imports the part skeleton resource of the part into the child skeleton component.

3. The method according to claim 2, wherein: The electronic device configures the part animation information of the part skeleton resource of the part based on the whole body animation information of the whole body skeleton resource, including: The electronic device creates a full-body animation state machine, and mounts 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; The electronic device creates a part animation state machine of the part, and mounts 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 part of the virtual object; The electronic device transfers the whole body animation information carried by the whole body animation state machine to the part animation state machine to generate the part animation information.

4. The method according to claim 2, wherein: 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 parts, the electronic device binds the appearance resource of the part to the child skeleton component of the part; The electronic device 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; The electronic device renders the appearance resources of the parts in the current picture frame according to the rendering posture information of each part, wherein the appearance resources of the multiple parts are assembled to constitute the animation behavior of the virtual object in the current picture frame.

5. The method according to claim 4, wherein: The electronic device hiding the whole body skeleton resource comprises: The electronic device hides rendering posture information of the parent skeleton component, and 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, wherein: The method further comprises: The electronic device divides the virtual object into the plurality of parts based on the division method indication information; For each of the parts, the electronic device creates at least one appearance resource adapted to the part.

7. The method according to claim 1, wherein: The electronic device loading the whole body skeleton resource of the virtual object comprises: The electronic device determines the initial bone resource of the species type based on the species type of the virtual object; The electronic device configures the initial skeleton resource based on the body parameters of the virtual object to obtain the whole body skeleton resource.

8. The method according to claim 1, wherein: The electronic device loading the appearance resource of the part based on the appearance resource indication information of the part includes: The electronic device determines the resource address of the appearance resource based on the appearance resource indication information; The electronic device accesses the resource address and loads the appearance resource stored in the resource address.

9. The method according to claim 1, wherein: The method further comprises: The electronic device determines, in the current frame, from the multiple parts of the virtual object, a part to be replaced that has a change in appearance relative to that in the previous frame; The electronic device loads the dressing appearance resource of the dressing part based on the dressing resource indication information of the dressing part, wherein the dressing resource indication information indicates the appearance resource of the dressing part after the dressing.

10. A control device for a virtual object, the device comprising: 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 parts; A configuration module, configured to configure, for each of the parts, part animation information of the part skeleton resource of the 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 part in the whole body animation information; An appearance resource loading module, configured to load the appearance resource of the part based on the appearance resource indication information of the part, wherein the appearance resource indication information indicates the appearance resource of the 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, comprising 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 control method of a virtual object as described in any one of claims 1 to 9.

12. A computer-readable storage medium, wherein 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 a processor to implement the control method of the virtual object according to any one of claims 1 to 9.

13. A computer program product, comprising at least one computer program, wherein the at least one computer program is loaded and executed by a processor to implement the control method of a virtual object according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Game dress-up system and method

    CN106075909A

  • Skin detection method and device and electronic terminal

    CN111028321A

  • Animation generation method and device, storage medium and electronic device

    CN111773686A

  • Game role rendering method and device, electronic equipment and computer readable medium

    CN112237739A

  • Animation generation method and device

    CN115187707A

Cited By

  • Universal importing method for multi-format model

    CN120147489A