Virtual object animation processing method and device, electronic equipment, computer readable storage medium and computer program product

By adapting the target animation clips of the system resource margin in virtual object animation processing, the resource bottleneck problem during virtual object animation switching is solved, and the normal display of animation and user experience is improved.

CN119228955AActive Publication Date: 2024-12-31TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 13 Cites 0 Cited by

Patent Information

Application Number
CN202411381599.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-29
Publication Date
2024-12-31
Estimated Expiration
2044-09-29

AI Technical Summary

Technical Problem

In games or immersive video applications, the problem of animation lag or loss caused by resource bottlenecks during virtual object animation switching is difficult to effectively solve the problem of existing technology.

Method used

By determining the target animation clip, adapting to the system resource margin, loading and rendering animation resources, ensuring that the animation is displayed normally when resources are limited.

Benefits of technology

It effectively avoids animation lag and loss caused by resource bottlenecks, improves user experience, and ensures that the animation is displayed normally under the support of system resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119228955A_ABST
    Figure CN119228955A_ABST
Patent Text Reader

Abstract

The invention provides an animation processing method and device of a virtual object, electronic equipment, a computer readable storage medium and a computer program product. The method comprises the following steps: in response to an animation switching request for a virtual object, determining a target animation requested to be switched and displayed by the animation switching request and a first resource demand required for displaying the target animation; in response to the fact that the system resource margin is lower than the first resource demand quantity, determining a target animation segment matched with the system resource margin in the target animation; wherein the target animation comprises at least two continuous animation frames associated with the virtual object, and the loading precision of the target animation segment is lower than that of the target animation; and loading the animation resource of the target animation segment, and rendering the virtual object based on the loaded animation resource of the target animation segment. Through the method and the device, normal display of the animation can be ensured, and user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to animation processing technology, and in particular to a method, device, electronic device, computer-readable storage medium and computer program product for animation processing of a virtual object. Background Art

[0002] With the development of computer technology, the animation effects required to be displayed for virtual objects in games or immersive video applications are becoming more and more complex. Therefore, the system resources required to display the animation are also increasing. If an animation switching request suddenly appears during the use of the application, the corresponding animation resources need to be loaded in response to the request. However, this process may cause the virtual object to freeze or even lose the animation because the animation resources are large and the system resource margin cannot support the loading and rendering of the animation resources. Summary of the invention

[0003] The embodiments of the present application provide a method, device, electronic device, computer-readable storage medium and computer program product for processing animation of a virtual object, which can ensure the normal display of animation and improve the user experience when there is a resource bottleneck.

[0004] The technical solution of the embodiment of the present application is implemented as follows:

[0005] The present application provides a method for processing an animation of a virtual object, the method comprising:

[0006] In response to an animation switching request for a virtual object, determine the target animation requested to be switched and displayed by the animation switching request, and a first resource requirement required to display the target animation; in response to the system resource margin being lower than the first resource requirement, determine a target animation segment in the target animation that is adapted to the system resource margin; wherein the target animation includes at least two consecutive animation frames associated with the virtual object, and a loading accuracy of the target animation segment is lower than a loading accuracy of the target animation; load the animation resources of the target animation segment, and render the virtual object based on the loaded animation resources of the target animation segment.

[0007] The embodiment of the present application provides a virtual object animation processing device, including:

[0008] A first determining module, configured to determine, in response to an animation switching request for a virtual object, a target animation to be switched and displayed as requested by the animation switching request, and a first resource requirement required to display the target animation;

[0009] A second determining module, configured to determine a target animation segment in the target animation adapted to the system resource margin in response to the system resource margin being lower than the first resource requirement;

[0010] Wherein, the target animation includes at least two consecutive animation frames associated with the virtual object, and the loading accuracy of the target animation segment is lower than the loading accuracy of the target animation;

[0011] The display module is used to load the animation resource of the target animation clip and render the virtual object based on the loaded animation resource of the target animation clip.

[0012] In the above scheme, when the number of the virtual objects is multiple, the first determination module is also used to determine the target animation requested to be switched and displayed for each virtual object in the animation switching request, and the first resource requirement component required to display the target animation of each virtual object; and determine the sum of the first resource requirement components corresponding to each virtual object as the first resource requirement.

[0013] In the above scheme, the second determination module is also used to determine the virtual scene in which each virtual object is located and the depth distance of each virtual object in the depth direction of the virtual scene when there are multiple virtual objects and each virtual object corresponds to a target animation; for each virtual object, based on the virtual scene and the depth distance corresponding to the virtual object, determine the target animation segment adapted to the system resource margin in the target animation corresponding to the virtual object.

[0014] In the above scheme, the second determination module is also used to set the loading accuracy of the animation resources associated with the virtual object based on the virtual scene and the depth distance corresponding to the virtual object to obtain the initial loading accuracy; determine the initial animation segment corresponding to the initial loading accuracy in the target animation of the virtual object, and determine the second resource requirement component required to display the initial animation segment; determine the sum of the second resource requirement components corresponding to the initial animation segments of multiple virtual objects as the second resource requirement required to simultaneously display the initial animation segments corresponding to multiple virtual objects; in response to the system resource margin being lower than the second resource requirement, adjust the initial loading accuracy of the multiple virtual objects until the system resource margin is not lower than the second resource requirement determined based on the adjusted target loading accuracy; determine the animation segment corresponding to the target loading accuracy in the target animation of each virtual object as the corresponding target animation segment.

[0015] In the above scheme, the second determination module is also used to determine the display priority of the corresponding target animation of the virtual object based on the virtual scene and the depth distance corresponding to the virtual object; and set the loading accuracy of the animation resource associated with the virtual object in a manner that the display priority is positively correlated with the loading accuracy to obtain the initial loading accuracy.

[0016] In the above scheme, the second determination module is also used to obtain a priority configuration relationship, which is used to characterize the correspondence between animation, virtual scene, depth distance and display priority; based on the virtual scene and the depth distance corresponding to the virtual object, the priority configuration relationship is queried, and the display priority corresponding to the target animation, the virtual scene and the depth distance is determined as the display priority of the target animation corresponding to the virtual object.

[0017] In the above scheme, the animation processing device of the virtual object also includes a configuration module, which is used to configure the display priority of the target animation corresponding to different depth distances in different virtual scenes in response to new operations on the target animation, and obtain the correspondence between the target animation and different virtual scenes, depth distances and display priorities; and add the correspondence to the priority configuration relationship.

[0018] In the above scheme, the target animation includes multiple groups of animation frame sequences, each group of the animation frame sequences includes at least two animation frames; the second determination module is also used to obtain the precision sequence relationship, and the precision sequence relationship is used to characterize the correspondence between the loading precision and the animation frame sequence; based on the precision sequence relationship, the target animation frame sequence corresponding to the initial loading precision in the multiple groups of the animation frame sequences is determined as the initial animation segment.

[0019] In the above scheme, the second determination module is also used to obtain the frame memory requirement component required to load the target animation frame sequence, and the frame computing power requirement component required to render the target animation frame sequence; based on the frame memory requirement component and the frame computing power requirement component, determine the second resource requirement component required to display the initial animation clip.

[0020] In the above scheme, the second determination module is also used to adjust the initial loading accuracy of each of the virtual objects at the same time according to a uniform accuracy adjustment range; or, determine the accuracy adjustment priority of the animation clip of each of the virtual objects, and adjust the initial loading accuracy of each of the virtual objects based on the accuracy adjustment priority, wherein different accuracy adjustment priorities correspond to different accuracy adjustment ranges.

[0021] In the above scheme, when the number of the virtual objects is one, the second determination module is also used to obtain multiple animation clips divided for the target animation, and the third resource requirement required to display each animation clip; based on each of the third resource requirements, the animation clips that meet the preset adaptation conditions are screened out from the multiple animation clips, and the screened out animation clips are used as the target animation clips; wherein the preset adaptation conditions include at least one of the following: the third resource requirement is not higher than the system resource margin; when the third resource requirements of multiple animation clips are not higher than the system resource margin, the third resource requirement is the largest.

[0022] In the above scheme, the animation processing device of the virtual object also includes a margin determination module, which is used to obtain the current available memory space, current operating frequency and current utilization of the central processing unit, and the maximum computing power of the central processing unit at the current operating frequency; determine the memory resource margin based on the current available memory space, and calculate the available computing power of the central processing unit based on the maximum computing power, the current utilization and the preset buffer value to obtain the computing power resource margin; determine the system resource margin based on the memory resource margin and the computing power resource margin.

[0023] An embodiment of the present application provides an electronic device, the electronic device comprising:

[0024] A memory for storing computer executable instructions or computer programs;

[0025] The processor is used to implement the virtual object animation processing method provided in the embodiment of the present application when executing the computer executable instructions or computer program stored in the memory.

[0026] An embodiment of the present application provides a computer-readable storage medium storing a computer program or computer-executable instructions for implementing the virtual object animation processing method provided in the embodiment of the present application when executed by a processor.

[0027] An embodiment of the present application provides a computer program product, including a computer program or computer executable instructions. When the computer program or computer executable instructions are executed by a processor, the virtual object animation processing method provided by the embodiment of the present application is implemented.

[0028] The embodiments of the present application have the following beneficial effects:

[0029] In response to the animation switching request for the virtual object through the embodiment of the present application, the target animation requested to be switched for the virtual object is first determined, and the first resource requirement required to display the target animation is determined. If the current system resource margin is lower than the first resource requirement, that is, the system resource margin cannot support the direct loading of the full amount of animation resources of the target animation, the target animation segment adapted to the system resource margin can be selected in the target animation, and the animation display for the virtual object is completed based on the animation resources corresponding to the target animation segment. In this way, when the virtual object is animated, if a resource bottleneck occurs (that is, the current system resource margin is lower than the first resource requirement required to display the target animation), since the loading accuracy of the target animation segment is lower than the loading accuracy of the target animation, the resource requirement required to display the target animation segment is lower than the resource requirement required to display the target segment, and the animation display for the virtual object is completed by loading the animation resources of the target animation segment with less resource requirements, which can not only ensure the normal display of the animation under the resources supported by the system resource margin, but also reduce the occurrence of animation jams or even animation loss caused by loading timeouts or failures to load due to resource bottlenecks, thereby improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 It is a structural diagram of the virtual object animation processing system architecture provided by an embodiment of the present application;

[0031] Figure 2 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application;

[0032] Figure 3A is a flowchart of a method for processing an animation of a virtual object provided in an embodiment of the present application;

[0033] Figure 3B is a first flow chart of a method for determining a target animation clip provided in an embodiment of the present application;

[0034] Figure 3C is a second flow chart of the method for determining a target animation clip provided in an embodiment of the present application;

[0035] Figure 3D is a schematic diagram of a process for determining a target animation clip based on a virtual scene and a depth distance provided by an embodiment of the present application;

[0036] Figure 4 It is a schematic diagram of an animation frame provided in an embodiment of the present application.

[0037] Figure 5A is a schematic diagram of the interaction between the game client and the server provided in an embodiment of the present application;

[0038] Figure 5Bis a schematic diagram of the interaction between the game client and the display module of the terminal provided in an embodiment of the present application;

[0039] Figure 6 A schematic diagram of the structure of a game client and a game server provided in an embodiment of the present application.

[0040] It should be pointed out that the above-mentioned "first" and "second" are only used to distinguish different solutions, and do not represent the degree of superiority or inferiority of the solutions or the priority in the implementation process. DETAILED DESCRIPTION

