WO2023130808A1 - 动画帧的显示方法、装置、设备及存储介质 - Google Patents

动画帧的显示方法、装置、设备及存储介质 Download PDF

Info

Publication number
WO2023130808A1
WO2023130808A1 PCT/CN2022/127133 CN2022127133W WO2023130808A1 WO 2023130808 A1 WO2023130808 A1 WO 2023130808A1 CN 2022127133 W CN2022127133 W CN 2022127133W WO 2023130808 A1 WO2023130808 A1 WO 2023130808A1
Authority
WO
WIPO (PCT)
Prior art keywords
animation
virtual model
update frequency
virtual
frame
Prior art date
Application number
PCT/CN2022/127133
Other languages
English (en)
French (fr)
Inventor
刘舒畅
Original Assignee
腾讯科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 腾讯科技(深圳)有限公司 filed Critical 腾讯科技(深圳)有限公司
Publication of WO2023130808A1 publication Critical patent/WO2023130808A1/zh
Priority to US18/455,592 priority Critical patent/US20230401772A1/en

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/55Controlling game characters or game objects based on the game progress
    • A63F13/56Computing the motion of game characters with respect to other game characters, game objects or elements of the game scene, e.g. for simulating the behaviour of a group of virtual soldiers or for path finding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T13/00Animation
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/50Controlling the output signals based on the game progress
    • A63F13/52Controlling the output signals based on the game progress involving aspects of the displayed game scene
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/80Special adaptations for executing a specific game genre or game mode
    • A63F13/837Shooting of targets
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/60Methods for processing data by generating or executing the game program
    • A63F2300/66Methods for processing data by generating or executing the game program for rendering three dimensional images
    • A63F2300/6607Methods for processing data by generating or executing the game program for rendering three dimensional images for animating game characters, e.g. skeleton kinematics
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G2340/00Aspects of display data processing
    • G09G2340/04Changes in size, position or resolution of an image
    • G09G2340/0407Resolution change, inclusive of the use of different resolutions for different screen areas
    • G09G2340/0435Change or adaptation of the frame rate of the video stream
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G2350/00Solving problems of bandwidth in display systems
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G5/00Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators
    • G09G5/001Arbitration of resources in a display system, e.g. control of access to frame buffer by video controller and/or main processor
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G5/00Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators
    • G09G5/36Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators characterised by the display of a graphic pattern, e.g. using an all-points-addressable [APA] memory
    • G09G5/363Graphics controllers

