Display method, device and equipment of animation frame and storage medium
By calculating the target animation update frequency of the virtual model to control resource consumption, the problem of insufficient animation frame display smoothness in the existing technology is solved, and a higher human-computer interaction rate is achieved.
Patent Information
- Application Number
- CN202210006550.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-05
- Publication Date
- 2026-02-03
- Estimated Expiration
- 2042-01-05
AI Technical Summary
In existing technologies, displaying animation frames based on the initial animation update frequency of virtual models can easily reduce the smoothness of animation frame display, resulting in a low human-computer interaction rate.
By acquiring the resource consumption index of the virtual model, the target animation update frequency is calculated based on the resource consumption index and the initial animation update frequency. Animation frames are then displayed according to the target animation update frequency, and the animation update frequency of the virtual model is adjusted to control resource consumption.
It improved the smoothness of animation frame display and increased the human-computer interaction rate.
Smart Images

Figure CN114299201B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present application relate to the technical field of computer, and particularly relate to an animation frame display method and device, equipment and storage medium. BACKGROUND
[0002] With the development of computer technology, there are more and more application programs capable of providing virtual environments, and the virtual environment includes at least one virtual model. When a terminal displays a picture of the virtual environment, the terminal displays an animation frame of the at least one virtual model in the picture for an interactive object to view.
[0003] In the related art, an animation frame corresponding to a virtual model is directly displayed according to an initial animation update frequency of the virtual model. The initial animation update frequency of the virtual model is determined based on a ratio of a rendering size of the virtual model to a reference size.
[0004] The way of displaying an animation frame based on an initial animation update frequency of a virtual model can easily reduce the display fluency of the animation frame, resulting in a low human-computer interaction rate. SUMMARY
[0005] Embodiments of the present application provide an animation frame display method, device, equipment and storage medium, which can be used to provide the display fluency of the animation frame. The technical solution is as follows:
[0006] In one aspect, an animation frame display method is provided, and the method comprises:
[0007] Based on an initial animation update frequency of at least one virtual model, a resource consumption index is obtained, and the resource consumption index is used to indicate an amount of resources consumed for animation update according to the initial animation update frequency of the at least one virtual model;
[0008] Based on the resource consumption index and the initial animation update frequency, a target animation update frequency of the at least one virtual model is obtained;
[0009] According to the target animation update frequency, an animation frame corresponding to the at least one virtual model is displayed.
[0010] In another aspect, an animation frame display device is provided, and the device comprises:
[0011] A first obtaining unit is configured to obtain a resource consumption index based on an initial animation update frequency of at least one virtual model, and the resource consumption index is used to indicate an amount of resources consumed for animation update according to the initial animation update frequency of the at least one virtual model;
[0012] The second obtaining unit is configured to obtain a target animation update frequency of the at least one virtual model based on the resource consumption indicator and the initial animation update frequency.
[0013] The display unit is configured to display an animation frame corresponding to the at least one virtual model according to the target animation update frequency.
[0014] In a possible implementation, the second obtaining unit is configured to: when the resource consumption indicator is greater than a resource consumption threshold, determine an adjustment coefficient based on the resource consumption indicator and the resource consumption threshold; adjust the initial animation update frequency based on the adjustment coefficient to obtain a first animation update frequency of the at least one virtual model; and obtain the target animation update frequency of the at least one virtual model based on the first animation update frequency.
[0015] In a possible implementation, the second obtaining unit is configured to: when a first virtual model satisfies a first model screening condition and the first animation update frequency of the first virtual model is not higher than a reference animation update frequency, take the reference animation update frequency as the target animation update frequency of the first virtual model, the first virtual model being any virtual model in the at least one virtual model.
[0016] In a possible implementation, the second obtaining unit is configured to: when a first virtual model satisfies a first model screening condition and the first animation update frequency of the first virtual model is higher than a reference animation update frequency, or when the first virtual model does not satisfy the first model screening condition, take the first animation update frequency of the first virtual model as the target animation update frequency of the first virtual model, the first virtual model being any virtual model in the at least one virtual model.
[0017] In a possible implementation, the second obtaining unit is configured to: when the resource consumption indicator is not greater than a resource consumption threshold, take the initial animation update frequency as the target animation update frequency of the at least one virtual model.
[0018] In a possible implementation, the display unit is configured to display a first animation frame of the first virtual model when a target animation update frequency of the first virtual model does not match a count value of the first virtual model, the first virtual model being any virtual model in the at least one virtual model; and display a second animation frame of the first virtual model when the target animation update frequency of the first virtual model matches the count value of the first virtual model, the first animation frame being a latest displayed animation frame in an animation of the first virtual model, the second animation frame being an animation frame located after the first animation frame in the animation of the first virtual model, and the target animation frame being determined based on the first animation frame, the second animation frame, and the count value of the first virtual model.
[0019] In a possible implementation, the display unit is configured to display a first animation frame of the first virtual model when the first virtual model does not satisfy a second model screening condition; and display a target animation frame of the first virtual model when the first virtual model satisfies the second model screening condition.
[0020] In a possible implementation, the display unit is configured to adjust a target animation update frequency of a first virtual model to an animation update frequency of a second virtual model when the first virtual model is associated with the second virtual model, the first virtual model being any virtual model in the at least one virtual model, and display an animation frame corresponding to the first virtual model according to the adjusted target animation update frequency of the first virtual model.
[0021] In a possible implementation, the display unit is further configured to adjust a count value of the first virtual model to a count value of the second virtual model, so as to synchronize animation update of the first virtual model with animation update of the second virtual model.
[0022] In a possible implementation, the first obtaining unit is configured to obtain resource consumption sub-indicators of the at least one virtual model, and a resource consumption sub-indicator of any virtual model is in a positive correlation with an initial animation update frequency of the any virtual model; and aggregate the resource consumption sub-indicators of the at least one virtual model to obtain the resource consumption indicator.
[0023] In a possible implementation, the first obtaining unit is further configured to determine a proportion value of a first virtual model, the first virtual model being any virtual model in the at least one virtual model, the proportion value of the first virtual model being a ratio of a rendering size of the first virtual model to a reference size; and take an animation update frequency corresponding to the proportion value of the first virtual model as the initial animation update frequency of the first virtual model.
[0024] In a possible implementation, the resource consumption threshold is a resource consumption threshold corresponding to a target category, and the at least one virtual model is a virtual model of the target category.
[0025] In another aspect, a computer device is provided, which includes a processor and a memory, and the memory stores at least one computer program, which is loaded and executed by the processor to enable the computer device to implement the display method of the animation frame according to any of the above aspects.
[0026] In another aspect, a computer readable storage medium is also provided, which stores at least one computer program, which is loaded and executed by a processor to enable a computer to implement the display method of the animation frame according to any of the above aspects.
[0027] In another aspect, a computer program product is also provided, which includes a computer program or computer instructions, which is loaded and executed by a processor to enable a computer to implement the display method of the animation frame according to any of the above aspects.
[0028] The technical solutions provided by the embodiments of the present application at least bring the following beneficial effects:
[0029] According to the technical solutions provided by the embodiments of the present application, the animation frame corresponding to the at least one virtual model is displayed according to the target animation update frequency of the at least one virtual model, wherein the target animation update frequency of the at least one virtual model is determined on the basis of the initial animation update frequency of the at least one virtual model by considering the resource consumption index. The target animation update frequency of the at least one virtual model can effectively control the resource consumption globally, which is conducive to improving the display fluency of the animation frame and further improving the human-computer interaction rate. BRIEF DESCRIPTION OF DRAWINGS
[0030] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative effort.
[0031] Figure 1 is a schematic diagram of an implementation environment of an animation frame display method provided by an embodiment of the present application;
[0032] Figure 2 is a flowchart of an animation frame display method provided by an embodiment of the present application;
[0033] Figure 3 This is a schematic diagram illustrating an animation update synchronization situation provided in an embodiment of this application;
[0034] Figure 4 This is a schematic diagram illustrating a screen display effect provided in an embodiment of this application;
[0035] Figure 5 This is a schematic diagram illustrating a screen display effect provided in an embodiment of this application;
[0036] Figure 6 This is a schematic diagram illustrating a screen display effect provided in an embodiment of this application;
[0037] Figure 7 This is a schematic diagram illustrating the distribution of a virtual model provided in an embodiment of this application;
[0038] Figure 8 This is a schematic diagram illustrating the distribution of a virtual model provided in an embodiment of this application;
[0039] Figure 9 This is a schematic diagram illustrating a screen display effect provided in an embodiment of this application;
[0040] Figure 10 This is a schematic diagram illustrating a screen display effect provided in an embodiment of this application;
[0041] Figure 11 This is a schematic diagram illustrating the display process of an animation frame provided in an embodiment of this application;
[0042] Figure 12 This is a schematic diagram of an animation frame display device provided in an embodiment of this application;
[0043] Figure 13 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0044] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0045] The following is a description of the terms used in the embodiments of this application:
[0046] Virtual environment: An environment provided (or displayed) by an application when it runs on a terminal. This virtual environment refers to the environment created for virtual objects to perform activities. A virtual environment can be a two-dimensional, 2.5-dimensional, or three-dimensional virtual environment. It can be a simulation of the real world, a semi-simulated / semi-fictional environment, or a purely fictional environment.
[0047] Virtual objects are interactive objects within a virtual environment. These can be virtual characters, animals, anime figures, etc. Virtual objects can be manipulated via peripheral devices or by clicking on a touchscreen. Each virtual object has its own shape and volume within the virtual environment, occupying a portion of the virtual space. For example, when the virtual environment is three-dimensional, the virtual objects are three-dimensional models created using animation skeletal technology.
[0048] Virtual models refer to skeletal models within a virtual environment. Virtual models include, but are not limited to, virtual objects, virtual props, and virtual pets. Terminals present virtual models by displaying their animations, which consist of multiple animation frames. Each animation frame in a virtual model's animation is derived through complex logical calculations based on the relationships between the skeletons, requiring significant resource consumption (e.g., CPU resources). By controlling the animation update frequency of the virtual model, the number of animation frames required for logical calculations can be controlled, thereby managing resource consumption.
[0049] FPS (Frames Per Second): The higher the frame rate, the smoother the visual experience.
[0050] URO (Update Rate Optimizations) is a virtual model animation frequency reduction optimization technique in UE4 (Unreal Engine 4). In some implementations, URO can be used to describe the animation update frequency; for example, URO1 means the animation is updated once per frame, URO2 means the animation is updated once every two frames, and so on.
[0051] Resource consumption: The resources consumed by the animation update of the virtual model. For example, the consumed resources refer to the CPU time required. The higher the resource consumption, the longer the CPU time required to update each frame.
[0052] Figure 1 A schematic diagram of the implementation environment for the animation frame display method provided in this application embodiment is shown. The implementation environment includes: terminal 11 and server 12.
[0053] Terminal 11 has an application that supports virtual environments installed and running. Interactive objects can use Terminal 11 to control virtual objects to perform activities in the virtual environment provided by the application. These activities include, but are not limited to: adjusting body posture, crawling, walking, running, riding, jumping, driving, picking up, shooting, attacking, throwing, changing position, etc.
[0054] This application does not limit the applications that support virtual environments. For example, applications that support virtual environments include, but are not limited to: VR (Virtual Reality) applications, AR (Augmented Reality) applications, 3D mapping applications, game applications, social applications, interactive entertainment applications, etc.
[0055] For example, game applications include, but are not limited to, shooting games, MOBA (Multiplayer Online Battle Arena) games, and SLG (Simulation Game) games. Shooting games refer to all games that use items for ranged attacks, including but not limited to FPS (First-Person Shooter) games and TPS (Third-Person Shooter) games.
[0056] In some embodiments, applications supporting virtual environments can support at least one of the following operating systems: Windows, macOS, Android, iOS, and Linux. Applications running on different operating systems can communicate with each other. In some embodiments, applications supporting virtual environments are applications developed based on a 3D engine. In some embodiments, applications supporting virtual environments are either standalone applications or network-connected applications.
[0057] Server 12 provides background services for applications supporting virtual environments installed on terminal 11. In one possible implementation, server 12 undertakes the main computing work, and terminal 11 undertakes the secondary computing work; or, server 12 undertakes the secondary computing work, and terminal 11 undertakes the main computing work; or, server 12 and terminal 11 collaborate on computing using a distributed computing architecture.
[0058] In one possible implementation, terminal 11 is any electronic product capable of human-computer interaction with an interactive object through one or more methods such as a keyboard, touchpad, touchscreen, remote control, voice interaction, or handwriting device. Examples include PCs (Personal Computers), mobile phones, smartphones, PDAs (Personal Digital Assistants), wearable devices, handheld portable gaming devices, PPCs (Pocket PCs), tablets, smart car systems, smart TVs, smart speakers, and in-vehicle terminals. Server 12 can be a single server, a server cluster consisting of multiple servers, or a cloud computing service center. Terminal 11 and server 12 establish a communication connection via wired or wireless network.
[0059] Those skilled in the art should understand that the above-described terminal 11 and server 12 are merely examples. Other existing or future terminals or servers that are applicable to this application should also be included within the scope of protection of this application, and are hereby incorporated by reference.
[0060] Based on the above Figure 1 The implementation environment shown in this application provides a method for displaying animation frames, taking the application of this method to terminal 11 as an example. Figure 2 As shown, the animation frame display method provided in this application embodiment includes the following steps 201 to 203.
[0061] In step 201, a resource consumption index is obtained based on the initial animation update frequency of at least one virtual model. The resource consumption index is used to indicate the amount of resources required to update the animation according to the initial animation update frequency of at least one virtual model.
[0062] At least one virtual model refers to a virtual model in a virtual environment that needs to display animation frames by taking resource consumption indicators into account. This application does not limit the number of at least one virtual model. Exemplarily, at least one virtual model is a virtual model of the target category.
[0063] This application does not limit the method of classifying virtual models, and can set it based on experience or adjust it flexibly according to the application scenario. For example, if all virtual models are divided into one category, then at least one virtual model is one of all virtual models that need to be displayed in the same animation frame. For example, if virtual models are divided into virtual object category and virtual prop category, assuming the target category is virtual object category, then at least one virtual model is one of the virtual models belonging to the virtual object category among all virtual models that need to be displayed in the same animation frame. Of course, there can be other ways to classify virtual models, and this application does not limit this.
[0064] In an exemplary embodiment, each virtual model is identified by a unique string to its category before the application runs, so that resource consumption can be statistically analyzed at the category level.
[0065] During application operation, the displayed virtual environment screen is continuously updated. The animation frame display method provided in this application embodiment occurs during the display of the latest virtual environment screen frame. When displaying a virtual environment screen frame, at least one virtual model's animation frame is displayed on the screen. This application embodiment describes the implementation process of displaying at least one virtual model's animation frame. It should be noted that when displaying a virtual environment screen frame, in addition to displaying at least one virtual model's animation frame, other virtual model's animation frames or environmental elements may also be displayed on the screen. This application embodiment does not limit this. Unless otherwise specified, the screen mentioned in this application embodiment refers to the virtual environment screen.
[0066] The initial animation update frequency of at least one virtual model refers to the animation update frequency of at least one virtual model on which the resource consumption index is based. The animation update frequency indicates how many frames of screens update the animation once; each update generates a new animation frame. This new animation frame refers to one frame within the animation. For example, if an animation update frequency is once every n frames (n is an integer not less than 1), then this animation update frequency can be represented as UROn.
[0067] Before executing step 201, it is necessary to obtain the initial animation update frequency of at least one virtual model. The principle for obtaining the initial animation update frequency of each virtual model is the same; the process of obtaining the initial animation update frequency of the first virtual model will be used as an example for explanation. Here, the first virtual model is any one of the at least one virtual models.
[0068] For example, the method of obtaining the initial animation update frequency of the first virtual model includes: using the animation update frequency of the first virtual model when displaying the previous frame of the virtual environment as the initial animation update frequency of the first virtual model.
[0069] For example, the method of obtaining the initial animation update frequency of the first virtual model includes: using the default animation update frequency of the first virtual model as the initial animation update frequency of the first virtual model, where the default animation update frequency of the first virtual model may refer to an inherent attribute of the first virtual model.
[0070] For example, the method for obtaining the initial animation update frequency of the first virtual model includes: determining the proportion value of the first virtual model, and using the animation update frequency corresponding to the proportion value of the first virtual model as the initial animation update frequency of the first virtual model. Wherein, the proportion value of the first virtual model is the ratio of the rendering size of the first virtual model to the reference size.
[0071] For example, the rendering size of the first virtual model refers to the rendering size of the first virtual model presented in the previous frame of the virtual environment. The reference size is set based on experience or flexibly adjusted according to the application scenario; the reference size is the same for different virtual models. For example, the reference size is the size of the virtual environment screen. For example, the rendering size of the first virtual model presented in the previous frame of the virtual environment can be identified by the animation frames of the first virtual model displayed when the previous frame of the virtual environment is displayed. That is, the proportion of the first virtual model may change continuously as the virtual environment screen is updated. In this way, before each frame of the virtual environment is officially displayed, the initial animation update frequency of at least one virtual model is obtained based on the display result of the previous frame of the virtual environment to further calculate resource consumption indicators.
[0072] For example, the terminal stores the correspondence between the proportion value and the animation update frequency. After determining the proportion value of the first virtual model, it can find the animation update frequency corresponding to the proportion value of the first virtual model according to the correspondence between the proportion value and the animation update frequency, and then use the found animation update frequency as the initial animation update frequency of the first virtual model.
[0073] The correspondence between the percentage value and the animation update frequency is set based on experience or can be flexibly adjusted according to the application scenario; this application embodiment does not limit this. In the correspondence between the percentage value and the animation update frequency, the animation update frequency corresponding to the first percentage value is not lower than the animation update frequency corresponding to the second percentage value, wherein the first percentage value is greater than the second percentage value.
[0074] In an exemplary embodiment, the terminal stores a correspondence between percentage ranges and animation update frequencies. In this case, the animation update frequency corresponding to the percentage value of the first virtual model refers to the animation update frequency corresponding to the percentage range in which the percentage value of the first virtual model is located. After determining the percentage value of the first virtual model, the percentage range in which the percentage value of the first virtual model is located is determined. Then, according to the correspondence between percentage ranges and animation update frequencies, the animation update frequency corresponding to the percentage range in which the percentage value of the first virtual model is located is found. Finally, the found animation update frequency is used as the initial animation update frequency of the first virtual model.
[0075] By referencing the method used to obtain the initial animation update frequency of the first virtual model, the initial animation update frequency of at least one virtual model can be obtained. After obtaining the initial animation update frequency of at least one virtual model, resource consumption metrics are obtained based on the initial animation update frequency of at least one virtual model.
[0076] Resource consumption metrics indicate the amount of resources required to update animations based on the initial animation update frequency of at least one virtual model. For example, the greater the resource consumption for updating animations based on the initial animation update frequency of at least one virtual model, the more resources are consumed in displaying the animation frames corresponding to the at least one virtual model, and the worse the smoothness of the animation frame display.
[0077] In one possible implementation, obtaining resource consumption metrics based on the initial animation update frequency of at least one virtual model includes: obtaining resource consumption sub-metrics for at least one virtual model, summarizing the resource consumption sub-metrics for at least one virtual model, and obtaining the resource consumption. The resource consumption sub-metric of any virtual model is positively correlated with the initial animation update frequency of that virtual model. That is, the higher the initial animation update frequency of any virtual model, the larger its resource consumption sub-metric; the lower the initial animation update frequency of any virtual model, the smaller its resource consumption sub-metric. For example, the resource consumption sub-metric of any virtual resource is used to indicate the amount of resources required to update the animation according to the initial animation update frequency of that virtual model.
[0078] The principle of obtaining the resource consumption sub-indicators of at least one virtual model is the same. Taking the acquisition of the resource consumption sub-indicators of the first virtual model as an example, the first virtual model is any one of the at least one virtual models.
[0079] For example, the method of obtaining the resource consumption sub-index of the first virtual model includes: determining the number of frames corresponding to the initial animation update frequency of the first virtual model, and taking the reciprocal of the number of frames corresponding to the initial animation update frequency of the first virtual model as the resource consumption sub-index of any virtual model.
[0080] The frame count corresponding to the initial animation update frequency of the first virtual model refers to the number of frames required to update the animation once, as indicated by the initial animation update frequency of the first virtual model. For example, if the initial animation update frequency of the first virtual model is to update the animation once every 5 frames, then the frame count corresponding to the initial animation update frequency of the first virtual model is 5.
[0081] For example, assuming the default animation update frequency of the first virtual model is 1 animation update per frame, the larger the number of frames corresponding to the initial animation update frequency of the first virtual model, the greater the reduction in the initial animation update frequency of the first virtual model relative to the default animation update frequency, and the smaller the amount of resources required to update the animation according to the initial animation update frequency of the first virtual model.
[0082] Referring to the method for obtaining the resource consumption sub-indicators of the first virtual model, it is possible to obtain the resource consumption sub-indicators of at least one virtual model. After obtaining the resource consumption sub-indicators of at least one virtual model, the resource consumption sub-indicators of at least one virtual model are summarized to obtain the resource consumption index. For example, summing the resource consumption sub-indicators of at least one virtual model means calculating the sum of the resource consumption sub-indicators of at least one virtual model.
[0083] In step 202, the target animation update frequency of at least one virtual model is obtained based on the resource consumption index and the initial animation update frequency.
[0084] After obtaining the resource consumption metrics, the target animation update frequency of at least one virtual model is obtained based on these metrics and the initial animation update frequency of at least one virtual model. In this approach, the process of obtaining the target animation update frequency of at least one virtual model takes into account the resource consumption metrics. By using the target animation update frequency of at least one virtual model, resource consumption can be effectively and globally controlled, preventing excessive resource consumption from causing long animation frame display times and improving the smoothness of animation frame display.
[0085] In one possible implementation, the process of obtaining the target animation update frequency of at least one virtual model based on the resource consumption index and the initial animation update frequency includes: when the resource consumption index is not greater than the resource consumption threshold, the initial animation update frequency is used as the target animation update frequency of at least one virtual model.
[0086] The resource consumption threshold limits the maximum amount of resources required to update animations based on the animation update frequency of at least one virtual model. The resource consumption threshold is a pre-configured threshold.
[0087] In an exemplary embodiment, a resource consumption threshold is set for each category through a configuration table, so as to constrain the resource consumption caused by the animation update of the virtual model for each category using the resource consumption threshold corresponding to each category. For example, at least one virtual model is a virtual model of the target category. In this case, the resource consumption threshold is the resource consumption threshold corresponding to the target category.
[0088] In an exemplary embodiment, the resource consumption threshold is used to constrain the maximum number of virtual models globally that are allowed to update the animation in every frame. In an exemplary embodiment, the resource consumption threshold may also be referred to as a resource consumption budget, or an animation update budget, etc.
[0089] When resource consumption is no greater than the resource consumption threshold, it indicates that updating animations based on the initial animation update frequency of at least one virtual model will not result in significant resource consumption. In this case, the initial animation update frequency of at least one virtual model can be directly used as the target animation update frequency for at least one virtual model. It should be noted that using the initial animation update frequency of at least one virtual model as the target animation update frequency for at least one virtual model means using the initial animation update frequency of each virtual model as the target animation update frequency for each virtual model.
[0090] In one possible implementation, when the resource consumption index is greater than the resource consumption threshold, the process of obtaining the target animation update frequency of at least one virtual model based on the resource consumption index and the initial animation update frequency includes the following steps 1 to 3.
[0091] Step 1: Determine the adjustment coefficient based on resource consumption indicators and resource consumption thresholds.
[0092] When the resource consumption index exceeds the resource consumption threshold, it indicates that updating the animation based on the initial animation update frequency of at least one virtual model will result in significant resource consumption. In this case, the initial animation update frequency of at least one virtual model needs to be adjusted under the constraint of the resource consumption threshold to obtain a first animation update frequency that can result in less resource consumption.
[0093] The process of adjusting the initial animation update frequency of at least one virtual model is based on an adjustment coefficient, which is determined based on a resource consumption index and a resource consumption threshold. In one possible implementation, the adjustment coefficient is determined by using the ratio of the resource consumption index to the resource consumption threshold as the adjustment coefficient. Since the resource consumption index is greater than the resource consumption threshold, the adjustment coefficient is greater than 1.
[0094] Of course, in some embodiments, the method for determining the adjustment coefficient based on the resource consumption index and the resource consumption threshold can be other than that, and this application does not limit this method. For example, the ratio of the resource consumption threshold to the resource consumption index is used as the adjustment coefficient. In this case, the adjustment coefficient is a coefficient less than 1.
[0095] Step 2: Adjust the initial animation update frequency based on the adjustment coefficient to obtain the first animation update frequency of at least one virtual model.
[0096] After determining the adjustment coefficient, the initial animation update frequency of at least one virtual model is adjusted based on the adjustment coefficient to obtain a first animation update frequency for at least one virtual model. For example, since the adjustment coefficient is used to adjust the initial animation update frequency of each virtual model, it can also be called a global load balancing scaling coefficient.
[0097] It should be noted that the initial animation update frequency of each virtual model is adjusted based on the adjustment coefficient to obtain the first animation update frequency of each virtual model. The principle of adjusting the initial animation update frequency of each virtual model based on the adjustment coefficient is the same; the adjustment of the initial animation update frequency of the first virtual model based on the adjustment coefficient will be used as an example for explanation. Here, the first virtual model is any one of at least one virtual model.
[0098] The method of adjusting the initial animation update frequency of the first virtual model based on the adjustment coefficient is related to the method of determining the adjustment coefficient. The adjustment principle is that the first animation update frequency of the first virtual model is lower than the initial animation update frequency of the first virtual model.
[0099] In one possible implementation, for the case where the adjustment coefficient is the ratio of the resource consumption index to the resource consumption threshold, the method for adjusting the initial animation update frequency of the first virtual model based on the adjustment coefficient is as follows: calculate the product of the number of frames corresponding to the initial animation update frequency of the first virtual model and the adjustment coefficient, round the product to obtain the target value; and use the animation update frequency with the corresponding number of frames as the target value as the first animation update frequency of the first virtual model.
[0100] The method for rounding the product can be set based on experience or flexibly adjusted according to the application scenario; this application embodiment does not limit this. For example, the method for rounding the product can be rounding up, rounding down, or rounding to the nearest integer, etc. Taking rounding up as an example, the product can be rounded using the Ceil function (rounding up function) to obtain the target value. After obtaining the target value, the animation update frequency corresponding to the target value in frame rate is used as the first animation update frequency of the first virtual model.
[0101] For example, suppose the initial animation update frequency of the first virtual model is once every 2 frames (URO2), and the adjustment factor is 1.2. Then the number of frames corresponding to the initial animation update frequency of the first virtual model is 2. The product of the number of frames corresponding to the initial animation update frequency of the first virtual model and the adjustment factor is 2.4. After rounding up the product, the target value is 3. Therefore, the animation update frequency with the corresponding number of frames is 3, which is taken as the first animation update frequency of the first virtual model. At this time, the determined first animation update frequency of the first virtual model is once every 3 frames (URO3).
[0102] The above description, using the ratio of the resource consumption index to the resource consumption threshold as an example, illustrates the process of adjusting the initial animation update frequency of the first virtual model based on the adjustment coefficient. This application embodiment is not limited to this. If the adjustment coefficient is determined in other ways, the process of adjusting the initial animation update frequency of the first virtual model based on the adjustment coefficient can also be other processes, as long as the first animation update frequency of the first virtual model obtained after adjustment is lower than the initial animation update frequency.
[0103] By referring to the method for obtaining the first animation update frequency of the first virtual model, the first animation update frequency of at least one virtual model can be obtained, and then step 3 is executed.
[0104] For example, the process of obtaining the first animation update frequency of at least one virtual model according to steps 1 and 2 above can be regarded as obtaining the animation update frequency according to a load-balanced animation frequency reduction optimization technique (Load Balance URO). By globally statistically analyzing the resource consumption of virtual models of the target category, and according to a pre-allocated resource consumption threshold, the animation update frequency is reduced by an adjustment coefficient to reduce the time consumption of global animation updates, thereby improving FPS.
[0105] Step 3: Based on the first animation update frequency, obtain the target animation update frequency of at least one virtual model.
[0106] The process of obtaining the target animation update frequency of at least one virtual model based on the first animation update frequency refers to the process of obtaining the target animation update frequency of each virtual model based on the first animation update frequency of each virtual model. The principle of obtaining the target animation update frequency of each virtual model based on the first animation update frequency of each virtual model is the same. Taking the process of obtaining the target animation update frequency of the first virtual model based on the first animation update frequency of the first virtual model as an example, the explanation is as follows. Here, the first virtual model is any one of the at least one virtual models.
[0107] In one possible implementation, the first animation update frequency of the first virtual model is directly used as the target animation update frequency of the first virtual model. This method is relatively efficient.
[0108] In one possible implementation, the process of obtaining the target animation update frequency of at least one virtual model based on the first animation update frequency includes: when the first virtual model meets the first model screening condition and the first animation update frequency of the first virtual model is not higher than the reference animation update frequency, the reference animation update frequency is used as the target animation update frequency of the first virtual model. Alternatively, when the first virtual model meets the first model screening condition and the first animation update frequency of the first virtual model is higher than the reference animation update frequency; or when the first virtual model does not meet the first model screening condition, the first animation update frequency of the first virtual model is used as the target animation update frequency of the first virtual model. This method, in addition to considering the adjustment coefficient, also considers the first model screening condition, which helps to improve the reliability of the obtained target animation update frequency of the first virtual model.
[0109] The first model screening criteria are used to screen virtual models. The first model screening criteria are set based on experience or can be flexibly adjusted according to the application scenario. This application embodiment does not limit this.
[0110] Virtual models that meet the first model selection criteria are those with significant animation performance requirements. For example, a virtual model meeting the first model selection criteria is one whose initial animation update frequency is not lower than the reference animation update frequency. The higher the initial animation update frequency, the higher the importance of the virtual model. For example, virtual models that meet the first model selection criteria can be called high-importance virtual models, and virtual models that do not meet the first model selection criteria can be called low-importance virtual models.
[0111] The reference animation update frequency can be set based on experience or flexibly adjusted according to the application scenario, and this application embodiment does not limit this. For example, the reference animation update frequency is represented as URO5. Suppose the initial animation update frequency of a virtual model is represented as URO2. Since the animation update frequency represented by URO2 is higher than the animation update frequency represented by URO5, the virtual model meets the first model screening condition.
[0112] In some embodiments, the virtual model's initial animation update frequency can be compared with a frame rate threshold to determine whether the virtual model meets the first model selection criteria. If the frame rate corresponding to the virtual model's initial animation update frequency is not greater than the frame rate threshold, the virtual model meets the first model selection criteria. The frame rate threshold can be set empirically or adjusted flexibly according to the application scenario. This application embodiment does not limit this; for example, the frame rate threshold is 5.
[0113] For example, a virtual model that meets the first model selection criteria can also refer to a virtual model whose proportion value is not less than a proportion value threshold. The proportion value threshold is set based on experience or can be flexibly adjusted according to the application scenario, and this application embodiment does not limit it in this way.
[0114] When the first virtual model meets the first model selection criteria, it indicates that the animation performance requirements of the first virtual model are relatively high. The target animation update frequency of the first virtual model needs to be no lower than the reference animation update frequency to ensure the animation performance effect of the first virtual model. Therefore, if the first virtual model meets the first model selection criteria and its first animation update frequency is no higher than the reference animation update frequency, then the reference animation update frequency is used as the target animation update frequency of the first virtual model. If the first virtual model meets the first model selection criteria and its first animation update frequency is higher than the reference animation update frequency, then the first animation update frequency of the first virtual model is used as the target animation update frequency of the first virtual model.
[0115] When the first virtual model does not meet the first model selection criteria, it means that the animation performance requirements of the first virtual model are relatively small, and there is no need to limit the target animation update frequency of the first virtual model. Therefore, the first animation update frequency of the first virtual model can be directly used as the target animation update frequency of the first virtual model.
[0116] In addition to considering the adjustment coefficients, the additional first model selection criterion is to ensure the animation performance of high-importance virtual models. Since the first animation update frequency obtained after adjustment based on the adjustment coefficients (i.e., the animation update frequency after load balancing and frequency reduction optimization) may decrease significantly due to a large number of virtual models, meaning the frame rate corresponding to the first animation update frequency becomes much higher, leading to excessive frequency reduction for nearby virtual models, it is necessary to limit the target animation update frequency for high-importance virtual models to ensure that the target animation update frequency for high-importance virtual models is not lower than the reference animation update frequency.
[0117] For example, assuming the frame rate threshold is 5, then at least one virtual model whose initial animation update frequency corresponds to a frame rate of less than or equal to 5 satisfies the first model selection condition, that is, they all belong to high-importance virtual models. The frame rate corresponding to the target animation update frequency of this part of the virtual models needs to be limited to no more than 5, that is, the target animation update frequency is at least once every 5 frames, so as to ensure that the high-importance model updates the animation once every 5 frames at most.
[0118] In step 203, at least one animation frame corresponding to a virtual model is displayed according to the target animation update frequency.
[0119] The target animation update frequency is determined based on the initial animation update frequency of at least one virtual model, taking into account resource consumption indicators. It can effectively control resource consumption globally. Displaying the animation frames corresponding to at least one virtual model according to the target animation update frequency has a better effect, which is conducive to improving the display smoothness of animation frames, and thus improving the smoothness of screen updates.
[0120] The process of displaying at least one animation frame corresponding to a virtual model based on the target animation update frequency refers to the process of displaying the animation frame corresponding to each virtual model according to the target animation update frequency of each virtual model. It should be noted that the animation frames corresponding to each virtual model are displayed within the same frame of the virtual environment.
[0121] The principle of displaying the animation frames corresponding to each virtual model based on the target animation update frequency of each virtual model is the same. Taking the process of displaying the animation frames corresponding to the first virtual model based on the target animation update frequency of the first virtual model as an example, the explanation is as follows: Here, the first virtual model refers to any virtual model among at least one virtual model.
[0122] In one possible implementation, the process of displaying the animation frames corresponding to the first virtual model based on the target animation update frequency of the first virtual model is as follows: directly display the animation frames corresponding to the first virtual model according to the target animation update frequency of the first virtual model. In this case, the animation frames corresponding to the first virtual model refer to the animation frames of the first virtual model that correspond to the target animation update frequency. That is, there is no need to determine whether the first virtual model meets certain conditions; the animation frames of the first virtual model that correspond to the target animation update frequency are displayed directly.
[0123] In an exemplary embodiment, the process of displaying the animation frame corresponding to the first virtual model directly according to the target animation update frequency of the first virtual model includes: when the target animation update frequency of the first virtual model does not match the count value of the first virtual model, displaying the first animation frame or the target animation frame of the first virtual model; when the target animation update frequency of the first virtual model matches the count value of the first virtual model, displaying the second animation frame of the first virtual model.
[0124] In this system, the first animation frame is the latest animation frame displayed in the animation of the first virtual model, and the second animation frame is the animation frame immediately following the first animation frame. The first and second animation frames are two adjacent animation frames in the animation of the first virtual model; the first animation frame has already been displayed, but the second animation frame has not yet been displayed. The calculation logic for the first and second animation frames is relatively complex, and determining them takes a considerable amount of time. After displaying the first animation frame, the terminal can calculate and cache the second animation frame. Then, when the second animation frame needs to be displayed, it is retrieved from the cache for display.
[0125] The count value of the first virtual model refers to the current count value of the first virtual model. The count value of the first virtual model is used to indicate the number of unupdated frames in the animation of the first virtual model. In an exemplary embodiment, the count value of the first virtual model is updated as follows: when an animation frame of the first virtual model is first displayed, the count value of the first virtual model is 0; for each frame in the animation of the first virtual model that is not displayed after that animation frame, the count value of the first virtual model is increased by 1.
[0126] If the target animation update frequency of the first virtual model matches the count value of the first virtual model, it indicates that the second animation frame of the first virtual model needs to be displayed. For example, matching the target animation update frequency of the first virtual model with its count value means that the count value of the first virtual model is not less than the difference between the number of frames corresponding to the target animation update frequency and 1. For instance, if the number of frames corresponding to the target animation update frequency of the first virtual model is 5, and the count value of the first virtual model is not less than 4, then the target animation update frequency of the first virtual model is considered to match its count value.
[0127] When the target animation update frame rate of the first virtual model matches the count value of the first virtual model, it indicates that the animation frame to be displayed is the second animation frame of the first virtual model. Therefore, the second animation frame of the first virtual model is displayed. When the target animation update frequency of the first virtual model does not match the count value of the first virtual model, it indicates that the animation frame to be displayed is not the second animation frame of the first virtual model. In this case, the first animation frame or the target animation frame of the first virtual model is displayed.
[0128] The target animation frame is determined based on the count values of the first animation frame, the second animation frame, and the first virtual model. For example, interpolated smoothing animation frames can be determined based on the first and second animation frames in the cache, and displayed after the first animation frame and before the second animation frame, achieving an animation effect close to per-frame updates, i.e., close to an animation effect without frequency reduction. The number of interpolated smoothing animation frames determined based on the first and second animation frames in the cache is the same as the number of count values that do not match the target animation update frequency of the first virtual model; each interpolated smoothing animation frame corresponds to one count value that does not match the target animation update frequency of the first virtual model.
[0129] For example, the number of counts that do not match the target animation update frequency of the first virtual model is the difference between the number of frames corresponding to the target animation update frequency of the first virtual model and 1. For instance, if the number of frames corresponding to the target animation update frequency of the first virtual model is 5, then the number of counts that do not match the target animation update frequency of the first virtual model is 4, and 4 interpolated smoothing animation frames can be identified.
[0130] Interpolated smoothing animation frames can be calculated from the difference between the first and second animation frames. Calculating interpolated smoothing animation frames takes less time than calculating the first and second animation frames. The interpolated smoothing animation frame corresponding to the count value of the first virtual model is retrieved from each interpolated smoothing animation; this interpolated smoothing animation frame is the target animation frame.
[0131] This application does not limit the implementation method of displaying the first animation frame or target animation frame of the first virtual model when the target animation update frequency of the first virtual model does not match the count value of the first virtual model. Exemplarily, the first virtual model is displayed when the target animation update frequency of the first virtual model does not match the count value of the first virtual model. Exemplarily, the target animation frame is displayed when the target animation update frequency of the first virtual model does not match the count value of the first virtual model.
[0132] For example, if the target animation update frequency of the first virtual model does not match the count value of the first virtual model, the first animation frame of the first virtual model is displayed when the first virtual model does not meet the second model filtering conditions; and the target animation frame of the first virtual model is displayed when the first virtual model meets the second model filtering conditions.
[0133] The second model filtering criteria are used to filter virtual models. These criteria are set based on experience or can be flexibly adjusted according to the application scenario; this embodiment does not limit their application. The second model filtering criteria may be the same as or different from the first model filtering criteria.
[0134] The virtual model that meets the second model selection criteria is the virtual model that needs to display the target animation frame when the target animation update frequency and the count value do not match. In the exemplary embodiment, the second model selection criteria are the same as the first model selection criteria, that is, the virtual model that meets the first model selection criteria refers to the virtual model with greater animation performance requirements.
[0135] If the first virtual model meets the selection criteria of the second model, the target animation frame of the first virtual model is displayed to largely mitigate the adverse effects of frequency reduction on animation performance. In other words, for high-importance virtual models, animation interpolation smoothing is enabled. In scenes where updates are skipped, high-importance virtual models will use cached first and second animation frames for interpolation, achieving an animation effect close to that without frequency reduction.
[0136] If the first virtual model does not meet the selection criteria for the second model, it means that the animation performance of the first virtual model has low attention, and the first animation frame can be displayed directly.
[0137] In one possible implementation, the process of displaying the animation frame corresponding to the first virtual model based on the target animation update frequency of the first virtual model is as follows: when the first virtual model is not associated with other virtual models, the animation frame corresponding to the first virtual model is displayed directly based on the target animation update frequency of the first virtual model; when the first virtual model is associated with the second virtual model, the target animation update frequency of the first virtual model is adjusted to the animation update frequency of the second virtual model to obtain the adjusted animation update frequency of the first virtual model; the animation frame corresponding to the first virtual model is displayed based on the adjusted animation update frequency of the first virtual model.
[0138] The second virtual model can refer to one of the at least one virtual models, or it can be any virtual model other than the at least one virtual model; this application embodiment does not limit this. The animation update frequency of the second virtual model refers to the latest animation update frequency of the second virtual model. The terminal records the association relationships between virtual models. Based on these association relationships, it can be determined whether the first virtual model is associated with other virtual models. If the first virtual model is associated with the second virtual model, the target animation update frequency of the first virtual model is adjusted to the animation update frequency of the second virtual model. For example, the association of the first virtual model with the second virtual model can also be referred to as the first virtual model depending on the second virtual model.
[0139] In one possible implementation, after adjusting the target animation update frequency of the first virtual model to the animation update frequency of the second virtual model, the method further includes: adjusting the count value of the first virtual model to the count value of the second virtual model, so that the animation update of the first virtual model is synchronized with the animation update of the second virtual model.
[0140] The animation updates of the first virtual model are synchronized with those of the second virtual model to ensure the accuracy of the animation. Different virtual models may have different animation update frequencies after optimization, but virtual models with a relationship must maintain consistency in their animation performance. For example, the animation performance of a virtual object and its associated virtual props must be consistent. If the animation update frequencies of related virtual models differ, it may lead to errors in the animation.
[0141] Therefore, during the process of displaying the animation frames corresponding to the first virtual model according to the target animation update frequency of the first virtual model, it is determined whether the first virtual model is associated with other virtual models. If the first virtual model is associated with the second virtual model, frequency reduction synchronization is achieved by adjusting the target animation update frequency of the first virtual model to the animation update frequency of the second virtual model and adjusting the count value of the first virtual model to the count value of the second virtual model. In other words, the animation update of the first virtual model is synchronized with the animation update of the second virtual model. For example, since the first virtual model is associated with the second virtual model, the first virtual model can be called the child model, and the second virtual model can be called the parent model.
[0142] The implementation details of frequency reduction synchronization are as follows: the update frequencies of the parent and child models remain synchronized, and the child model adopts the update frequency of the parent model; the count values of the parent and child models are aligned. For example, by aligning the count values of the parent and child models, the update start frames of the parent and child models can be aligned. The update start frame refers to the frame at which the latest displayed animation frame is first shown.
[0143] For example, the animation update frequency and update start frame of the parent model and child model have four cases: the animation update frequency and update start frame of the parent model and child model are not the same; the animation update frequency of the parent model and child model are the same, but the update start frame is not the same; the animation update frequency of the parent model and child model are not the same, but the update start frame is the same; and the animation update frequency and update start frame of the parent model and child model are both the same.
[0144] Figure 3 The animation update synchronization status under the four scenarios described above is illustrated. Figure 3 In this context, frames that update animation are called updated frames, and frames that do not update animation are called skipped frames. According to... Figure 3It is evident that if the animation update frequencies and start frames of the parent and child models are inconsistent; or if their animation update frequencies are consistent but their start frames are inconsistent; or if their animation update frequencies are inconsistent but their start frames are consistent, it is insufficient to achieve complete synchronization of the animation updates between the parent and child models. Therefore, by adjusting the animation update frequency of the child model to match that of the parent model, and by adjusting the count value of the child model to match that of the parent model, the effect of synchronized animation updates can be achieved.
[0145] For example, Figure 4 This demonstrates the display effect when the animation update frequency and update start frame of the parent and child models are inconsistent. Figure 4 In this model, the parent model is virtual object 410, and the child model is virtual prop 420. The animation update frequency of virtual object 410 is URO4, and the animation update frequency of virtual prop 420 is URO7. The update start frames of virtual object 410 and virtual prop 420 are different. Figure 4 In the video, the issue of the virtual prop 420 detaching from the hand of the virtual object 410 is obvious, indicating that the animation updates of the virtual object 410 and the virtual prop 420 are not synchronized.
[0146] Figure 5 This demonstrates the display effect when the parent and child models have the same animation update frequency but different update start frames. Figure 5 In this model, the parent model is virtual object 510, and the child model is virtual prop 520. The animation update frequency of both virtual object 510 and virtual prop 520 is UR4, but their update start frames are different. Figure 5 The issue of virtual prop 520 detaching from the hand of virtual object 510 can still be observed, indicating that the animation updates of virtual object 510 and virtual prop 520 are not synchronized.
[0147] Figure 6 This demonstrates the display effect when the animation update frequency and update start frame of the parent and child models are the same. Figure 6 In this model, the parent model is virtual object 610, and the child model is virtual prop 620. The animation update frequency of both virtual object 610 and virtual prop 620 is UR4, and their update start frames are the same. Figure 6 In the video, the virtual prop 620 did not detach from the hand of the virtual object 610, and the screen display was normal, indicating that the animation updates of the virtual object 610 and the virtual prop 620 were synchronized.
[0148] When obtaining the adjusted animation update frequency of the first virtual model, the corresponding animation frames of the first virtual model are displayed based on the adjusted animation update frequency. The implementation principle of displaying the corresponding animation frames of the first virtual model based on the adjusted animation update frequency is the same as that of displaying the corresponding animation frames of the first virtual model directly based on the target animation update frequency, and will not be elaborated here.
[0149] In an exemplary embodiment, steps 201 to 203 can be performed each time an animation frame of at least one virtual model needs to be displayed. Alternatively, in an exemplary embodiment, steps 201 to 203 can be performed only when the virtual model meets the reference conditions, thus reducing computational load.
[0150] This application does not limit the display method of animation frames when the virtual model does not meet the reference conditions. For example, when the virtual model does not meet the reference conditions, the animation frames are displayed using methods from related technologies. For example, the method from related technologies involves using the animation update frequency corresponding to the proportion value of at least one virtual model as the initial animation update frequency of at least one virtual model, and displaying the animation frames corresponding to at least one virtual model based on the initial animation update frequency of at least one virtual model.
[0151] For example, the percentage value can also be called screen ratio. The method used in related technologies is based on the URO optimization scheme built into the UE4 engine to display animation frames. The UE4 engine's built-in URO optimization scheme calculates the screen ratio of each virtual model. The smaller the screen ratio, the lower the animation update frequency. A small screen ratio indicates that the virtual model is far from the virtual camera. Therefore, by reducing the animation update frequency of virtual models far from the virtual camera, the resource consumption for virtual model animation updates can be effectively reduced. For example, the correspondence between screen ratio and frame rate can be pre-set; the higher the frame rate, the lower the animation update frequency. For example, the frame rate can also be represented using URO levels.
[0152] The reference conditions are used to constrain the display of animation frames according to steps 201 to 203. The reference conditions are set based on experience or can be flexibly adjusted according to the application scenario; this embodiment does not limit this. Exemplarily, the reference conditions are used to constrain the case of at least one virtual model. Exemplarily, the reference conditions are used to constrain the case of all virtual models that need to be displayed on the same screen.
[0153] Taking the constraint of reference conditions on all virtual models that need to be displayed on the same screen as an animation frame as an example. For example, the virtual model situation satisfying the reference conditions may mean that the number of all virtual models that need to be displayed on the same screen as an animation frame is greater than a first quantity threshold. For example, the virtual model situation satisfying the reference conditions may mean that the number of virtual models whose proportion value is greater than a proportion value threshold among all virtual models that need to be displayed on the same screen as an animation frame is greater than a second quantity threshold. For example, the virtual model situation satisfying the reference conditions may mean that the number of all virtual models that need to be displayed on the same screen as an animation frame is greater than the first quantity threshold, and the number of virtual models whose proportion value is greater than the proportion value threshold among all virtual models is greater than the second quantity threshold.
[0154] The first quantity threshold is not less than the second quantity threshold. The first and second quantity thresholds are set based on experience or can be flexibly adjusted according to the application scenario. This application embodiment does not limit this.
[0155] In situations where the total number of virtual models that need to be displayed on the same screen for animation frames is relatively small (such as...) Figure 7 Under the distribution of virtual models shown, the display method of animation frames in related technologies is used to retain the URO optimization features. Frequency reduction optimization is performed based on the proportion value. For virtual models with smaller proportion values, the animation is updated at a lower frequency to reduce the time consumption caused by animation updates. For example, virtual models with smaller proportion values can be considered as virtual models that are far from the virtual camera. Because such virtual models are located at a distance, the interactive objects may not be clearly visible, so the animation update frequency can be reduced. Figure 7 In the case shown, using methods from related technologies, the animation update frequencies of the animation frames of each virtual model, displayed in order from closest to furthest from the virtual camera, are URO1, URO2, and URO3, respectively.
[0156] When there are many virtual models that need to be displayed on the same screen for animation frames (such as...) Figure 8 The distribution of virtual models shown, especially when there are many virtual models with a large proportion (i.e., close to the virtual camera), means that virtual models close to the virtual camera will still update their animations at a higher frequency when using the animation frame display method in related technologies (i.e., frequency reduction optimization based on proportion). For example, if the animation frames of each virtual model are displayed according to the order from closest to farthest from the virtual camera, the animation update frequencies are URO1, URO2, and URO3, respectively. This will put a lot of pressure on the overall animation update, resulting in a large number of virtual models close to the virtual camera. In such scenarios, resource consumption will be high, which may cause the terminal to overheat, and may also affect FPS, the smoothness of animation frame display, and the smoothness of application operation.
[0157] The animation frame display method provided in this application embodiment can effectively improve the performance of such scenarios. The animation frame display method provided in this application embodiment globally calculates the resource consumption index of the virtual model for each frame. If the resource consumption threshold is exceeded, the animation update frequency of each virtual model is further reduced. Simultaneously, animation interpolation smoothing optimization is performed on virtual models that meet the first model selection criteria to avoid significant animation performance issues due to frequency reduction. Through this optimization method, the animation update frequencies based on displaying the animation frames of each virtual model in order from closest to furthest from the virtual camera are optimized to URO2, URO4, and URO6 respectively, effectively controlling the time consumption of displaying animation frames of multiple virtual models on the same screen.
[0158] For example, the display effect of the animation frame display method in the related art is as follows: Figure 9 As shown, the display effect of the animation frame display method in this embodiment is as follows: Figure 10 As shown. In Figure 9 and Figure 10 In this case, the number of virtual models with a proportion value greater than the proportion value threshold (also known as near-field virtual models) is 20. The initial animation update frequency of these 20 virtual models is URO1, that is, these 20 virtual models update the animation once per frame. In this case, the application takes about 20ms to update each frame, and the FPS is 50.
[0159] Assuming the resource consumption threshold is one virtual model, after initial load balancing adjustment (i.e., adjustment based on the resource consumption threshold constraint), the animation update frequency of all 20 virtual models is URO20. Since all 20 virtual models meet the first model selection condition (i.e., all belong to high importance models), the animation update frequency of high importance models is not allowed to be lower than URO5. Therefore, using the method provided in this application embodiment, the target animation update frequency of all 20 virtual models is URO5, that is, an animation update every 5 frames. Displaying animation frames according to this target animation update frequency, the application's frame update time is approximately 15.6ms, increasing the FPS to 64. Compared to related technologies, the frame update time is reduced by 4.4ms, and the FPS is increased by 16. Figure 9 and Figure 10 It can be seen that the display effect varies depending on the display method of different animation frames.
[0160] For example, the display process of an animation frame is as follows: Figure 11As shown, before the application runs, a resource consumption threshold corresponding to the target category is set. When displaying the Nth frame (N is an integer not less than 1), at least one animation frame of a virtual model matching the Nth frame is displayed, and these at least one virtual models are all virtual models of the target category. Based on the display result of the Nth frame, the proportion of at least one virtual model is calculated, and the animation update frequency corresponding to the proportion of at least one virtual model is used as the initial animation update frequency of at least one virtual model. Based on the initial animation update frequency of at least one virtual model, a resource consumption index is obtained, and it is determined whether the resource consumption index is greater than the resource consumption threshold.
[0161] If the resource consumption index is not greater than the resource consumption threshold, display the animation frame corresponding to at least one virtual model according to the initial animation update frequency of at least one virtual model. The animation frame corresponding to at least one virtual model refers to the animation frame of at least one virtual model that matches the (N+1)th frame.
[0162] If the resource consumption index exceeds the resource consumption threshold, the ratio of the resource consumption index to the resource consumption threshold is used as an adjustment coefficient. The initial animation update frequency of at least one virtual model is adjusted according to this adjustment coefficient to obtain the first animation update frequency of at least one virtual model. Based on the first model selection criteria and the first animation update frequency of at least one virtual model, the target animation update frequency of at least one virtual model is obtained to ensure performance. The animation update frequencies and count values between related models are synchronized to ensure performance. Based on the latest animation update frequency of at least one virtual model, the animation frame corresponding to at least one virtual model is displayed. This animation frame refers to the animation frame of at least one virtual model that matches the (N+1)th frame.
[0163] It should be noted that, for cases where at least one virtual model is a target category model, and the virtual models that need to display animation frames on the same screen also include virtual models of other categories besides the target category, the display process of the animation frames of other categories of virtual models can be implemented with reference to the process provided in the embodiments of this application, so as to ensure the display effect of the animation frames of all virtual models that need to display animation frames on the same screen.
[0164] In this embodiment, based on the URO animation optimization technology built into the UE4 engine, an additional load balancing optimization feature is added. By configuring and adjusting key parameters such as the resource consumption budget of a certain type of virtual model, the minimum animation update frequency of high-importance models, and the conditions for animation interpolation smoothing, the resource consumption of animation updates in multi-user scenes can be effectively controlled while ensuring animation performance. This effectively reduces the time taken to display animation frames of multiple virtual models on the same screen, achieving a balance between performance and visual appeal, improving FPS, and enhancing the application experience. For example, if the application is a game, it can improve the gaming experience.
[0165] The animation frame display method provided in this application embodiment displays animation frames corresponding to at least one virtual model based on the target animation update frequency of the at least one virtual model. The target animation update frequency of the at least one virtual model is determined by considering resource consumption indicators based on the initial animation update frequency of the at least one virtual model. Using the target animation update frequency of the at least one virtual model allows for effective global control of resource consumption, which is beneficial for improving the smoothness of animation frame display and thus increasing the human-computer interaction rate.
[0166] See Figure 12 This application provides a display device for animation frames, the device comprising:
[0167] The first acquisition unit 1201 is used to acquire a resource consumption index based on the initial animation update frequency of at least one virtual model. The resource consumption index is used to indicate the amount of resources required to update the animation according to the initial animation update frequency of at least one virtual model.
[0168] The second acquisition unit 1202 is used to acquire the target animation update frequency of at least one virtual model based on resource consumption indicators and the initial animation update frequency.
[0169] Display unit 1203 is used to display at least one animation frame corresponding to a virtual model according to the target animation update frequency.
[0170] In one possible implementation, the second acquisition unit 1202 is used to determine an adjustment coefficient based on the resource consumption index and the resource consumption threshold when the resource consumption index is greater than the resource consumption threshold; adjust the initial animation update frequency based on the adjustment coefficient to obtain a first animation update frequency for at least one virtual model; and obtain a target animation update frequency for at least one virtual model based on the first animation update frequency.
[0171] In one possible implementation, the second acquisition unit 1202 is used to take the reference animation update frequency as the target animation update frequency of the first virtual model when the first virtual model meets the first model screening condition and the first animation update frequency of the first virtual model is not higher than the reference animation update frequency. The first virtual model is any virtual model among at least one virtual model.
[0172] In one possible implementation, the second acquisition unit 1202 is used to: when the first virtual model meets the first model screening condition and the first animation update frequency of the first virtual model is higher than the reference animation update frequency; or, when the first virtual model does not meet the first model screening condition, use the first animation update frequency of the first virtual model as the target animation update frequency of the first virtual model, wherein the first virtual model is any virtual model among at least one virtual model.
[0173] In one possible implementation, the second acquisition unit 1202 is used to take the initial animation update frequency as the target animation update frequency of at least one virtual model when the resource consumption index is not greater than the resource consumption threshold.
[0174] In one possible implementation, the display unit 1203 is configured to display either a first animation frame or a target animation frame of the first virtual model when the target animation update frequency of the first virtual model does not match the count value of the first virtual model, wherein the first virtual model is any one of at least one virtual model; and to display a second animation frame of the first virtual model when the target animation update frequency of the first virtual model matches the count value of the first virtual model; wherein the first animation frame is the latest animation frame displayed in the animation of the first virtual model, the second animation frame is the animation frame located one position after the first animation frame in the animation of the first virtual model, and the target animation frame is determined based on the first animation frame, the second animation frame, and the count value of the first virtual model.
[0175] In one possible implementation, the display unit 1203 is used to display the first animation frame of the first virtual model when the first virtual model does not meet the second model filtering conditions, and to display the target animation frame of the first virtual model when the first virtual model meets the second model filtering conditions.
[0176] In one possible implementation, the display unit 1203 is configured to, when the first virtual model is associated with the second virtual model, adjust the target animation update frequency of the first virtual model to the animation update frequency of the second virtual model to obtain the adjusted animation update frequency of the first virtual model, wherein the first virtual model is any one of at least one virtual model; and display the animation frame corresponding to the first virtual model according to the adjusted animation update frequency of the first virtual model.
[0177] In one possible implementation, the display unit 1203 is further configured to adjust the count value of the first virtual model to the count value of the second virtual model, so that the animation update of the first virtual model is synchronized with the animation update of the second virtual model.
[0178] In one possible implementation, the first acquisition unit 1201 is used to acquire at least one resource consumption sub-index of a virtual model, wherein the resource consumption sub-index of any virtual model is positively correlated with the initial animation update frequency of any virtual model; and the resource consumption sub-index of at least one virtual model is summarized to obtain the resource consumption index.
[0179] In one possible implementation, the first acquisition unit 1201 is further configured to determine the proportion value of the first virtual model, wherein the first virtual model is any one of at least one virtual model, and the proportion value of the first virtual model is the ratio of the rendering size of the first virtual model to the reference size; and the animation update frequency corresponding to the proportion value of the first virtual model is used as the initial animation update frequency of the first virtual model.
[0180] In one possible implementation, the resource consumption threshold is the resource consumption threshold corresponding to the target category, and at least one virtual model is a virtual model of the target category.
[0181] The animation frame display device provided in this application embodiment displays animation frames corresponding to at least one virtual model based on a target animation update frequency of the at least one virtual model. The target animation update frequency of the at least one virtual model is determined by considering resource consumption indicators based on the initial animation update frequency of the at least one virtual model. Using the target animation update frequency of the at least one virtual model allows for effective global control of resource consumption, which is beneficial for improving the smoothness of animation frame display and thus increasing the human-computer interaction rate.
[0182] It should be noted that the apparatus provided in the above embodiments is only illustrated by the division of the above functional units. In practical applications, the above functions can be assigned to different functional units as needed, that is, the internal structure of the device can be divided into different functional units to complete all or part of the functions described above. In addition, the apparatus and method embodiments provided in the above embodiments belong to the same concept, and their specific implementation process can be found in the method embodiments, which will not be repeated here.
[0183] Figure 13 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. The computer device can be a terminal, which can be: a PC, mobile phone, smartphone, PDA, wearable device, handheld portable gaming device, PPC, tablet computer, smart car system, smart TV, smart speaker, or in-vehicle terminal. The terminal may also be referred to as user equipment, portable terminal, laptop terminal, desktop terminal, or other names.
[0184] Typically, a terminal includes a processor 1301 and a memory 1302.
[0185] Processor 1301 may include one or more processing cores, such as a quad-core processor, an octa-core processor, etc. Processor 1301 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). Processor 1301 may also include a main processor and a coprocessor. The main processor, also known as the CPU, is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 1301 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the screen. In some embodiments, processor 1301 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.
[0186] The memory 1302 may include one or more computer-readable storage media, which may be non-transitory. The memory 1302 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in the memory 1302 are used to store at least one instruction, which is executed by the processor 1301 to cause the terminal to implement the animation frame display method provided in the method embodiments of this application.
[0187] In some embodiments, the terminal may also optionally include: a peripheral device interface 1303 and at least one peripheral device. The processor 1301, memory 1302, and peripheral device interface 1303 can be connected via a bus or signal line. Each peripheral device can be connected to the peripheral device interface 1303 via a bus, signal line, or circuit board. Specifically, the peripheral device includes at least one of: a radio frequency circuit 1304, a display screen 1305, a camera assembly 1306, an audio circuit 1307, and a power supply 1308.
[0188] Peripheral device interface 1303 can be used to connect at least one I / O (Input / Output) related peripheral device to processor 1301 and memory 1302. In some embodiments, processor 1301, memory 1302 and peripheral device interface 1303 are integrated on the same chip or circuit board; in some other embodiments, any one or two of processor 1301, memory 1302 and peripheral device interface 1303 can be implemented on separate chips or circuit boards, which is not limited in this embodiment.
[0189] The radio frequency (RF) circuit 1304 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The RF circuit 1304 communicates with communication networks and other communication devices via electromagnetic signals. The RF circuit 1304 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals back into electrical signals. Optionally, the RF circuit 1304 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, etc. The RF circuit 1304 can communicate with other terminals through at least one wireless communication protocol. This wireless communication protocol includes, but is not limited to: metropolitan area networks (MANs), various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks (WLANs), and / or WiFi (Wireless Fidelity) networks. In some embodiments, the RF circuit 1304 may also include circuitry related to NFC (Near Field Communication), which is not limited in this application.
[0190] Display screen 1305 is used to display a UI (User Interface). This UI may include graphics, text, icons, videos, and any combination thereof. When display screen 1305 is a touch display screen, it also has the ability to collect touch signals on or above its surface. These touch signals can be input as control signals to processor 1301 for processing. In this case, display screen 1305 can also be used to provide virtual buttons and / or a virtual keyboard, also known as soft buttons and / or a soft keyboard. In some embodiments, display screen 1305 can be a single screen, located on the front panel of the terminal; in other embodiments, display screen 1305 can be at least two screens, respectively located on different surfaces of the terminal or in a folded design; in other embodiments, display screen 1305 can be a flexible display screen, located on a curved or folded surface of the terminal. Furthermore, display screen 1305 can be configured as a non-rectangular, irregular shape, i.e., a non-rectangular screen. Display screen 1305 can be made of materials such as LCD (Liquid Crystal Display) or OLED (Organic Light-Emitting Diode).
[0191] The camera assembly 1306 is used to acquire images or videos. Optionally, the camera assembly 1306 includes a front-facing camera and a rear-facing camera. Typically, the front-facing camera is located on the front panel of the terminal, and the rear-facing camera is located on the back of the terminal. In some embodiments, there are at least two rear-facing cameras, which are any one of a main camera, a depth-sensing camera, a wide-angle camera, and a telephoto camera, to achieve background blurring by fusion of the main camera and the depth-sensing camera, panoramic shooting by fusion of the main camera and the wide-angle camera, VR (Virtual Reality) shooting, or other fusion shooting functions. In some embodiments, the camera assembly 1306 may also include a flash. The flash can be a single-color temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm-light flash and a cool-light flash, which can be used for light compensation at different color temperatures.
[0192] The audio circuit 1307 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, converting the sound waves into electrical signals that are input to the processor 1301 for processing, or input to the radio frequency circuit 1304 to achieve voice communication. For stereo sound acquisition or noise reduction purposes, multiple microphones may be used, each positioned at a different location on the terminal. The microphone may also be an array microphone or an omnidirectional microphone. The speaker is used to convert electrical signals from the processor 1301 or the radio frequency circuit 1304 into sound waves. The speaker may be a conventional diaphragm speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can convert electrical signals not only into audible sound waves but also into inaudible sound waves for purposes such as distance measurement. In some embodiments, the audio circuit 1307 may also include a headphone jack.
[0193] Power supply 1308 is used to power the various components in the terminal. Power supply 1308 can be AC power, DC power, a disposable battery, or a rechargeable battery. When power supply 1308 includes a rechargeable battery, the rechargeable battery can support wired or wireless charging. The rechargeable battery can also be used to support fast charging technology.
[0194] In some embodiments, the terminal further includes one or more sensors 1309. The one or more sensors 1309 include, but are not limited to: an acceleration sensor 1310, a gyroscope sensor 1311, a pressure sensor 1312, an optical sensor 1313, and a proximity sensor 1314.
[0195] Accelerometer 1310 can detect the magnitude of acceleration along the three coordinate axes of a coordinate system established by the terminal. For example, accelerometer 1310 can be used to detect the components of gravitational acceleration along the three coordinate axes. Processor 1301 can control display screen 1305 to display the user interface in either a landscape or portrait view based on the gravitational acceleration signal acquired by accelerometer 1310. Accelerometer 1310 can also be used for games or for acquiring user motion data.
[0196] The gyroscope sensor 1311 can detect the terminal's orientation and rotation angle. The gyroscope sensor 1311 can work in conjunction with the accelerometer sensor 1310 to collect the user's 3D movements on the terminal. Based on the data collected by the gyroscope sensor 1311, the processor 1301 can perform the following functions: motion sensing (e.g., changing the UI based on the user's tilt), image stabilization during shooting, game control, and inertial navigation.
[0197] The pressure sensor 1312 can be disposed on the side bezel of the terminal and / or the lower layer of the display screen 1305. When the pressure sensor 1312 is disposed on the side bezel of the terminal, it can detect the user's grip signal on the terminal, and the processor 1301 can perform left / right hand recognition or quick operation based on the grip signal collected by the pressure sensor 1312. When the pressure sensor 1312 is disposed on the lower layer of the display screen 1305, the processor 1301 can control the operable controls on the UI interface based on the user's pressure operation on the display screen 1305. The operable controls include at least one of button controls, scroll bar controls, icon controls, and menu controls.
[0198] Optical sensor 1313 is used to collect ambient light intensity. In one embodiment, processor 1301 can control the display brightness of display screen 1305 based on the ambient light intensity collected by optical sensor 1313. Specifically, when the ambient light intensity is high, the display brightness of display screen 1305 is increased; when the ambient light intensity is low, the display brightness of display screen 1305 is decreased. In another embodiment, processor 1301 can also dynamically adjust the shooting parameters of camera assembly 1306 based on the ambient light intensity collected by optical sensor 1313.
[0199] The proximity sensor 1314, also known as a distance sensor, is typically installed on the front panel of the terminal. The proximity sensor 1314 is used to detect the distance between the user and the front of the terminal. In one embodiment, when the proximity sensor 1314 detects that the distance between the user and the front of the terminal is gradually decreasing, the processor 1301 controls the display screen 1305 to switch from a screen-on state to a screen-off state; when the proximity sensor 1314 detects that the distance between the user and the front of the terminal is gradually increasing, the processor 1301 controls the display screen 1305 to switch from a screen-off state to a screen-on state.
[0200] Those skilled in the art will understand that Figure 13 The structure shown does not constitute a limitation on the terminal and may include more or fewer components than shown, or combine certain components, or use different component arrangements.
[0201] In an exemplary embodiment, a computer-readable storage medium is also provided, which stores at least one computer program that is loaded and executed by a processor of a computer device to enable the computer to implement any of the above-described methods for displaying animation frames.
[0202] In one possible implementation, the aforementioned computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CD-ROM), magnetic tape, floppy disk, and optical data storage device, etc.
[0203] In an exemplary embodiment, a computer program product is also provided, which includes a computer program or computer instructions that are loaded and executed by a processor to enable a computer to implement any of the above-described methods for displaying animation frames.
[0204] It should be noted that the terms "first," "second," etc., used in this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the above exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0205] It should be understood that "multiple" as used in this article refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.
[0206] The above description is merely an exemplary embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the principles of this application should be included within the protection scope of this application.
Claims
1. A method for displaying animation frames, characterized in that, The method includes: Based on the initial animation update frequency of at least one virtual model in the virtual environment, a resource consumption index is obtained, wherein the resource consumption index is used to indicate the amount of resources required to update the animation according to the initial animation update frequency of the at least one virtual model. When the resource consumption index is greater than the resource consumption threshold, the ratio of the resource consumption index to the resource consumption threshold is used as an adjustment coefficient. The product of the number of frames corresponding to the initial animation update frequency of the at least one virtual model and the adjustment coefficient is calculated. The product is rounded to obtain the target value. The animation update frequency with the corresponding number of frames as the target value is used as the first animation update frequency of the at least one virtual model. Based on the first animation update frequency, the target animation update frequency of the at least one virtual model is obtained. The resource consumption threshold is used to constrain the maximum number of virtual models that can update the animation every frame. The initial animation update frequency and the target animation update frequency are used to indicate how many frames the animation is updated once. When displaying the virtual environment, the animation frames corresponding to the at least one virtual model are displayed in the screen according to the target animation update frequency.
2. The method according to claim 1, characterized in that, The step of obtaining the target animation update frequency of the at least one virtual model based on the first animation update frequency includes: When the first virtual model meets the first model selection criteria and the first animation update frequency of the first virtual model is not higher than the reference animation update frequency, the reference animation update frequency is taken as the target animation update frequency of the first virtual model, and the first virtual model is any virtual model among the at least one virtual model.
3. The method according to claim 1, characterized in that, The step of obtaining the target animation update frequency of the at least one virtual model based on the first animation update frequency includes: When the first virtual model meets the first model selection criteria and the first animation update frequency of the first virtual model is higher than the reference animation update frequency; or, when the first virtual model does not meet the first model selection criteria, the first animation update frequency of the first virtual model is taken as the target animation update frequency of the first virtual model, and the first virtual model is any virtual model among the at least one virtual model.
4. The method according to claim 1, characterized in that, After obtaining resource consumption metrics based on the initial animation update frequency of at least one virtual model in the virtual environment, the method further includes: When the resource consumption index is not greater than the resource consumption threshold, the initial animation update frequency is used as the target animation update frequency for the at least one virtual model.
5. The method according to any one of claims 1-4, characterized in that, The step of displaying animation frames corresponding to the at least one virtual model in the screen according to the target animation update frequency includes: When the target animation update frequency of the first virtual model does not match the count value of the first virtual model, the first animation frame or the target animation frame of the first virtual model is displayed in the screen, wherein the first virtual model is any one of the at least one virtual models; When the target animation update frequency of the first virtual model matches the count value of the first virtual model, the second animation frame of the first virtual model is displayed in the screen; Wherein, the first animation frame is the latest animation frame displayed in the animation of the first virtual model, the second animation frame is the animation frame located one position after the first animation frame in the animation of the first virtual model, and the target animation frame is determined based on the count values of the first animation frame, the second animation frame, and the first virtual model.
6. The method according to claim 5, characterized in that, The step of displaying the first animation frame or target animation frame of the first virtual model in the screen includes: When the first virtual model does not meet the second model selection criteria, the first animation frame of the first virtual model is displayed on the screen; When the first virtual model meets the second model selection criteria, the target animation frame of the first virtual model is displayed on the screen.
7. The method according to any one of claims 1-4, characterized in that, The step of displaying animation frames corresponding to the at least one virtual model in the screen according to the target animation update frequency includes: When the first virtual model is associated with the second virtual model, the target animation update frequency of the first virtual model is adjusted to the animation update frequency of the second virtual model to obtain the adjusted animation update frequency of the first virtual model. The first virtual model is any one of the at least one virtual models. Based on the adjusted animation update frequency of the first virtual model, the animation frames corresponding to the first virtual model are displayed in the screen.
8. The method according to claim 7, characterized in that, After adjusting the target animation update frequency of the first virtual model to the animation update frequency of the second virtual model, the method further includes: The count value of the first virtual model is adjusted to the count value of the second virtual model so that the animation update of the first virtual model is synchronized with the animation update of the second virtual model.
9. The method according to any one of claims 1-4, characterized in that, The method for obtaining resource consumption metrics based on the initial animation update frequency of at least one virtual model includes: Obtain the resource consumption sub-indicators of the at least one virtual model, wherein the resource consumption sub-indicator of any virtual model is positively correlated with the initial animation update frequency of the virtual model. The resource consumption sub-indicators of the at least one virtual model are summarized to obtain the resource consumption index.
10. The method according to any one of claims 1-4, characterized in that, Before obtaining resource consumption metrics based on the initial animation update frequency of at least one virtual model, the method further includes: Determine the proportion value of the first virtual model, where the first virtual model is any one of the at least one virtual models, and the proportion value of the first virtual model is the ratio of the rendering size of the first virtual model to the reference size. The animation update frequency corresponding to the proportion value of the first virtual model is used as the initial animation update frequency of the first virtual model.
11. The method according to any one of claims 1-4, characterized in that, The resource consumption threshold is the resource consumption threshold corresponding to the target category, and the at least one virtual model is a virtual model of the target category.
12. A display device for animation frames, characterized in that, The device includes: The first acquisition unit is used to acquire a resource consumption index based on the initial animation update frequency of at least one virtual model in the virtual environment. The resource consumption index is used to indicate the amount of resources required to update the animation according to the initial animation update frequency of the at least one virtual model. The second acquisition unit is used to, when the resource consumption index is greater than the resource consumption threshold, use the ratio of the resource consumption index to the resource consumption threshold as an adjustment coefficient, calculate the product of the number of frames corresponding to the initial animation update frequency of the at least one virtual model and the adjustment coefficient, round the product to obtain a target value, use the animation update frequency with the corresponding number of frames as the target value as the first animation update frequency of the at least one virtual model, and obtain the target animation update frequency of the at least one virtual model based on the first animation update frequency. The resource consumption threshold is used to constrain the maximum number of virtual models that can update animation every frame globally. The initial animation update frequency and the target animation update frequency are used to indicate how many frames the animation is updated once. The display unit is used to display animation frames corresponding to the at least one virtual model in the screen according to the target animation update frequency when displaying the screen of the virtual environment.
13. The apparatus according to claim 12, characterized in that, The second acquisition unit is used to take the reference animation update frequency as the target animation update frequency of the first virtual model when the first virtual model meets the first model filtering condition and the first animation update frequency of the first virtual model is not higher than the reference animation update frequency, wherein the first virtual model is any virtual model among the at least one virtual model.
14. The apparatus according to claim 12, characterized in that, The second acquisition unit is used to take the first animation update frequency of the first virtual model as the target animation update frequency of the first virtual model when the first virtual model meets the first model filtering condition and the first animation update frequency of the first virtual model is higher than the reference animation update frequency; or, when the first virtual model does not meet the first model filtering condition, take the first animation update frequency of the first virtual model as the target animation update frequency of the first virtual model, wherein the first virtual model is any virtual model among the at least one virtual model.
15. The apparatus according to claim 12, characterized in that, The second acquisition unit is further configured to use the initial animation update frequency as the target animation update frequency of the at least one virtual model when the resource consumption index is not greater than the resource consumption threshold.
16. The apparatus according to any one of claims 12-15, characterized in that, The display unit is configured to display either a first animation frame or a target animation frame of the first virtual model on the screen when the target animation update frequency of the first virtual model does not match the count value of the first virtual model, wherein the first virtual model is any one of the at least one virtual models; and to display a second animation frame of the first virtual model on the screen when the target animation update frequency of the first virtual model matches the count value of the first virtual model; wherein the first animation frame is the latest animation frame displayed in the animation of the first virtual model, the second animation frame is the animation frame located one position after the first animation frame in the animation of the first virtual model, and the target animation frame is determined based on the first animation frame, the second animation frame, and the count value of the first virtual model.
17. The apparatus according to claim 16, characterized in that, The display unit is configured to display the first animation frame of the first virtual model when the first virtual model does not meet the second model filtering conditions, and to display the target animation frame of the first virtual model when the first virtual model meets the second model filtering conditions.
18. The apparatus according to any one of claims 12-15, characterized in that, The display unit is configured to, when the first virtual model is associated with the second virtual model, adjust the target animation update frequency of the first virtual model to the animation update frequency of the second virtual model to obtain the adjusted animation update frequency of the first virtual model, wherein the first virtual model is any one of the at least one virtual models; and display the animation frame corresponding to the first virtual model in the screen according to the adjusted animation update frequency of the first virtual model.
19. The apparatus according to claim 18, characterized in that, The display unit is further configured to adjust the count value of the first virtual model to the count value of the second virtual model, so that the animation update of the first virtual model is synchronized with the animation update of the second virtual model.
20. The apparatus according to any one of claims 12-15, characterized in that, The first acquisition unit is used to acquire the resource consumption sub-indicators of the at least one virtual model, wherein the resource consumption sub-indicator of any virtual model is positively correlated with the initial animation update frequency of the at least one virtual model; and to summarize the resource consumption sub-indicators of the at least one virtual model to obtain the resource consumption index.
21. The apparatus according to any one of claims 12-15, characterized in that, The first acquisition unit is further configured to determine the proportion value of the first virtual model, wherein the first virtual model is any one of the at least one virtual models, and the proportion value of the first virtual model is the ratio of the rendering size of the first virtual model to the reference size; and to use the animation update frequency corresponding to the proportion value of the first virtual model as the initial animation update frequency of the first virtual model.
22. The apparatus according to any one of claims 12-15, characterized in that, The resource consumption threshold is the resource consumption threshold corresponding to the target category, and the at least one virtual model is a virtual model of the target category.
23. A computer device, characterized in that, The computer device includes a processor and a memory, the memory storing at least one computer program, the at least one computer program being loaded and executed by the processor to enable the computer device to implement the method for displaying animation frames as described in any one of claims 1 to 11.
24. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores at least one computer program, which is loaded and executed by a processor to enable the computer to implement the method for displaying animation frames as described in any one of claims 1 to 11.
25. A computer program product, characterized in that, The computer program product includes a computer program or computer instructions, which are loaded and executed by a processor to enable the computer to implement the method for displaying animation frames as described in any one of claims 1 to 11.
Citation Information
Patent Citations
Skeletal animation updating method and device, equipment and storage medium
CN112927332A
Game program, recording medium, and computer device
JP2011186834A
Controlling animation frame rate of applications
US20110096077A1
Cited By
Animation frame display method and apparatus, device, and storage medium
WO2023130808A1