[0041] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.

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

[0043] In the following description, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described here can be implemented in an order other than that illustrated or described here.

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

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

[0046] The relevant data collection and processing in the embodiments of this application should be strictly in accordance with the requirements of relevant laws and regulations when applied in examples, obtain the informed consent or separate consent of the personal information subject, and carry out subsequent data use and processing within the scope of authorization of laws and regulations and the personal information subject.

[0047] Before further describing the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations.

[0048] 1) Client: an application running in the terminal to provide various services, such as a video player client, a game client, etc.

[0049] 2) In response, it is used to indicate the conditions or states on which the executed operations depend. When the dependent conditions or states are met, one or more operations executed may be in real time or have a set delay. Unless otherwise specified, there is no restriction on the order of execution of the multiple operations executed.

[0050] 3) Virtual scene, which is the environment displayed (or provided) when the client of an application (such as game applications, virtual reality (VR) video applications, augmented reality (AR) video applications, mixed reality (MR) video applications) runs on a terminal. The virtual scene refers to an environment created for virtual objects to carry out activities (such as game competitions), such as virtual houses, virtual islands, virtual maps, etc. The virtual scene can be a simulation of the real world, a semi-simulated and semi-fictional environment, or a purely fictional environment. The virtual scene can be a two-dimensional virtual scene, a 2.5-dimensional virtual scene, or a three-dimensional virtual scene, which is not limited in the embodiments of the present application.

[0051] 4) Virtual objects, which generally refer to all physical objects in the virtual scene that can carry animation displays, such as virtual characters (such as player characters, non-player characters NPC), architectural objects (windmills, bridges, etc.), and environmental interactive objects (such as trees, grass, streams, etc.).

[0052] Taking the virtual object as a virtual character controlled by a user account in a game application as an example, the virtual object refers to a game character controlled by a user account. The virtual object can be in the form of a person, an animal, a cartoon, or other forms, which is not limited in the embodiments of the present application. The virtual object can be displayed in three-dimensional form or in two-dimensional form, which is not limited in the embodiments of the present application. In different game applications, the operations that can be performed by the user account to control the virtual object may also be different. For example, in a shooting game application, the user account can control the virtual object to perform operations such as shooting, running, jumping, picking up virtual firearms, changing firearms, and adding bullets to firearms.

[0053] Of course, in addition to game applications, other types of applications can also display virtual objects to users and provide corresponding functions to virtual objects. For example, AR applications, social applications, interactive entertainment applications, etc., which are not limited in the embodiments of the present application. In addition, for different applications, the form of the virtual objects provided will also be different, and the corresponding functions will also be different, which can be pre-configured according to actual needs, which are not limited in the embodiments of the present application.

[0054] 5) Animation. Animation is an important part of the virtual scene. It provides life and movement to virtual objects and enhances the immersion and interactivity of the virtual scene. Animation can be divided into many types, including character animation, environmental animation, transition animation, etc. Among them, character animation refers to the action design of virtual characters in the game, such as walking, running, jumping, attacking and getting injured. These animations need to be carefully designed to match the personality of the virtual character and the overall style of the game. Environmental animation includes dynamic effects of backgrounds and static objects in virtual scenes, such as the effect of wind blowing grass, rippling water, weather changes, etc. These environmental animations can create an atmosphere and make the virtual scene more vivid.

[0055] 6) Animation frame is the basic unit in animation production, representing a single picture in the animation. In the animation process, each frame is a visual representation of a period of time. When these frames are played continuously at a certain speed, due to the human visual persistence effect, a continuous motion visual effect will be produced. When making an animation, the animator will create or draw a series of frames to show the continuity of the action. In traditional frame-by-frame animation, each frame is drawn manually. In computer-assisted animation production, software can be used to automatically generate intermediate frames. This process is called "interpolation".

[0056] 7) System resource margin refers to the unused portion of the hardware resources (such as the central processing unit (CPU), memory, storage space, etc.) of a computer or mobile device during operation. These resource margins are critical to ensuring stable system operation and providing a good user experience. For example, the CPU's computing power resource margin refers to the unoccupied computing power of the central processing unit. When the CPU computing power resource margin is sufficient, the system can respond to user operations more quickly and run more applications without causing performance degradation. Memory resource margin refers to the unused portion of random access memory. Sufficient memory resource margin can ensure that programs can load and run quickly, reducing delays and freezes. Storage resource margin refers to the available space on the hard drive or solid-state drive. When the storage resource margin is insufficient, the system may run slowly and be unable to install new applications or save files.

[0057] The embodiments of the present application provide a method, device, electronic device, computer-readable storage medium and computer program product for processing animation of a virtual object, which can ensure the normal display of animation and improve the user experience when there is a resource bottleneck.

[0058] See also Figure 1 , Figure 1 It is a schematic diagram of the architecture of the virtual object animation processing system 100 provided in an embodiment of the present application. To implement an animation processing application that supports a virtual object, a terminal 401 is connected to a server 200 via a network 300. The network 300 may be a wide area network or a local area network, or a combination of the two.

[0059] The client of the target application can be installed in the terminal 401. The target application can be a game application, such as a shooting game application terminal, and the shooting game application can be any one of a first person shooting (First Person Shooting, FPS) game application, a third person shooting (Third Person Shooting, TPS) game application, a multiplayer online tactical competitive (Multiplayer Online Battle Arena, MOBA) game application, a multiplayer gun battle survival game application, etc. Optionally, the game application can be a stand-alone application, such as a stand-alone 3D game application; it can also be a network-connected application. In addition, the target application can also be an immersive video application, such as a VR video application, an AR video application, and an MR video application. Among them, the VR video application can create a partial sense of reality by displaying a virtual scene, allowing the user to be immersed in the scene provided in the video, so that the user can feel the scene provided in the video from the visual sense, and finally break through the limitations of time and space, allowing the user to experience the virtual scene provided in the video anytime and anywhere. AR video applications can enrich the real world by superimposing some virtual scene factors on the real world, and ultimately create a virtual scene in which real environment factors and virtual scene factors are superimposed and displayed together. MR video applications can integrate the real environment and virtual scenes.

[0060] The client in terminal 401 can be used to respond to an animation switching request for a virtual object, determine the target animation requested to be switched and displayed by the animation switching request, and a first resource requirement required to display the target animation; in response to the system resource margin being lower than the first resource requirement, determine a target animation segment in the target animation that is adapted to the system resource margin; and obtain the animation resource corresponding to the target animation segment from server 200, and load the animation resource of the target animation segment into the memory available to the client, and render the virtual object based on the loaded animation resource of the target animation segment, so as to animate the virtual object on the display module (e.g., screen) of the client.

[0061] In some embodiments, terminal 401 can be implemented as various types of terminals such as laptop computers, tablet computers, desktop computers, smart phones, smart speakers, smart watches, smart TVs, car terminals, e-book readers, electronic game consoles, Moving Picture Experts Group Audio Layer IV (MP4) players, smart glasses, VR players, AR players, etc., and can also be implemented as servers.

[0062] In some embodiments, the server 200 may be 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 (CDN), and big data and artificial intelligence platforms. The terminal and the server may be directly or indirectly connected via wired or wireless communication, which is not limited in the embodiments of the present application.

[0063] See also Figure 2 , Figure 2 is a schematic diagram of the structure of an electronic device 400 provided in an embodiment of the present application, Figure 2 The electronic device 400 shown includes: at least one processor 410, a memory 450, at least one network interface 420 and a user interface 430. The various components in the electronic device 400 are coupled together via a bus system 440. It is understood that the bus system 440 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 440 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, the bus system 440 is not described in detail. Figure 2 Various buses are labeled as bus system 440 .

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

[0065] The user interface 430 includes one or more output devices 431 that enable presentation of media content, including one or more speakers and / or one or more visual display screens. The user interface 430 also includes one or more input devices 432, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.

[0066] The memory 450 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard disk drives, optical disk drives, etc. The memory 450 may optionally include one or more storage devices that are physically remote from the processor 410.

[0067] The memory 450 includes a volatile memory or a non-volatile memory, and may also include both volatile and non-volatile memories. The non-volatile memory may be a read-only memory (ROM), and the volatile memory may be a random access memory (RAM). The memory 450 described in the embodiments of the present application is intended to include any suitable type of memory.

[0068] In some embodiments, memory 450 can store data to support various operations, examples of which include programs, modules, and data structures, or a subset or superset thereof, as exemplarily described below.

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

[0070] A network communication module 452, used to reach other electronic devices via one or more (wired or wireless) network interfaces 420, exemplary network interfaces 420 include: Bluetooth, Wireless Compatibility Certification (WiFi), and Universal Serial Bus (USB), etc.;

[0071] a presentation module 453 for enabling presentation of information via one or more output devices 431 (e.g., display screen, speaker, etc.) associated with the user interface 430 (e.g., a user interface for operating peripherals and displaying content and information);

[0072] The input processing module 454 is used to detect one or more user inputs or interactions from one of the one or more input devices 432 and translate the detected inputs or interactions.

[0073] In some embodiments, the virtual object animation processing device provided in the embodiments of the present application can be implemented in a software manner. Figure 2 The animation processing device 455 of the virtual object stored in the memory 450 is shown, which can be software in the form of a program and a plug-in, etc., including the following software modules: a first determination module 4551, a second determination module 4552, and a display module 4553. These modules are logical, so they can be arbitrarily combined or further divided according to the functions implemented. The functions of each module will be explained below.

[0074] In other embodiments, the animation processing device for virtual objects provided in the embodiments of the present application can be implemented in hardware. As an example, the animation processing device for virtual objects provided in the embodiments of the present application can be a processor in the form of a hardware decoding processor, which is programmed to execute the animation processing method for virtual objects provided in the embodiments of the present application. For example, the processor in the form of a hardware decoding processor can adopt one or more application-specific integrated circuits (Application Specific Integrated Circuit, ASIC), digital signal processors (Digital Signal Processor, DSP), programmable logic devices (Programmable Logic Device, PLD), complex programmable logic devices (Complex Programmable Logic Device, CPLD), field programmable gate arrays (Field-Programmable Gate Array, FPGA) or other electronic components.

[0075] In some embodiments, the terminal or server can implement the animation processing method of the virtual object provided in the embodiment of the present application by running various computer executable instructions or computer programs. For example, the computer executable instructions can be commands, machine instructions or software instructions at the microprogram level. The computer program can be a native program or software module in the operating system; it can be a local (Native) application (APPlication, APP), that is, a program that needs to be installed in the operating system to run, such as a game APP; it can also be a small program that can be embedded in any APP, that is, a program that can be run only by downloading it to a browser environment. In short, the above-mentioned computer executable instructions can be instructions in any form, and the above-mentioned computer program can be an application, module or plug-in in any form.

[0076] The following will describe the virtual object animation processing method provided by the embodiment of the present application in conjunction with the accompanying drawings. As mentioned above, the electronic device that implements the virtual object animation processing method of the embodiment of the present application can be the terminal 401, the server 200, or a combination of the two. Therefore, the execution subject of each step will not be repeatedly described below.

[0077] The method for processing the animation of a virtual object in the embodiment of the present application is described by taking the execution subject as the terminal 401 as an example. Figure 3A , Figure 3A is a flowchart of a method for processing an animation of a virtual object provided in an embodiment of the present application, which will be combined with Figure 3A The steps shown are explained.