Definitions

  • the embodiments of the present application relate to the field of computer technology, and in particular, to a display method, device, device, and storage medium of an animation frame.
  • the virtual environment includes at least one virtual model.
  • the terminal displays the picture of the virtual environment, it will display the animation frame of the at least one virtual model in the picture. , for viewing by the interacting object.
  • the animation frames corresponding to the virtual model are displayed directly according to the update frequency of the initial animation of the virtual model.
  • the initial animation update frequency of the virtual model is determined based on the ratio of the rendering size of the virtual model to the reference size.
  • Embodiments of the present application provide a method, device, device, and storage medium for displaying animation frames, which can be used to improve the smoothness of displaying animation frames. Described technical scheme is as follows:
  • an embodiment of the present application provides a method for displaying an animation frame, the method comprising:
  • a device for displaying animation frames comprising:
  • the first acquisition unit is configured to acquire a resource consumption index based on the initial animation update frequency of at least one virtual model, and the resource consumption index is used to indicate resources that need to be consumed for animation update according to the initial animation update frequency of the at least one virtual model quantity;
  • a second acquiring unit configured to acquire a target animation update frequency of the at least one virtual model based on the resource consumption index and the initial animation update frequency
  • a display unit configured to display animation frames corresponding to the at least one virtual model according to the target animation update frequency.
  • a computer device in another aspect, includes a processor and a memory, at least one computer program is stored in the memory, the at least one computer program is loaded and executed by the processor, so that all The above-mentioned computer device realizes the display method of any one of the above-mentioned animation frames.
  • a non-volatile computer-readable storage medium wherein at least one computer program is stored in the non-volatile computer-readable storage medium, and the at least one computer program is loaded and executed by a processor , so that the computer can realize any of the animation frame display methods described above.
  • a computer program product includes a computer program or a computer instruction, the computer program or the computer instruction is loaded and executed by a processor, so that the computer implements any of the above-mentioned The display method for animation frames.
  • the animation frame corresponding to at least one virtual model is displayed according to the target animation update frequency of at least one virtual model, wherein the target animation update frequency of at least one virtual model is at least one virtual model's initial Animation update frequency is determined based on resource consumption metrics.
  • the target animation update frequency of at least one virtual model resource consumption can be effectively and globally controlled, which is beneficial to improving the display fluency of animation frames, and further improving the human-computer interaction rate.
  • FIG. 1 is a schematic diagram of an implementation environment of a method for displaying animation frames provided in an embodiment of the present application
  • FIG. 2 is a flow chart of a method for displaying an animation frame provided in an embodiment of the present application
  • FIG. 3 is a schematic diagram of an animation update synchronization situation provided by an embodiment of the present application.
  • Fig. 4 is a schematic diagram of a screen display effect provided by an embodiment of the present application.
  • Fig. 5 is a schematic diagram of a screen display effect provided by an embodiment of the present application.
  • Fig. 6 is a schematic diagram of a screen display effect provided by an embodiment of the present application.
  • Fig. 7 is a schematic diagram of the distribution of a virtual model provided by the embodiment of the present application.
  • Fig. 8 is a schematic diagram of the distribution of a virtual model provided by the embodiment of the present application.
  • Fig. 9 is a schematic diagram of a screen display effect provided by an embodiment of the present application.
  • Fig. 10 is a schematic diagram of a screen display effect provided by an embodiment of the present application.
  • Fig. 11 is a schematic diagram of a display process of an animation frame provided by an embodiment of the present application.
  • Fig. 12 is a schematic diagram of a display device for an animation frame provided by an embodiment of the present application.
  • FIG. 13 is a schematic structural diagram of a computer device provided by an embodiment of the present application.
  • Virtual environment an environment provided (or displayed) when an application program runs on a terminal.
  • the virtual environment refers to an environment created for virtual objects to perform activities.
  • the virtual environment may be a two-dimensional virtual environment, a 2.5-dimensional virtual environment or a three-dimensional virtual environment.
  • the virtual environment can be a simulation environment of the real world, a semi-simulation and semi-fictional environment, or a purely fictitious environment.
  • Virtual object refers to the movable object in the virtual environment.
  • the virtual object may be a virtual character, a virtual animal, an animation character, or the like.
  • Interactive objects can manipulate virtual objects through peripheral components or by clicking on a touch screen.
  • Each virtual object has its own shape and volume in the virtual environment, occupying a part of the space in the virtual environment.
  • the virtual object is a three-dimensional model created based on animation skeleton technology.
  • Virtual model refers to a model composed of skeletons in a virtual environment.
  • Virtual models include but are not limited to virtual objects, virtual props, virtual pets, etc.
  • the terminal presents the virtual model by displaying the animation of the virtual model, and the animation of the virtual model is composed of multiple animation frames.
  • Each animation frame in the animation of the virtual model is obtained through complex logic calculation based on the relationship between the bones, which consumes more resources (such as CPU (Central Processing Unit, central processing unit) resources).
  • CPU Central Processing Unit, central processing unit
  • FPS Frames Per Second, the number of frames per second to update the picture: referred to as frame rate, the higher the frame rate, the smoother the picture experience.
  • URO Update Rate Optimizations, animation update frequency optimization
  • URO can be used to describe the animation update frequency, for example, URO1 means that the animation is updated every frame, URO2 means that the animation is updated every two frames, and so on.
  • Resource consumption The resources consumed by the animation update of the virtual model.
  • the consumed resources refer to the CPU time consumed. The higher the resource consumption, the longer the CPU time required for each frame update.
  • the animation frames corresponding to the virtual model are displayed directly according to the update frequency of the initial animation of the virtual model.
  • the initial animation update frequency of the virtual model is determined based on the ratio of the rendering size of the virtual model to the reference size.
  • the information considered in the way of displaying animation frames based on the initial animation update frequency of the virtual model is relatively limited, and it is easy to reduce the display fluency of animation frames, resulting in a low rate of human-computer interaction.
  • FIG. 1 shows a schematic diagram of an implementation environment of a method for displaying an animation frame provided by an embodiment of the present application.
  • the implementation environment includes: a terminal 11 and a server 12 .
  • the terminal 11 installs and runs applications supporting a virtual environment.
  • the interactive object can use the terminal 11 to control the virtual object to perform activities in the virtual environment provided by the application program, the activities include but not limited to: adjusting body posture, crawling, walking, running, riding, jumping, driving, picking up, shooting, attacking, Throwing, changing positions, etc.
  • the terminal 11 is also referred to as an electronic device.
  • the embodiment of the present application does not limit the application programs that support the virtual environment.
  • the application programs that support the virtual environment include but are not limited to: VR (Virtual Reality, virtual reality) applications, AR (Augmented Reality, augmented reality) Class applications, 3D map programs, game applications, social applications, interactive entertainment applications, etc.
  • game applications include but are not limited to shooting games, MOBA (Multiplayer Online Battle Arena, multiplayer online battle arena) games, SLG (Simulation Game, strategy games) and the like.
  • Shooting games refer to all games that use props for long-range attacks, including but not limited to FPS (First-Person Shooting, first-person shooting) games and TPS (Third-Personal Shooting, third-person shooting) games.
  • the application program supporting the virtual environment can support at least one operating system in Windows operating system, Apple operating system, Android operating system, IOS operating system and Linux operating system, and the application programs running in different operating systems Can be interconnected.
  • the application program supporting the virtual environment is an application program developed based on a three-dimensional engine.
  • the application program supporting the virtual environment is a stand-alone application program or a network online version application program.
  • the server 12 is used to provide background services for the application programs installed on the terminal 11 that support the virtual environment.
  • the server 12 undertakes the main calculation work, and the terminal 11 undertakes the secondary calculation work; or, the server 12 undertakes the secondary calculation work, and the terminal 11 undertakes the main calculation work; or, the server 12 and the terminal 11 undertake the main calculation work;
  • a distributed computing architecture is used for collaborative computing.
  • the terminal 11 is any electronic product that can perform human-computer interaction with an interactive object in one or more ways such as a keyboard, a touchpad, a touch screen, a remote control, voice interaction, or a handwriting device, such as , PC (Personal Computer, personal computer), mobile phone, smart phone, PDA (Personal Digital Assistant, personal digital assistant), wearable device, handheld portable game device, PPC (Pocket PC, handheld computer), tablet computer, smart car machine , smart TV, smart speaker, vehicle terminal, etc.
  • the server 12 may be one server, or a server cluster composed of multiple servers, or a cloud computing service center.
  • the terminal 11 establishes a communication connection with the server 12 through a wired or wireless network.
  • terminal 11 and server 12 are only examples, and other existing or future terminals or servers that may be applicable to this application should also be included in the scope of protection of this application, and are referred to herein as Citations are included here.
  • An embodiment of the present application provides a method for displaying an animation frame, and the method can be applied to the implementation environment shown in FIG. 1 . Take this method applied to terminal 11 as an example.
  • the animation frame display method provided by the embodiment of the present application includes the following steps 201 to 203 .
  • a resource consumption index is obtained based on the initial animation update frequency of at least one virtual model, and the resource consumption index is used to indicate the amount of resources that need to be consumed for animation update according to the initial animation update frequency of at least one virtual model.
  • At least one virtual model refers to a virtual model in a virtual environment that needs to display animation frames by considering resource consumption indicators.
  • the embodiment of the present application does not limit the quantity of the at least one virtual model.
  • at least one virtual model is a virtual model of the target category.
  • the embodiment of the present application does not limit the way of classifying the categories of virtual models, which can be set according to experience, or flexibly adjusted according to application scenarios.
  • all virtual models are divided into one category, and at least one virtual model is all virtual models that need to display animation frames on the same screen.
  • the virtual model is divided into a virtual object category and a virtual prop category.
  • the target category is a virtual object category
  • at least one virtual model is a virtual model that belongs to the virtual object category among all virtual models that need to display animation frames on the same screen.
  • there may be other ways to classify the categories of virtual models which is not limited in this embodiment of the present application.
  • each virtual model will identify its category through a unique character string, so as to facilitate subsequent statistics on resource consumption at the granularity of category.
  • the displayed virtual environment picture is constantly updated, and the animation frame display method provided by the embodiment of the present application occurs during the process of displaying the latest frame of the virtual environment picture.
  • a frame of a virtual environment is displayed, at least one animation frame of a virtual model will be displayed in the screen.
  • the embodiment of the present application introduces the implementation process of displaying at least one animation frame of a virtual model. It should be noted that when displaying a frame of a virtual environment, in addition to displaying at least one animation frame of a virtual model in the screen, animation frames of other virtual models or environmental elements may also be displayed in the screen. The embodiment does not limit this. Unless otherwise specified, the screens mentioned in the embodiments of the present application all refer to the screens of the virtual environment.
  • the initial animation update frequency of the at least one virtual model refers to the animation update frequency of the at least one virtual model on which the resource consumption indicator is obtained.
  • the animation update frequency is used to indicate how many frames of the screen to update the animation, and each time the animation is updated, there is a new animation frame for performance.
  • the new animation frame refers to an animation frame in the animation. Exemplarily, if an animation update frequency is to update the animation every n (n is an integer not less than 1) frames, the animation update frequency may be expressed as UROn.
  • the initial animation update frequency of at least one virtual model needs to be acquired.
  • the principle of obtaining the initial animation update frequency of each virtual model is the same, and the process of obtaining the initial animation update frequency of the first virtual model is taken as an example for illustration.
  • the first virtual model is any one of at least one virtual model.
  • the manner of acquiring the initial animation update frequency of the first virtual model includes: using the animation update frequency of the first virtual model when the last frame of the virtual environment is displayed as the initial animation update frequency of the first virtual model.
  • the manner 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, and the default animation update frequency of the first virtual model may be Refers to an inherent property of the first virtual model.
  • the way of obtaining the initial animation update frequency of the first virtual model includes: determining the proportion of the first virtual model, and using the animation update frequency corresponding to the proportion of the first virtual model as the initial animation update frequency of the first virtual model .
  • the ratio of the first virtual model is the ratio of the rendering size of the first virtual model to the reference size.
  • 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 according to experience, or flexibly adjusted according to the application scenario.
  • the reference size can be the same or different.
  • the reference size may be the size of the screen of the virtual environment.
  • the rendering size of the first virtual model presented in the previous frame of the virtual environment picture can be obtained by identifying the animation frame of the first virtual model displayed when the last frame of the virtual environment picture is displayed. That is to say, the percentage value of the first virtual model may continuously change with the update of the virtual environment picture.
  • the update frequency of the initial animation of at least one virtual model will be obtained according to the display result of the last frame of the virtual environment, so as to further count resource consumption indicators.
  • the initial animation update frequency of the virtual model determined in this way has a higher degree of matching with the real-time display results of the animation frames of the virtual model, which makes the initial animation update frequency more reliable, thereby improving the resources determined based on the initial animation update frequency. Reliability of consumption indicators.
  • the corresponding relationship between the proportion value and the animation update frequency is stored in the terminal. After the proportion value of the first virtual model is determined, the proportion value of the first virtual model can be searched according to the corresponding relationship between the proportion value and the animation update frequency. The corresponding animation update frequency, and then use the found animation update frequency as the initial animation update frequency of the first virtual model.
  • the corresponding relationship between the proportion value and the animation update frequency is set according to experience, or flexibly adjusted according to the application scenario, which is not limited in this embodiment of the present application.
  • the animation update frequency corresponding to the first proportion value is not lower than the animation update frequency corresponding to the second proportion value, wherein the first proportion value is greater than the second proportion value. That is to say, as the ratio increases, the animation update frequency corresponding to the ratio remains unchanged or increases.
  • the terminal stores the corresponding relationship between the proportion value range and the animation update frequency.
  • the animation update frequency corresponding to the proportion value of the first virtual model refers to the proportion value of the first virtual model.
  • the animation update frequency corresponding to the ratio range After determining the ratio of the first virtual model, determine the ratio range of the ratio of the first virtual model, and then find the ratio of the ratio of the first virtual model according to the corresponding relationship between the ratio range and the animation update frequency.
  • the animation update frequency corresponding to the range and then use the found animation update frequency as the initial animation update frequency of the first virtual model.
  • the corresponding relationship between the proportion value range and the animation update frequency is set according to experience, or flexibly adjusted according to application scenarios, which is not limited in this embodiment of the present application.
  • the animation update frequency corresponding to the first proportion value range is not lower than the animation update frequency corresponding to the second proportion value range, wherein the lower limit of the first proportion value range greater than the upper limit of the second proportion value range.
  • the initial animation update frequency of at least one virtual model can be obtained by referring to the manner of obtaining the initial animation update frequency of the first virtual model. After acquiring the initial animation update frequency of the at least one virtual model, the resource consumption index is acquired based on the initial animation update frequency of the at least one virtual model.
  • the resource consumption index is used to indicate the amount of resources that need to be consumed for animation update according to the initial animation update frequency of at least one virtual model. For example, the greater the amount of resources consumed for animation update according to the initial animation update frequency of at least one virtual model, the more resources are consumed to display the animation frame corresponding to at least one virtual model according to the initial animation update frequency of at least one virtual model. More, the worse the display fluency of the animation frame.
  • the method of obtaining the resource consumption index includes: obtaining the resource consumption sub-index of at least one virtual model, summarizing the resource consumption sub-index of at least one virtual model, and obtaining Resource consumption metrics.
  • the resource consumption sub-index of any virtual model is positively correlated with the initial animation update frequency of any virtual model. That is to say, the higher the initial animation update frequency of any virtual model, the greater the resource consumption sub-index of any virtual model; the lower the initial animation update frequency of any virtual model, the greater the resource consumption sub-index of any virtual model.
  • the index is smaller.
  • the resource consumption sub-indicator of any virtual model is used to indicate the amount of resources that need to be consumed for animation update according to the initial animation update frequency of any virtual model.
  • the principle of obtaining the resource consumption sub-indicator of at least one virtual model is the same, and the acquisition of the resource consumption sub-index of the first virtual model is taken as an example for illustration.
  • the first virtual model is any virtual model in the at least one virtual model.
  • the method of obtaining the resource consumption sub-indicator of the first virtual model includes: determining the frame number corresponding to the initial animation update frequency of the first virtual model, and using a positive number that is negatively correlated with the frame number of the screen as the first virtual model The model's resource consumption sub-metric.
  • the reciprocal of the frame number corresponding to the initial animation update frequency of the first virtual model is used as the resource consumption sub-indicator of the first virtual model.
  • the product of the reciprocal of the frame number corresponding to the initial animation update frequency of the first virtual model and a certain positive number is used as the resource consumption sub-indicator of the first virtual model.
  • the number of frames corresponding to the initial animation update frequency of the first virtual model refers to the number of frames of the screen that needs to be passed through to update an animation 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 The animation is updated every 5 frames, and the number of frames corresponding to the initial animation update frequency of the first virtual model is 5.
  • the default animation update frequency of the first virtual model is to update the animation once per frame
  • the larger the number of frames corresponding to the initial animation update frequency of the first virtual model the greater the initial animation of the first virtual model
  • the greater the reduction of the update frequency relative to the default animation update frequency the smaller the resource consumption required for animation update according to the initial animation update frequency of the first virtual model.
  • At least one resource consumption sub-indicator of the virtual model can be obtained.
  • the resource consumption sub-indices of at least one virtual model are aggregated to obtain the resource consumption indicators.
  • aggregating the resource consumption sub-indices of at least one virtual model refers to calculating the sum of the resource consumption sub-indices of at least one virtual model.
  • aggregating the resource consumption sub-indices of the at least one virtual model refers to weighting and summing the resource consumption sub-indices of the at least one virtual model by using the weight of the at least one virtual model, and the weight of the at least one virtual model is set according to experience.
  • a target animation update frequency of at least one virtual model is obtained based on the resource consumption index and the initial animation update frequency.
  • the target animation update frequency of the at least one virtual model is obtained.
  • the acquisition process of the target animation update frequency of at least one virtual model takes into account the resource consumption index, and the resource consumption can be effectively controlled globally according to the target animation update frequency of at least one virtual model, so as to avoid excessive resource consumption. It takes a long time to display the animation frame, which is beneficial to improve the display fluency of the animation frame.
  • the process of obtaining the target animation update frequency of at least one virtual model includes: when the resource consumption index is not greater than the resource consumption threshold, taking the initial animation update frequency as at least The target animation update frequency for an avatar.
  • the resource consumption threshold is used to limit the maximum amount of resources that need to be consumed for animation update according to the animation update frequency of at least one virtual model.
  • the resource consumption threshold is a pre-configured threshold.
  • the resource consumption threshold corresponding to each category is set through the configuration table, so that the resource consumption caused by the animation update of the virtual model of each category can be utilized by using the resource consumption threshold corresponding to each category. to constrain.
  • at least one virtual model is a virtual model of the target category.
  • the resource consumption threshold is the resource consumption threshold corresponding to the target category.
  • the resource consumption threshold is used to constrain the global maximum number of avatars that are allowed to update the animation every frame.
  • the resource consumption threshold may also be referred to as a resource consumption budget, or an animation update budget, and the like.
  • the initial animation of at least one virtual model can be directly updated
  • the frequency serves as a target animation update frequency for at least one virtual model. It should be noted that taking the initial animation update frequency of at least one virtual model as the target animation update frequency of at least one virtual model refers to taking the initial animation update frequency of each virtual model as the target animation update frequency of each virtual model.
  • 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.
  • Step 1 Determine the adjustment coefficient based on the resource consumption index and the resource consumption threshold.
  • the animation update based on the initial animation update frequency of at least one virtual model will bring large resource consumption.
  • at least one virtual model needs to be The initial animation update frequency of the model is adjusted to obtain a first animation update frequency that can bring less resource consumption.
  • the process of adjusting the update frequency of the initial animation of the at least one virtual model is implemented based on an adjustment coefficient, and the adjustment coefficient is determined based on the resource consumption index and the resource consumption threshold.
  • a manner of determining the adjustment coefficient based on the resource consumption index and the resource consumption threshold is: using a 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 a coefficient greater than 1.
  • the manner of determining the adjustment coefficient based on the resource consumption index and the resource consumption threshold may also be other manners, which are not limited in this embodiment of the present application.
  • the ratio of the resource consumption threshold to the resource consumption index is used as the adjustment coefficient, and in this case, the adjustment coefficient is a coefficient smaller than 1.
  • Step 2 Adjust the initial animation update frequency based on the adjustment coefficient to obtain a first animation update frequency of at least one virtual model.
  • the initial animation update frequency of the at least one virtual model is adjusted based on the adjustment coefficient to obtain a first animation update frequency of the at least one virtual model.
  • the adjustment coefficient since the adjustment coefficient is used to adjust the initial animation update frequency of each virtual model, the adjustment coefficient may also be referred to as a global load balancing scaling coefficient.
  • the first animation update frequency of each virtual model is obtained by adjusting the initial animation update frequency of each virtual model based on the adjustment coefficient.
  • the principle of adjusting the initial animation update frequency of each virtual model based on the adjustment coefficient is the same, and the adjustment of the initial animation update frequency of the first virtual model based on the adjustment coefficient is taken as an example for illustration.
  • the first virtual model is any one of at least one virtual model.
  • the method of adjusting the initial animation update frequency of the first virtual model based on the adjustment coefficient is related to the determination method of 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.
  • the way to adjust the initial animation update frequency of the first virtual model based on the adjustment coefficient is: calculate the initial animation update frequency of the first virtual model The product of the picture frame number corresponding to the animation update frequency and the adjustment coefficient is rounded to obtain the target value; the corresponding picture frame number is the animation update frequency of the target value as the first animation update frequency of the first virtual model.
  • the manner of rounding the product may be set according to experience, or flexibly adjusted according to the application scenario, which is not limited in this embodiment of the present application.
  • the manner of rounding the product may be rounding up, rounding down, or rounding.
  • the product can be rounded up according to the Ceil function (rounding up function) to obtain the target value.
  • the animation update frequency corresponding to the frame number of the target value is used as the first animation update frequency of the first virtual model.
  • the initial animation update frequency of the first virtual model is to update the animation every 2 frames (URO2)
  • the adjustment factor is 1.2.
  • the number of screen frames corresponding to the initial animation update frequency of the first virtual model is 2
  • the product of the screen frame number corresponding to the initial animation update frequency of the first virtual model and the adjustment coefficient is 2.4
  • the target obtained after rounding up the product If the value is 3, then the animation update frequency corresponding to the frame number of the screen being 3 is used as the first animation update frequency of the first virtual model.
  • the first animation update frequency of the first virtual model determined at this time is updated every 3 frames animation (URO3).
  • the adjustment coefficient is the ratio of the resource consumption index to the resource consumption threshold as an example, and the process of adjusting the initial animation update frequency of the first virtual model based on the adjustment coefficient is introduced.
  • the embodiment of the present application is not limited thereto.
  • 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 adjusted first animation update frequency of the first virtual model is guaranteed Just below the initial animation update frequency.
  • the first animation update frequency of at least one virtual model can be obtained by referring to the manner of obtaining the first animation update frequency of the first virtual model, and then step 3 is performed.
  • the process of obtaining the first animation update frequency of at least one virtual model according to the above step 1 and step 2 can be regarded as the animation update frequency obtained according to an animation frequency reduction optimization technology with load balance (Load Balance URO).
  • Load Balance URO load balance
  • Step 3 Obtain a target animation update frequency of at least one virtual model based on the first animation update frequency.
  • 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 is the same.
  • the target animation update frequency of the first virtual model is obtained as Example to illustrate.
  • the first virtual model is any one of at least one virtual model.
  • 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 more efficient.
  • 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 satisfies the first model filtering condition, and the first animation of the first virtual model When the updating frequency is not higher than the updating frequency of the reference animation, the updating frequency of the reference animation is taken as the target animation updating frequency of the first virtual model.
  • the first virtual model satisfies 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 The first animation update frequency of the virtual model is used as the target animation update frequency of the first virtual model.
  • the first model screening condition is additionally considered, which is beneficial to improving the reliability of the obtained target animation update frequency of the first virtual model.
  • the first model filtering condition is used to filter the virtual model, and the first model filtering condition is set according to experience, or flexibly adjusted according to the application scenario, which is not limited in this embodiment of the present application.
  • the virtual models satisfying the first model screening condition refer to the virtual models that have a high demand for animation performance.
  • a virtual model satisfying the first model filtering condition refers to a virtual model whose initial animation update frequency is not lower than the reference animation update frequency. The higher the update frequency of the initial animation, the higher the importance of the virtual model can be considered.
  • the virtual model that meets the first model screening condition can be called a high-importance virtual model, and the virtual model that does not meet the first model screening condition The model is called a low importance virtual model.
  • the update frequency of the reference animation is set according to experience, or flexibly adjusted according to application scenarios, which is not limited in this embodiment of the present application.
  • the reference animation update frequency is denoted as URO5, assuming that the initial animation update frequency of a virtual model is denoted as URO2, since the animation update frequency represented by URO2 is higher than the animation update frequency represented by URO5, the virtual model satisfies the first model screening condition.
  • the threshold of the number of picture frames is set based on experience, or flexibly adjusted according to the application scenario, which is not limited in this embodiment of the present application. For example, the threshold of the number of picture frames is 5.
  • the virtual model satisfying the first model screening condition may also refer to a virtual model whose proportion is not less than the proportion threshold.
  • the proportion threshold is set according to experience, or flexibly adjusted according to application scenarios, which is not limited in this embodiment of the present application.
  • the reference animation update frequency is set as the target animation update frequency of the first virtual model. If the first virtual model satisfies the first model screening condition, and the first animation update frequency of the first virtual model 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 of the first virtual model update frequency. That is to say, when the first virtual model satisfies the first model filtering condition, the larger value of the first animation update frequency of the first virtual model and the reference animation update frequency is taken as the target animation update frequency of the first virtual model.
  • the first virtual model does not meet the first model screening condition, it means that the animation performance requirements of the first virtual model are small, and there is no need to limit the target animation update frequency of the first virtual model. Therefore, the first virtual model can be directly The first animation update frequency is used as the target animation update frequency of the first virtual model.
  • the additional consideration of the first model screening condition is to ensure the animation performance of the virtual model with high importance.
  • the first animation update frequency adjusted according to the adjustment coefficient that is, the animation update frequency obtained after load balancing frequency reduction optimization
  • the first animation update frequency corresponds to The number of frames of the picture becomes very large, which leads to excessive frequency reduction of the nearby virtual model. Therefore, for the virtual model with high importance, the target animation update frequency needs to be limited, so that the target animation update frequency of the virtual model with high importance is not high. Lower than reference animation update frequency.
  • the near virtual model refers to the virtual model that is relatively close to the virtual camera in the virtual environment, and the demand for animation performance of the near virtual model is usually greater.
  • the virtual camera refers to a camera used to capture images of the virtual environment. For a virtual model, the closer the distance between the virtual model and the virtual camera, the larger the size of the virtual model displayed in the virtual environment frame.
  • the screen frame number threshold is 5, then at least one virtual model whose screen frame number corresponding to the initial animation update frequency is less than or equal to 5 in at least one virtual model satisfies the first model screening condition, that is, all belong to high-importance virtual models.
  • the number of screen frames corresponding to the target animation update frequency of this part of the virtual model needs to be limited to no more than 5, that is, the minimum target animation update frequency is to update the animation every 5 frames, so as to ensure that the high-importance model updates the animation at most 5 frames .
  • step 203 at least one animation frame corresponding to the virtual model is displayed according to the target animation update frequency.
  • the target animation update frequency is determined based on the resource consumption index on the basis of the initial animation update frequency of at least one virtual model, which can effectively control the resource consumption globally, and display the animation frame corresponding to at least one virtual model according to the target animation update frequency
  • the effect is better, which is conducive to improving the display fluency of the animation frame, thereby improving the smoothness of the screen update.
  • the process of displaying the animation frame corresponding to at least one virtual model according to 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 in the same frame of the virtual environment picture.
  • the principle of displaying the animation frame corresponding to each virtual model is the same. Take the process of displaying the animation frame corresponding to the first virtual model according to the target animation update frequency of the first virtual model as an example. illustrate.
  • the first virtual model refers to any virtual model in at least one virtual model.
  • the implementation process of displaying the animation frame corresponding to the first virtual model is: directly according to the target animation update frequency of the first virtual model, displaying the first virtual model The corresponding animation frame.
  • the animation frame corresponding to the first virtual model refers to the animation frame of the first virtual model corresponding to the target animation update frequency. That is to say, there is no need to judge whether the first virtual model satisfies a certain condition, and the animation frame corresponding to the target animation update frequency of the first virtual model is directly displayed.
  • 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 and the count value of the first virtual model When it does not match, display 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, display the second animation frame of the first virtual model .
  • the first animation frame is the latest animation frame displayed in the animation of the first virtual model
  • the second animation frame is an animation frame located one position behind the first animation frame in the animation of the first virtual model.
  • the first animation frame and the second animation frame are two adjacent animation frames in the animation of the first virtual model, the first animation frame has been displayed, and the second animation frame has not been displayed yet.
  • the calculation logic of the first animation frame and the second animation frame is relatively complicated, and it takes a long time to determine the first animation frame and the second animation frame.
  • the terminal can calculate and cache the second animation frame, and then extract the second animation frame from the cache for display when the second animation frame needs to be displayed.
  • 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 unupdated frame number of the animation of the first virtual model.
  • the count value of the first virtual model is updated in the following manner: when an animation frame in the animation of the first virtual model is displayed for the first time, the count value of the first virtual model is 0, and every frame In the animation of the first avatar, the animation frame that is one bit behind the one animation frame is not displayed, and the count value of the first avatar is increased by 1.
  • the match between the target animation update frequency of the first virtual model and the count value of the first virtual model indicates that the second animation frame of the first virtual model needs to be displayed.
  • the match between the target animation update frequency of the first virtual model and the count value of the first virtual model means that the count value of the first virtual model is not less than the number of picture frames corresponding to the target animation update frequency of the first virtual model and 1 difference. For example, if the number of screen frames corresponding to the target animation update frequency of the first avatar is 5, and the count value of the first avatar is not less than 4, it is considered that the target animation update frequency of the first avatar is equal to the count value of the first avatar match.
  • the target animation update frame rate of the first virtual model matches the count value of the first virtual model, it means that the animation frame currently to be displayed is the second animation frame of the first virtual model, so the second animation frame of the first virtual model is displayed. animation frame.
  • the target animation update frequency of the first virtual model does not match the count value of the first virtual model, it means that the animation frame currently to be displayed is not the second animation frame of the first virtual model. In this case, the first virtual The model's first or target animation frame.
  • the target animation frame is determined based on the count value of the first animation frame, the second animation frame and the first virtual model. Before displaying the target animation frame, the target animation frame needs to be determined first.
  • the manner of determining the target animation frame includes: determining candidate interpolation smooth animation frames based on the first animation frame and the second animation frame; determining the interpolation smooth animation frame corresponding to the count value of the first virtual model in the candidate interpolation smooth animation frame An animation frame, using an interpolation smooth animation frame corresponding to the count value of the first virtual model as a target animation frame of the first virtual model.
  • the interpolated smooth animation frame may be determined according to the first animation frame and the second animation frame in the cache, so that the interpolated smooth animation frame is displayed after the first animation frame is displayed and before the second animation frame is displayed, so as to achieve a value close to The animation effect updated every frame is close to the animation effect without frequency reduction.
  • the number of candidate interpolation smooth animation frames may be one or more. When the number of candidate interpolation smooth animation frames is one, the one candidate interpolation smooth animation frame is directly used as the interpolation smooth animation frame corresponding to the count value of the first virtual model.
  • the target animation frame of the first virtual model is an interpolation smooth animation frame corresponding to the count value of the first virtual model among the multiple candidate interpolation smooth animation frames.
  • the terminal stores the corresponding relationship between the candidate interpolated smooth animation frame and the count value, and then the interpolated smooth animation frame corresponding to the count value of the first virtual model can be determined among the candidate interpolated smooth animation frames according to the corresponding relationship.
  • the number of candidate interpolation smooth animation frames determined is the same as the number of count values that do not match the target animation update frequency of the first virtual model, and each candidate The interpolated smooth animation frame corresponds to a count value that does not match the target animation update frequency of the first avatar.
  • the number of count values that do not match the target animation update frequency of the first virtual model is the difference between the frame number corresponding to the target animation update frequency of the first virtual model and 1. For example, if the frame number corresponding to the target animation update frequency of the first virtual model is 5, the number of count values that do not match the target animation update frequency of the first virtual model is 4, and 4 candidate interpolation smooth animations can be determined frame.
  • the candidate interpolation smooth animation frame can be calculated by the difference between the first animation frame and the second animation frame. Compared with the time consumption of calculating the first animation frame and the second animation frame, the time for calculating the candidate interpolation smooth animation frame Less consumption.
  • An interpolation smooth animation frame corresponding to the count value of the first virtual model is queried from each candidate interpolation smooth animation, and the interpolation smooth animation frame is the target animation frame.
  • the embodiment of the present application does not limit the implementation manner of 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 does not match the count value of the first virtual model.
  • 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.
  • the target animation frame is displayed.
  • the target animation update frequency of the first virtual model when the first virtual model does not match the count value of the first virtual model, when the first virtual model does not satisfy the second model filtering condition, the first animation of the first virtual model is displayed.
  • Animation frame when the first virtual model satisfies the second model filtering condition, display the target animation frame of the first virtual model.
  • the second model filtering condition is used to filter the virtual model, and the second model filtering condition is set according to experience, or flexibly adjusted according to the application scenario, which is not limited in this embodiment of the present application.
  • the second model filter condition can be the same as the first model filter condition, or can be different from the first model filter condition.
  • the virtual models satisfying the second model filtering condition are virtual models that need to display the target animation frame when the target animation update frequency does not match the count value.
  • the second model filtering condition is the same as the first model filtering condition, that is, the avatars satisfying the second model filtering condition refer to avatars that have greater animation performance requirements.
  • the target animation frame of the first virtual model is displayed, so as to alleviate the adverse effect of frequency reduction on animation performance to a large extent. That is to say, for high-importance virtual models, turn on animation interpolation smoothing, and high-importance virtual models will use the cached first animation frame and second animation frame for interpolation performance in the screen that skips the update, to achieve close to For animation effects without frequency reduction.
  • the animation performance of the first virtual model is less concerned, and the first animation frame can be displayed directly.
  • the implementation process of displaying the animation frame corresponding to the first virtual model is: when the first virtual model is not associated with other virtual models, directly according to the first The target animation update frequency of the virtual model, displaying the animation frame corresponding to the first virtual model; 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 of the second virtual model frequency, to obtain the adjusted animation update frequency of the first 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.
  • the second virtual model may refer to one of the at least one virtual model, or may be a virtual model other than the at least one virtual model, which is not limited in this embodiment of the present application.
  • the animation update frequency of the second virtual model refers to the current latest animation update frequency of the second virtual model.
  • the terminal records the relationship between the virtual models. According to the relationship, it can be judged whether the first virtual model is related to other virtual models. If the first virtual model is related to the second virtual model, the target animation of the first virtual model is updated. The frequency is adjusted to the animation update frequency of the second virtual model.
  • the first virtual model being associated with the second virtual model may also be referred to as the first virtual model being dependent on the second virtual model.
  • after adjusting the target animation update frequency of the first virtual model to the animation update frequency of the second virtual model it further includes: adjusting the count value of the first virtual model to the count value of the second virtual model value to synchronize animation updates for the first avatar with animation updates for the second avatar.
  • the animation update of the first virtual model is synchronized with the animation update of the second virtual model to ensure the correctness of the animation performance.
  • Different virtual models may have different animation update frequencies after optimization, but the animation performance of the related virtual models is required to be consistent.
  • the animation performance of the virtual object and the virtual props equipped with the virtual object is required to be consistent . If the animation update frequency of the related avatars is different, it may cause incorrect performance.
  • the first virtual model may be called a child model, and the second virtual model may be called a parent model.
  • the implementation details of down-frequency synchronization are: the update frequency of the parent-child model is kept synchronized, and the child model adopts the update frequency of the parent model; the count values of the parent-child model are aligned.
  • the alignment of the update start frames of the parent and child models can be achieved.
  • the update start frame is a screen on which the latest animation frame that has already been displayed is displayed for the first time.
  • the animation update frequency and update start frame of the parent model and the child model have four situations: the animation update frequency and update start frame of the parent model and the child model are inconsistent; the animation update frequency of the parent model and the child model are consistent, and the update start frame The start frame is inconsistent; the animation update frequency of the parent model and the child model are inconsistent, and the update start frame is consistent; the animation update frequency and update start frame of the parent model and the child model are consistent.
  • FIG. 3 shows animation update synchronization situations in the above four situations.
  • a frame whose animation is updated is called an update frame
  • a frame whose animation is not updated is called a skip frame.
  • the animation update frequency and update start frame of the parent model and the child model are inconsistent; or, the animation update frequency of the parent model and the child model are consistent, and the update start frame is inconsistent; or, the animation update frequency of the parent model and the child model Inconsistency and the same update start frame are not enough to fully synchronize the animation updates of the parent model and the child model. Therefore, by adjusting the animation update frequency of the child model to the animation update frequency of the parent model, and adjusting the count value of the child model to the count value of the parent model, the animation update synchronization effect is achieved.
  • FIG. 4 shows the screen display effect when the animation update frequency and the update start frame of the parent model and the child model are inconsistent.
  • the parent model is a virtual object 410
  • the child model is a virtual prop 420 .
  • the animation update frequency of the virtual object 410 is URO4
  • the animation update frequency of the virtual prop 420 is URO7
  • the update start frame of the virtual object 410 is inconsistent with the update start frame of the virtual prop 420 .
  • the virtual prop 420 is out of the hand of the virtual object 410 , indicating that the animation updates of the virtual object 410 and the virtual prop 420 are not synchronized.
  • Fig. 5 shows the screen display effect when the animation update frequency of the parent model and the child model are consistent, but the update start frame is inconsistent.
  • the parent model is a virtual object 510
  • the child model is a virtual prop 520 .
  • the animation update frequency of the virtual object 510 and the animation update frequency of the virtual prop 520 are both URO4, and the update start frame of the virtual object 510 is inconsistent with the update start frame of the virtual prop 520 .
  • the virtual prop 520 is out of the hand of the virtual object 510 , indicating that the animation update of the virtual object 510 and the virtual prop 520 are not synchronized.
  • Figure 6 shows the screen display effect when the animation update frequency and update start frame of the parent model and the child model are consistent.
  • the parent model is a virtual object 610
  • the child model is a virtual prop 620 .
  • the animation update frequency of the virtual object 610 and the animation update frequency of the virtual prop 620 are both URO4, and the update start frame of the virtual object 610 is consistent with the update start frame of the virtual prop 620 .
  • the virtual prop 620 is not out of the hand of the virtual object 610 , and the picture appears normal, which shows that the animation updates of the virtual object 610 and the virtual prop 620 are synchronized.
  • the animation frame corresponding to the first virtual model is displayed according to the adjusted animation update frequency of the first virtual model.
  • the realization principle of displaying the animation frame corresponding to the first virtual model according to the adjusted animation update frequency of the first virtual model and the realization principle of displaying the animation frame corresponding to the first virtual model directly according to the target animation update frequency of the first virtual model will not be repeated here.
  • the above-mentioned steps 201 to 203 may be performed each time it is necessary to display at least one animation frame of the virtual model.
  • the above steps 201 to 203 are executed when the virtual model satisfies the reference condition, which can reduce the amount of calculation.
  • the embodiment of the present application does not limit the display manner of the animation frame when the virtual model does not satisfy the reference condition.
  • the display of the animation frame is realized by using the method in the related art.
  • the method in the related art is: use the animation update frequency corresponding to the proportion of at least one virtual model as the initial animation update frequency of at least one virtual model, and display at least one virtual model according to the initial animation update frequency of at least one virtual model The animation frame corresponding to the model.
  • the proportion value may also be referred to as the screen proportion, and the manner in the related art is based on the display manner of the animation frame realized by the URO optimization scheme that comes with the UE4 engine.
  • the UE4 engine comes with a URO optimization solution, which calculates the screen-to-body ratio of each virtual model. The smaller the screen-to-body ratio, the lower the animation update frequency.
  • a small screen-to-body ratio means that the virtual model is far away from the virtual camera.
  • the animation update frequency of the virtual model far from the camera can effectively reduce the resource consumption of the animation update of the virtual model.
  • the corresponding relationship between the screen ratio and the frame number of the screen may be preset, and the larger the frame number of the screen, the lower the animation update frequency.
  • the picture frame number can also be represented by URO level.
  • the reference conditions are used to constrain the conditions for realizing the display of animation frames according to the manners of steps 201 to 203 .
  • the reference condition is set according to experience, or flexibly adjusted according to the application scenario, which is not limited in this embodiment of the present application.
  • the reference condition is used to constrain the condition of at least one virtual model.
  • the reference condition is used to constrain the situation that all virtual models of animation frames need to be displayed on the same screen.
  • the fact that the virtual models meet the reference condition may mean that the number of all virtual models that need to display animation frames on the same screen is greater than the first number threshold.
  • the fact that the avatar meets the reference condition may mean that the number of avatars whose proportion is greater than the proportion threshold among all the avatars that need to display animation frames on the same screen is greater than the second quantity threshold.
  • the fact that the virtual models meet the reference condition may mean that the number of all virtual models that need to display animation frames on the same screen is greater than the first number threshold, and the number of virtual models with a proportion greater than the proportion threshold among all virtual models is greater than the first number threshold.
  • Two quantity thresholds Two quantity thresholds.
  • the first number threshold is not less than the second number threshold, and the first number threshold and the second number threshold are set according to experience, or flexibly adjusted according to application scenarios, which are not limited in this embodiment of the present application.
  • the display mode of animation frames in the related art is used to continue to maintain the URO optimization feature. Perform frequency reduction optimization. For virtual models with a small proportion, update animations at a lower frequency to reduce time consumption caused by animation updates. Exemplarily, a virtual model with a smaller ratio can be regarded as a virtual model that is farther away from the virtual camera. Because such a virtual model is located far away, interactive objects may not be seen clearly, so the animation update frequency can be reduced.
  • the animation update frequencies for displaying the animation frames of each virtual model are URO1 , URO2 , and URO3 , respectively, in order from the closest to the farthest from the virtual camera.
  • the virtual model that is closer to the virtual camera will still update the animation with a higher animation update frequency, for example, from the distance
  • the order of the virtual camera from near to far, the animation update frequency based on which the animation frames of each virtual model are displayed are URO1, URO2 and URO3 respectively, which will put a lot of pressure on the global animation update, resulting in virtual models that are closer to the virtual camera
  • the resource consumption is high, which may cause the terminal to heat up, and may also affect the FPS, the display fluency of animation frames, and the smoothness of application running.
  • the performance of this kind of scene can be effectively improved by using the display mode of the animation frame provided by the embodiment of the present application.
  • the display mode of the animation frame provided by the embodiment of the present application will globally count the resource consumption index of the virtual model for each frame, and if it exceeds the allocated resource consumption threshold, the animation update frequency of each virtual model will be further reduced, and at the same time, the first model selection condition will be satisfied.
  • the virtual model is optimized for animation interpolation smoothing to avoid detailed animation performance problems due to frequency reduction. Through this optimization method, from near to far from the virtual camera, the animation update frequency based on which the animation frames of each virtual model are displayed is optimized to URO2, URO4 and URO6, which can effectively control the animation of multiple virtual models displayed on the same screen The time consumption of frames.
  • the screen display effect in the animation frame display mode in the related art is shown in FIG. 9
  • the screen display effect in the animation frame display mode in the embodiment of the present application is shown in FIG. 10 .
  • the number of virtual models also referred to as close-range virtual models
  • the initial animation update frequency of the 20 virtual models is URO1, that is, the The 20 virtual models keep updating the animation once per frame. In this case, it takes about 20ms (milliseconds) for the application to update each frame, and the FPS is 50.
  • the animation update frequency of the 20 virtual models is URO20, because the 20 virtual models all meet The first model screening condition (that is, all belong to high-importance models), the animation update frequency of the high-importance model is not allowed to be lower than URO5, then using the method provided in the embodiment of this application, the target animation update frequency of the 20 virtual models Both are URO5, that is, the animation is updated every 5 frames.
  • the update time of each frame of the application is about 15.6ms, and the FPS is increased to 64. Compared with related technologies, the update time of each frame is reduced by 4.4ms, and the FPS is increased by 16. According to FIG. 9 and FIG. 10 , it can be seen that different animation frame display modes have different screen display effects.
  • the display process of the animation frame is shown in Figure 11.
  • set the resource consumption threshold corresponding to the target category An animation frame matching the Nth frame of a virtual model, the at least one virtual model is a virtual model of the target category; according to the display result of the Nth frame, calculate the proportion of at least one virtual model, and at least one virtual model
  • the animation update frequency corresponding to the proportion value of is used as the initial animation update frequency of at least one virtual model.
  • the resource consumption index is obtained, and it is judged whether the resource consumption index is greater than the resource consumption threshold.
  • the animation frame corresponding to at least one virtual model refers to at least one virtual model with the first ( N+1) The animation frame that the frame picture matches.
  • 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 the adjustment coefficient to obtain the first animation update frequency of at least one virtual model.
  • a target animation update frequency of the at least one virtual model is acquired to ensure performance. Synchronize animation update frequency and count value between associated models to ensure performance.
  • the animation frame corresponding to at least one virtual model is displayed, and the animation frame corresponding to the at least one virtual model refers to the animation frame matching the (N+1)th frame picture of at least one virtual model .
  • the animation frames of other categories of virtual models can be realized by referring to the process provided by the embodiment of the present application, so as to ensure the display effect of the animation frames of all the virtual models that need to display the animation frames on the same screen.
  • Animation interpolation smooth conditions and other key parameters can effectively control the resources consumed by animation updates in multi-person scenes, effectively reduce the time consumption of animation frames of multiple virtual models displayed on the same screen, and achieve performance Balance with performance, improve FPS, and improve the experience of the application program, for example, if the application program is a game application program, the game experience can be improved.
  • the animation frame corresponding to at least one virtual model is displayed according to the target animation update frequency of at least one virtual model, wherein the target animation update frequency of at least one virtual model is at least one virtual model
  • the model's initial animation update frequency is determined based on resource consumption metrics. According to the target animation update frequency of at least one virtual model, resource consumption can be effectively and globally controlled, which is beneficial to improving the display fluency of animation frames, and further improving the human-computer interaction rate.
  • the resource consumption index is compared with the resource consumption threshold, and when the resource consumption index is greater than the resource consumption threshold, the adjustment coefficient is determined according to the two, and the animation is reduced according to the adjustment coefficient Update frequency, thereby reducing the amount of resources consumed by animation updates, achieving the purpose of reducing the time consumption of global animation updates, thereby increasing FPS.
  • the target animation update frequency of the high-importance virtual model is limited by considering the first model screening condition, so that the target animation update frequency of the high-importance virtual model is not lower than the reference animation update frequency, ensuring high importance The animation performance of the virtual model.
  • the target animation update frequency of the virtual model is compared with the count value of the virtual model.
  • the target animation frame determined based on the first animation frame, the second animation frame and the count value of the virtual model can be displayed, and the target animation frame is an interpolation smoothing between the first animation frame and the second animation frame.
  • the animation frame shows that the target animation frame can achieve an animation effect close to updating every frame, that is, close to an animation effect without frequency reduction, and improve the display effect of the animation frame.
  • the virtual model is associated with other virtual models, and if the virtual model is associated with other virtual models, then by adjusting the target animation update frequency of the virtual model to the animation update frequency of other virtual models and adjusting the count value of the virtual model to other
  • the counter value of the virtual model is used to realize down-frequency synchronization, that is, the animation update of the virtual model is synchronized with the animation update of the associated virtual model to ensure that the animation performance is correct.
  • an embodiment of the present application provides a display device for animation frames, which includes:
  • the first obtaining unit 1201 is configured to obtain a resource consumption index based on the initial animation update frequency of at least one virtual model, and the resource consumption index is used to indicate the amount of resources that need to be consumed for animation update according to the initial animation update frequency of at least one virtual model;
  • the second acquiring unit 1202 is configured to acquire the target animation update frequency of at least one virtual model based on the resource consumption index and the initial animation update frequency;
  • the display unit 1203 is configured to display at least one animation frame corresponding to the virtual model according to the target animation update frequency.
  • the second acquiring unit 1202 is configured 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, A first animation update frequency of the at least one virtual model is obtained; based on the first animation update frequency, a target animation update frequency of the at least one virtual model is obtained.
  • the second obtaining unit 1202 is configured to refer to
  • the animation update frequency is used as the target animation update frequency of the first virtual model, and the first virtual model is any one of the at least one virtual model.
  • the second obtaining unit 1202 is configured to: when the first virtual model satisfies 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 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, and the first virtual model is any virtual model in at least one virtual model .
  • the adjustment coefficient is the ratio of the resource consumption index to the resource consumption threshold;
  • the second acquisition unit 1202 is used to calculate the product of the number of picture frames corresponding to the update frequency of the initial animation of the first virtual model and the adjustment coefficient, The product is rounded to obtain the target value, and the first virtual model is any virtual model in at least one virtual model; the animation update frequency with the corresponding frame number as the target value is used as the first animation update frequency of the first virtual model .
  • the second acquiring unit 1202 is configured to use 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.
  • the display unit 1203 is configured to display 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 does not match the count value of the first virtual model , the first virtual model is any virtual model in at least one virtual model; wherein, the first animation frame is the latest animation frame displayed in the animation of the first virtual model, and the target animation frame is based on the first animation frame, the second The animation frame is determined by the count value of the first virtual model, and the second animation frame is an animation frame that is one bit behind the first animation frame in the animation of the first virtual model.
  • the display unit 1203 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 condition; when the first virtual model meets the second model filtering condition , display the target animation frame of the first virtual model.
  • the display unit 1203 is further configured to determine candidate interpolation smooth animation frames based on the first animation frame and the second animation frame;
  • the interpolated smooth animation frame, the interpolated smooth animation frame corresponding to the count value of the first virtual model is used as the target animation frame of the first virtual model.
  • the display unit 1203 is configured to display the 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, and the first virtual model It is any virtual model in at least one virtual model; wherein, the second animation frame is an animation frame located one bit behind the first animation frame in the animation of the first virtual model, and the first animation frame is in the animation of the first virtual model The latest animation frame that was displayed.
  • the display unit 1203 is configured to adjust the target animation update frequency of the first virtual model to the animation update frequency of the second virtual model when the first virtual model is associated with the second virtual model, to obtain the second An adjusted animation update frequency of the virtual model, where the first virtual model is any one of the at least one virtual model; according to the adjusted animation update frequency of the first virtual model, an animation frame corresponding to the first virtual model is displayed.
  • 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 the same as the animation update of the second virtual model Synchronize.
  • the first obtaining unit 1201 is configured to obtain the resource consumption sub-indicator of at least one virtual model, and the resource consumption sub-index of any virtual model is positively correlated with the initial animation update frequency of any virtual model;
  • the resource consumption sub-indices of at least one virtual model are aggregated to obtain the resource consumption indicators.
  • the first acquisition unit 1201 is configured to determine the number of picture frames corresponding to the initial animation update frequency of the first virtual model, where the first virtual model is any virtual model in at least one virtual model; A positive number with a negative correlation between the number of picture frames is used as a resource consumption sub-indicator of the first virtual model.
  • the first acquiring unit 1201 is further configured to determine the proportion of the first virtual model, where the first virtual model is any one of at least one virtual model, and the proportion 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 ratio of the first virtual model is used as the initial animation update frequency of the first virtual model.
  • the resource consumption threshold is a resource consumption threshold corresponding to the target category
  • at least one virtual model is a virtual model of the target category.
  • the first acquiring unit 1201 is configured to acquire the resource consumption index based on the initial animation update frequency of at least one virtual model when the condition of the virtual model satisfies the reference condition; wherein, the condition of the virtual model meets the reference condition
  • the conditions include any of the following: the number of all virtual models that need to display animation frames on the same screen is greater than the first number threshold; the number of virtual models that need to display animation frames on the same screen with a proportion greater than the proportion threshold is greater than the second Quantity threshold; the number of all virtual models that need to display animation frames on the same screen is greater than the first quantity threshold, and the number of virtual models with a proportion greater than the proportion threshold of all virtual models is greater than the second quantity threshold; the proportion of any virtual model is the ratio of the rendered size of any virtual model to the reference size.
  • the animation frame corresponding to at least one virtual model is displayed according to the target animation update frequency of at least one virtual model, wherein the target animation update frequency of at least one virtual model is at least one virtual model
  • the model's initial animation update frequency is determined based on resource consumption metrics. According to the target animation update frequency of at least one virtual model, resource consumption can be effectively and globally controlled, which is beneficial to improving the display fluency of animation frames, and further improving the human-computer interaction rate.
  • the resource consumption index is compared with the resource consumption threshold, and when the resource consumption index is greater than the resource consumption threshold, the adjustment coefficient is determined according to the two, and the animation is reduced according to the adjustment coefficient Update frequency, thereby reducing the amount of resources consumed by animation updates, achieving the purpose of reducing the time consumption of global animation updates, thereby increasing FPS.
  • the target animation update frequency of the high-importance virtual model is limited by considering the first model screening condition, so that the target animation update frequency of the high-importance virtual model is not lower than the reference animation update frequency, ensuring high importance The animation performance of the virtual model.
  • the target animation update frequency of the virtual model is compared with the count value of the virtual model.
  • the target animation frame determined based on the first animation frame, the second animation frame and the count value of the virtual model can be displayed, and the target animation frame is an interpolation smoothing between the first animation frame and the second animation frame.
  • the animation frame shows that the target animation frame can achieve an animation effect close to updating every frame, that is, close to an animation effect without frequency reduction, and improve the display effect of the animation frame.
  • the virtual model is associated with other virtual models, and if the virtual model is associated with other virtual models, then by adjusting the target animation update frequency of the virtual model to the animation update frequency of other virtual models and adjusting the count value of the virtual model to other
  • the counter value of the virtual model is used to realize down-frequency synchronization, that is, the animation update of the virtual model is synchronized with the animation update of the associated virtual model to ensure that the animation performance is correct.
  • the device provided by the above-mentioned embodiments implements its functions, it only uses the division of the above-mentioned functional units as an example. In practical applications, the above-mentioned function allocation can be completed by different functional units according to needs. The internal structure of the device is divided into different functional units to complete all or part of the functions described above. In addition, the device and the method embodiment provided by the above embodiment belong to the same idea, and the specific implementation process thereof is detailed in the method embodiment, and will not be repeated here.
  • FIG. 13 is a schematic structural diagram of a computer device provided by an embodiment of the present application.
  • the computer device can be a terminal, and the terminal can be: PC, mobile phone, smart phone, PDA, wearable device, handheld portable game device, PPC, tablet computer, smart car machine, smart TV, smart speaker, and vehicle-mounted terminal.
  • a terminal may also be called user equipment, portable terminal, laptop terminal, desktop terminal, etc. by other names.
  • a terminal includes: a processor 1301 and a memory 1302 .
  • the processor 1301 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. Processor 1301 can adopt at least one hardware form in DSP (Digital Signal Processing, digital signal processing), FPGA (Field-Programmable Gate Array, field programmable gate array), PLA (Programmable Logic Array, programmable logic array) accomplish.
  • the processor 1301 may also include a main processor and a coprocessor.
  • the main processor is a processor for processing data in the wake-up state, also called a CPU; the coprocessor is used for processing data in the standby state.
  • a low-power processor for processing is a processor for processing data in the wake-up state, also called a CPU; the coprocessor is used for processing data in the standby state.
  • the processor 1301 may be integrated with a GPU (Graphics Processing Unit, image processor), and the GPU is used for rendering and drawing the content that needs to be displayed on the display screen.
  • the processor 1301 may also include an AI (Artificial Intelligence, artificial intelligence) processor, where the AI processor is used to process computing operations related to machine learning.
  • AI Artificial Intelligence, artificial intelligence
  • 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 magnetic disk storage devices and flash memory storage devices.
  • the non-transitory computer-readable storage medium in the memory 1302 is used to store at least one instruction, and the at least one instruction is used to be executed by the processor 1301, so that the terminal implements the method embodiment in this application A display method for the provided animation frames.
  • the terminal may optionally further include: a display screen 1305 .
  • the display screen 1305 is used to display a UI (User Interface, user interface).
  • the UI can include graphics, text, icons, video, and any combination thereof.
  • the display screen 1305 also has the ability to collect touch signals on or above the surface of the display screen 1305 .
  • the touch signal can be input to the processor 1301 as a control signal for processing.
  • the display screen 1305 can also be used to provide virtual buttons and/or virtual keyboards, also called soft buttons and/or soft keyboards.
  • the display screen 1305 may be a flexible display screen, which is disposed on a curved surface or a folded surface of the terminal. Even, the display screen 1305 can also be set as a non-rectangular irregular figure, that is, a special-shaped screen.
  • the display screen 1305 can be made of LCD (Liquid Crystal Display, liquid crystal display), OLED (Organic Light-Emitting Diode, organic light-emitting diode) and other materials.
  • the animation frame corresponding to at least one virtual model is displayed through the display screen 1305 .
  • FIG. 13 does not limit the terminal, and may include more or less components than shown in the figure, or combine certain components, or adopt different component arrangements.
  • a non-volatile computer-readable storage medium is also provided, and at least one computer program is stored in the non-volatile computer-readable storage medium, and the at least one computer program is processed by a computer device The device is loaded and executed, so that the computer can realize any one of the above animation frame display methods.
  • the above-mentioned non-volatile computer-readable storage medium may be a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a read-only optical disc (Compact Disc Read-Only Memory, CD-ROM), magnetic tape, floppy disk and optical data storage devices, etc.
  • a computer program product includes a computer program or a computer instruction, and the computer program or computer instruction is loaded and executed by a processor, so that the computer realizes any one of the above-mentioned animation frame display method.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Processing Or Creating Images (AREA)