[0078] In step 101 , in response to an animation switching request for a virtual object, a target animation to be switched and displayed as requested by the animation switching request and a first resource requirement required to display the target animation are determined.

[0079] In actual implementation, the user can run the client of the target application installed in the terminal 401, and the client can display the display screen corresponding to the virtual scene. The display screen of the virtual scene can include various types of virtual objects, such as environmental interaction objects, building objects, interactive objects, and virtual characters. Among them, environmental interaction objects refer to virtual objects used to simulate natural phenomena or environmental interactions in virtual scenes, such as trees, grass, streams, etc., and their animation display can be trees swaying in the wind and streams flowing; building objects refer to buildings or structures that may display animations in virtual scenes, such as windmills, building signs, bridges, etc., and their animation display can be windmills rotating, dynamically displayed building signs, and movable bridges; interactive objects refer to virtual objects that are directly related to the user's behavior, such as doors and pickable items, and their animation display can be opening doors, closing doors, and picking up items.

[0080] Taking the target application as a game application as an example, after the user runs the client of the game application, the user can choose to enter different game modes, and the client can display the display screen of the virtual scene corresponding to the game mode. The virtual objects in different virtual scenes may be different, and the animations displayed by the virtual objects may also be different. For example, in a real-time multiplayer role-playing game, a virtual character as a virtual object may suddenly appear in the display screen of the current user, or the user may need to switch actions for the virtual character controlled by himself. In all of the above scenarios, the animation switching process of virtual objects may be involved.

[0081] When performing animation switching display for a virtual object, the system resources required to display different animations are different. Therefore, in actual applications, the terminal can respond to an animation switching request for a virtual object, determine the target animation requested to be switched for display for the virtual object by the animation switching request, and determine the first resource requirement required to display the target animation.

[0082] As an example, when the user switches from the current virtual scene to another virtual scene on the client, all virtual objects included in the other virtual scene need to be animated, and this may trigger an animation switching request for all virtual objects that can be animated in the other virtual scene; for another example, in a real-time multiplayer role-playing game, while the current user is playing the game, virtual characters (virtual objects) controlled by other users may suddenly appear in the display screen of the current user's client, or when the current user switches the action of the virtual character (virtual object) controlled by himself (such as changing from walking to running), an animation switching request for the virtual objects may be triggered.

[0083] In some embodiments, when the number of virtual objects triggering the animation switching request is one, the client determines the target animation requested to be switched and displayed for the virtual object in response to the animation switching request for the virtual object. For example, when the user controls his own virtual character to switch from a walking action to a running action, the target animation requested to be switched and displayed for the virtual character in the animation switching request is the animation corresponding to the running action. The system resources required to display this target animation are taken as the first resource demand.

[0084] In some embodiments, when there are multiple virtual objects, step 101 can be implemented in the following manner: determine the target animation requested to be switched for each virtual object in the animation switching request, and the first resource requirement component required to display the target animation of each virtual object; and determine the sum of the first resource requirement components corresponding to each virtual object as the first resource requirement amount.

[0085] In actual implementation, the client may display animations of multiple virtual objects at the same time. Therefore, when animation switching requests are triggered for multiple virtual objects at the same time, the client responds to the animation switching requests for the multiple virtual objects, determines the target animations that the animation switching requests request to switch display for each virtual object respectively, and then determines the first resource requirement components required to display each target animation, and determines the sum of the first resource requirement components required to display each target animation as the first resource requirement.

[0086] Through the above method, when determining the first resource requirement, by predetermining the number of virtual objects, and then calculating the system resource requirements of each virtual object when performing animation display, this method can accurately determine the resources required for each virtual object to perform animation display, and more accurately allocate system resources for the animation display of different virtual objects, thereby avoiding unnecessary waste of system resources, rationally using system resources, and improving the utilization rate of system resources.

[0087] In step 102 , in response to the system resource margin being lower than the first resource requirement, a target animation segment in the target animation adapted to the system resource margin is determined.

[0088] The target animation includes at least two consecutive animation frames associated with the virtual object, and the loading accuracy of the target animation segment is lower than the loading accuracy of the target animation.

[0089] In actual applications, if the first required resource amount required to display the target animation is relatively large, the virtual object playback action will be stuck during the process of displaying the target animation of the virtual object. Therefore, in order to reduce the occurrence of playback jams, the current system resource margin of terminal 401 can be determined while determining the first resource margin required to display the target animation.

[0090] In some embodiments, the system resource margin can be determined in the following manner: obtaining the current available memory space, current operating frequency and current utilization of the central processing unit, as well as the maximum computing power of the central processing unit at the current operating frequency; determining the memory resource margin based on the current available memory space, and calculating the available computing power of the central processing unit based on the maximum computing power, current utilization and preset buffer value to obtain the computing power resource margin; determining the system resource margin based on the memory resource margin and the computing power resource margin.

[0091] In actual implementation, when displaying a target animation for a virtual object, it is usually necessary to preload the animation resources of the target animation, and then render the virtual object according to the appearance attributes of the virtual object and the target animation, so that the virtual object can play the action represented by the target animation. Here, in the process of displaying the target animation, it mainly involves the memory resources required to load the animation resources and the computing power resources required for rendering. Therefore, the system resource margin can include the computing power resource margin and the memory resource margin.

[0092] In actual implementation, the memory resource margin can be determined by directly determining the memory space currently available to the terminal 401. As for the computing power resource margin, the computing power resource is mainly related to the processing power of the central processing unit (CPU) of the terminal 401, and is usually measured by operations per second (OPS). The operations per second represent the number of computing operations that the central processing unit can perform per second. Here, the operations per second can refer to the number of basic operations performed by the central processing unit per second. However, the number of basic operations cannot be directly obtained during the actual operation of the terminal 401, and needs to be obtained through indirect calculation.

[0093] In actual applications, in order to calculate the computing power resource margin, you can first obtain the core of the thread that plays the target animation in the central processing unit, and obtain the current operating frequency and current utilization of the core in the central processing unit. Through the empirical data of historical records, the maximum computing power (that is, the maximum number of basic operations) of the same model of central processing unit at the current operating frequency is obtained. Then, based on the maximum computing power, current utilization and preset buffer value, the available computing power of the central processing unit is calculated to obtain the computing power resource margin. Among them, the preset buffer value can be set based on actual conditions, such as 90%. The preset buffer value is to avoid the utilization rate of the central processing unit reaching 100% when displaying the target animation, resulting in slow response of the central processing unit or even application crashes.

[0094] As an example, the computing power resource margin can be calculated by the following formula:

[0095] n=N*(1-v)*90%

[0096] Among them, n represents the computing power resource margin; N represents the maximum computing power; v represents the current utilization rate; and 90% is the preset buffer value.

[0097] Through the above method, when calculating the computing power resource surplus of the terminal, by setting the preset buffer value, when the animation of the virtual object is displayed on the terminal, the utilization rate of the terminal's central processing unit will not reach 100%, thereby reducing the slow response of the terminal or the occurrence of application crashes. At the same time, since the preset buffer value can be set in advance manually, it is highly flexible and can control the detailed level of animation playback according to actual conditions while ensuring that the terminal displays the animation normally.

[0098] After determining the computing power resource margin and the memory resource margin based on the above method, the memory resource margin and the computing power resource margin are used as the system resource margin. Similarly, the first resource requirement determined for the target animation includes the first memory resource requirement and the first computing power resource requirement. The system resource margin is compared with the first resource margin, including comparing the memory resource margin with the first memory resource requirement, and comparing the computing power resource margin with the first computing power resource requirement. When the memory resource margin is less than the first memory resource requirement and the computing power resource margin is less than the first computing power resource requirement, it is determined that the system resource margin is lower than the first resource requirement. In response to the system resource margin being lower than the first resource margin, the client determines a target animation segment in the target animation that is adapted to the system resource margin, and the animation frames included in the target animation segment are part of the animation frames included in the target animation. Therefore, the loading accuracy of the target animation segment is lower than the loading accuracy of the target animation.

[0099] It should be noted that the animation resources of animation refer to the collection of various materials and data used in the animation production process. These resources are the basis of animation production and cover all visual and audible elements in the animation creation process, as well as related technical parameter settings. Animation resources are a collection of all digital assets used to create animation content, which include but are not limited to the following categories: visual resources, including virtual object models, scene models, props, textures, materials, lighting settings, etc., which constitute the visual elements in the animation; animation data, covering key animation frames, motion paths, joint rotations, skeletal animation, expression capture and other data, which define the movement and transformation in the animation; sound effect resources, including background music, environmental sound effects, character dubbing, action sound effects, etc., to provide sound support for animation; special effect resources, such as particle systems, dynamic blur, light and shadow effects, etc., used to enhance the visual effects and authenticity of animation; scripts and controllers, programming scripts and logic controllers used to control animation playback, interaction logic, animation transition, etc.; metadata, information about animation resources, such as copyright, creator, creation date, version number, dependencies, etc.

[0100] In some embodiments, see Figure 3B , when the number of virtual objects is one, Figure 3A The illustrated step 102 may be implemented through steps 1021A to 1022A.

[0101] In step 1021A, a plurality of animation segments divided according to the target animation and a third resource requirement required to display each animation segment are obtained.

[0102] In practical applications, the target animation includes at least two consecutive animation frames, and each animation frame may include key information of the action represented. For example, a continuous multi-frame animation frame is designed for walking action, and each animation frame may include key information such as the position and orientation of the character's skeleton. Then, based on the multi-frame animation frames included in the target animation, the target animation can be pre-divided into multiple animation clips. The number of animation frames contained in each animation clip is different, that is, the corresponding animation resources of each animation clip are different, and their loading accuracy will also be different, and the loading accuracy of the animation clip is lower than the loading accuracy of the target animation.

[0103] For example, see Figure 4, assuming that the target animation is an animation designed for walking action, and the target animation includes five animation frames, and five consecutive animation frames form a complete target animation. When dividing the animation segments for the target animation, the first, third, and fifth animation frames can be used as animation segment 1, and the second and fourth animation frames can be used as animation segment 2. When the system resource margin is lower than the first resource requirement required to display the complete target animation, one of the animation segments can be selected for display, for example, animation segment 1 can be selected for display, so that the action represented by the target animation can be played normally, but some details are missing.

[0104] In actual implementation, after the target animation is divided into multiple animation clips, loading and rendering simulations can be performed for each animation clip to determine the memory resource requirements for loading the animation resources of the animation clip and the computing power resource requirements for rendering virtual objects based on the animation clip, thereby obtaining the third resource requirement corresponding to each animation clip.

[0105] As an example, the third resource requirements of each animation clip of the target animation may be stored in the form of Table 1.

[0106] Table 1

[0107]

[0108]

[0109] As an example, the field contents corresponding to the fields shown in Table 1 for each animation clip can also be used as a resource record, and each animation clip corresponds to a resource record, and the third resource requirements of each animation clip of the target animation are stored in the form of records. For example, the record associated with animation clip 1 of target animation 1 can be {animation 1, animation clip 1, XX, XXX}, where XX is used to schematically represent the memory resource requirements required to load the animation clip 1, and XXX is used to schematically represent the computing power resource requirements required to render the animation clip 1.

[0110] In step 1022A, based on the third resource requirements, animation clips that meet the preset adaptation conditions are screened out from the plurality of animation clips, and the screened out animation clips are used as target animation clips.

[0111] The preset adaptation condition includes at least one of the following: the third resource demand is not higher than the system resource margin; when the third resource demand of multiple animation clips is not higher than the system resource margin, the third resource demand is the largest.

[0112] In actual implementation, when the number of virtual objects requesting to switch display animation is only one, if the first resource requirement required for the target animation requested to switch display is higher than the system resource requirement, then it is possible to screen out animation clips whose third resource requirement meets the preset adaptation conditions from among the multiple animation clips divided for the target animation, use the screened out animation clips as the target animation clips, load the animation resources of the target animation clips, and render the virtual object based on the animation resources of the target animation clip, so that the virtual object displays the action represented by the target animation clip in the virtual scene.

[0113] As an example, in combination with the above two preset adaptation conditions, satisfying the preset adaptation condition may be: when the third resource requirements of multiple animation clips are not higher than the system resource margin, among the multiple third resource requirements that are not higher than the system resource margin, determine the animation clip corresponding to the largest third resource requirement as the target animation clip.

[0114] Through the above method, a resource table or resource record as shown in Table 1 is pre-configured for the animation clips of each animation. When the terminal switches the animation, the third resource demand required for displaying each animation clip of the target animation can be quickly obtained, thereby improving the screening speed for the target animation clip and speeding up the speed of switching the display animation for the virtual object.

[0115] In some embodiments, see Figure 3C , when there are multiple virtual objects and each virtual object corresponds to a target animation, Figure 3A The illustrated step 102 may be implemented through steps 1021B to 1022B.

[0116] In step 1021B, the virtual scene in which each virtual object is located and the depth distance of each virtual object in the depth direction of the virtual scene are determined.

[0117] In practical applications, such as when a user switches virtual scenes on the client, or when multiple other virtual characters appear on the display screen of the user's client at the same time, there is a need to display the animations of multiple virtual objects at the same time, and different virtual objects correspond to different target animations, and the demand for system resources is also different. At the same time, different virtual scenes and different virtual objects have different depth distances in the virtual scene, which also have different visual experiences for users. Therefore, in the embodiment of the present application, when there are multiple virtual objects, if the system resource margin cannot support the display of the target animation of each virtual object, then when selecting the target animation segment in the target animation of each virtual object, the depth distance of the virtual scene and the virtual object in the depth direction of the virtual scene is used as a reference factor to select the target animation segment.

[0118] The depth distance refers to the distance in the depth direction of the virtual scene, where the depth direction refers to the direction in which light propagates when observing from a viewpoint position; the viewpoint position refers to the position where the user observes the virtual scene in the display screen of the virtual scene on the client.

[0119] In actual implementation, when multiple virtual objects' animations are displayed simultaneously, the multiple virtual objects may be displayed simultaneously in the same virtual scene, but different virtual objects appear at different positions in the virtual scene, which will result in different depth distances of different virtual objects in the depth of field direction of the virtual scene.

[0120] As an example, when the user switches the virtual scene and multiple virtual objects need to be animated at the same time, in response to the virtual scene switching request, the virtual scene requested by the switching request is determined as the virtual scene where each virtual object is located, the virtual objects that need to be animated in the virtual scene, the target animations that need to be displayed for each virtual object, and the depth distance corresponding to each virtual object in the virtual scene. In the virtual scene currently displayed by the user client, if multiple virtual characters (multiple virtual objects) other than the virtual character controlled by the user appear at the same time, then the other multiple virtual characters that appear at the same time are determined to be multiple virtual objects that need to be animated, and the current virtual scene is the virtual scene where the multiple virtual objects that need to be animated are located. At the same time, the position of each virtual object in the virtual scene is determined, and the depth distance corresponding to each virtual object is determined based on the position of its appearance to the viewpoint of the current user.

[0121] Through the above method, taking into account the different importance of different animations displayed in different virtual scenes, and the different visual experiences of the user when the same animation is displayed at different depths in the same virtual scene, the two factors of virtual scene and depth distance of virtual objects in the virtual scene are introduced as reference factors when determining the target animation clips of each virtual object. This can make the visual effect of the user watching the animation more natural when the determined target animation clips are displayed in the virtual scene, thereby improving the user's viewing experience.

[0122] In step 1022B, for each virtual object, based on the depth distance between the virtual scene and the virtual object, a target animation segment adapted to the system resource margin is determined in the target animation corresponding to the virtual object.

[0123] In some embodiments, see Figure 3D , Figure 3C The shown step 1022B can be implemented through steps 10221 to 10225.

[0124] In step 10221, based on the virtual scene and the depth distance corresponding to the virtual object, the loading accuracy of the animation resource associated with the virtual object is set to obtain an initial loading accuracy.

[0125] In actual implementation, due to different virtual scenes and different depth distances in the virtual scenes, the user's visual experience is different. Therefore, based on the two factors of virtual scene and depth distance, the loading accuracy of animation resources associated with different virtual objects can be set. In other words, the accuracy of the animations that need to be displayed by different virtual objects can be set to obtain the initial loading accuracy.

[0126] In some embodiments, step 10221 can be implemented in the following ways: based on the virtual scene and the depth distance corresponding to the virtual object, determine the display priority of the corresponding target animation of the virtual object; in a manner that the display priority is positively correlated with the loading accuracy, set the loading accuracy of the animation resources associated with the virtual object to obtain the initial loading accuracy.

[0127] In some embodiments, the display priority can be determined in the following manner: obtaining a priority configuration relationship, the priority configuration relationship is used to characterize the correspondence between animation, virtual scene, depth distance and display priority; based on the virtual scene and the depth distance corresponding to the virtual object, querying the priority configuration relationship, and determining the display priority corresponding to the target animation, virtual scene, and depth distance as the display priority of the target animation corresponding to the virtual object.

[0128] In actual applications, a priority configuration relationship is pre-configured for each pre-built animation and each virtual scene, and the corresponding relationship between the animation, virtual scene, depth distance and display priority is configured in the priority configuration relationship. This is because the same animation in different virtual scenes, or at different depth distances in the same virtual scene, will affect the importance of the animation display. Generally speaking, the closer the depth distance of the animation in the same virtual scene, the higher the importance of the animation display. This is because the closer the depth distance, the more clearly the user can see the detail of the virtual object display animation; and in different applications, different virtual scenes set have different physical meanings, and the importance of different animation displays in the same virtual scene will also be different. Therefore, the embodiment of the present application pre-configures the priority configuration relationship according to the above-mentioned influence.

[0129] As an example, the corresponding relationship between the animations in the priority configuration relationship may be stored in Table 2.

[0130] Table 2

[0131]

[0132] As an example, in a large-world multiplayer game, meters are usually used as the distance unit for the virtual scene set for the large world. When setting the display priority, in order to make the setting rules more convenient, multiple distance ranges can be set to correspond to different depth distances. For example, a distance of [0,50] is determined as a "near" depth distance, a distance of [51,100] is determined as a "medium" depth distance, and a distance greater than 100 meters is determined as a "far" depth distance. Therefore, when determining the depth distance of the target animation in the virtual scene, the depth distance corresponding to the target animation can be determined based on a pre-set distance range by displaying the distance from the position of the virtual object of the target animation in the virtual scene to the viewpoint position.

[0133] It should be noted that the setting method of display priority is schematically given here. How to set the depth distance, display priority and the corresponding relationship between the depth distance and display priority can be set based on actual conditions and is not specifically limited here.

[0134] As an example, the field contents corresponding to the fields shown in Table 2 for each animation may be used as a priority record. Each animation corresponds to one or more priority records. The display priority of each animation at different depths and distances in different virtual scenes is stored in the form of records.

[0135] After obtaining the priority configuration relationship, you can query the priority configuration relationship based on the scene ID corresponding to the virtual scene, the depth distance corresponding to the virtual object, and the animation ID of the target animation corresponding to the virtual object, and obtain the display priority corresponding to the target animation, virtual scene, and depth distance, and use the display priority obtained from the query as the display priority of the target animation of the virtual object.

[0136] Through the above method, when a resource bottleneck occurs in the system resource margin (that is, the system resource margin is less than the first resource requirement required to display the target animation), the display priority of the target animation of each virtual object can be quickly determined directly through the pre-configured priority configuration relationship, thereby quickly reducing the demand for system resources when displaying animations of multiple virtual objects according to the display priority, improving the speed of determining the target animation segment, and accelerating the animation switching display efficiency. Moreover, since the priority configuration relationship is configured based on factors such as the importance of each animation when displayed at different depths and distances in different virtual scenes, after adjusting the accuracy of each virtual object based on the display priority, the animation display after loading the accuracy adjustment can be guaranteed to be played normally, which is more in line with the viewing experience from the user's perspective and enhances the user's immersion. In addition, this method is easy to expand, and the display priority strategy can be flexibly adjusted according to different application requirements to adapt to different virtual reality application scenarios.

[0137] In some embodiments, the correspondence relationship of the target animation can be constructed and the constructed correspondence relationship can be added to the priority configuration relationship in the following manner: in response to a new operation on the target animation, the display priority of the target animation corresponding to different depth distances in different virtual scenes is configured to obtain the correspondence relationship between the target animation and different virtual scenes, depth distances and display priorities; and the correspondence relationship is added to the priority configuration relationship.

[0138] In actual implementation, after completing the configuration of the priority configuration relationship for the designed animations and the designed virtual scenes, each time a new animation or a new virtual scene is added, the priority configuration relationship will be updated for the new animation or the new virtual scene.

[0139] As an example, when the target animation is designed, in response to the new operation for the target animation, the display priority of the target animation in different virtual scenes corresponding to different depth distances is configured based on the actual situation, and multiple priority records of the target animation and different virtual scenes are obtained, or multiple priority tables as shown in Table 2. The priority record or priority table records the correspondence between the target animation, virtual scene, depth distance, and display priority, and then the correspondence configured for the target animation is added to the priority configuration relationship.

[0140] Continuing to explain step 10221, after determining the display priority of the target animation corresponding to each virtual object based on the priority configuration relationship, the loading accuracy can be set based on the display priority of the target animation corresponding to each virtual object.

[0141] As an example, the loading accuracy of the animation resources associated with each virtual object is set in a manner that the display priority is positively correlated with the loading accuracy, that is, the higher the display priority, the higher the loading accuracy. Here, setting the loading accuracy of the animation resources associated with each virtual object can be understood as setting the level of detail for each virtual object when displaying the action represented by the animation resource. The higher the loading accuracy, the more animation frames are included in the animation resources loaded for the virtual object, and the more detailed the action represented by the animation resource displayed by the virtual object. The animation resources associated with the virtual object here can be the animation resources of the target animation corresponding to the virtual object, or they can be the animation resources corresponding to each animation segment divided for the target animation.

[0142] As an example, if the animation switching request indicates a request to simultaneously switch the display of the corresponding target animations for three virtual objects, the three virtual objects are virtual object 1, virtual object 2, and virtual object 3. The target animation requested to switch the display for virtual object 1 is animation 1, the target animation requested to switch the display for virtual object 2 is animation 2, and the target animation requested to switch the display for virtual object 3 is 3.

[0143] As an example, in one case, if the display priorities of the animation resources associated with the three virtual objects are determined respectively by the method of the above-mentioned embodiment: the display priority of the animation resources associated with virtual object 1 is high, the display priority of the animation resources associated with virtual object 2 is medium, and the display priority of the animation resources associated with virtual object 3 is low, based on the fact that the display priority is positively correlated with the loading accuracy, it can be set as follows: the loading accuracy of the animation resources associated with virtual object 1 is high, and the initial loading accuracy corresponding to virtual object 1 is obtained; the loading accuracy of the animation resources associated with virtual object 2 is medium, and the initial loading accuracy corresponding to virtual object 2 is obtained; the loading accuracy of the animation resources associated with virtual object 3 is low, and the initial loading accuracy corresponding to virtual object 3 is obtained.