Abstract

动画帧的显示方法、装置、设备及存储介质,属于计算机技术领域。该方法包括:基于至少一个虚拟模型的初始动画更新频率,获取资源消耗指标,资源消耗指标用于指示根据至少一个虚拟模型的初始动画更新频率进行动画更新需要消耗的资源量(201);基于资源消耗指标以及初始动画更新频率,获取至少一个虚拟模型的目标动画更新频率(202);根据目标动画更新频率,显示至少一个虚拟模型对应的动画帧(203)。采用上述方法、装置、设备及存储介质,能够对资源消耗进行有效地全局控制,有利于提高动画帧的显示流畅性,提高人机交互率。

Description

动画帧的显示方法、装置、设备及存储介质
本申请要求于2022年01月05日提交的申请号为202210006550.9、发明名称为“动画帧的显示方法、装置、设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请实施例涉及计算机技术领域,特别涉及一种动画帧的显示方法、装置、设备及存储介质。
背景技术
随着计算机技术的发展,能够提供虚拟环境的应用程序越来越多,虚拟环境中包括至少一个虚拟模型,终端在显示虚拟环境的画面时,会在画面中显示该至少一个虚拟模型的动画帧,以供交互对象查看。
相关技术中,直接根据虚拟模型的初始动画更新频率显示虚拟模型对应的动画帧。其中,虚拟模型的初始动画更新频率基于虚拟模型的渲染尺寸与参考尺寸的比值确定。
发明内容
本申请实施例提供了一种动画帧的显示方法、装置、设备及存储介质,可用于提高动画帧的显示流畅性。所述技术方案如下:
一方面,本申请实施例提供了一种动画帧的显示方法,所述方法包括:
基于至少一个虚拟模型的初始动画更新频率,获取资源消耗指标,所述资源消耗指标用于指示根据所述至少一个虚拟模型的初始动画更新频率进行动画更新需要消耗的资源量;
基于所述资源消耗指标以及所述初始动画更新频率,获取所述至少一个虚拟模型的目标动画更新频率;
根据所述目标动画更新频率,显示所述至少一个虚拟模型对应的动画帧。
另一方面,提供了一种动画帧的显示装置,所述装置包括:
第一获取单元,用于基于至少一个虚拟模型的初始动画更新频率,获取资源消耗指标,所述资源消耗指标用于指示根据所述至少一个虚拟模型的初始动画更新频率进行动画更新需要消耗的资源量;
第二获取单元,用于基于所述资源消耗指标以及所述初始动画更新频率,获取所述至少一个虚拟模型的目标动画更新频率;
显示单元,用于根据所述目标动画更新频率,显示所述至少一个虚拟模型对应的动画帧。
另一方面,提供了一种计算机设备,所述计算机设备包括处理器和存储器,所述存储器中存储有至少一条计算机程序,所述至少一条计算机程序由所述处理器加载并执行,以使所述计算机设备实现上述任一所述的动画帧的显示方法。
另一方面,还提供了一种非易失性计算机可读存储介质,所述非易失性计算机可读存储介质中存储有至少一条计算机程序,所述至少一条计算机程序由处理器加载并执行,以使计算机实现上述任一所述的动画帧的显示方法。
另一方面,还提供了一种计算机程序产品,所述计算机程序产品包括计算机程序或计算 机指令,所述计算机程序或所述计算机指令由处理器加载并执行,以使计算机实现上述任一所述的动画帧的显示方法。
本申请实施例提供的技术方案,至少一个虚拟模型对应的动画帧是根据至少一个虚拟模型的目标动画更新频率显示的,其中,至少一个虚拟模型的目标动画更新频率是在至少一个虚拟模型的初始动画更新频率的基础上考虑资源消耗指标确定的。根据至少一个虚拟模型的目标动画更新频率能够对资源消耗进行有效地全局控制,有利于提高动画帧的显示流畅性,进而提高人机交互率。
附图说明
图1是本申请实施例提供的一种动画帧的显示方法的实施环境的示意图;
图2是本申请实施例提供的一种动画帧的显示方法的流程图;
图3是本申请实施例提供的一种动画更新同步情况的示意图;
图4是本申请实施例提供的一种画面显示效果的示意图;
图5是本申请实施例提供的一种画面显示效果的示意图;
图6是本申请实施例提供的一种画面显示效果的示意图;
图7是本申请实施例提供的一种虚拟模型的分布情况的示意图;
图8是本申请实施例提供的一种虚拟模型的分布情况的示意图;
图9是本申请实施例提供的一种画面显示效果的示意图;
图10是本申请实施例提供的一种画面显示效果的示意图;
图11是本申请实施例提供的一种动画帧的显示过程的示意图;
图12是本申请实施例提供的一种动画帧的显示装置的示意图;
图13是本申请实施例提供的一种计算机设备的结构示意图。
具体实施方式
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。
对本申请实施例中涉及的名词进行介绍:
虚拟环境:应用程序在终端上运行时提供(或显示)的环境,该虚拟环境是指营造出的供虚拟对象进行活动的环境。虚拟环境可以是二维虚拟环境、2.5维虚拟环境或三维虚拟环境。该虚拟环境可以是对真实世界的仿真环境,也可以是半仿真半虚构的环境,还可以是纯虚构的环境。
虚拟对象:是指虚拟环境中的可活动对象。该虚拟对象可以是虚拟人物、虚拟动物、动漫人物等。交互对象可通过外设部件或点击触摸显示屏的方式操控虚拟对象。每个虚拟对象在虚拟环境中具有自身的形状和体积,占据虚拟环境中的一部分空间。示例性地,当虚拟环境为三维虚拟环境时,虚拟对象是基于动画骨骼技术创建的三维立体模型。
虚拟模型:是指虚拟环境中的由骨骼构成的模型。虚拟模型包括但不限于虚拟对象、虚拟道具、虚拟宠物等。终端通过显示虚拟模型的动画来呈现虚拟模型,虚拟模型的动画由多个动画帧构成。虚拟模型的动画中的每个动画帧均根据骨骼之间的关联进行较为复杂的逻辑计算得到,需要消耗的资源(如,CPU(Central Processing Unit,中央处理器)资源)较多。通过控制虚拟模型的动画更新频率,能够控制需要通过逻辑计算得到的动画帧的数量,从而控制资源消耗。
FPS(Frames Per Second,画面每秒更新帧数):简称帧率,帧率越高,画面体验越流畅。
URO(Update Rate Optimizations,动画更新频率优化):是UE4(Unreal Engine 4,虚幻引擎4)的一种虚拟模型的动画降频优化技术。一些实施例中,URO可以用来描述动画更新频率,如,URO1表示每帧画面更新一次动画,URO2表示每两帧画面更新一次动画,依次类 推。
资源消耗:虚拟模型的动画更新消耗的资源,例如,消耗的资源是指占用的CPU耗时,资源消耗越高,每帧画面更新所需的CPU耗时越长。
相关技术中,直接根据虚拟模型的初始动画更新频率显示虚拟模型对应的动画帧。其中,虚拟模型的初始动画更新频率基于虚拟模型的渲染尺寸与参考尺寸的比值确定。基于虚拟模型的初始动画更新频率显示动画帧的方式考虑的信息较局限,容易降低动画帧的显示流畅性,导致人机交互率较低。
图1示出了本申请实施例提供的动画帧的显示方法的实施环境的示意图。该实施环境包括:终端11和服务器12。
终端11安装和运行有支持虚拟环境的应用程序。交互对象能够使用终端11控制虚拟对象在应用程序提供的虚拟环境中进行活动,该活动包括但不限于:调整身体姿态、爬行、步行、奔跑、骑行、跳跃、驾驶、拾取、射击、攻击、投掷、改变位置等。在一些实施例中,终端11还被称为电子设备。
本申请实施例对支持虚拟环境的应用程序不加以限定,示例性地,支持虚拟环境的应用程序包括但不限于:VR(Virtual Reality,虚拟现实)类应用程序、AR(Augmented Reality,增强现实)类应用程序、三维地图程序、游戏类应用程序、社交类应用程序、互动娱乐类应用程序等。
示例性地,游戏类应用程序包括但不限于射击游戏、MOBA(Multiplayer Online Battle Arena,多人在线战术竞技)游戏、SLG(Simulation Game,策略游戏)等。射击游戏是指包含FPS(First-Person Shooting,第一人称射击)游戏、TPS(Third-Personal Shooting,第三人称射击)游戏但不仅限于此的所有使用道具进行远程攻击的游戏。
在一些实施例中,支持虚拟环境的应用程序可以支持Windows操作系统、苹果操作系统、安卓操作系统、IOS操作系统和Linux操作系统中的至少一种操作系统,运行在不同操作系统中的应用程序可以互联互通。在一些实施例中,支持虚拟环境的应用程序是基于三维引擎开发的应用程序。在一些实施例中,支持虚拟环境的应用程序是单机版的应用程序,或者是网络联机版的应用程序。
服务器12用于为终端11安装的支持虚拟环境的应用程序提供后台服务。在一种可能实现方式中,服务器12承担主要计算工作,终端11承担次要计算工作;或者,服务器12承担次要计算工作,终端11承担主要计算工作;或者,服务器12和终端11二者之间采用分布式计算架构进行协同计算。
在一种可能实现方式中,终端11是任何一种可与交互对象通过键盘、触摸板、触摸屏、遥控器、语音交互或手写设备等一种或多种方式进行人机交互的电子产品,例如,PC(Personal Computer,个人计算机)、手机、智能手机、PDA(Personal Digital Assistant,个人数字助手)、可穿戴设备、手持便携式游戏设备、PPC(Pocket PC,掌上电脑)、平板电脑、智能车机、智能电视、智能音箱、车载终端等。服务器12可以是一台服务器,也可以是由多台服务器组成的服务器集群,或者是一个云计算服务中心。终端11与服务器12通过有线或无线网络建立通信连接。
本领域技术人员应能理解上述终端11和服务器12仅为举例,其他现有的或今后可能出现的终端或服务器如可适用于本申请,也应包含在本申请保护范围以内,并在此以引用方式包含于此。
本申请实施例提供一种动画帧的显示方法,该方法可应用于图1所示的实施环境。以该方法应用于终端11为例。如图2所示,本申请实施例提供的动画帧的显示方法包括如下步骤201至步骤203。
在步骤201中,基于至少一个虚拟模型的初始动画更新频率,获取资源消耗指标,资源 消耗指标用于指示根据至少一个虚拟模型的初始动画更新频率进行动画更新需要消耗的资源量。
至少一个虚拟模型是指处于虚拟环境中的需要通过考虑资源消耗指标来显示动画帧的虚拟模型。本申请实施例对至少一个虚拟模型的数量不加以限定。示例性地,至少一个虚拟模型均为目标类别的虚拟模型。
本申请实施例对虚拟模型的类别的划分方式不加以限定,可以根据经验设置,或者根据应用场景灵活调整。示例性地,将全部虚拟模型均划分为一个类别,则至少一个虚拟模型为需要同屏显示动画帧的全部虚拟模型。示例性地,将虚拟模型划分为虚拟对象类别和虚拟道具类别,假设目标类别为虚拟对象类别,则至少一个虚拟模型为需要同屏显示动画帧的全部虚拟模型中属于虚拟对象类别的虚拟模型。当然,虚拟模型的类别还可以有其他划分方式,本申请实施例对此不加以限定。
在示例性实施例中,在应用程序运行之前,每个虚拟模型都会通过唯一字符串标识所属类别,以便于后续以类别为粒度统计资源消耗。
在应用程序运行的过程中,不断更新显示的虚拟环境的画面,本申请实施例提供的动画帧的显示方法发生在显示最新一帧虚拟环境的画面的过程中。在显示一帧虚拟环境的画面时,会在画面中显示至少一个虚拟模型的动画帧,本申请实施例对显示至少一个虚拟模型的动画帧的实现过程进行介绍。需要说明的是,在显示一帧虚拟环境的画面时,除了会在画面中显示至少一个虚拟模型的动画帧外,还可能会在画面中显示其他虚拟模型的动画帧或者环境元素等,本申请实施例对此不加以限定。如无特别说明,本申请实施例中提到的画面均是指虚拟环境的画面。
至少一个虚拟模型的初始动画更新频率是指获取资源消耗指标所依据的至少一个虚拟模型具有的动画更新频率。动画更新频率用于指示每多少帧画面更新一次动画,每更新一次动画,则有一个新的动画帧进行表现。该新的动画帧是指动画中的一个动画帧。示例性地,若一个动画更新频率为每n(n为不小于1的整数)帧画面更新一次动画,则该动画更新频率可以表示为UROn。
在执行步骤201之前,需要先获取至少一个虚拟模型的初始动画更新频率。获取每个虚拟模型的初始动画更新频率的原理相同,以获取第一虚拟模型的初始动画更新频率的过程为例进行说明。其中,第一虚拟模型为至少一个虚拟模型中的任一虚拟模型。
示例性地,获取第一虚拟模型的初始动画更新频率的方式包括:将显示上一帧虚拟环境的画面时该第一虚拟模型具有的动画更新频率作为第一虚拟模型的初始动画更新频率。
示例性地,获取第一虚拟模型的初始动画更新频率的方式包括:将第一虚拟模型的默认动画更新频率作为第一虚拟模型的初始动画更新频率,第一虚拟模型的默认动画更新频率可以是指第一虚拟模型的一种固有属性。
示例性地,获取第一虚拟模型的初始动画更新频率的方式包括:确定第一虚拟模型的占比值,将第一虚拟模型的占比值对应的动画更新频率作为第一虚拟模型的初始动画更新频率。其中,第一虚拟模型的占比值为第一虚拟模型的渲染尺寸与参考尺寸的比值。
示例性地,第一虚拟模型的渲染尺寸是指在上一帧虚拟环境的画面中呈现出的第一虚拟模型的渲染尺寸。参考尺寸根据经验设置,或者根据应用场景灵活调整,对于不同的虚拟模型而言,参考尺寸可以是相同的,也可以是不同的。示例性地,在参考尺寸对于不同的虚拟模型而言是相同的情况下,参考尺寸可以为虚拟环境的画面的尺寸。示例性地,上一帧虚拟环境的画面中呈现出的第一虚拟模型的渲染尺寸可以通过在显示上一帧虚拟环境的画面时显示的第一虚拟模型的动画帧识别得到。也就是说,第一虚拟模型的占比值随着虚拟环境的画面的更新可能不断发生变化。在此种方式下,在每一帧虚拟环境的画面正式显示之前,会根据上一帧虚拟环境的画面的显示结果获取至少一个虚拟模型的初始动画更新频率,以便于进一步统计资源消耗指标。此种方式确定的虚拟模型的初始动画更新频率与虚拟模型的动画帧的实时显示结果的匹配程度较高,使得初始动画更新频率的可靠性较高,从而提高基于初始 动画更新频率确定出的资源消耗指标的可靠性。
示例性地,终端中存储有占比值与动画更新频率的对应关系,在确定第一虚拟模型的占比值后,能够根据该占比值与动画更新频率的对应关系,查找第一虚拟模型的占比值对应的动画更新频率,然后将查找到的动画更新频率作为第一虚拟模型的初始动画更新频率。
占比值与动画更新频率的对应关系根据经验设置,或者根据应用场景灵活调整,本申请实施例对此不加以限定。在占比值与动画更新频率的对应关系中,第一占比值对应的动画更新频率不低于第二占比值对应的动画更新频率,其中,第一占比值大于第二占比值。也就是说,随着占比值的增大,占比值对应的动画更新频率保持不变或者增大。
在示例性实施例中,终端存储有占比值范围与动画更新频率的对应关系,此种情况下,第一虚拟模型的占比值对应的动画更新频率是指第一虚拟模型的占比值所在的占比值范围对应的动画更新频率。在确定第一虚拟模型的占比值后,确定第一虚拟模型的占比值所在的占比值范围,然后根据占比值范围与动画更新频率的对应关系,查找第一虚拟模型的占比值所在的占比值范围对应的动画更新频率,然后将查找到的动画更新频率作为第一虚拟模型的初始动画更新频率。占比值范围与动画更新频率的对应关系根据经验设置,或者根据应用场景灵活调整,本申请实施例对此不加以限定。示例性地,在占比值范围与动画更新频率的对应关系中,第一占比值范围对应的动画更新频率不低于第二占比值范围对应的动画更新频率,其中,第一占比值范围的下限大于第二占比值范围的上限。
参考获取第一虚拟模型的初始动画更新频率的方式能够获取至少一个虚拟模型的初始动画更新频率。在获取至少一个虚拟模型的初始动画更新频率后,基于至少一个虚拟模型的初始动画更新频率,获取资源消耗指标。
资源消耗指标用于指示根据至少一个虚拟模型的初始动画更新频率进行动画更新需要消耗的资源量。示例性地,根据至少一个虚拟模型的初始动画更新频率进行动画更新需要消耗的资源量越大,说明根据至少一个虚拟模型的初始动画更新频率显示至少一个虚拟模型对应的动画帧所耗费的资源越多,动画帧的显示流畅性越差。
在一种可能实现方式中,基于至少一个虚拟模型的初始动画更新频率,获取资源消耗指标的方式包括:获取至少一个虚拟模型的资源消耗子指标,汇总至少一个虚拟模型的资源消耗子指标,得到资源消耗指标。其中,任一虚拟模型的资源消耗子指标与任一虚拟模型的初始动画更新频率呈正相关关系。也就是说,任一虚拟模型的初始动画更新频率越高,该任一虚拟模型的资源消耗子指标越大;任一虚拟模型的初始动画更新频率越低,该任一虚拟模型的资源消耗子指标越小。示例性地,任一虚拟模型的资源消耗子指标用于指示根据该任一虚拟模型的初始动画更新频率进行动画更新需要消耗的资源量。
获取至少一个虚拟模型的资源消耗子指标的原理相同,以获取第一虚拟模型的资源消耗子指标为例进行说明,第一虚拟模型为至少一个虚拟模型中的任一虚拟模型。
示例性地,获取第一虚拟模型的资源消耗子指标的方式包括:确定第一虚拟模型的初始动画更新频率对应的画面帧数,将与画面帧数呈负相关关系的正数作为第一虚拟模型的资源消耗子指标。示例性地,将第一虚拟模型的初始动画更新频率对应的画面帧数的倒数作为该第一虚拟模型的资源消耗子指标。示例性地,将第一虚拟模型的初始动画更新频率对应的画面帧数的倒数与某一正数的乘积作为第一虚拟模型的资源消耗子指标。
第一虚拟模型的初始动画更新频率对应的画面帧数是指第一虚拟模型的初始动画更新频率指示的更新一次动画需要经过的画面的帧数,例如,若第一虚拟模型的初始动画更新频率为每5帧画面更新一次动画,则第一虚拟模型的初始动画更新频率对应的画面帧数为5。
示例性地,假设第一虚拟模型的默认动画更新频率为每1帧画面更新1次动画,则第一虚拟模型的初始动画更新频率对应的画面帧数越大,说明第一虚拟模型的初始动画更新频率相对默认动画更新频率降低的程度越大,根据第一虚拟模型的初始动画更新频率进行动画更新需要消耗的资源量越小。
参考获取第一虚拟模型的资源消耗子指标的方式,能够获取至少一个虚拟模型的资源消 耗子指标。在获取至少一个虚拟模型的资源消耗子指标后,汇总至少一个虚拟模型的资源消耗子指标,得到资源消耗指标。示例性地,汇总至少一个虚拟模型的资源消耗子指标是指计算至少一个虚拟模型的资源消耗子指标的和。示例性地,汇总至少一个虚拟模型的资源消耗子指标是指利用至少一个虚拟模型的权重对至少一个虚拟模型的资源消耗子指标进行加权求和,至少一个虚拟模型的权重根据经验设置。
在步骤202中,基于资源消耗指标以及初始动画更新频率,获取至少一个虚拟模型的目标动画更新频率。
在获取资源消耗指标后,基于资源消耗指标以及至少一个虚拟模型的初始动画更新频率,获取至少一个虚拟模型的目标动画更新频率。此种方式下,至少一个虚拟模型的目标动画更新频率的获取过程考虑了资源消耗指标,根据至少一个虚拟模型的目标动画更新频率能够对资源消耗进行有效地全局控制,避免由于资源消耗过大导致显示动画帧的耗时较长,有利于提高动画帧的显示流畅性。
在一种可能实现方式中,基于资源消耗指标以及初始动画更新频率,获取至少一个虚拟模型的目标动画更新频率的过程包括:当资源消耗指标不大于资源消耗阈值时,将初始动画更新频率作为至少一个虚拟模型的目标动画更新频率。
资源消耗阈值用于限制根据至少一个虚拟模型的动画更新频率进行动画更新最多需要消耗的资源量。资源消耗阈值为预先配置的阈值。
在示例性实施例中,通过配置表设定每种类别分别对应的资源消耗阈值,以便于利用每种类别分别对应的资源消耗阈值对每种类别的虚拟模型的动画更新所带来的资源消耗进行约束。示例性地,至少一个虚拟模型均为目标类别的虚拟模型,此种情况下,资源消耗阈值为目标类别对应的资源消耗阈值。
在示例性实施例中,资源消耗阈值用于约束全局最多允许每帧画面均更新动画的虚拟模型的数量。在示例性实施例中,资源消耗阈值还可以称为资源消耗预算,或者,动画更新预算等。
当资源消耗不大于资源消耗阈值时,说明根据至少一个虚拟模型的初始动画更新频率进行动画更新不会带来较大的资源消耗,此种情况下,可以直接将至少一个虚拟模型的初始动画更新频率作为至少一个虚拟模型的目标动画更新频率。需要说明的是,将至少一个虚拟模型的初始动画更新频率作为至少一个虚拟模型的目标动画更新频率是指将每个虚拟模型的初始动画更新频率作为每个虚拟模型的目标动画更新频率。
在一种可能实现方式中,当资源消耗指标大于资源消耗阈值时,基于资源消耗指标以及初始动画更新频率,获取至少一个虚拟模型的目标动画更新频率的过程包括以下步骤1至步骤3。
步骤1:基于资源消耗指标和资源消耗阈值,确定调整系数。
当资源消耗指标大于资源消耗阈值时,说明根据至少一个虚拟模型的初始动画更新频率进行动画更新会带来较大的资源消耗,此种情况下,需要在资源消耗阈值的约束下对至少一个虚拟模型的初始动画更新频率进行调整,以得到能够带来较小的资源消耗的第一动画更新频率。
对至少一个虚拟模型的初始动画更新频率进行调整的过程是基于调整系数实现的,调整系数基于资源消耗指标和资源消耗阈值确定。在一种可能实现方式中,基于资源消耗指标和资源消耗阈值确定调整系数的方式为:将资源消耗指标与资源消耗阈值的比值作为调整系数。由于资源消耗指标大于资源消耗阈值,所以调整系数为大于1的系数。
当然,在一些实施例中,基于资源消耗指标和资源消耗阈值确定调整系数的方式还可以为其他方式,本申请实施例对此不加以限定。示例性地,将资源消耗阈值与资源消耗指标的比值作为调整系数,此种情况下,调整系数为小于1的系数。
步骤2:基于调整系数对初始动画更新频率进行调整,得到至少一个虚拟模型的第一动画更新频率。
在确定调整系数后,基于调整系数对至少一个虚拟模型的初始动画更新频率进行调整,以得到至少一个虚拟模型的第一动画更新频率。示例性地,由于调整系数用于对各个虚拟模型的初始动画更新频率进行调节,所以调整系数还可以称为全局负载均衡缩放系数。
需要说明的是,基于调整系数分别对每个虚拟模型的初始动画更新频率进行调整,得到每个虚拟模型的第一动画更新频率。基于调整系数对每个虚拟模型的初始动画更新频率进行调整的原理相同,以基于调整系数对第一虚拟模型的初始动画更新频率进行调整为例进行说明。其中,第一虚拟模型为至少一个虚拟模型中的任一虚拟模型。
基于调整系数对第一虚拟模型的初始动画更新频率进行调整的方式与调整系数的确定方式有关,调整原则是第一虚拟模型的第一动画更新频率低于第一虚拟模型的初始动画更新频率。
在一种可能实现方式中,对于调整系数为资源消耗指标与资源消耗阈值的比值的情况,基于调整系数对第一虚拟模型的初始动画更新频率进行调整的方式为:计算第一虚拟模型的初始动画更新频率对应的画面帧数与调整系数的乘积,对乘积进行取整,得到目标值;将对应的画面帧数为目标值的动画更新频率作为第一虚拟模型的第一动画更新频率。
对乘积进行取整的方式可以根据经验设置,或者根据应用场景灵活调整,本申请实施例对此不加以限定。示例性地,对乘积进行取整的方式可以为向上取整,也可以为向下取整,还可以为四舍五入取整等。以向上取整为例,可以根据Ceil函数(向上取整函数)对乘积进行取整,得到目标值。在得到目标值后,将对应的画面帧数为目标值的动画更新频率作为第一虚拟模型的第一动画更新频率。
例如,假设第一虚拟模型的初始动画更新频率为每2帧画面更新一次动画(URO2),调整系数为1.2。则第一虚拟模型的初始动画更新频率对应的画面帧数为2,第一虚拟模型的初始动画更新频率对应的画面帧数与调整系数的乘积为2.4,对乘积进行向上取整后得到的目标值为3,则将对应的画面帧数为3的动画更新频率作为第一虚拟模型的第一动画更新频率,此时确定的第一虚拟模型的第一动画更新频率为每3帧画面更新一次动画(URO3)。
以上所述以调整系数为资源消耗指标与资源消耗阈值的比值为例,介绍了基于调整系数对第一虚拟模型的初始动画更新频率进行调整的过程,本申请实施例并不局限于此,对于调整系数的确定方式为其他方式的情况,基于调整系数对第一虚拟模型的初始动画更新频率进行调整的过程还可以为其他过程,只要保证调整后得到的第一虚拟模型的第一动画更新频率低于初始动画更新频率即可。
参考获取第一虚拟模型的第一动画更新频率的方式能够获取至少一个虚拟模型的第一动画更新频率,然后执行步骤3。
示例性地,根据上述步骤1和步骤2获取至少一个虚拟模型的第一动画更新频率的过程可视为根据一种带负载均衡的动画降频优化技术(Load Balance URO)得到的动画更新频率。通过全局统计目标类别的虚拟模型的资源消耗情况,根据预先分配的资源消耗阈值,按调整系数降低动画更新频率,降低动画更新需要消耗的资源量,达到降低全局动画更新的时间消耗的目的,从而提升FPS。
步骤3:基于第一动画更新频率,获取至少一个虚拟模型的目标动画更新频率。
基于第一动画更新频率,获取至少一个虚拟模型的目标动画更新频率的过程是指基于每个虚拟模型的第一动画更新频率,分别获取每个虚拟模型的目标动画更新频率的过程。基于每个虚拟模型的第一动画更新频率,获取每个虚拟模型的目标动画更新频率的原理相同,以基于第一虚拟模型的第一动画更新频率,获取第一虚拟模型的目标动画更新频率为例进行说明。其中,第一虚拟模型为至少一个虚拟模型中的任一虚拟模型。
在一种可能实现方式中,直接将第一虚拟模型的第一动画更新频率作为第一虚拟模型的目标动画更新频率。此种方式的效率较高。
在一种可能实现方式中,基于第一动画更新频率,获取至少一个虚拟模型的目标动画更新频率的过程包括:当第一虚拟模型满足第一模型筛选条件,且第一虚拟模型的第一动画更 新频率不高于参考动画更新频率时,将参考动画更新频率作为第一虚拟模型的目标动画更新频率。当第一虚拟模型满足第一模型筛选条件,且第一虚拟模型的第一动画更新频率高于参考动画更新频率时;或者,当第一虚拟模型不满足第一模型筛选条件时,将第一虚拟模型的第一动画更新频率作为第一虚拟模型的目标动画更新频率。此种方式在考虑了调整系数的基础上,额外考虑了第一模型筛选条件,有利于提高获取的第一虚拟模型的目标动画更新频率的可靠性。
第一模型筛选条件用于对虚拟模型进行筛选,第一模型筛选条件根据经验设置,或者根据应用场景灵活调整,本申请实施例对此不加以限定。
满足第一模型筛选条件的虚拟模型是指动画表现需求较大的虚拟模型。示例性地,满足第一模型筛选条件的虚拟模型是指初始动画更新频率不低于参考动画更新频率的虚拟模型。初始动画更新频率越高,可认为虚拟模型的重要度越高,示例性地,可以将满足第一模型筛选条件的虚拟模型称为高重要度虚拟模型,将不满足第一模型筛选条件的虚拟模型称为低重要度虚拟模型。
参考动画更新频率根据经验设置,或者根据应用场景灵活调整,本申请实施例对此不加以限定。示例性地,参考动画更新频率表示为URO5,假设一个虚拟模型的初始动画更新频率表示为URO2,由于URO2表示的动画更新频率高于URO5表示的动画更新频率,所以该虚拟模型满足第一模型筛选条件。
在一些实施例中,还可以通过将虚拟模型的初始动画更新频率对应的画面帧数与画面帧数阈值进行比对,来判断虚拟模型是否满足第一模型筛选条件。若虚拟模型的初始动画更新频率对应的画面帧数不大于画面帧数阈值,则虚拟模型满足第一模型筛选条件。画面帧数阈值根据经验设置,或者根据应用场景灵活调整,本申请实施例对此不加以限定,例如,画面帧数阈值为5。
示例性地,满足第一模型筛选条件的虚拟模型还可以是指占比值不小于占比值阈值的虚拟模型。占比值阈值根据经验设置,或者根据应用场景灵活调整,本申请实施例对此不加以限定。
当第一虚拟模型满足第一模型筛选条件时,说明第一虚拟模型的动画表现需求较大,第一虚拟模型的目标动画更新频率需要不低于参考动画更新频率,以保证第一虚拟模型的动画表现效果。因此,若第一虚拟模型满足第一模型筛选条件,且第一虚拟模型的第一动画更新频率不高于参考动画更新频率,则将参考动画更新频率作为第一虚拟模型的目标动画更新频率。若第一虚拟模型满足第一模型筛选条件,且第一虚拟模型的第一动画更新频率高于参考动画更新频率,则将第一虚拟模型的第一动画更新频率作为第一虚拟模型的目标动画更新频率。也就是说,当第一虚拟模型满足第一模型筛选条件时,将第一虚拟模型的第一动画更新频率和参考动画更新频率中的较大值作为第一虚拟模型的目标动画更新频率。
当第一虚拟模型不满足第一模型筛选条件时,说明第一虚拟模型的动画表现需求较小,无需对第一虚拟模型的目标动画更新频率进行限制,因此,可以直接将第一虚拟模型的第一动画更新频率作为第一虚拟模型的目标动画更新频率。
在考虑了调整系数的基础上,额外考虑第一模型筛选条件是为了保证高重要度的虚拟模型的动画表现。由于根据调整系数调整后得到的第一动画更新频率(也即经过负载均衡降频优化后得到的动画更新频率)可能会由于虚拟模型的数量非常多而降低很多,也即第一动画更新频率对应的画面帧数变大非常多,导致近处虚拟模型过度降频,因此,对于高重要度的虚拟模型,需要对目标动画更新频率进行限制,使得高重要度的虚拟模型的目标动画更新频率不低于参考动画更新频率。其中,近处虚拟模型是指与虚拟环境中的虚拟相机距离较近的虚拟模型,近处虚拟模型的动画表现需求通常较大。虚拟相机是指拍摄虚拟环境的画面所利用的相机。对于一个虚拟模型而言,该虚拟模型与虚拟相机的距离越近,该虚拟模型在虚拟环境的画面中呈现出的尺寸越大。
示例性地,假设画面帧数阈值为5,则至少一个虚拟模型中初始动画更新频率对应的画 面帧数小于等于5的虚拟模型,都满足第一模型筛选条件,也即都属于高重要度虚拟模型,此部分虚拟模型的目标动画更新频率对应的画面帧数需要限制不超过5,也即目标动画更新频率最低为每5帧画面更新一次动画,从而保证高重要度模型最多5帧更新一次动画。
在步骤203中,根据目标动画更新频率,显示至少一个虚拟模型对应的动画帧。
目标动画更新频率是在至少一个虚拟模型的初始动画更新频率的基础上考虑资源消耗指标确定的,能够对资源消耗进行有效地全局控制,根据目标动画更新频率显示至少一个虚拟模型对应的动画帧的效果较好,有利于提高动画帧的显示流畅性,进而提高画面更新的流畅性。
根据目标动画更新频率,显示至少一个虚拟模型对应的动画帧的过程是指根据每个虚拟模型的目标动画更新频率,显示每个虚拟模型对应的动画帧的过程。需要说明的是,各个虚拟模型对应的动画帧是显示在同一帧虚拟环境的画面中的。
根据每个虚拟模型的目标动画更新频率,显示每个虚拟模型对应的动画帧的原理相同,以根据第一虚拟模型的目标动画更新频率,显示第一虚拟模型对应的动画帧的过程为例进行说明。其中,第一虚拟模型是指至少一个虚拟模型中的任一虚拟模型。
在一种可能实现方式中,根据第一虚拟模型的目标动画更新频率,显示第一虚拟模型对应的动画帧的实现过程为:直接根据第一虚拟模型的目标动画更新频率,显示第一虚拟模型对应的动画帧。此种情况下,第一虚拟模型对应的动画帧是指第一虚拟模型的与目标动画更新频率对应的动画帧。也就是说,无需判断第一虚拟模型是否满足一定条件,直接显示第一虚拟模型的与目标动画更新频率对应的动画帧。
在示例性实施例中,直接根据第一虚拟模型的目标动画更新频率,显示第一虚拟模型对应的动画帧的过程包括:当第一虚拟模型的目标动画更新频率与第一虚拟模型的计数值不匹配时,显示第一虚拟模型的第一动画帧或目标动画帧;当第一虚拟模型的目标动画更新频率与第一虚拟模型的计数值匹配时,显示第一虚拟模型的第二动画帧。
其中,第一动画帧为第一虚拟模型的动画中已显示的最新的动画帧,第二动画帧为第一虚拟模型的动画中位于第一动画帧后一位的动画帧。第一动画帧和第二动画帧为第一虚拟模型的动画中的相邻的两个动画帧,第一动画帧已经显示过,第二动画帧还未显示过。第一动画帧和第二动画帧的计算逻辑较为复杂,确定第一动画帧和第二动画帧所需的耗时较长。在显示第一动画帧之后,终端即可计算第二动画帧并缓存,然后在需要显示第二动画帧时,从缓存中提取第二动画帧进行显示。
第一虚拟模型的计数值是指第一虚拟模型当前具有的计数值。第一虚拟模型具有的计数值用于指示第一虚拟模型的动画的未更新画面帧数。在示例性实施例中,第一虚拟模型具有计数值的更新方式为:在初次显示第一虚拟模型的动画中的一个动画帧时,第一虚拟模型具有的计数值为0,每有一个画面不显示第一虚拟模型的动画中位于该一个动画帧后一位的动画帧,将第一虚拟模型具有的计数值增加1。
第一虚拟模型的目标动画更新频率与第一虚拟模型的计数值匹配说明需要显示第一虚拟模型的第二动画帧。示例性地,第一虚拟模型的目标动画更新频率与第一虚拟模型的计数值匹配是指第一虚拟模型的计数值不小于第一虚拟模型的目标动画更新频率对应的画面帧数与1的差值。例如,若第一虚拟模型的目标动画更新频率对应的画面帧数为5,第一虚拟模型的计数值不小4,则认为第一虚拟模型的目标动画更新频率与第一虚拟模型的计数值匹配。
在第一虚拟模型的目标动画更新帧率与第一虚拟模型的计数值匹配时,说明当前需要显示的动画帧为第一虚拟模型的第二动画帧,因此,显示第一虚拟模型的第二动画帧。当第一虚拟模型的目标动画更新频率与第一虚拟模型的计数值不匹配时,说明当前需要显示的动画帧不为第一虚拟模型的第二动画帧,此种情况下,显示第一虚拟模型的第一动画帧或目标动画帧。
目标动画帧基于第一动画帧、第二动画帧和第一虚拟模型的计数值确定。在显示目标动画帧之前,需要先确定目标动画帧。示例性地,确定目标动画帧的方式包括:基于第一动画 帧和第二动画帧,确定候选插值平滑动画帧;在候选插值平滑动画帧中确定与第一虚拟模型的计数值对应的插值平滑动画帧,将与第一虚拟模型的计数值对应的插值平滑动画帧作为第一虚拟模型的目标动画帧。
示例性地,可以根据缓存中的第一动画帧和第二动画帧,确定插值平滑动画帧,以在显示第一动画帧之后以及显示第二动画帧之前,显示插值平滑动画帧,达到接近于每帧更新的动画效果,也即接近于不降频的动画效果。候选插值平滑动画帧的数量可能为一个,也可能为多个。当候选插值平滑动画帧的数量为一个时,直接将该一个候选插值平滑动画帧作为与第一虚拟模型的计数值对应的插值平滑动画帧。当候选插值平滑动画帧的数量为多个时,第一虚拟模型的目标动画帧为多个候选插值平滑动画帧中与第一虚拟模型的计数值对应的一个插值平滑动画帧。示例性地,终端中存储有候选插值平滑动画帧与计数值的对应关系,然后可以根据该对应关系,在候选插值平滑动画帧中确定与第一虚拟模型的计数值对应的插值平滑动画帧。
示例性地,根据缓存中的第一动画帧和第二动画帧,确定的候选插值平滑动画帧的数量和与第一虚拟模型的目标动画更新频率不匹配的计数值的数量相同,每个候选插值平滑动画帧对应一个与第一虚拟模型的目标动画更新频率不匹配的计数值。
示例性地,与第一虚拟模型的目标动画更新频率不匹配的计数值的数量为第一虚拟模型的目标动画更新频率对应的画面帧数与1的差值。例如,若第一虚拟模型的目标动画更新频率对应的画面帧数为5,则与第一虚拟模型的目标动画更新频率不匹配的计数值的数量为4,可以确定出4个候选插值平滑动画帧。
候选插值平滑动画帧能够通过第一动画帧和第二动画帧之间的差异计算得到,相比于计算得到第一动画帧和第二动画帧的时间消耗,计算得到候选插值平滑动画帧的时间消耗较小。从各个候选插值平滑动画中查询到与第一虚拟模型的计数值对应的插值平滑动画帧,该插值平滑动画帧即为目标动画帧。
本申请实施例对在第一虚拟模型的目标动画更新频率与第一虚拟模型的计数值不匹配的情况下,显示第一虚拟模型的第一动画帧或目标动画帧的实现方式不加以限定。示例性地,在第一虚拟模型的目标动画更新频率与第一虚拟模型的计数值不匹配的情况下,显示第一虚拟模型的第一动画帧。示例性地,在第一虚拟模型的目标动画更新频率与第一虚拟模型的计数值不匹配的情况下,显示目标动画帧。
示例性地,在第一虚拟模型的目标动画更新频率与第一虚拟模型的计数值不匹配的情况下,当第一虚拟模型不满足第二模型筛选条件时,显示第一虚拟模型的第一动画帧;当第一虚拟模型满足第二模型筛选条件时,显示第一虚拟模型的目标动画帧。
第二模型筛选条件用于对虚拟模型进行筛选,第二模型筛选条件根据经验设置,或者根据应用场景灵活调整,本申请实施例对此不加以限定。第二模型筛选条件可以与第一模型筛选条件相同,也可以与第一模型筛选条件不同。
满足第二模型筛选条件的虚拟模型为在目标动画更新频率与计数值不匹配的情况下需要显示目标动画帧的虚拟模型。在示例性实施例中,第二模型筛选条件与第一模型筛选条件相同,也即满足第二模型筛选条件的虚拟模型是指动画表现需求较大的虚拟模型。
若第一虚拟模型满足第二模型筛选条件,则显示第一虚拟模型的目标动画帧,以较大程度上缓解降频对动画表现的不利影响。也就是说,对于高重要度的虚拟模型,开启动画插值平滑,高重要度的虚拟模型在跳过更新的画面中,会利用缓存的第一动画帧和第二动画帧进行插值表现,达到接近于不降频的动画效果。
若第一虚拟模型不满足第二模型筛选条件,则说明第一虚拟模型的动画表现的关注度较低,可以直接显示第一动画帧。
在一种可能实现方式中,根据第一虚拟模型的目标动画更新频率,显示第一虚拟模型对应的动画帧的实现过程为:当第一虚拟模型未关联于其他虚拟模型时,直接根据第一虚拟模型的目标动画更新频率,显示第一虚拟模型对应的动画帧;当第一虚拟模型关联于第二虚拟 模型时,将第一虚拟模型的目标动画更新频率调整为第二虚拟模型的动画更新频率,得到第一虚拟模型的调整后的动画更新频率;根据第一虚拟模型的调整后的动画更新频率,显示第一虚拟模型对应的动画帧。
第二虚拟模型可以是指至少一个虚拟模型中的一个虚拟模型,也可以是除至少一个虚拟模型外的一个虚拟模型,本申请实施例对此不加以限定。第二虚拟模型的动画更新频率是指第二虚拟模型当前最新的动画更新频率。终端中记录有虚拟模型之间的关联关系,根据该关联关系能够判断第一虚拟模型是否关联于其他虚拟模型,若第一虚拟模型关联于第二虚拟模型,将第一虚拟模型的目标动画更新频率调整为第二虚拟模型的动画更新频率。示例性地,第一虚拟模型关联于第二虚拟模型还可以称为第一虚拟模型依赖第二虚拟模型。
在一种可能实现方式中,在将第一虚拟模型的目标动画更新频率调整为第二虚拟模型的动画更新频率之后,还包括:将第一虚拟模型的计数值调整为第二虚拟模型的计数值,以使第一虚拟模型的动画更新与第二虚拟模型的动画更新同步。
第一虚拟模型的动画更新与第二虚拟模型的动画更新同步用于保证动画表现的正确性。不同的虚拟模型在经过优化后可能具有不同的动画更新频率,但是存在关联关系的虚拟模型在动画表现上要求保持一致,比如,虚拟对象和该虚拟对象配备的虚拟道具在动画表现上要求保持一致。如果存在关联关系的虚拟模型的动画更新频率不同,可能导致表现错误。
因此,在根据第一虚拟模型的目标动画更新频率,显示第一虚拟模型对应的动画帧的过程中,判断第一虚拟模型是否关联于其他虚拟模型,若第一虚拟模型关联于第二虚拟模型,则通过将第一虚拟模型的目标动画更新频率调整为第二虚拟模型的动画更新频率以及将第一虚拟模型的计数值调整为第二虚拟模型的计数值,来实现降频同步,也即使第一虚拟模型的动画更新与第二虚拟模型的动画更新同步。示例性地,由于第一虚拟模型关联于第二虚拟模型,所以可以将第一虚拟模型称为子模型,将第二虚拟模型称为父模型。
降频同步的实现细节为:父子模型的更新频率保持同步,子模型采用父模型的更新频率;父子模型的计数值对齐。示例性地,通过将父子模型的计数值对齐,能够实现父子模型的更新起始帧的对齐。更新起始帧是指初次显示已显示的最新的动画帧的画面。
示例性地,父模型和子模型的动画更新频率、更新起始帧具有四种情况:父模型和子模型的动画更新频率、更新起始帧均不一致;父模型和子模型的动画更新频率一致、更新起始帧不一致;父模型和子模型的动画更新频率不一致、更新起始帧一致;父模型和子模型的动画更新频率、更新起始帧均一致。
图3示出了上述四种情况下的动画更新同步情况。在图3中,将更新动画的画面称为更新帧,将未更新动画的画面称为跳过帧。根据图3可知,若父模型和子模型的动画更新频率、更新起始帧均不一致;或者,父模型和子模型的动画更新频率一致、更新起始帧不一致;或者,父模型和子模型的动画更新频率不一致、更新起始帧一致,均不足以让父模型和子模型的动画更新完全同步。因此,通过将子模型的动画更新频率调整为父模型的动画更新频率,将子模型的计数值调整为父模型的计数值,达到动画更新同步的效果。
示例性地,图4示出了父模型和子模型的动画更新频率、更新起始帧均不一致的情况下的画面显示效果。在图4中,父模型为虚拟对象410,子模型为虚拟道具420。虚拟对象410的动画更新频率为URO4、虚拟道具420的动画更新频率为URO7,虚拟对象410的更新起始帧和虚拟道具420的更新起始帧不一致。在图4中,虚拟道具420脱离虚拟对象410的手部的问题明显,说明虚拟对象410和虚拟道具420的动画更新未同步。
图5示出了父模型和子模型的动画更新频率一致、更新起始帧不一致的情况下的画面显示效果。在图5中,父模型为虚拟对象510,子模型为虚拟道具520。虚拟对象510的动画更新频率和虚拟道具520的动画更新频率均为URO4,虚拟对象510的更新起始帧和虚拟道具520的更新起始帧不一致。在图5中,仍能观察到虚拟道具520脱离虚拟对象510的手部的问题,说明虚拟对象510和虚拟道具520的动画更新未同步。
图6示出了父模型和子模型的动画更新频率、更新起始帧均一致的情况下的画面显示效 果。在图6中,父模型为虚拟对象610,子模型为虚拟道具620。虚拟对象610的动画更新频率和虚拟道具620的动画更新频率均为URO4,虚拟对象610的更新起始帧和虚拟道具620的更新起始帧一致。在图6中,虚拟道具620未脱离虚拟对象610的手部,画面表现正常,说明虚拟对象610和虚拟道具620的动画更新同步。
对于获取第一虚拟模型的调整后的动画更新频率的情况,根据第一虚拟模型的调整后的动画更新频率,显示第一虚拟模型对应的动画帧。根据第一虚拟模型的调整后的动画更新频率,显示第一虚拟模型对应的动画帧的实现原理与直接根据第一虚拟模型的目标动画更新频率,显示第一虚拟模型对应的动画帧的实现原理相同,此处不再加以赘述。
在示例性实施例中,上述步骤201至步骤203可以在每次需要显示至少一个虚拟模型的动画帧的情况下均执行。在示例性实施例中,上述步骤201至步骤203在虚拟模型的情况满足参考条件时再执行,可以减少计算量。
本申请实施例对虚拟模型的情况不满足参考条件时的动画帧的显示方式不加以限定。示例性地,当虚拟模型的情况不满足参考条件时,利用相关技术中的方式实现动画帧的显示。示例性地,相关技术中的方式为:将至少一个虚拟模型的占比值对应的动画更新频率作为至少一个虚拟模型的初始动画更新频率,根据至少一个虚拟模型的初始动画更新频率,显示至少一个虚拟模型对应的动画帧。
示例性地,占比值还可以称为屏占比,相关技术中的方式是基于UE4引擎自带的URO优化方案实现的动画帧的显示方式。UE4引擎自带URO优化方案,是通过计算每个虚拟模型的屏占比,屏占比越小,动画更新频率越低,屏占比小可认为虚拟模型距离虚拟相机远,这样通过降低距离虚拟相机远的虚拟模型的动画更新频率,就可以有效降低虚拟模型的动画更新的资源消耗。示例性地,可以预先设置屏占比与画面帧数的对应关系,画面帧数越大,动画更新频率越低。示例性地,画面帧数还可以利用URO的等级表示。
参考条件用于约束根据步骤201至步骤203的方式实现动画帧的显示的条件。参考条件根据经验设置,或者根据应用场景灵活调整,本申请实施例对此不加以限定。示例性地,参考条件用于对至少一个虚拟模型的情况进行约束。示例性地,参考条件用于对需要同屏显示动画帧的全部虚拟模型的情况进行约束。
以参考条件用于对需要同屏显示动画帧的全部虚拟模型的情况进行约束为例。示例性地,虚拟模型的情况满足参考条件可以是指需要同屏显示动画帧的全部虚拟模型的数量大于第一数量阈值。示例性地,虚拟模型的情况满足参考条件可以是指需要同屏显示动画帧的全部虚拟模型中占比值大于占比值阈值的虚拟模型的数量大于第二数量阈值。示例性地,虚拟模型的情况满足参考条件可以是指需要同屏显示动画帧的全部虚拟模型的数量大于第一数量阈值,且全部虚拟模型中占比值大于占比值阈值的虚拟模型的数量大于第二数量阈值。
第一数量阈值不小于第二数量阈值,第一数量阈值和第二数量阈值根据经验设置,或者根据应用场景灵活调整,本申请实施例对此不加以限定。
在需要同屏显示动画帧的全部虚拟模型较少的情况(如图7所示的虚拟模型的分布情况)下,利用相关技术中的动画帧的显示方式,继续保有URO优化特征,根据占比值进行降频优化,对于占比值较小的虚拟模型,以较低的频率更新动画,减少动画更新带来的时间消耗。示例性地,占比值较小的虚拟模型可认为是与虚拟相机距离较远的虚拟模型,此种虚拟模型由于位于远处,交互对象可能看不清,所以可以降低动画更新频率。在图7所示的情况下,利用相关技术中的方式,从距离虚拟相机近到远的顺序,显示各个虚拟模型的动画帧所依据的动画更新频率分别为URO1、URO2和URO3。
当需要同屏显示动画帧的全部虚拟模型较多时(如图8所示的虚拟模型的分布情况),尤其是占比值较大(也即与虚拟相机距离较近)的虚拟模型的数量较多时,利用相关技术中的动画帧的显示方式(也即根据占比值进行降频优化的方式),与虚拟相机距离较近的虚拟模型还是会以较高的动画更新频率更新动画,例如,从距离虚拟相机近到远的顺序,显示各个虚拟模型的动画帧所依据的动画更新频率分别为URO1、URO2和URO3,这会使全局的动 画更新压力非常大,导致与虚拟相机距离较近的虚拟模型的数量较多等场景下,资源消耗较多,可能造成终端发热,还可能会影响FPS,影响动画帧的显示流畅性以及应用程序运行的流畅性等。
利用本申请实施例提供的动画帧的显示方式,能够有效改善此种场景的性能表现。本申请实施例提供的动画帧的显示方式会每帧全局统计虚拟模型的资源消耗指标,超过分配的资源消耗阈值,就进一步降低每个虚拟模型的动画更新频率,同时对满足第一模型筛选条件的虚拟模型进行动画插值平滑优化,避免因降频而出现明细的动画表现问题。通过此种优化方式,从距离虚拟相机近到远的顺序,显示各个虚拟模型的动画帧所依据的动画更新频率分别优化为URO2、URO4和URO6,可以有效控制同屏显示多个虚拟模型的动画帧的时间消耗。
示例性地,在相关技术中的动画帧的显示方式下的画面显示效果如图9所示,在本申请实施例中的动画帧的显示方式下的画面显示效果如图10所示。在图9和图10中,占比值大于占比值阈值的虚拟模型(也可称为近距离虚拟模型)的数量为20,该20个虚拟模型的初始动画更新频率均为URO1,也即,该20个虚拟模型均保持每帧画面更新一次动画,此种情况下,应用程序的每帧画面更新耗时约20ms(毫秒),FPS为50。
假设资源消耗阈值为1个虚拟模型,经过负载均衡初步调整(也即根据资源消耗阈值的约束进行调整)之后,该20个虚拟模型的动画更新频率均为URO20,由于该20个虚拟模型均满足第一模型筛选条件(也即均属于高重要度模型),高重要度模型的动画更新频率不允许低于URO5,则利用本申请实施例提供的方式,该20个虚拟模型的目标动画更新频率均为URO5,也即每5帧画面更新一次动画。根据此种目标动画更新频率显示动画帧,应用程序的每帧画面更新耗时约为15.6ms,FPS提升为64。相比于相关技术,每帧画面更新耗时减少4.4ms,FPS提升16。根据图9和图10可知,利用不同的动画帧的显示方式,画面显示效果有所不同。
示例性地,动画帧的显示过程如图11所示,在应用程序运行之前,设定目标类别对应的资源消耗阈值;在显示第N(N为不小于1的整数)帧画面时,显示至少一个虚拟模型的与第N帧画面匹配的动画帧,该至少一个虚拟模型均为目标类别的虚拟模型;根据第N帧画面的显示结果,计算至少一个虚拟模型的占比值,将至少一个虚拟模型的占比值对应的动画更新频率作为至少一个虚拟模型的初始动画更新频率。基于至少一个虚拟模型的初始动画更新频率,获取资源消耗指标,判断资源消耗指标是否大于资源消耗阈值。
若资源消耗指标不大于资源消耗阈值,根据至少一个虚拟模型的初始动画更新频率,显示至少一个虚拟模型对应的动画帧,该至少一个虚拟模型对应的动画帧是指至少一个虚拟模型的与第(N+1)帧画面匹配的动画帧。
若资源消耗指标大于资源消耗阈值,将资源消耗指标与资源消耗阈值的比值作为调整系数;根据调整系数调整至少一个虚拟模型的初始动画更新频率,得到至少一个虚拟模型的第一动画更新频率。根据第一模型筛选条件和至少一个虚拟模型的第一动画更新频率,获取至少一个虚拟模型的目标动画更新频率,以保证表现。将关联模型之间的动画更新频率以及计数值同步,以保证表现。根据至少一个虚拟模型最新的动画更新频率,显示至少一个虚拟模对应的动画帧,该至少一个虚拟模型对应的动画帧是指至少一个虚拟模的与第(N+1)帧画面匹配的动画帧。
需要说明的是,对于至少一个虚拟模型为目标类别的模型,且需要同屏显示动画帧的虚拟模型还包括除目标类别外的其他类别的虚拟模型的情况,其他类别的虚拟模型的动画帧的显示过程可以参考本申请实施例提供的过程实现,以保证需要同屏显示动画帧的全部虚拟模型的动画帧的显示效果。
本申请实施例,在UE4引擎自带的URO动画优化技术的基础上,额外增加了负载均衡优化特性,通过配置调整某一类别的虚拟模型的资源消耗预算、高重要度模型的最低动画更新频率、动画插值平滑的条件等关键参数,在保证动画表现的前提下,可以有效控制多人场景下的动画更新消耗的资源,有效降低同屏显示多个虚拟模型的动画帧的耗时,达到性能和 表现的平衡,提升FPS,提升应用程序的体验,例如,若应用程序为游戏类应用程序,则可以提升游戏体验。
本申请实施例提供的动画帧的显示方法,至少一个虚拟模型对应的动画帧是根据至少一个虚拟模型的目标动画更新频率显示的,其中,至少一个虚拟模型的目标动画更新频率是在至少一个虚拟模型的初始动画更新频率的基础上考虑资源消耗指标确定的。根据至少一个虚拟模型的目标动画更新频率能够对资源消耗进行有效地全局控制,有利于提高动画帧的显示流畅性,进而提高人机交互率。
在通过考虑资源消耗指标确定目标动画更新频率的过程中,将资源消耗指标与资源消耗阈值进行比对,并且在资源消耗指标大于资源消耗阈值时,根据二者确定调整系数,按调整系数降低动画更新频率,从而降低动画更新需要消耗的资源量,达到降低全局动画更新的时间消耗的目的,从而提升FPS。
进一步地,通过考虑第一模型筛选条件来对高重要度的虚拟模型的目标动画更新频率进行限制,使得高重要度的虚拟模型的目标动画更新频率不低于参考动画更新频率,保证高重要度的虚拟模型的动画表现。
此外,在根据虚拟模型的目标动画更新频率,显示虚拟模型的动画帧时,将虚拟模型的目标动画更新频率与虚拟模型的计数值进行比对,当虚拟模型的目标动画更新频率与虚拟模型的计数值不匹配时,可以显示基于虚拟模型的第一动画帧、第二动画帧和计数值确定的目标动画帧,该目标动画帧是在第一动画帧和第二动画帧之间的插值平滑动画帧,显示目标动画帧能够达到接近于每帧更新的动画效果,也即接近于不降频的动画效果,提高动画帧的显示效果。
另外,判断虚拟模型是否关联于其他虚拟模型,若虚拟模型关联于其他虚拟模型,则通过将虚拟模型的目标动画更新频率调整为其他虚拟模型的动画更新频率以及将虚拟模型的计数值调整为其他虚拟模型的计数值,来实现降频同步,也即使虚拟模型的动画更新与所关联的虚拟模型的动画更新同步,保证动画表现正确。
参见图12,本申请实施例提供了一种动画帧的显示装置,该装置包括:
第一获取单元1201,用于基于至少一个虚拟模型的初始动画更新频率,获取资源消耗指标,资源消耗指标用于指示根据至少一个虚拟模型的初始动画更新频率进行动画更新需要消耗的资源量;
第二获取单元1202,用于基于资源消耗指标以及初始动画更新频率,获取至少一个虚拟模型的目标动画更新频率;
显示单元1203,用于根据目标动画更新频率,显示至少一个虚拟模型对应的动画帧。
在一种可能实现方式中,第二获取单元1202,用于当资源消耗指标大于资源消耗阈值时,基于资源消耗指标和资源消耗阈值,确定调整系数;基于调整系数对初始动画更新频率进行调整,得到至少一个虚拟模型的第一动画更新频率;基于第一动画更新频率,获取至少一个虚拟模型的目标动画更新频率。
在一种可能实现方式中,第二获取单元1202,用于当第一虚拟模型满足第一模型筛选条件,且第一虚拟模型的第一动画更新频率不高于参考动画更新频率时,将参考动画更新频率作为第一虚拟模型的目标动画更新频率,第一虚拟模型为至少一个虚拟模型中的任一虚拟模型。
在一种可能实现方式中,第二获取单元1202,用于当第一虚拟模型满足第一模型筛选条件,且第一虚拟模型的第一动画更新频率高于参考动画更新频率时;或者,当第一虚拟模型不满足第一模型筛选条件时,将第一虚拟模型的第一动画更新频率作为第一虚拟模型的目标动画更新频率,第一虚拟模型为至少一个虚拟模型中的任一虚拟模型。
在一种可能实现方式中,调整系数为资源消耗指标与资源消耗阈值的比值;第二获取单元1202,用于计算第一虚拟模型的初始动画更新频率对应的画面帧数与调整系数的乘积,对 乘积进行取整,得到目标值,第一虚拟模型为至少一个虚拟模型中的任一虚拟模型;将对应的画面帧数为目标值的动画更新频率作为第一虚拟模型的第一动画更新频率。
在一种可能实现方式中,第二获取单元1202,用于当资源消耗指标不大于资源消耗阈值时,将初始动画更新频率作为至少一个虚拟模型的目标动画更新频率。
在一种可能实现方式中,显示单元1203,用于当第一虚拟模型的目标动画更新频率与第一虚拟模型的计数值不匹配时,显示第一虚拟模型的第一动画帧或目标动画帧,第一虚拟模型为至少一个虚拟模型中的任一虚拟模型;其中,第一动画帧为第一虚拟模型的动画中已显示的最新的动画帧,目标动画帧基于第一动画帧、第二动画帧和第一虚拟模型的计数值确定,第二动画帧为第一虚拟模型的动画中位于第一动画帧后一位的动画帧。
在一种可能实现方式中,显示单元1203,用于当第一虚拟模型不满足第二模型筛选条件时,显示第一虚拟模型的第一动画帧;当第一虚拟模型满足第二模型筛选条件时,显示第一虚拟模型的目标动画帧。
在一种可能实现方式中,显示单元1203,还用于基于第一动画帧和第二动画帧,确定候选插值平滑动画帧;在候选插值平滑动画帧中确定与第一虚拟模型的计数值对应的插值平滑动画帧,将与第一虚拟模型的计数值对应的插值平滑动画帧作为第一虚拟模型的目标动画帧。
在一种可能实现方式中,显示单元1203,用于当第一虚拟模型的目标动画更新频率与第一虚拟模型的计数值匹配时,显示第一虚拟模型的第二动画帧,第一虚拟模型为至少一个虚拟模型中的任一虚拟模型;其中,第二动画帧为第一虚拟模型的动画中位于第一动画帧后一位的动画帧,第一动画帧为第一虚拟模型的动画中已显示的最新的动画帧。
在一种可能实现方式中,显示单元1203,用于当第一虚拟模型关联于第二虚拟模型时,将第一虚拟模型的目标动画更新频率调整为第二虚拟模型的动画更新频率,得到第一虚拟模型的调整后的动画更新频率,第一虚拟模型为至少一个虚拟模型中的任一虚拟模型;根据第一虚拟模型的调整后的动画更新频率,显示第一虚拟模型对应的动画帧。
在一种可能实现方式中,显示单元1203,还用于将第一虚拟模型的计数值调整为第二虚拟模型的计数值,以使第一虚拟模型的动画更新与第二虚拟模型的动画更新同步。
在一种可能实现方式中,第一获取单元1201,用于获取至少一个虚拟模型的资源消耗子指标,任一虚拟模型的资源消耗子指标与任一虚拟模型的初始动画更新频率呈正相关关系;汇总至少一个虚拟模型的资源消耗子指标,得到资源消耗指标。
在一种可能实现方式中,第一获取单元1201,用于确定第一虚拟模型的初始动画更新频率对应的画面帧数,第一虚拟模型为至少一个虚拟模型中的任一虚拟模型;将与画面帧数呈负相关关系的正数作为第一虚拟模型的资源消耗子指标。
在一种可能实现方式中,第一获取单元1201,还用于确定第一虚拟模型的占比值,第一虚拟模型为至少一个虚拟模型中的任一虚拟模型,第一虚拟模型的占比值为第一虚拟模型的渲染尺寸与参考尺寸的比值;将第一虚拟模型的占比值对应的动画更新频率作为第一虚拟模型的初始动画更新频率。
在一种可能实现方式中,资源消耗阈值为目标类别对应的资源消耗阈值,至少一个虚拟模型均为目标类别的虚拟模型。
在一种可能实现方式中,第一获取单元1201,用于当虚拟模型的情况满足参考条件时,基于至少一个虚拟模型的初始动画更新频率,获取资源消耗指标;其中,虚拟模型的情况满足参考条件包括以下任一项:需要同屏显示动画帧的全部虚拟模型的数量大于第一数量阈值;需要同屏显示动画帧的全部虚拟模型中占比值大于占比值阈值的虚拟模型的数量大于第二数量阈值;需要同屏显示动画帧的全部虚拟模型的数量大于第一数量阈值,且全部虚拟模型中占比值大于占比值阈值的虚拟模型的数量大于第二数量阈值;任一虚拟模型的占比值为任一虚拟模型的渲染尺寸与参考尺寸的比值。
本申请实施例提供的动画帧的显示装置,至少一个虚拟模型对应的动画帧是根据至少一个虚拟模型的目标动画更新频率显示的,其中,至少一个虚拟模型的目标动画更新频率是在 至少一个虚拟模型的初始动画更新频率的基础上考虑资源消耗指标确定的。根据至少一个虚拟模型的目标动画更新频率能够对资源消耗进行有效地全局控制,有利于提高动画帧的显示流畅性,进而提高人机交互率。
在通过考虑资源消耗指标确定目标动画更新频率的过程中,将资源消耗指标与资源消耗阈值进行比对,并且在资源消耗指标大于资源消耗阈值时,根据二者确定调整系数,按调整系数降低动画更新频率,从而降低动画更新需要消耗的资源量,达到降低全局动画更新的时间消耗的目的,从而提升FPS。
进一步地,通过考虑第一模型筛选条件来对高重要度的虚拟模型的目标动画更新频率进行限制,使得高重要度的虚拟模型的目标动画更新频率不低于参考动画更新频率,保证高重要度的虚拟模型的动画表现。
此外,在根据虚拟模型的目标动画更新频率,显示虚拟模型的动画帧时,将虚拟模型的目标动画更新频率与虚拟模型的计数值进行比对,当虚拟模型的目标动画更新频率与虚拟模型的计数值不匹配时,可以显示基于虚拟模型的第一动画帧、第二动画帧和计数值确定的目标动画帧,该目标动画帧是在第一动画帧和第二动画帧之间的插值平滑动画帧,显示目标动画帧能够达到接近于每帧更新的动画效果,也即接近于不降频的动画效果,提高动画帧的显示效果。
另外,判断虚拟模型是否关联于其他虚拟模型,若虚拟模型关联于其他虚拟模型,则通过将虚拟模型的目标动画更新频率调整为其他虚拟模型的动画更新频率以及将虚拟模型的计数值调整为其他虚拟模型的计数值,来实现降频同步,也即使虚拟模型的动画更新与所关联的虚拟模型的动画更新同步,保证动画表现正确。
需要说明的是,上述实施例提供的装置在实现其功能时,仅以上述各功能单元的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元完成,即将设备的内部结构划分成不同的功能单元,以完成以上描述的全部或者部分功能。另外,上述实施例提供的装置与方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。
图13是本申请实施例提供的一种计算机设备的结构示意图。该计算机设备可以为终端,该终端可以是:PC、手机、智能手机、PDA、可穿戴设备、手持便携式游戏设备、PPC、平板电脑、智能车机、智能电视、智能音箱、车载终端。终端还可能被称为用户设备、便携式终端、膝上型终端、台式终端等其他名称。
通常,终端包括有:处理器1301和存储器1302。
处理器1301可以包括一个或多个处理核心,比如4核心处理器、8核心处理器等。处理器1301可以采用DSP(Digital Signal Processing,数字信号处理)、FPGA(Field-Programmable Gate Array,现场可编程门阵列)、PLA(Programmable Logic Array,可编程逻辑阵列)中的至少一种硬件形式来实现。处理器1301也可以包括主处理器和协处理器,主处理器是用于对在唤醒状态下的数据进行处理的处理器,也称CPU;协处理器是用于对在待机状态下的数据进行处理的低功耗处理器。在一些实施例中,处理器1301可以集成有GPU(Graphics Processing Unit,图像处理器),GPU用于负责显示屏所需要显示的内容的渲染和绘制。一些实施例中,处理器1301还可以包括AI(Artificial Intelligence,人工智能)处理器,该AI处理器用于处理有关机器学习的计算操作。
存储器1302可以包括一个或多个计算机可读存储介质,该计算机可读存储介质可以是非暂态的。存储器1302还可包括高速随机存取存储器,以及非易失性存储器,比如一个或多个磁盘存储设备、闪存存储设备。在一些实施例中,存储器1302中的非暂态的计算机可读存储介质用于存储至少一个指令,该至少一个指令用于被处理器1301所执行,以使该终端实现本申请中方法实施例提供的动画帧的显示方法。
在一些实施例中,终端还可选包括有:显示屏1305。
显示屏1305用于显示UI(User Interface,用户界面)。该UI可以包括图形、文本、图标、视频及其它们的任意组合。当显示屏1305是触摸显示屏时,显示屏1305还具有采集在显示屏1305的表面或表面上方的触摸信号的能力。该触摸信号可以作为控制信号输入至处理器1301进行处理。此时,显示屏1305还可以用于提供虚拟按钮和/或虚拟键盘,也称软按钮和/或软键盘。在一些实施例中,显示屏1305可以为一个,设置在终端的前面板;在另一些实施例中,显示屏1305可以为至少两个,分别设置在终端的不同表面或呈折叠设计;在另一些实施例中,显示屏1305可以是柔性显示屏,设置在终端的弯曲表面上或折叠面上。甚至,显示屏1305还可以设置成非矩形的不规则图形,也即异形屏。显示屏1305可以采用LCD(Liquid Crystal Display,液晶显示屏)、OLED(Organic Light-Emitting Diode,有机发光二极管)等材质制备。示例性地,至少一个虚拟模型对应的动画帧通过该显示屏1305显示。
本领域技术人员可以理解,图13中示出的结构并不构成对终端的限定,可以包括比图示更多或更少的组件,或者组合某些组件,或者采用不同的组件布置。
在示例性实施例中,还提供了一种非易失性计算机可读存储介质,该非易失性计算机可读存储介质中存储有至少一条计算机程序,该至少一条计算机程序由计算机设备的处理器加载并执行,以使计算机实现上述任一种动画帧的显示方法。
在一种可能实现方式中,上述非易失性计算机可读存储介质可以是只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、只读光盘(Compact Disc Read-Only Memory,CD-ROM)、磁带、软盘和光数据存储设备等。
在示例性实施例中,还提供了一种计算机程序产品,该计算机程序产品包括计算机程序或计算机指令,该计算机程序或计算机指令由处理器加载并执行,以使计算机实现上述任一种动画帧的显示方法。
需要说明的是,本申请中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施。以上示例性实施例中所描述的实施方式并不代表与本申请相一致的所有实施方式。相反,它们仅是与本申请的一些方面相一致的装置和方法的例子。
应当理解的是,在本文中提及的“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。字符“/”一般表示前后关联对象是一种“或”的关系。
以上所述仅为本申请的示例性实施例,并不用以限制本申请,凡在本申请的原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。

Claims (21)

  1. 一种动画帧的显示方法,其中,所述方法由电子设备执行,所述方法包括:
    基于至少一个虚拟模型的初始动画更新频率,获取资源消耗指标,所述资源消耗指标用于指示根据所述至少一个虚拟模型的初始动画更新频率进行动画更新需要消耗的资源量;
    基于所述资源消耗指标以及所述初始动画更新频率,获取所述至少一个虚拟模型的目标动画更新频率;
    根据所述目标动画更新频率,显示所述至少一个虚拟模型对应的动画帧。
  2. 根据权利要求1所述的方法,其中,所述基于所述资源消耗指标以及所述初始动画更新频率,获取所述至少一个虚拟模型的目标动画更新频率,包括:
    当所述资源消耗指标大于资源消耗阈值时,基于所述资源消耗指标和所述资源消耗阈值,确定调整系数;
    基于所述调整系数对所述初始动画更新频率进行调整,得到所述至少一个虚拟模型的第一动画更新频率;
    基于所述第一动画更新频率,获取所述至少一个虚拟模型的目标动画更新频率。
  3. 根据权利要求2所述的方法,其中,所述基于所述第一动画更新频率,获取所述至少一个虚拟模型的目标动画更新频率,包括:
    当第一虚拟模型满足第一模型筛选条件,且所述第一虚拟模型的第一动画更新频率不高于参考动画更新频率时,将所述参考动画更新频率作为所述第一虚拟模型的目标动画更新频率,所述第一虚拟模型为所述至少一个虚拟模型中的任一虚拟模型。
  4. 根据权利要求2所述的方法,其中,所述基于所述第一动画更新频率,获取所述至少一个虚拟模型的目标动画更新频率,包括:
    当第一虚拟模型满足第一模型筛选条件,且所述第一虚拟模型的第一动画更新频率高于参考动画更新频率时;或者,当所述第一虚拟模型不满足所述第一模型筛选条件时,将所述第一虚拟模型的第一动画更新频率作为所述第一虚拟模型的目标动画更新频率,所述第一虚拟模型为所述至少一个虚拟模型中的任一虚拟模型。
  5. 根据权利要求2所述的方法,其中,所述调整系数为所述资源消耗指标与所述资源消耗阈值的比值;所述基于所述调整系数对所述初始动画更新频率进行调整,得到所述至少一个虚拟模型的第一动画更新频率,包括:
    计算第一虚拟模型的初始动画更新频率对应的画面帧数与所述调整系数的乘积,对所述乘积进行取整,得到目标值,所述第一虚拟模型为所述至少一个虚拟模型中的任一虚拟模型;
    将对应的画面帧数为所述目标值的动画更新频率作为所述第一虚拟模型的第一动画更新频率。
  6. 根据权利要求1所述的方法,其中,所述基于所述资源消耗指标以及所述初始动画更新频率,获取所述至少一个虚拟模型的目标动画更新频率,包括:
    当所述资源消耗指标不大于资源消耗阈值时,将所述初始动画更新频率作为所述至少一个虚拟模型的目标动画更新频率。
  7. 根据权利要求1-6任一所述的方法,其中,所述根据所述目标动画更新频率,显示所述至少一个虚拟模型对应的动画帧,包括:
    当第一虚拟模型的目标动画更新频率与所述第一虚拟模型的计数值不匹配时,显示所述第一虚拟模型的第一动画帧或目标动画帧,所述第一虚拟模型为所述至少一个虚拟模型中的 任一虚拟模型;
    其中,所述第一动画帧为所述第一虚拟模型的动画中已显示的最新的动画帧,所述目标动画帧基于所述第一动画帧、第二动画帧和所述第一虚拟模型的计数值确定,所述第二动画帧为所述第一虚拟模型的动画中位于所述第一动画帧后一位的动画帧。
  8. 根据权利要求7所述的方法,其中,所述显示所述第一虚拟模型的第一动画帧或目标动画帧,包括:
    当所述第一虚拟模型不满足第二模型筛选条件时,显示所述第一虚拟模型的第一动画帧;
    当所述第一虚拟模型满足所述第二模型筛选条件时,显示所述第一虚拟模型的目标动画帧。
  9. 根据权利要求8所述的方法,其中,所述显示所述第一虚拟模型的目标动画帧之前,所述方法还包括:
    基于所述第一动画帧和所述第二动画帧,确定候选插值平滑动画帧;
    在所述候选插值平滑动画帧中确定与所述第一虚拟模型的计数值对应的插值平滑动画帧,将所述与所述第一虚拟模型的计数值对应的插值平滑动画帧作为所述第一虚拟模型的目标动画帧。
  10. 根据权利要求1-6任一所述的方法,其中,所述根据所述目标动画更新频率,显示所述至少一个虚拟模型对应的动画帧,包括:
    当第一虚拟模型的目标动画更新频率与所述第一虚拟模型的计数值匹配时,显示所述第一虚拟模型的第二动画帧,所述第一虚拟模型为所述至少一个虚拟模型中的任一虚拟模型;其中,所述第二动画帧为所述第一虚拟模型的动画中位于第一动画帧后一位的动画帧,所述第一动画帧为所述第一虚拟模型的动画中已显示的最新的动画帧。
  11. 根据权利要求1-6任一所述的方法,其中,所述根据所述目标动画更新频率,显示所述至少一个虚拟模型对应的动画帧,包括:
    当第一虚拟模型关联于第二虚拟模型时,将所述第一虚拟模型的目标动画更新频率调整为所述第二虚拟模型的动画更新频率,得到所述第一虚拟模型的调整后的动画更新频率,所述第一虚拟模型为所述至少一个虚拟模型中的任一虚拟模型;
    根据所述第一虚拟模型的调整后的动画更新频率,显示所述第一虚拟模型对应的动画帧。
  12. 根据权利要求11所述的方法,其中,所述将所述第一虚拟模型的目标动画更新频率调整为所述第二虚拟模型的动画更新频率之后,所述方法还包括:
    将所述第一虚拟模型的计数值调整为所述第二虚拟模型的计数值,以使所述第一虚拟模型的动画更新与所述第二虚拟模型的动画更新同步。
  13. 根据权利要求1-6任一所述的方法,其中,所述基于至少一个虚拟模型的初始动画更新频率,获取资源消耗指标,包括:
    获取所述至少一个虚拟模型的资源消耗子指标,任一虚拟模型的资源消耗子指标与所述任一虚拟模型的初始动画更新频率呈正相关关系;
    汇总所述至少一个虚拟模型的资源消耗子指标,得到所述资源消耗指标。
  14. 根据权利要求13所述的方法,其中,所述获取至少一个虚拟模型的资源消耗子指标,包括:
    确定第一虚拟模型的初始动画更新频率对应的画面帧数,所述第一虚拟模型为所述至少 一个虚拟模型中的任一虚拟模型;
    将与所述画面帧数呈负相关关系的正数作为所述第一虚拟模型的资源消耗子指标。
  15. 根据权利要求1-6任一所述的方法,其中,所述基于至少一个虚拟模型的初始动画更新频率,获取资源消耗指标之前,所述方法还包括:
    确定第一虚拟模型的占比值,所述第一虚拟模型为所述至少一个虚拟模型中的任一虚拟模型,所述第一虚拟模型的占比值为所述第一虚拟模型的渲染尺寸与参考尺寸的比值;
    将所述第一虚拟模型的占比值对应的动画更新频率作为所述第一虚拟模型的初始动画更新频率。
  16. 根据权利要求2-6任一所述的方法,其中,所述资源消耗阈值为目标类别对应的资源消耗阈值,所述至少一个虚拟模型均为所述目标类别的虚拟模型。
  17. 根据权利要求1-6任一所述的方法,其中,所述基于至少一个虚拟模型的初始动画更新频率,获取资源消耗指标,包括:
    当虚拟模型的情况满足参考条件时,基于至少一个虚拟模型的初始动画更新频率,获取资源消耗指标;
    其中,所述虚拟模型的情况满足参考条件包括以下任一项:需要同屏显示动画帧的全部虚拟模型的数量大于第一数量阈值;需要同屏显示动画帧的全部虚拟模型中占比值大于占比值阈值的虚拟模型的数量大于第二数量阈值;需要同屏显示动画帧的全部虚拟模型的数量大于所述第一数量阈值,且所述全部虚拟模型中占比值大于所述占比值阈值的虚拟模型的数量大于所述第二数量阈值;
    任一虚拟模型的占比值为所述任一虚拟模型的渲染尺寸与参考尺寸的比值。
  18. 一种动画帧的显示装置,其中,所述装置包括:
    第一获取单元,用于基于至少一个虚拟模型的初始动画更新频率,获取资源消耗指标,所述资源消耗指标用于指示根据所述至少一个虚拟模型的初始动画更新频率进行动画更新需要消耗的资源量;
    第二获取单元,用于基于所述资源消耗指标以及所述初始动画更新频率,获取所述至少一个虚拟模型的目标动画更新频率;
    显示单元,用于根据所述目标动画更新频率,显示所述至少一个虚拟模型对应的动画帧。
  19. 一种计算机设备,其中,所述计算机设备包括处理器和存储器,所述存储器中存储有至少一条计算机程序,所述至少一条计算机程序由所述处理器加载并执行,以使所述计算机设备实现如权利要求1至17任一所述的动画帧的显示方法。
  20. 一种非易失性计算机可读存储介质,其中,所述非易失性计算机可读存储介质中存储有至少一条计算机程序,所述至少一条计算机程序由处理器加载并执行,以使计算机实现如权利要求1至17任一所述的动画帧的显示方法。
  21. 一种计算机程序产品,其中,所述计算机程序产品包括计算机程序或计算机指令,所述计算机程序或所述计算机指令由处理器加载并执行,以使计算机实现如权利要求1至17任一所述的动画帧的显示方法。