[0144] As an example, in another case, if the display priority of the animation resources associated with virtual object 1 and the animation resources associated with virtual object 2 are both medium, and the display priority of the animation resources associated with virtual object 3 is low, then based on the positive correlation between display priority and loading accuracy, it can be set: the initial loading accuracy corresponding to virtual object 1 and virtual object 2 is high, and the initial loading accuracy corresponding to virtual object 3 is medium.

[0145] As an example, in another case, if the display priorities of the animation resources associated with virtual object 1, virtual object 2, and virtual object 3 are the same, whether they are all high, medium, or low, then the initial loading precisions corresponding to virtual object 1, virtual object 2, and virtual object 3 can be set to be the same. Since the highest loading precision usually corresponds to the full amount of animation resources corresponding to the target animation, in this case, the initial loading precisions corresponding to virtual object 1, virtual object 2, and virtual object 3 can be uniformly set to medium.

[0146] Through the above method, after determining the initial loading accuracy corresponding to each virtual object, it is not necessary to load the full amount of animation resources for all virtual objects. Therefore, the overall system resource demand required to display the animations of multiple virtual objects at the same time is reduced. This method of reducing the demand for system resources can ensure the animation display detail of virtual objects close to the user's viewpoint, thereby ensuring clear visual feedback to the user; and although the animation display detail of virtual objects far from the user's viewpoint is reduced, it can also ensure the normal playback of animation effects and will not affect the user's visual experience.

[0147] Through the above method, when responding to an animation switching request for a virtual object, if there are multiple virtual objects and the system resource margin cannot meet the first resource demand required to display the target animations of multiple virtual objects, that is, the system resource margin cannot meet the full animation resources for loading multiple target animations or cannot render each virtual object based on the corresponding full animation resources, the initial loading accuracy corresponding to each virtual object can be set by the virtual scene where the virtual object is located and the depth distance in the virtual scene, thereby achieving a reduction in the accuracy of the action display of each virtual object. This method can not only reduce the demand for system resources, but also ensure the normal playback of animations, and the animation display after the loading accuracy is reduced is more in line with the viewing experience from the user's perspective, making the visual transition of the user when viewing the virtual objects in the virtual scene more natural.

[0148] In step 10222, an initial animation segment corresponding to the initial loading accuracy in the target animation of the virtual object is determined, and a second resource requirement component required to display the initial animation segment is determined.

[0149] In some cases, although the demand for system resources can be reduced by determining the initial loading accuracy, the reduced demand will not necessarily be lower than the current system resource margin of terminal 401. Therefore, it is also necessary to determine the second resource demand required for simultaneous animation display of multiple virtual objects based on the initial loading accuracy in order to size it with the system resource margin.

[0150] In actual implementation, since the animation switching request indicates that animation display is performed for multiple virtual objects simultaneously, the second resource requirement is the sum of the second resource requirement components when animation display is performed for each virtual object.

[0151] As an example, for each virtual object among the multiple virtual objects indicated by the animation switching request, after determining the target animation corresponding to the virtual object and the initial loading accuracy, determine the initial animation segment corresponding to the initial loading accuracy in the target animation. Based on the aforementioned embodiment, the resource record corresponding to the initial animation segment or the resource table shown in Table 1 can be obtained through the animation ID of the target animation and the animation segment ID of the initial animation segment, thereby determining the memory resource requirement and computing power resource requirement corresponding to the initial animation segment, and obtaining the second resource requirement component required to display the initial animation segment.

[0152] In some embodiments, the target animation includes multiple groups of animation frame sequences, each group of animation frame sequences includes at least two animation frames, and the "determining the initial animation segment corresponding to the initial loading accuracy in the target animation of the virtual object" in step 10222 can be achieved in the following way: obtaining the accuracy sequence relationship, the accuracy sequence relationship is used to characterize the correspondence between the loading accuracy and the animation frame sequence; based on the accuracy sequence relationship, determining the target animation frame sequence corresponding to the initial loading accuracy in the multiple groups of animation frame sequences as the initial animation segment.

[0153] In actual implementation, since the full animation resources of the target animation will include several animation frames, in order to divide the target animation into multiple animation clips so that different animation clips include different numbers of animation frames, the animation frames of the target animation can be divided into multiple groups of animation frame sequences, and the animation clips are determined based on the animation frame sequences.

[0154] As an example, multiple groups of animation frame sequences of the target animation can be divided based on the setting of the loading accuracy. For example, if three levels of "high, medium, and low" are set for the loading accuracy, then based on the full amount of animation frames of the target animation, different numbers of animation frames can be selected from the full amount of animation frames to form three groups of animation frame sequences (animation frame sequence 1, animation frame sequence 2, animation frame sequence 3). Among them, each group of animation frame sequences corresponds to an animation clip, and the number of animation frames contained in animation frame sequence 1> the number of animation frames contained in animation frame sequence 2> the number of animation frames contained in animation frame sequence 3. Here, animation frame sequence 1 can be set to correspond to "high" loading accuracy, animation frame sequence 2 to correspond to "medium" loading accuracy, and animation frame sequence 3 to correspond to "low" loading accuracy.

[0155] As an example, in the case where a group of animation frame sequences corresponds to an animation clip, when different groups of animation frame sequences are divided, different groups of animation frame sequences can be determined according to preset interval rules on the basis of ensuring that each group of animation frame sequences contains the first frame animation frame and the last frame animation frame. For example, the full animation frames of the target animation include 20 consecutive animation frames, and these 20 animation frames are numbered and recorded as {1, 2, 3, 4, ..., 18, 19, 20}. When determining the animation frame sequence 1 corresponding to the "high" loading accuracy, the animation frame sequence 1 can be determined by selecting one animation frame every interval of one animation frame, and the animation frame sequence 1 is recorded as {1, 3, 5, 7, ..., 17, 19, 20}, with a total of 11 animation frames. When determining the animation frame sequence 2 corresponding to the "medium" loading accuracy, the animation frame sequence 2 can be determined by selecting one animation frame every interval of two animation frames, and the animation frame sequence 2 can be recorded as {1, 4, 7, 10, 13, 16, 19, 20}, with a total of 8 animation frames. When determining the animation frame sequence 3 corresponding to the "low" loading precision, the animation frame sequence 3 can be determined by selecting one animation frame every three animation frames, and the animation frame sequence 3 can be recorded as {1, 5, 9, 13, 17, 20}, with a total of 6 animation frames. The above is an implementation method for dividing the animation frame sequence. On the basis of ensuring that each group of animation frame sequences contains the first frame animation frame and the last frame animation frame, other animation frames can be randomly selected to determine the animation frame sequences corresponding to different loading precisions. As long as it can be ensured that the number of animation frames included in the animation frame sequence with high loading precision is greater than the number of animation frames included in the animation frame sequence with low loading precision.

[0156] As an example, multiple groups of animation frame sequences can also be divided in advance for the target animation, and one animation clip includes one or more groups of animation frame sequences, ensuring that the number of animation frames included in different animation clips is different. For example, the full animation frames of the target animation can be pre-divided into three groups of animation frame sequences, and different animation frame sequences contain different animation frames. The number of animation frames included in the four groups of animation frame sequences is the same as the number of animation frames included in the target animation. Assuming that the full animation frames of the target animation contain 20 animation frames, recorded as {1,3,5,7,…,17,19,20}, it can be divided into animation frame sequence 1 as {1,10,20}, animation frame sequence 2 as {2,4,6,8,12,14,16,18}, and animation frame sequence 3 as {3,5,7,9,11,13,15,17}. In this way, the animation segment 1 corresponding to the loading accuracy of "low" can be set to include only the animation frame sequence 1; the animation segment 2 corresponding to the loading accuracy of "medium" can include the animation frame sequence 1 and the animation frame sequence 2, or the animation frame sequence 1 and the animation frame sequence 3; the animation segment 3 corresponding to the loading accuracy of "high" can include the animation frame sequence 1, the animation frame sequence 2, and the animation frame sequence 3. In this way, the animation frame sequences can be arbitrarily combined according to actual needs, and after the animation frame sequences are combined, the animation frames will not be repeated.

[0157] Through the above method, no matter which method is used to divide the animation frame sequence, it can be guaranteed that the animation clip with the lowest loading accuracy contains animation frames corresponding to the initial action and the ending action of the animation, so that after the virtual object is rendered based on the animation resources of the animation clip with the lowest loading accuracy, the virtual object can complete the entire visual action and ensure the basic animation effect.

[0158] In actual implementation, a unified animation frame sequence division standard can be adopted for all animations, and the right animation frames of all animations can be divided into animation frame sequences of the same number of groups. After determining the division standard, a precision sequence relationship table as shown in Table 3 can be constructed for the correspondence between loading precision and animation frame sequence, and the correspondence between the two can be reflected through the precision sequence relationship table.

[0159] Table 3

[0160]

[0161] As an example, if all animation frames are divided into three groups of animation frame sequences, an animation clip may include one or more groups of animation frame sequences, which can be set in Table 3: if the loading accuracy is "3", the animation frame sequence is {sequence 1, sequence 2, sequence 3}; if the loading accuracy is "2", the animation frame sequence is {sequence 1, sequence 2}; if the loading accuracy is "1", the animation frame sequence is {sequence 1}. Among them, sequence 1, sequence 2, sequence 3 are the sequence identifiers of each animation frame sequence.

[0162] In actual implementation, after determining the initial loading accuracy corresponding to each virtual object, the accuracy sequence relationship shown in Table 3 can be obtained, and the sequence identifier corresponding to the initial loading accuracy is determined in the accuracy sequence relationship. Then, the target animation frame sequence corresponding to the determined sequence identifier is used as the initial animation clip in the multiple groups of animation frame sequences divided for the target animation of the virtual object.

[0163] As an example, if the initial loading accuracy determined for virtual object 1 is "medium", the animation frame sequence corresponding to the initial loading accuracy of "medium" is determined to include {sequence 1, sequence 2} based on the accuracy sequence relationship. Then, among the three groups of animation frame sequences corresponding to the target animation 1 corresponding to virtual object 1, the animation frame sequence identified as "sequence 1" and the animation frame sequence identified as "sequence 2" can be determined as the target animation frame sequence. Then, the two groups of animation frame sequences in the target animation frame sequence can be combined to obtain an initial animation clip, which includes animation frames in the animation frame sequence identified as "sequence 1" and animation frames in the animation frame sequence identified as "sequence 2".

[0164] Through the above method, by uniformly managing the division method of animation frames of all animations, and configuring the precision sequence relationship table shown in Table 3 according to the division method, it is possible to quickly determine the animation segment corresponding to the initial loading precision in each target animation according to the precision sequence relationship table when adjusting the precision of the animation display of each virtual object, thereby improving the animation display speed.

[0165] In some embodiments, "determining the second resource requirement component required to display the initial animation clip" in step 10222 can also be achieved in the following way: obtaining the frame memory requirement component required to load the target animation frame sequence, and the frame computing power requirement component required to render the target animation frame sequence; based on the frame memory requirement component and the frame computing power requirement component, determining the second resource requirement component required to display the initial animation clip.