PCT/CN2022/127133 2022-01-05 2022-10-24 动画帧的显示方法、装置、设备及存储介质 WO2023130808A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US18/455,592 US20230401772A1 (en) 2022-01-05 2023-08-24 Animation frame display method and apparatus, device, and storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210006550.9 2022-01-05
CN202210006550.9A CN114299201A (zh) 2022-01-05 2022-01-05 动画帧的显示方法、装置、设备及存储介质

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US18/455,592 Continuation US20230401772A1 (en) 2022-01-05 2023-08-24 Animation frame display method and apparatus, device, and storage medium

Publications (1)

Publication Number Publication Date
WO2023130808A1 true WO2023130808A1 (zh) 2023-07-13

Family

ID=80975310

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/127133 WO2023130808A1 (zh) 2022-01-05 2022-10-24 动画帧的显示方法、装置、设备及存储介质

Country Status (3)

Country Link
US (1) US20230401772A1 (zh)
CN (1) CN114299201A (zh)
WO (1) WO2023130808A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114299201A (zh) * 2022-01-05 2022-04-08 腾讯科技(深圳)有限公司 动画帧的显示方法、装置、设备及存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090167768A1 (en) * 2007-12-31 2009-07-02 Apple Inc. Selective frame rate display of a 3D object
US20110096077A1 (en) * 2009-10-27 2011-04-28 Microsoft Corporation Controlling animation frame rate of applications
CN106816134A (zh) * 2017-01-24 2017-06-09 广东欧珀移动通信有限公司 显示帧率调整方法、装置和终端设备
CN112927332A (zh) * 2021-04-02 2021-06-08 腾讯科技(深圳)有限公司 骨骼动画更新方法、装置、设备及存储介质
CN114299201A (zh) * 2022-01-05 2022-04-08 腾讯科技(深圳)有限公司 动画帧的显示方法、装置、设备及存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090167768A1 (en) * 2007-12-31 2009-07-02 Apple Inc. Selective frame rate display of a 3D object
US20110096077A1 (en) * 2009-10-27 2011-04-28 Microsoft Corporation Controlling animation frame rate of applications
CN106816134A (zh) * 2017-01-24 2017-06-09 广东欧珀移动通信有限公司 显示帧率调整方法、装置和终端设备
CN112927332A (zh) * 2021-04-02 2021-06-08 腾讯科技(深圳)有限公司 骨骼动画更新方法、装置、设备及存储介质
CN114299201A (zh) * 2022-01-05 2022-04-08 腾讯科技(深圳)有限公司 动画帧的显示方法、装置、设备及存储介质

Also Published As

Publication number Publication date
US20230401772A1 (en) 2023-12-14
CN114299201A (zh) 2022-04-08

Similar Documents

Publication Publication Date Title
CN111652121B (zh) 一种表情迁移模型的训练方法、表情迁移的方法及装置
WO2020228406A1 (zh) 图像风格化生成方法、装置及电子设备
CN108211352B (zh) 一种调节画质的方法及终端
CN111190926B (zh) 资源缓存方法、装置、设备及存储介质
CN111767554B (zh) 屏幕分享方法、装置、存储介质及电子设备
CN112802172B (zh) 三维模型的纹理映射方法、装置、存储介质及计算机设备
US20190080512A1 (en) Three-dimensional graphics image processing
WO2023130808A1 (zh) 动画帧的显示方法、装置、设备及存储介质
CN113350793B (zh) 一种界面元素设置方法、装置、电子设备和存储介质
WO2022247204A1 (zh) 游戏的显示控制方法、非易失性存储介质及电子装置
US20220109617A1 (en) Latency determinations for human interface devices
CN108290071B (zh) 用于在预测游戏者的意图的情况下确定用于执行绘制的资源分配的介质、装置、系统和方法
US20230082928A1 (en) Virtual aiming control
CN112927332A (zh) 骨骼动画更新方法、装置、设备及存储介质
WO2020156487A1 (zh) 场景识别方法及装置、终端、存储介质
CN109302523B (zh) 一种手机端和服务器端手机性能评估方法
CN111277904B (zh) 一种视频的播放控制方法、装置及计算设备
CN110197459B (zh) 图像风格化生成方法、装置及电子设备
CN110089076B (zh) 实现信息互动的方法和装置
CN114863008B (zh) 图像处理方法、装置、电子设备及存储介质
US8633932B1 (en) Animation with adjustable detail level
CN106547339A (zh) 计算机设备的控制方法和装置
CN118159341A (zh) 一种图像帧的渲染方法及相关装置
US20220253807A1 (en) Context aware annotations for collaborative applications
CN113941152A (zh) 虚拟对象控制方法、装置、电子设备及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22918260

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2023575358

Country of ref document: JP

Kind code of ref document: A

WWE Wipo information: entry into national phase

Ref document number: 2022918260

Country of ref document: EP

ENP Entry into the national phase

Ref document number: 2022918260

Country of ref document: EP

Effective date: 20240610