[0166] As an example, you can refer to the method of constructing Table 1 above. After dividing the animation frames of the target animation to obtain multiple groups of animation frame sequences of the target animation, you can perform loading and rendering simulations for each group of animation frame sequences to determine the frame memory requirement component required to load each group of animation frame sequences and the frame computing power requirement component required to render each group of animation frame sequences, thereby configuring a resource table or resource record as shown in Table 1 for each group of animation frame sequences.

[0167] In actual implementation, after determining the corresponding target animation frame sequence for each virtual object, the frame memory requirement component and frame computing power requirement component corresponding to each target animation frame sequence can be determined through the resource table or resource record pre-configured for the target animation frame sequence. If the number of target animation frame sequences is one, the frame memory requirement component and frame computing power requirement component of the target animation frame sequence are directly used as the second resource requirement component of the initial animation clip. If the number of target animation frame sequences is multiple groups, the sum of the frame memory requirement components corresponding to the multiple groups of target animation frame sequences can be used as the memory resource requirement of the second resource requirement component, and the sum of the frame computing power requirement components corresponding to the multiple groups of target animation frame sequences can be used as the computing power resource requirement of the second resource requirement component, thereby obtaining the second resource requirement component required to display the initial animation clip.

[0168] In step 10223, the sum of the second resource requirement components corresponding to the initial animation clips of the multiple virtual objects is determined as the second resource requirement required for simultaneously displaying the initial animation clips corresponding to the multiple virtual objects.

[0169] As an example, after determining the second resource requirement component required to display the initial animation clip of each virtual object based on step 10222, the sum of the memory resource requirements in multiple second resource requirement components is used as the second memory resource requirement in the second resource requirements, and the sum of the computing power resource requirements in multiple second resource requirement components is used as the second computing power resource requirement in the second resource requirements, to obtain the second resource requirement required to simultaneously display the initial animation clips corresponding to multiple virtual objects.

[0170] Through the above method, based on the resource table or resource record pre-configured for the animation clips of each animation, or the resource table or resource record configured for the animation frame sequence included in each animation clip, it is possible to directly determine the second resource demand component corresponding to the initial animation clip of each virtual object during the dynamic change of the system resource demand required for the virtual object animation display, and then determine the second resource demand based on the sum of multiple second resource demand components. This method can make the system more flexible, respond quickly to changes in system resource demand, and determine system resource demand more accurately in an environment where the resource demand changes dynamically.

[0171] In step 10224, in response to the system resource margin being lower than the second resource requirement, the initial loading precisions of the plurality of virtual objects are adjusted until the system resource margin is not lower than the second resource requirement determined based on the adjusted target loading precision.

[0172] In actual implementation, although determining the initial animation clip corresponding to each virtual object through the above embodiment can reduce the demand for system resources to a certain extent, the reduced demand (second resource demand) will not necessarily be lower than the current system resource margin of terminal 401.

[0173] As an example, if the second resource demand is lower than the system resource margin, the animation resources of the initial animation clip determined for each virtual object can be directly loaded into the memory of terminal 401, and each virtual object can be rendered based on the animation resources loaded into the memory, so that each virtual object can display the action represented by the initial animation clip in the virtual scene where it is located.

[0174] As an example, if it is determined that the system resource margin is still lower than the second resource requirement, then in response to the system resource margin being lower than the second resource requirement, the initial loading accuracy of multiple virtual objects is adjusted, that is, the loading accuracy of virtual objects continues to be reduced until the system resource margin is not lower than the second resource requirement determined based on the adjusted target loading accuracy.

[0175] In some embodiments, "adjusting the initial loading accuracy of multiple virtual objects" in step 10224 can be achieved in the following ways: adjusting the initial loading accuracy of each virtual object at the same time according to a uniform accuracy adjustment range; or, determining the accuracy adjustment priority of each virtual object, and adjusting the initial loading accuracy of each virtual object based on the accuracy adjustment priority, wherein different accuracy adjustment priorities correspond to different accuracy adjustment ranges.

[0176] In actual applications, the precision of multiple virtual objects can be uniformly adjusted according to a uniform precision adjustment range. The precision adjustment range can be set based on actual conditions and is not specifically limited here. As an example, the uniform precision adjustment range can be set to be reduced by one level. In response to the system resource margin being lower than the second resource requirement, the initial loading precision of multiple virtual objects can be reduced by one level at the same time. If the initial loading precision of the virtual object is already the lowest loading precision, the initial loading precision is no longer reduced.

[0177] As an example, if the animation switching request indicates that the animation switching display is requested for three virtual objects (virtual object 1, virtual object 2, virtual object 3) at the same time, the initial loading precisions corresponding to the three virtual objects are determined by the above embodiment as follows: the initial loading precisions corresponding to virtual object 1 and virtual object 2 are both "high", and the initial loading precision corresponding to virtual object 3 is "low". In response to the system resource margin being lower than the second resource requirement, the initial loading precisions of the three virtual objects are uniformly reduced by one level, and after one adjustment, the loading precisions of the three virtual objects after reduction are: the adjusted loading precisions of virtual object 1 and virtual object 2 are both "medium", and the adjusted loading precision of virtual object 3 is still "low".

[0178] Through the above-mentioned method, the precision of multiple virtual objects is uniformly adjusted according to a uniform precision adjustment range. When the system resource margin is lower than the second resource requirement, the second resource requirement required for the animation display of multiple virtual objects can be quickly reduced, and the target loading precision adapted to the system resource margin is obtained, thereby improving the animation display speed of terminal 401 when there is a resource bottleneck. The resource bottleneck here refers to the system resource margin being lower than the first resource requirement required to display the target animation, that is, it is unable to meet the full amount of animation frames required to display the target animation.

[0179] In actual applications, the accuracy adjustment priority corresponding to each virtual object can also be determined based on the depth distance, display priority, attribute characteristics of each virtual object, etc. corresponding to each virtual object. Based on the accuracy adjustment priority corresponding to each virtual object, the initial loading accuracy of each virtual object is adjusted. In this case, there is a situation where only the initial loading accuracy of one virtual object is adjusted, there is a situation where the initial loading accuracy of the same virtual object is adjusted to multiple levels at one time, and there is also a situation where the initial loading accuracy of multiple virtual objects is adjusted.

[0180] As an example, taking the precision adjustment priority of each virtual object determined based on the display priority as a reference, the display priority is negatively correlated with the precision adjustment priority, that is, the higher the display priority of the virtual object, the lower the precision adjustment priority. If the animation switching request indicates that the display animation is requested to be switched for three virtual objects (virtual object 1, virtual object 2, virtual object 3) at the same time, the initial loading precisions corresponding to the three virtual objects are determined by the above embodiment as follows: the initial loading precision corresponding to virtual object 1 is "high", and the initial loading precisions corresponding to virtual object 2 and virtual object 3 are both "medium". The display priorities of the three virtual objects are: the display priority corresponding to virtual object 1 is "high", and the display priorities corresponding to virtual object 2 and virtual object 3 are "low". Based on the negative correlation between the display priority and the precision adjustment priority, it can be determined that the precision adjustment priority of virtual object 1 is low, while the precision adjustment priorities corresponding to virtual object 2 and virtual object 3 are both high. Adjusting the initial loading precision of each virtual object based on the precision adjustment priority may include: preferentially adjusting the loading precision of virtual objects with high precision adjustment priority, and the adjustment amplitude is the precision adjustment amplitude corresponding to the precision adjustment priority. For example, in response to the system resource margin being lower than the second resource requirement, the first adjustment may be to reduce the initial loading accuracy of virtual object 2 and the initial loading accuracy of virtual object 3 according to the accuracy adjustment amplitude (e.g., the amplitude is two levels) corresponding to the high-precision adjustment priority, and the first adjustment result is: the loading accuracy corresponding to virtual object 1 is still "high", and the loading accuracy corresponding to virtual object 2 and virtual object 3 are both "low". Assuming that after the first adjustment, the system resource margin is still lower than the second resource requirement determined based on the adjusted loading accuracy, the accuracy of each virtual object can continue to be adjusted based on the accuracy adjustment priority. If the loading accuracy of the virtual object is already the lowest loading accuracy, the loading accuracy of the virtual object will no longer be reduced, and other virtual objects can be selected for accuracy adjustment.

[0181] By adjusting the loading precision of multiple virtual objects at the same time according to a unified precision adjustment range in the above manner, it is easy to reduce the demand for a large number of system resources at one time. Although the second resource demand is quickly lower than the system resource margin, the accuracy of the animation display of all virtual objects will be reduced, resulting in a reduction in the level of detail of the animation display of virtual objects closer to the user's viewpoint, which may affect the user's visual experience. Therefore, in order to solve the above-mentioned problems when adjusting the precision according to a unified precision adjustment range, the loading precision of some virtual objects can be adjusted by adjusting the precision priority, and the loading precision of some virtual objects with a high precision adjustment priority can be reduced first. This can ensure that the second resource demand determined after reducing the loading precision is lower than the system resource margin, so that the animation display of each virtual object can proceed normally, and the level of detail of the animation display can be guaranteed.

[0182] In step 10225, the animation segments corresponding to the target loading accuracy in the target animation of each virtual object are determined as corresponding target animation segments.

[0183] In actual implementation, a suitable adjustment method can be selected from the two adjustment methods of loading precision proposed in the above embodiments based on actual needs. After the target loading precision corresponding to each virtual object is obtained through the adjustment of the loading precision, the second resource demand determined based on the target loading precision is lower than the system resource margin. Then, for each virtual object, the target sequence identifier corresponding to the target loading precision corresponding to the virtual object can be determined through the precision sequence relationship, and the target animation frame sequence corresponding to the target sequence identifier can be determined in the multiple animation frame sequences divided for the target animation of the virtual object, and the animation segment determined based on the target animation frame sequence is used as the target animation segment corresponding to the virtual object.

[0184] Continue reading Figure 3A , and continue with the above step 102 for explanation.

[0185] In step 103, the animation resource of the target animation clip is loaded, and the virtual object is rendered based on the loaded animation resource of the target animation clip.

[0186] In actual implementation, after determining the target animation clip corresponding to each virtual object, the animation resources of the target animation clip corresponding to each virtual object can be loaded into the memory of terminal 401, and the associated virtual object can be rendered based on the animation resources of the target animation clip loaded into the memory, so that the virtual object displays the action represented by the target animation clip in the virtual scene.

[0187] As an example, taking a game application as an example, if multiple virtual objects are virtual characters controlled by different users, since different virtual characters may have different appearance attributes such as appearance, equipment, skin color, etc., the rendering process is to dynamically superimpose these appearance elements on the basic animation resources, so that each virtual character will show its unique image when displaying the corresponding animation.

[0188] Through the above embodiment, in response to the animation switching request for the virtual object, the target animation requested to be switched for the virtual object is first determined, and the first resource requirement required to display the target animation is determined. If the current system resource margin is lower than the first resource requirement, that is, the system resource margin cannot support the direct loading of the full amount of animation resources of the target animation, the target animation segment adapted to the system resource margin can be selected from the target animation, and the animation display for the virtual object is completed based on the animation resources corresponding to the target animation segment. In this way, when the virtual object is animated, if a resource bottleneck occurs (that is, the current system resource margin is lower than the first resource requirement required to display the target animation), since the loading accuracy of the target animation segment is lower than the loading accuracy of the target animation, the resource requirement required to display the target animation segment is lower than the resource requirement required to display the target segment, and the animation display for the virtual object is completed by loading the animation resources of the target animation segment with less resource requirements, which can not only ensure the normal display of the animation under the resources supported by the system resource margin, but also reduce the occurrence of animation jams or even animation loss caused by loading timeouts or failures to load due to resource bottlenecks, thereby improving the user experience.

[0189] Furthermore, through the above-mentioned embodiments, the method of determining the target animation clip based on the depth distance, virtual scene, etc. can realize the gradual reduction of the demand for system resources, and can also ensure the normal playback of the animation, and the animation display after the loading precision is lowered is more in line with the viewing experience from the user's perspective, making the visual transition of the user when watching the virtual object in the virtual scene more natural. And by configuring the precision sequence relationship and the priority configuration relationship, it is possible to quickly determine the target animation clip adapted to the system resource margin based on different system resource margins, improve the loading and rendering speed of animation resources, and enable the virtual object to complete the entire visual action, ensuring the basic animation effect and the level of detail of the animation display.

[0190] In a specific embodiment, the electronic device 400 implementing the virtual object animation processing method of the embodiment of the present application is a combination of a terminal 401 and a server 200. The terminal 401 is installed with a game client of a game application, and the server 200 is a game server connected to the game client.

[0191] Figure 5ASchematic diagram of the interaction between the game client and the server 200. Figure 5A , the animation processing method of the virtual object may include the following steps:

[0192] S201, start the game application.

[0193] The user starts the game client corresponding to the game application at the terminal 401 .

[0194] S202, sending a request for acquisition.

[0195] In response to the game client being started, a request for obtaining the animation loading strategy is sent to the game server.

[0196] S203, obtaining an animation loading strategy.

[0197] After receiving the acquisition request for the animation loading strategy, the game server obtains the animation loading strategy from the database in response to the acquisition request, and sends the obtained animation loading strategy to the game client. Here, the animation loading strategy includes the priority configuration relationship configured in advance for each designed animation, the resource record of each group of animation frame sequences divided by the animation, and the pre-configured precision sequence relationship.

[0198] Among them, the priority configuration relationship configures the correspondence between animation, virtual scene, depth distance and display priority; the resource record describes the memory resource requirements and computing power resource requirements required to display the animation frame sequence of the animation; the precision sequence relationship configuration has the correspondence between the loading precision and the animation frame sequence.

[0199] S204, cache animation loading strategy.

[0200] After the game client receives the animation loading strategy sent by the game server, it caches it locally for use in subsequent animation loading.

[0201] At this point, the process of the game client obtaining the animation loading strategy is completed.

[0202] S205, start the generation process.

[0203] In response to the addition of animation resources, the game server starts a process for generating an animation loading strategy for the newly added animation.

[0204] S206, traverse the newly added animations.

[0205] For each animation resource of the newly added animation, the system resource requirement is calculated to obtain the resource requirement for displaying all the animation resources of the newly added animation. The resource requirement includes the memory resource requirement and the computing power resource requirement.

[0206] S207, collect data.

[0207] For each newly added animation, the animation frames of the newly added animation are divided into n groups of animation frame sequences based on the preset animation frame division rules. Different animation clips of the newly added animation correspond to different loading precisions, and animation clips with different loading precisions include different animation frame sequences. Loading and rendering simulations are performed for each group of animation frame sequences to determine the memory resource requirement component and computing power resource requirement component corresponding to each group of animation frame sequences, thereby determining the memory resource requirement and computing power resource requirement corresponding to animation clips with different loading precisions.

[0208] S208: Generate an animation loading strategy for the newly added animation.

[0209] Based on the data determined in S207, a resource record corresponding to the newly added animation is generated, and a corresponding priority configuration relationship is configured for the newly added animation.

[0210] At this point, the animation loading strategy generation process for the newly added animation is completed.

[0211] Figure 5B Schematic diagram of the interaction between the game client and the display module of the terminal 401. Figure 5B , the animation processing method of the virtual object may further include the following steps:

[0212] S301, start the animation display process.

[0213] In response to an animation switching request for a virtual object, an animation display process is started. If the animation switching request indicates to switch display animations for multiple virtual objects at the same time, a target animation for each virtual object is determined.

[0214] S302, obtaining system resource margin.

[0215] The current system resource margin of the terminal 401 is obtained, including the memory resource margin and computing power resource margin that can be used by the game client.

[0216] S303, calculating the depth distance.

[0217] Determine a virtual scene in which multiple virtual objects are located, and for each virtual object, determine the distance between the position where the virtual object appears in the virtual scene and the viewpoint position of the current user, and map the calculated distance to a depth distance (e.g., far, medium, near) according to a priority configuration relationship of a target animation configuration for the virtual object.

[0218] S304, calculation accuracy.

[0219] For each virtual object, the initial loading accuracy corresponding to each virtual object is determined according to the priority configuration relationship of the target animation corresponding to each virtual object, the virtual scene, and the determined depth distance, and based on the determined initial loading accuracy, the second resource requirement required for the animation display of multiple virtual objects at the same time is calculated. In response to the system resource margin being lower than the second resource requirement, the initial loading accuracy of multiple virtual objects is adjusted until the system resource margin is not lower than the second resource requirement determined based on the adjusted target loading accuracy; based on the accuracy sequence relationship, the animation frame sequence corresponding to the target loading accuracy in the target animation of each virtual object is determined to obtain the target animation clip corresponding to each virtual object.

[0220] S305, loading animation resources.

[0221] For each virtual object, the animation resource of the target animation clip corresponding to the virtual object is loaded into the memory available to the game client.

[0222] S306, animation display.

[0223] According to the animation resources loaded into the memory, actual rendering of the animation is performed on each virtual object, and the rendering result is pushed to the display module of the terminal 401 for display, such as screen display.

[0224] After the animation is displayed, this process ends.

[0225] Figure 6 A schematic diagram of the structure of a game client and a game server provided in an embodiment of the present application.

[0226] See also Figure 6 In some embodiments, a game client may include:

[0227] The policy control module 601 is used to obtain the animation loading strategy from the game server and cache it locally. The animation loading module 602 is used to determine the target loading accuracy corresponding to each virtual object according to the animation loading strategy cached locally by the policy control module 601 and the current system resource margin of the game client, and load the animation resources of the target animation segment determined based on the target loading accuracy. That is, execute the above S301 to S305. The playback control module 603 is used to render the animation according to the animation resources loaded by the animation loading module 602 when the animation needs to be displayed, and display the animation. That is, execute S306.

[0228] Continue reading Figure 6 In some embodiments, a game server may include:

[0229] The animation processing module 604 is used to process and store the animation frames of the animation in segments, and calculate the memory resource requirements for loading different segments and the computing resource requirements for rendering. That is, S207 is executed.

[0230] The scene analysis module 605 is used to analyze the display priority of different animations in each virtual scene.

[0231] The strategy generation module 606 is used to determine the animation loading strategy according to the animation segmentation determined by the animation processing module 604 and the result of the scene analysis performed by the scene analysis module 605, and store it in the database for loading and use by the game client. That is, S208 is executed.

[0232] The following is a description of an exemplary structure of a virtual object animation processing device 455 provided in an embodiment of the present application implemented as a software module. In some embodiments, Figure 2 As shown, the software modules stored in the virtual object animation processing device 455 of the memory 440 may include:

[0233] The first determination module 4551 is used to determine, in response to an animation switching request for a virtual object, a target animation to be switched and displayed as requested by the animation switching request, and a first resource requirement required to display the target animation.

[0234] The second determining module 4552 is configured to determine a target animation segment in the target animation that is adapted to the system resource margin in response to the system resource margin being lower than the first resource requirement.

[0235] The target animation includes at least two consecutive animation frames associated with the virtual object, and the loading accuracy of the target animation segment is lower than the loading accuracy of the target animation.

[0236] The display module 4553 is used to load the animation resources of the target animation clip and render the virtual object based on the loaded animation resources of the target animation clip.

[0237] In some embodiments, when there are multiple virtual objects, the first determination module 4551 is also used to determine the target animation requested to be switched and displayed for each virtual object in the animation switching request, and the first resource requirement component required to display the target animation of each virtual object; and the sum of the first resource requirement components corresponding to each virtual object is determined as the first resource requirement.

[0238] In some embodiments, the second determination module 4552 is also used to determine the virtual scene in which each virtual object is located and the depth distance of each virtual object in the depth direction of the virtual scene when there are multiple virtual objects and each virtual object corresponds to a target animation; for each virtual object, based on the depth distance corresponding to the virtual scene and the virtual object, determine the target animation segment that is adapted to the system resource margin in the target animation corresponding to the virtual object.

[0239] In some embodiments, the second determination module 4552 is also used to set the loading accuracy of animation resources associated with virtual objects based on the virtual scene and the depth distance corresponding to the virtual object to obtain an initial loading accuracy; determine the initial animation segment corresponding to the initial loading accuracy in the target animation of the virtual object, and determine the second resource requirement component required to display the initial animation segment; determine the sum of the second resource requirement components corresponding to the initial animation segments of multiple virtual objects as the second resource requirement required to simultaneously display the initial animation segments corresponding to multiple virtual objects; in response to the system resource margin being lower than the second resource requirement, adjust the initial loading accuracy of multiple virtual objects until the system resource margin is not lower than the second resource requirement determined based on the adjusted target loading accuracy; determine the animation segment corresponding to the target loading accuracy in the target animation of each virtual object as the corresponding target animation segment.

[0240] In some embodiments, the second determination module 4552 is also used to determine the display priority of the corresponding target animation of the virtual object based on the virtual scene and the depth distance corresponding to the virtual object; the loading accuracy of the animation resources associated with the virtual object is set in a manner that the display priority is positively correlated with the loading accuracy to obtain the initial loading accuracy.

[0241] In some embodiments, the second determination module 4552 is also used to obtain a priority configuration relationship, which is used to characterize the correspondence between animation, virtual scene, depth distance and display priority; based on the depth distance corresponding to the virtual scene and the virtual object, the priority configuration relationship is queried, and the display priority corresponding to the target animation, virtual scene and depth distance is determined as the display priority of the target animation corresponding to the virtual object.

[0242] In some embodiments, the animation processing device 455 of the virtual object also includes a configuration module for configuring the display priority of the target animation corresponding to different depth distances in different virtual scenes in response to new operations on the target animation, and obtaining the correspondence between the target animation and different virtual scenes, depth distances and display priorities; and adding the correspondence to the priority configuration relationship.

[0243] In some embodiments, the target animation includes multiple groups of animation frame sequences, each group of animation frame sequences includes at least two animation frames; the second determination module 4552 is also used to obtain the precision sequence relationship, and the precision sequence relationship is used to characterize the correspondence between the loading precision and the animation frame sequence; based on the precision sequence relationship, the target animation frame sequence corresponding to the initial loading precision in the multiple groups of animation frame sequences is determined as the initial animation clip.

[0244] In some embodiments, the second determination module 4552 is also used to obtain the frame memory requirement component required to load the target animation frame sequence, and the frame computing power requirement component required to render the target animation frame sequence; and determine the frame memory requirement component and the frame computing power requirement component as the second resource requirement component required to display the initial animation clip.

[0245] In some embodiments, the second determination module 4552 is also used to adjust the initial loading precision of each virtual object at the same time according to a uniform precision adjustment range; or, determine the precision adjustment priority of the animation clip of each virtual object, and adjust the initial loading precision of each virtual object based on the precision adjustment priority, wherein different precision adjustment priorities correspond to different precision adjustment ranges.

[0246] In some embodiments, when the number of virtual objects is one, the second determination module 4552 is also used to obtain multiple animation clips divided for the target animation, and the third resource requirement required to display each animation clip; based on each third resource requirement, screen out animation clips that meet the preset adaptation conditions from the multiple animation clips, and use the screened animation clips as the target animation clip; wherein the preset adaptation conditions include at least one of the following: the third resource requirement is not higher than the system resource margin; when the third resource requirements of multiple animation clips are not higher than the system resource margin, the third resource requirement is the largest.

[0247] In some embodiments, the animation processing device 455 of the virtual object also includes a margin determination module, which is used to obtain the current available memory space, current operating frequency and current utilization of the central processing unit, and the maximum computing power of the central processing unit at the current operating frequency; determine the memory resource margin based on the current available memory space, and calculate the available computing power of the central processing unit based on the maximum computing power, current utilization and preset buffer value to obtain the computing power resource margin; determine the system resource margin based on the memory resource margin and the computing power resource margin.

[0248] The embodiment of the present application provides a computer program product, which includes a computer program or a computer executable instruction, and the computer program or the computer executable instruction is stored in a computer-readable storage medium. The processor of the electronic device 400 reads the computer executable instruction from the computer-readable storage medium, and the processor executes the computer executable instruction, so that the electronic device 400 executes the above-mentioned virtual object animation processing method of the embodiment of the present application.

[0249] The present application embodiment provides a computer-readable storage medium in which computer executable instructions or computer programs are stored. When the computer executable instructions or computer programs are executed by a processor, the processor will be caused to execute the virtual object animation processing method provided by the present application embodiment, for example, Figure 3A A method for processing animation of a virtual object is shown.

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

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

[0252] As an example, computer-executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file that stores other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or code portions).

[0253] As an example, computer executable instructions may be deployed to be executed on one electronic device, or on multiple electronic devices located at one site, or on multiple electronic devices distributed at multiple sites and interconnected by a communication network.

[0254] In summary, in response to the animation switching request for the virtual object, the embodiment of the present application first determines the target animation requested to be switched for the virtual object, and determines the first resource requirement required to display the target animation. If the current system resource margin is lower than the first resource requirement, that is, the system resource margin cannot support the direct loading of the full amount of animation resources of the target animation, the target animation segment adapted to the system resource margin can be selected in the target animation, and the animation display for the virtual object is completed based on the animation resources corresponding to the target animation segment. In this way, when the virtual object is animated, if a resource bottleneck occurs (that is, the current system resource margin is lower than the first resource requirement required to display the target animation), since the loading accuracy of the target animation segment is lower than the loading accuracy of the target animation, the resource requirement required to display the target animation segment is lower than the resource requirement required to display the target segment, and the animation display for the virtual object is completed by loading the animation resources of the target animation segment with less resource requirements, which can not only ensure the normal display of the animation under the resources supported by the system resource margin, but also reduce the occurrence of animation jams or even animation loss caused by loading timeouts or failures to load due to resource bottlenecks, thereby improving the user experience.

[0255] Furthermore, through the above-mentioned embodiments, the method of determining the target animation clip based on the depth distance, virtual scene, etc. can realize the gradual reduction of the demand for system resources, and can also ensure the normal playback of the animation, and the animation display after the loading precision is lowered is more in line with the viewing experience from the user's perspective, making the visual transition of the user when watching the virtual object in the virtual scene more natural. And by configuring the precision sequence relationship and the priority configuration relationship, it is possible to quickly determine the target animation clip adapted to the system resource margin based on different system resource margins, improve the loading and rendering speed of animation resources, and enable the virtual object to complete the entire visual action, ensuring the basic animation effect and the level of detail of the animation display.

[0256] The above is only an embodiment of the present application and is not intended to limit the protection scope of the present application. Any modifications, equivalent substitutions and improvements made within the spirit and scope of the present application are included in the protection scope of the present application.

Claims

1. A method for processing an animation of a virtual object, characterized in that: The method comprises: In response to an animation switching request for a virtual object, determining a target animation to be switched and displayed as requested by the animation switching request, and a first resource requirement required to display the target animation; In response to the system resource margin being lower than the first resource requirement, determining a target animation segment in the target animation adapted to the system resource margin; Wherein, the target animation includes at least two consecutive animation frames associated with the virtual object, and the loading accuracy of the target animation segment is lower than the loading accuracy of the target animation; The animation resource of the target animation clip is loaded, and the virtual object is rendered based on the loaded animation resource of the target animation clip.

2. The method according to claim 1, characterized in that When there are multiple virtual objects, determining the target animation to be switched and displayed requested by the animation switching request, and the first resource requirement required to display the target animation, includes: Determine the target animation requested to be switched and displayed for each of the virtual objects in the animation switching request, and a first resource requirement component required to display the target animation of each of the virtual objects; The sum of the first resource demand components corresponding to the virtual objects is determined as the first resource demand.

3. The method according to claim 1, characterized in that When there are multiple virtual objects and each virtual object corresponds to a target animation, determining a target animation segment in the target animation that is adapted to the system resource margin includes: Determine a virtual scene in which each of the virtual objects is located, and a depth distance of each of the virtual objects in a depth direction of the virtual scene; For each of the virtual objects, based on the depth distance between the virtual scene and the virtual object, a target animation segment adapted to the system resource margin is determined in the target animation corresponding to the virtual object.

4. The method according to claim 3, characterized in that The step of determining, based on the depth distance between the virtual scene and the virtual object, a target animation segment adapted to the system resource margin in the target animation corresponding to the virtual object comprises: Based on the virtual scene and the depth distance corresponding to the virtual object, setting the loading accuracy of the animation resource associated with the virtual object to obtain an initial loading accuracy; Determining an initial animation segment in a target animation of the virtual object corresponding to the initial loading accuracy, and determining a second resource requirement component required to display the initial animation segment; Determining the sum of the second resource requirement components corresponding to the initial animation clips of the plurality of virtual objects as the second resource requirement required for simultaneously displaying the initial animation clips corresponding to the plurality of virtual objects; In response to the system resource margin being lower than the second resource requirement, adjusting the initial loading precisions of the plurality of virtual objects until the system resource margin is no lower than the second resource requirement determined based on the adjusted target loading precision; The animation segment corresponding to the target loading accuracy in the target animation of each virtual object is determined as the corresponding target animation segment.

5. The method according to claim 4, characterized in that The step of setting the loading accuracy of the animation resource associated with the virtual object based on the virtual scene and the depth distance corresponding to the virtual object to obtain the initial loading accuracy includes: Determining a display priority of a target animation corresponding to the virtual object based on the virtual scene and the depth distance corresponding to the virtual object; The loading accuracy of the animation resource associated with the virtual object is set in a manner that the display priority is positively correlated with the loading accuracy to obtain an initial loading accuracy.

6. The method according to claim 5, characterized in that Before determining the display priority of the target animation corresponding to the virtual object based on the virtual scene and the depth distance corresponding to the virtual object, the method further includes: Acquire a priority configuration relationship, where the priority configuration relationship is used to characterize a corresponding relationship between an animation, a virtual scene, a depth distance, and a display priority; The determining, based on the virtual scene and the depth distance corresponding to the virtual object, the display priority of the target animation corresponding to the virtual object comprises: Based on the virtual scene and the depth distance corresponding to the virtual object, the priority configuration relationship is queried, and the queried display priority corresponding to the target animation, the virtual scene, and the depth distance is determined as the display priority of the target animation corresponding to the virtual object.

7. The method according to claim 6, characterized in that Before obtaining the priority configuration relationship, the method further includes: In response to a new operation on the target animation, display priorities of the target animation corresponding to different depth distances in different virtual scenes are configured to obtain a correspondence between the target animation and different virtual scenes, depth distances, and display priorities; The corresponding relationship is added to the priority configuration relationship.

8. The method according to claim 4, characterized in that The target animation includes multiple groups of animation frame sequences, each group of the animation frame sequences includes at least two animation frames; The determining of an initial animation segment corresponding to the initial loading accuracy in the target animation of the virtual object comprises: Acquire a precision sequence relationship, where the precision sequence relationship is used to characterize a corresponding relationship between loading precision and animation frame sequence; Based on the precision sequence relationship, a target animation frame sequence corresponding to the initial loading precision in the plurality of groups of animation frame sequences is determined as the initial animation clip.

9. The method according to claim 8, characterized in that The determining of a second resource requirement component required for displaying the initial animation clip comprises: Obtaining a frame memory requirement component required for loading the target animation frame sequence and a frame computing power requirement component required for rendering the target animation frame sequence; Based on the frame memory requirement component and the frame computing power requirement component, a second resource requirement component required to display the initial animation clip is determined.

10. The method according to claim 4, characterized in that The adjusting the initial loading accuracy of the plurality of virtual objects comprises: According to a uniform precision adjustment range, the initial loading precision of each virtual object is adjusted simultaneously; or, The precision adjustment priority of the animation clip of each virtual object is determined, and the initial loading precision of each virtual object is adjusted based on the precision adjustment priority, wherein different precision adjustment priorities correspond to different precision adjustment ranges.

11. The method according to claim 1, characterized in that: When the number of the virtual object is one, determining a target animation segment in the target animation that is adapted to the system resource margin includes: Acquire multiple animation segments divided according to the target animation, and the third resource requirement required to display each animation segment; Based on the third resource requirements, selecting animation clips that meet preset adaptation conditions from the plurality of animation clips, and using the selected animation clips as target animation clips; The preset adaptation condition includes at least one of the following: The third resource requirement is not higher than the system resource margin; when the third resource requirements of the plurality of animation clips are all not higher than the system resource margin, the third resource requirement is the largest.

12. The method according to any one of claims 1 to 11, characterized in that: Before the response that the system resource margin is lower than the first resource requirement, the method further includes: Obtaining the current available memory space, current operating frequency and current utilization of the central processing unit, and the maximum computing power of the central processing unit at the current operating frequency; Determine the memory resource margin based on the current available memory space, and calculate the available computing power of the central processing unit based on the maximum computing power, the current utilization rate and the preset buffer value to obtain the computing power resource margin; Based on the memory resource margin and the computing power resource margin, the system resource margin is determined.

13. A virtual object animation processing device, characterized in that: The device comprises: A first determining module, configured to determine, in response to an animation switching request for a virtual object, a target animation to be switched and displayed as requested by the animation switching request, and a first resource requirement required to display the target animation; A second determining module, configured to determine a target animation segment in the target animation adapted to the system resource margin in response to the system resource margin being lower than the first resource requirement; Wherein, the target animation includes at least two consecutive animation frames associated with the virtual object, and the loading accuracy of the target animation segment is lower than the loading accuracy of the target animation; The display module is used to load the animation resource of the target animation clip and render the virtual object based on the loaded animation resource of the target animation clip.

14. An electronic device, characterized in that: The electronic device comprises: A memory for storing computer executable instructions or computer programs; A processor, configured to implement the method according to any one of claims 1 to 12 when executing computer executable instructions or computer programs stored in the memory.

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

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

Citation Information

Patent Citations

  • An animation resource configuration method and device

    CN109725948A

  • Animation playing method and device, electronic equipment and storage medium

    CN113658300A

  • Resource processing method and device, electronic equipment and storage medium

    CN114501132A

  • Cloud rendering method and device, equipment, storage medium and program product

    CN116048792A

  • Image processing method and device, computer equipment and storage medium

    CN116129316A