CN112927332B - Bone animation updating method, device, equipment and storage medium - Google Patents

Bone animation updating method, device, equipment and storage medium Download PDF

Info

Publication number
CN112927332B
CN112927332B CN202110362955.1A CN202110362955A CN112927332B CN 112927332 B CN112927332 B CN 112927332B CN 202110362955 A CN202110362955 A CN 202110362955A CN 112927332 B CN112927332 B CN 112927332B
Authority
CN
China
Prior art keywords
animation
skeleton
group
bone
updating
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN202110362955.1A
Other languages
Chinese (zh)
Other versions
CN112927332A (en
Inventor
王磊
郭袁
林智超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202110362955.1A priority Critical patent/CN112927332B/en
Publication of CN112927332A publication Critical patent/CN112927332A/en
Application granted granted Critical
Publication of CN112927332B publication Critical patent/CN112927332B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T13/00Animation
    • G06T13/203D [Three Dimensional] animation
    • G06T13/403D [Three Dimensional] animation of characters, e.g. humans, animals or virtual beings
    • 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/60Generating or modifying game content before or while executing the game program, e.g. authoring tools specially adapted for game development or game-integrated level editor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/02Non-photorealistic rendering
    • 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

Landscapes

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

Abstract

The embodiment of the application discloses a skeleton animation updating method, a device, equipment and a storage medium, belonging to the technical field of computer graphics. The method comprises the following steps: displaying a virtual scene interface, wherein the virtual scene interface is used for displaying pictures obtained by shooting a virtual scene through a virtual camera; displaying a first scene picture in the virtual scene interface, wherein the first scene picture comprises a first virtual object, and the first virtual object corresponds to at least one skeleton group; updating the skeleton animation of the first virtual object in the first scene picture; at least one of the skeletal groups has a respective animation update interval in the skeletal animation, and the animation update interval of the skeletal group is inversely related to the rendering size of the skeletal group. Therefore, the consumption of processing resources and electric quantity resources is reduced while the display effect of the skeletal animation of the virtual object is ensured.

Description

Bone animation updating method, device, equipment and storage medium
Technical Field
The present invention relates to the field of computer graphics, and in particular, to a method, an apparatus, a device, and a storage medium for updating a skeletal animation.
Background
Currently, in a game application program, in order to solve the problem of influencing game performance when a skeletal animation is displayed, virtual objects can be distinguished according to multiple levels of detail.
In the related art, the virtual objects in the virtual scene are divided into multiple levels of detail according to the positions and the importance levels, when the level of the virtual object division is high, the skeleton model of the virtual object can be replaced with a simpler skeleton model and a simpler skeleton animation resource, and when the level of the virtual object division is low, the skeleton model of the virtual object can be replaced with a more complex skeleton model and a finer skeleton animation resource.
However, the above-mentioned way of replacing the skeleton model and skeleton animation resources to reduce the impact of displaying skeleton animation on game performance requires introducing additional skeleton model and skeleton animation resources, which increases the manufacturing cost and also causes additional resources to be occupied.
Disclosure of Invention
The embodiment of the application provides a skeleton animation updating method, device, equipment and storage medium, which can respectively determine corresponding animation updating intervals according to rendering sizes for different skeleton groups and update skeleton animation based on the animation updating intervals corresponding to the skeleton groups, so that the display effect of the skeleton animation of a virtual object is ensured, and meanwhile, the consumption of processing resources and electric quantity resources is reduced. The technical scheme is as follows:
In one aspect, an embodiment of the present application provides a bone animation updating method, where the method includes:
displaying a virtual scene interface, wherein the virtual scene interface is used for displaying pictures obtained by shooting a virtual scene through a virtual camera;
displaying a first scene picture in the virtual scene interface, wherein the first scene picture comprises a first virtual object, and the first virtual object corresponds to at least one skeleton group;
updating the skeleton animation of the first virtual object in the first scene picture; at least one of the skeletal groups has a respective animation update interval in the skeletal animation, and the animation update interval of the skeletal group is inversely related to the rendering size of the skeletal group.
In another aspect, an embodiment of the present application provides a bone animation updating apparatus, including:
the interface display module is used for displaying a virtual scene interface, and the virtual scene interface is used for displaying pictures obtained by shooting a virtual scene through a virtual camera;
the picture display module is used for displaying a first scene picture in the virtual scene interface, wherein the first scene picture comprises a first virtual object, and the first virtual object corresponds to at least one skeleton group;
The animation updating module is used for updating the skeleton animation of the first virtual object in the first scene picture; at least one of the skeletal groups has a respective animation update interval in the skeletal animation, and the animation update interval of the skeletal group is inversely related to the rendering size of the skeletal group.
In one possible implementation, the animation updating module includes:
a distance acquisition sub-module, configured to acquire a first distance between the virtual camera and the first virtual object;
a size determination submodule, configured to determine a rendering size corresponding to at least one bone group, respectively, based on the first distance;
the interval determining submodule is used for determining an animation updating interval corresponding to at least one skeleton group respectively based on rendering sizes corresponding to at least one skeleton group respectively;
and the animation updating sub-module is used for updating the skeleton animation of the first virtual object in the first scene picture based on the animation updating intervals respectively corresponding to the skeleton groups.
In one possible implementation, the animation updating sub-module includes:
a list determining unit, configured to determine an animation execution list corresponding to the current frame based on the animation update interval; the animation execution list comprises names of the skeleton groups which need to be updated in the skeleton animation in the skeleton model corresponding to the first virtual object of the current frame;
And the animation updating unit is used for updating the skeleton animation corresponding to the first virtual object in the first scene picture based on the animation execution list corresponding to the current frame picture.
In one possible implementation, at least a first bone group is included in a bone model responsive to the first virtual object; the animation update interval corresponding to the first skeleton group is a first update interval;
the list determining unit is configured to determine, based on the list of the plurality of users,
detecting a first counter value corresponding to the first bone group; the first counter is used for recording the corresponding frame pictures when the corresponding skeleton animation update is carried out last time on the first skeleton group, and the interval frame number between the frame pictures is away from the current frame picture;
and in response to the first counter value being greater than or equal to the first updating interval, adding the first skeleton group into the animation execution list corresponding to the current frame picture, and zeroing the first counter value.
In a possible implementation, the list determining unit is further configured to,
and in response to the first counter value being smaller than the first updating interval, accumulating the first counter value, wherein the first skeleton group does not join the animation execution list corresponding to the current frame picture.
In one possible implementation, the bone group in any one of the bone models is included in an initial state in response to the animation execution list;
the list determining unit is configured to determine, based on the list of the plurality of users,
in response to the first counter value being less than the first update interval, removing the first skeleton group from the animation execution list corresponding to the current frame picture, and determining the animation execution list corresponding to the current frame picture; the first bone set is any one of the bone sets in the bone model.
In one possible implementation, the animation updating unit is configured to, in response to a request from the user,
acquiring a skeleton identifier corresponding to at least one skeleton group in the animation execution list;
and in the first scene picture, updating the skeleton animation of the skeleton group corresponding to the skeleton mark in the skeleton model in the current frame picture.
In one possible implementation, the interval determination submodule includes:
a mapping acquisition unit, configured to acquire a configuration mapping table; the configuration mapping table is used for indicating the corresponding relation between the rendering size and the animation updating interval respectively configured by the at least one skeleton group;
And the first interval determining unit is used for determining the animation updating interval respectively corresponding to the at least one skeleton group from the configuration mapping table based on the rendering size.
In one possible implementation, the interval determination submodule includes:
a second interval determining unit configured to determine, in response to the at least one bone group including a first bone group and a second bone group, an animation update interval to which the first bone group and the second bone group respectively correspond, based on the rendering size and a position of the first bone group and the second bone group in the bone model;
and under the same rendering size, the distance between the skeleton group and the tail end of the skeleton model is inversely related to the animation updating interval corresponding to the skeleton group.
In one possible implementation, the bone group in the bone model is at least one of a stem bone group and a terminal bone group;
the backbone bone group comprises at least one of a spine bone group, an arm bone group, a shoulder bone group, a leg bone group and a head bone group; the end skeletal set includes at least one of a hand skeletal set, a foot skeletal set, and a apparel portion skeletal set.
In one possible implementation, in response to the rendering size being less than or equal to a first threshold, the animation update interval corresponding to the end bone group is greater than the animation update interval corresponding to the backbone bone group;
responsive to the rendering size being greater than the first threshold, the animation update interval corresponding to the end skeletal group is equal to the animation update interval corresponding to the backbone skeletal group.
In another aspect, an embodiment of the present application provides a terminal, where the terminal includes a processor and a memory, where the memory stores at least one instruction, at least one program, a code set, or an instruction set, and the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by the processor to implement the bone animation update method according to the above aspect.
In another aspect, embodiments of the present application provide a computer-readable storage medium having at least one instruction, at least one program, a set of codes, or a set of instructions stored therein, where the at least one instruction, the at least one program, the set of codes, or the set of instructions are loaded and executed by a processor to implement the bone animation update method as described in the above aspects.
According to one aspect of the present application, there is provided a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the terminal reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the terminal performs the bone animation updating method provided in various alternative implementations of the above aspect.
The beneficial effects of the technical scheme provided by the embodiment of the application at least comprise:
the method comprises the steps of determining respective animation updating intervals of at least one skeleton group which is inversely related to the rendering size in skeleton animations by acquiring the rendering size corresponding to at least one skeleton group of a first virtual object, and updating the skeleton animations of the first virtual object based on the animation updating intervals, so that when the skeleton animations are updated, the frequency of the skeleton animations can be different through different skeleton groups, refreshing the skeleton group with larger rendering size at a higher frequency, guaranteeing a display effect, refreshing the skeleton group with smaller rendering size at a lower frequency, saving processing resources and electric quantity resources, and reducing consumption of the processing resources and the electric quantity resources while guaranteeing the display effect of the skeleton animations of the virtual object.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
FIG. 1 is a schematic diagram of a skeletal animation updating system provided in an exemplary embodiment of the present application;
FIG. 2 is a schematic diagram of a skeletal animation update flow provided in one exemplary embodiment of the present application;
FIG. 3 is a method flow diagram of a bone animation update method provided in an exemplary embodiment of the present application;
FIG. 4 is a logic flow diagram for determining whether a bone animation update is performed for a bone group of a current frame of pictures in accordance with the embodiment of FIG. 3;
FIG. 5 is a diagram of a corresponding skeletal animation update scenario for a different rendering size in accordance with the embodiment of FIG. 3;
FIG. 6 is a time-consuming illustration of animation on an animation thread in accordance with the embodiment of FIG. 3;
FIG. 7 is a block diagram of a skeletal animation updating apparatus provided in one exemplary embodiment of the present application;
FIG. 8 is a block diagram of a computer device provided in an exemplary embodiment of the present application;
fig. 9 is a block diagram of a computer device according to an exemplary embodiment of the present application.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present application as detailed in the accompanying claims.
1) Virtual scene
A virtual scene is a virtual scene that an application program displays (or provides) while running on a terminal. The virtual scene can be a simulation environment scene of a real world, a half-simulation half-fictional three-dimensional environment scene, or a pure fictional three-dimensional environment scene. The virtual scene may be any one of a two-dimensional virtual scene, a 2.5-dimensional virtual scene, and a three-dimensional virtual scene, and the following embodiments are exemplified by the virtual scene being a three-dimensional virtual scene, but are not limited thereto. Optionally, the virtual scene may also be used for virtual scene fight between at least two virtual characters. Optionally, the virtual scene may also be used to fight between at least two virtual characters using a virtual firearm. Optionally, the virtual scene may be further operable to use the virtual firearm to fight between at least two virtual characters within a target area range that is continuously smaller over time in the virtual scene. Virtual scenes are typically presented by application generation in a computer device such as a terminal based on hardware (such as a screen) in the terminal. The terminal can be a mobile terminal such as a smart phone, a tablet computer or an electronic book reader; alternatively, the terminal may be a notebook computer or a personal computer device of a stationary computer.
2) Virtual object
Virtual objects refer to movable objects in a virtual scene. The movable object may be at least one of a virtual character, a virtual animal, a virtual vehicle. Alternatively, when the virtual scene is a three-dimensional virtual scene, the virtual object is a three-dimensional stereoscopic model created based on an animated skeleton technique. Each virtual object has its own shape, volume, and orientation in the three-dimensional virtual scene and occupies a portion of the space in the three-dimensional virtual scene.
3) Multiple levels of detail
Multiple Detail Levels (LOD), the LOD refers to determining the resource allocation of object rendering according to the position and importance of the nodes of the object model in the display environment, and reducing the number of planes and the Detail of non-important objects, so as to obtain efficient rendering operation. In general, the lower the LOD level, the more important the object model, whereas the higher the LOD level, the less important the object model.
4) Skeletal animation LOD
The skeletal animation LOD is to determine the detail level of playing the skeletal animation according to the distance between the virtual object playing the skeletal animation and the virtual camera and the importance level of the virtual object. In general, for virtual objects far away from the virtual camera or not important, a manner of simplifying a skeleton or reducing the updating frequency of the animation can be adopted to solve the problem of game performance brought in the skeleton animation rendering process.
5) Screen space rendering size
In the UE4 (the virtual Engine 4), the size of the skeletal animation mesh body on the screen may be identified using the rendering size of the skeletal animation mesh body in the screen space, and the LOD level corresponding to the virtual object may be determined according to the size value. In general, the farther a virtual object is from a virtual camera, the smaller the rendering size on the screen, the larger the LOD level; conversely, the closer the virtual object is to the virtual camera, the larger the rendered size on the screen, and the smaller the LOD level.
6) Animation update interval
The animation update interval may also be referred to as a skeletal animation update interval frame number. The skeletal animation update interval frame number is the frame number of the interval between two skeletal animation updates. If the skeleton animation update interval frame number is 0, the skeleton animation is indicated to be updated every frame. In general, the animation update interval may be converted into an animation update frequency, and the smaller the animation update interval, the higher the animation update frequency, and the smaller the frame number of the skeleton animation update interval.
Referring to fig. 1, a schematic diagram of a skeletal animation updating system according to an embodiment of the present application is shown. The system may include: computer device 110, terminal 120, and server 140.
The computer device 110 is a terminal corresponding to a developer, on which a development and editing platform for supporting an application program of a virtual environment is installed, the developer can edit and update the application program on the terminal, and transmit an updated application program installation package to the server 140 through a wired or wireless network, and the terminal 120 can download the application program installation package from the server 140 to implement update of the application program.
The terminal 120 installs and runs an application supporting a virtual environment, which may be a multi-person online fight program. When the terminal 120 runs the application, a user interface of the application is displayed on a screen of the terminal 120. The application may be any of a multiplayer online tactical Game (Multiplayer Online Battle Arena Games, MOBA), a fleeing Game, a simulated strategy Game (SLG). The terminal 120 is a terminal used by a first user, and the first user uses the terminal 120 to control a first virtual object located in a virtual scene to perform activities, where the first virtual object may be referred to as a master virtual object of the first user. The activities of the first virtual object include, but are not limited to: adjusting at least one of body posture, climbing, crawling, walking, running, riding, flying, jumping, driving, picking up, shooting, attacking, throwing, releasing skills. Illustratively, the first virtual object is a first virtual character, such as an emulated character or a cartoon character. The device types of the terminal 120 include: at least one of a smart phone, a tablet computer, an electronic book reader, an MP3 player, an MP4 player, a laptop portable computer, and a desktop computer. Only one terminal is shown in fig. 1, but in different embodiments there are a number of other terminals that can access the server 140.
The computer device 110 and the terminal 120 are connected to the server 140 via a wireless network or a wired network.
Server 140 includes at least one of a server, a server cluster formed by a plurality of servers, a cloud computing platform, and a virtualization center. The server 140 is used to provide background services for applications supporting a three-dimensional virtual environment. Optionally, the server 140 takes on primary computing work and the terminal takes on secondary computing work; alternatively, the server 140 takes on secondary computing work and the terminal takes on primary computing work; alternatively, a distributed computing architecture is used between the server 140 and the terminal for collaborative computing. The virtual scene may be a three-dimensional virtual scene, or the virtual scene may be a two-dimensional virtual scene. The following embodiment takes as an example that the virtual scene is a three-dimensional virtual scene.
In the related art, the problem of influencing game performance when a skeletal animation is displayed is solved. The LOD levels of the virtual objects need to be distinguished, in one case, when the LOD levels of the virtual objects are higher, the performance problem of exhibiting the skeletal animation can be solved by replacing a simpler skeletal model and animation resources with the virtual objects; and when the LOD level of the virtual object is lower, more complex and fine skeleton models and finer skeleton animation resources can be used interchangeably to ensure skeleton animation expression effects in the virtual scene. According to the scheme, skeleton models and corresponding animation resources for replacement, which correspond to different LOD levels, are required to be manufactured for different virtual objects, so that on one hand, the manufacturing cost of skeleton animation is improved, and on the other hand, as resources, which need to be replaced, of different LOD levels are required to be loaded into a memory during operation, additional memory overhead is brought to the virtual scene during operation.
In another case, when the LOD level of the virtual object is higher, the skeleton animation update frequency of the skeleton model of the whole virtual object can be reduced; and when the LOD level of the virtual object is lower, the normal skeleton animation updating frequency of the virtual object can be restored. Under the scheme, when the LOD level of the virtual object is lower, if the animation update rate of the whole skeleton model of the virtual object is limited, the animation of the virtual object is relatively stagnant, so that the expression effect of the skeleton animation is affected; if the overall animation update frequency of the virtual object is not limited, the performance problem in the process of actually displaying the skeleton animation can not be solved, and meanwhile, in the actual application process, the balance between the performance and the animation expression effect is difficult to obtain.
According to the skeleton animation updating method, a first scene picture is displayed in a virtual scene interface, wherein the first scene picture comprises a first virtual object with at least one skeleton group, and the respective animation updating interval of the at least one skeleton group in the skeleton animation is determined based on the rendering size of the skeleton group, so that the skeleton animation of the first virtual object is updated. Referring to fig. 2, a schematic diagram of a bone animation update procedure according to an exemplary embodiment of the present application is shown. The method may be performed by a computer device, which may be a terminal or a server. As shown in fig. 2, the computer device may update the skeletal animation of the virtual object in the virtual scene by performing the following steps.
Step 201, displaying a virtual scene interface, where the virtual scene interface is used to display a picture obtained by shooting a virtual scene with a virtual camera.
In the embodiment of the application, the terminal displays a virtual scene display interface obtained by shooting a virtual scene through a virtual camera on a display screen.
Step 202, a first scene picture is displayed in the virtual scene interface, wherein the first scene picture contains a first virtual object, and the first virtual object corresponds to at least one skeleton group.
In the embodiment of the application, the terminal displays a first scene picture containing a first virtual object in a virtual scene display interface.
The first virtual object may be a virtual object controlled by a terminal, or may be a virtual object controlled by another terminal or an application program.
In one possible implementation manner, the first virtual object is displayed in the virtual scene in the three-dimensional environment through a constructed three-dimensional model, and the three-dimensional model comprises a skeleton model of the first virtual object and is used for simulating a skeleton structure in reality, so that the first virtual object is controlled to flexibly execute various actions.
The skeleton model is composed of at least one skeleton group, and each skeleton corresponding to the at least one skeleton group is matched with each other to control the first virtual object to execute each action, and each action is displayed in a skeleton animation updating mode. Any one bone group includes at least one parent bone and at least one child bone.
Since the skeleton animation update operation corresponding to a skeleton is usually performed in a local space of the skeleton, the transformation data of a child skeleton in world space depends on all its parents, and all its parents must participate in the update at this time in order to ensure that the child skeleton obtains the correct transformation result. Similarly, when one sub-skeleton decides that the current frame is to skip updating, if a certain sub-skeleton thereof decides to update, the transform data obtained by that sub-skeleton is problematic. In executing the bone animation, it is necessary to execute the decision logic of whether or not the frame is to update the bone animation of the corresponding bone group in order from the parent bone to the child bone. That is, when a parent bone decides to skip updating the corresponding bone animation, all child bones in the bone group no longer update the bone animation when a frame, and other child bones in the bone group are not required to perform subsequent decision logic of whether to update the bone animation. Similarly, when a skeleton determines that the current frame is to perform updating of the skeleton animation, all parent skeletons corresponding to the skeleton cannot skip updating of the skeleton animation corresponding to the skeleton group.
Step 203, in the first scene picture, updating the skeleton animation of the first virtual object; at least one skeleton group has a respective animation update interval in the skeleton animation, and the animation update interval of the skeleton group is inversely related to the rendering size of the skeleton group.
In the embodiment of the present application, in a first scene, a rendering size corresponding to a skeleton group is acquired, an animation update interval corresponding to the skeleton group with which the rendering size is inversely related is determined, and based on respective animation update intervals of at least one skeleton group in skeleton animations, the skeleton animations of each skeleton group in a first virtual object are updated, so that the skeleton animations of the first virtual object are updated.
In one possible implementation manner, the skeleton model corresponding to the first virtual object at least includes one skeleton group needing to perform the skeleton animation LOD, and the skeleton not included in the skeleton group needing to perform the skeleton animation LOD is set to perform animation update every frame.
In summary, according to the scheme shown in the embodiment of the present application, by acquiring the rendering size corresponding to at least one skeleton group of the first virtual object, determining the respective animation update interval of at least one skeleton group negatively related to the rendering size in the skeleton animation, and then updating the skeleton animation of the first virtual object based on the animation update interval, so that when the skeleton animation is updated, the frequency of updating the skeleton animation can be different through different skeleton groups, for the skeleton group with a larger rendering size, a higher frequency refresh is used, a display effect is ensured, for the skeleton group with a smaller rendering size, a lower frequency refresh is used, and therefore, processing resources and electric quantity resources are saved, and the consumption of processing resources and electric quantity resources is reduced while the display effect of the skeleton animation of the virtual object is ensured.
Referring to fig. 3, a method flowchart of a bone animation update method according to an exemplary embodiment of the present application is shown. The method may be performed by a computer device, which may be a terminal or a server. As shown in fig. 3, taking a computer device as an example of a terminal, the terminal may update a skeletal animation of a virtual object in a virtual scene by performing the following steps.
Step 301, a first scene picture is displayed in a virtual scene interface.
In the embodiment of the application, the terminal displays the virtual scene interface in response to the start of the operation of the virtual scene, and then displays the first scene picture when the virtual camera observes that the first virtual object exists in the virtual scene.
The virtual scene interface is used for displaying pictures obtained by shooting virtual scenes through the virtual camera. The first scene picture comprises a first virtual object, and the first virtual object corresponds to at least one skeleton group.
In one possible implementation, the bone group in the bone model is at least one of a stem bone group and a terminal bone group.
The skeleton groups of the trunk are skeleton groups near the root in skeleton trees corresponding to the skeleton models, and the skeleton groups of the tail ends are skeleton groups near leaf nodes in the skeleton trees.
For example, taking a human skeletal model as an example, the backbone skeleton group may include at least one of a spine skeleton group, an arm skeleton group, a shoulder skeleton group, a leg skeleton group, and a head skeleton group; the end skeletal set may include at least one of a hand skeletal set, a foot skeletal set, and a apparel portion skeletal set. In addition, the skeletal model of the first virtual object may also be a non-human skeletal model.
Step 302, a first distance between a virtual camera and a first virtual object is obtained.
In the embodiment of the application, the terminal acquires a first distance between the virtual camera and the first virtual object.
Wherein the first distance may be a straight line distance from the virtual camera to a center of gravity of the first virtual object. Alternatively, it may be a vertical distance between the virtual camera and a plane perpendicular to the horizontal ground where the center of gravity of the first virtual object is located.
Step 303, determining rendering sizes corresponding to the at least one skeleton group respectively based on the first distance.
In the embodiment of the application, the terminal determines rendering sizes corresponding to each skeleton group on the skeleton model of the first virtual object based on the acquired first distance.
The terminal determines the rendering size of each skeleton group on the screen space on the skeleton model of the first virtual object based on the acquired first distance.
In one possible implementation, the rendering sizes respectively corresponding to the respective bone groups are related to model sizes respectively corresponding to the respective bone groups in addition to the magnitudes of the first distances.
For example, if a bone group a and a bone group B exist in the bone model of the first virtual object, the model size corresponding to the bone group a is greater than the model size corresponding to the bone group B, when the first virtual object enters the first virtual scene and is observed by the virtual camera, a first distance between the bone group a and the virtual camera and a first distance between the bone group B and the virtual camera are determined, and if the first distance between the bone group a and the virtual camera and the first distance between the bone group B and the virtual camera are equal, the rendering size corresponding to the bone group a is greater than the rendering size corresponding to the bone group B because the model size corresponding to the bone group a is greater than the model size corresponding to the bone group B.
Step 304, determining an animation update interval corresponding to at least one skeleton group based on the rendering sizes corresponding to at least one skeleton group respectively.
In the embodiment of the application, the terminal can determine the animation update interval of each skeleton group in the current frame based on the rendering sizes corresponding to each skeleton group on the obtained skeleton model.
Wherein, the animation update interval refers to the number of frames of the interval between two skeletal animation updates of the skeletal group.
In one possible implementation, a configuration map is obtained, and based on the rendering size, an animation update interval corresponding to each of the at least one skeleton group is determined from the configuration map.
That is, after the terminal obtains the rendering size corresponding to each skeleton group, the terminal searches the animation update interval corresponding to each skeleton group from the configuration mapping table stored in the server.
The configuration mapping table is used for indicating the corresponding relation between the rendering size and the animation updating interval respectively configured by at least one skeleton group.
For example, as shown in table 1 below, if the skeleton model includes skeleton group X, skeleton group Y, and skeleton group Z, the configuration mapping table may indicate that, for all parent skeletons and child skeletons in skeleton group X, when the rendering size of the virtual object corresponding to the rendering size in the screen space is smaller than a, the animation update interval corresponding to each skeleton in skeleton group X is a frames; when the rendering size of the virtual object corresponding to the virtual object in the screen space is larger than A and smaller than B, the animation updating interval corresponding to each skeleton in the skeleton group X is B frames; when the rendering size of the virtual object corresponding to the virtual object in the screen space is larger than B and smaller than C, the animation updating interval corresponding to each skeleton in the skeleton group X is C frames; when the rendering size of the virtual object corresponding to the virtual object in the screen space is larger than C, the animation updating interval corresponding to each skeleton is 0 frames, namely, each frame is subjected to skeleton animation updating. For all the father bones and the child bones in the skeleton group Y, when the rendering size of the virtual object corresponding to the virtual object in the screen space is smaller than D, the animation updating interval corresponding to each bone in the skeleton group Y is D frames; when the rendering size of the virtual object corresponding to the virtual object in the screen space is larger than D and smaller than E, the animation updating interval corresponding to each skeleton in the skeleton group Y is E frames; when the rendering size of the virtual object corresponding to the virtual object in the screen space is larger than E, the animation updating interval corresponding to each skeleton is 0 frame; for all the father bones and the child bones in the skeleton group Z, when the rendering size of the virtual object corresponding to the virtual object in the screen space is smaller than F, the animation updating interval corresponding to each bone in the skeleton group Z is F frames; when the rendering size of the virtual object corresponding to the virtual object in the screen space is larger than F, the animation updating interval corresponding to each skeleton is 0 frame; generally, if there is a relationship A < B < C, then there is a > B > C; if D < E is present, then D > E is present.
Figure SMS_1
TABLE 1
In one possible implementation, in response to at least one bone group being a first bone group and a second bone group, an animation update interval corresponding to the first bone group and the second bone group, respectively, is determined based on the rendering size and a position of the first bone group and the second bone group in the bone model.
Wherein, under the same rendering size, the distance between the skeleton group and the tail end of the skeleton model is inversely related to the animation updating interval corresponding to the skeleton group.
For example, in configuring the mapping relationship between the rendering size and the animation update interval for each bone group in the bone model of the virtual object, the configuration rule of the mapping relationship may conform to that the animation update interval for a bone group (such as a finger bone group, a toe bone group, a skirt bone group, etc.) closer to the end of the bone model is smaller as the animation update interval for a bone group (such as a torso bone group, a leg bone group, an arm bone group, etc.) closer to the top of the bone model is larger under the rendering size of the same screen space.
In one possible implementation, in response to the rendering size being less than or equal to a first threshold, the animation update interval corresponding to the end skeleton group is greater than the animation update interval corresponding to the backbone skeleton group; in response to the rendering size being greater than the first threshold, the animation update interval corresponding to the end skeleton group is equal to the animation update interval corresponding to the backbone skeleton group.
For example, if the first distance between the first virtual object and the virtual camera is smaller than the first threshold x, the rendering size of the skeleton model corresponding to the first virtual object in the screen space is smaller than or equal to the specified value, so in this case, in order to reduce the influence of the skeleton animation on the running performance of the virtual scene, the update rate of the skeleton animation should be reduced, at this time, the speed of updating the skeleton animation by the skeleton group at the end position of the skeleton model may be preferentially reduced, and then if the rendering size continues to be reduced, the reduction of the update rate of the skeleton animation by the skeleton group near the end position may be restarted. If the first distance between the first virtual object and the virtual camera is greater than or equal to a first threshold x, that is, the rendering size of the skeleton model corresponding to the first virtual object in the screen space is greater than or equal to a specified value, the skeleton animation needs to be updated more finely, so that the animation display effect of the skeleton animation can be improved by updating the skeleton animation every frame.
In step 305, based on the animation update intervals corresponding to the skeleton groups, the skeleton animation of the first virtual object is updated in the first scene.
In the embodiment of the application, in the process of updating the skeleton animation, the terminal determines the skeleton animation of the updated first virtual object displayed in the first scene based on the obtained animation updating interval corresponding to each skeleton group of the current scene.
In one possible implementation manner, determining an animation execution list corresponding to a current frame picture based on an animation update interval; and updating the skeleton animation corresponding to the first virtual object in the first scene picture based on the animation execution list corresponding to the current frame picture.
The animation execution list includes names of skeleton groups which need to be subjected to skeleton animation updating in a skeleton model corresponding to a first virtual object of the current frame of picture.
In one possible implementation manner, in response to the bone model of the first virtual object including at least the first bone group, and the animation update interval corresponding to the first bone group is the first update interval, first, a first counter value corresponding to the first bone group is detected, then, in response to the first counter value being greater than or equal to the first update interval, the first bone group is added to the animation execution list corresponding to the current frame picture, and the first counter value is zeroed. And in response to the first counter value being smaller than the first updating interval, accumulating the first counter value, wherein the first skeleton group does not join the animation execution list corresponding to the current frame picture.
The first counter is used for recording corresponding frame pictures when the first skeleton group carries out corresponding skeleton animation updating last time, and is distant from interval frames between current frame pictures.
Fig. 4 is a logic flow diagram for determining whether a bone animation update is performed on a current frame group according to an embodiment of the present application. As shown in fig. 4, each bone in the bone model of the first virtual object has a respective counter, for any bone in the bone model, the initial value of the counter is set to zero (S41), then, each frame of picture starts to calculate the bone for which the current frame needs to be subjected to the bone animation update (S42), firstly, the animation update interval corresponding to the bone in the current frame of picture is obtained based on the rendering size under the screen space corresponding to the current frame of picture and the configuration data table corresponding to the animation update interval, and the relationship between the current counter value of the bone and the animation update interval size is determined (S43). If the current counter value of the skeleton is less than the animation update interval, the counter value is incremented by 1 (S44), and it is determined that the skeleton is not being updated for the skeleton animation in the current frame (S45), and then the subsequent animation update logic is continued (S46). If the value of the counter is greater than the number of frames of the animation update interval, it is determined that the skeleton of the current frame is required to be updated (S47), and at the same time, the counter value corresponding to the skeleton is cleared (S48), and then the subsequent animation update logic is continued (S46).
In another possible implementation, the list of animation executions includes any one of the bone groups in the bone model in an initial state in response to the animation; and in response to the first counter value being smaller than the first updating interval, removing the first skeleton group from the animation execution list corresponding to the current frame picture, and determining the animation execution list corresponding to the current frame picture.
Wherein the first bone set is any one bone set in the bone model.
For example, the total number of bones included in the bone model of the first virtual object in the virtual scene is 127, with the terminal bone numbers of the hand, foot, and skirt portions being 84. When the bone animation LOD is enabled, after the animation update frequency of the end bone parts is reduced, 84 end bones are removed in the animation execution list, and only bones of the spine, the arms, the shoulders, the legs and the head remain in the animation execution list, and the number of the bones is 43.
In one possible implementation manner, acquiring a skeleton identifier corresponding to at least one skeleton group in an animation execution list; in the first scene picture, updating the skeleton animation of the skeleton group corresponding to the skeleton mark in the skeleton model in the current frame picture.
When the animation execution list is configured, the names of skeleton groups are added in the table, and in the process of updating the skeleton animation through the animation execution list, the skeleton names need to be converted into skeleton index values of the skeleton in the skeleton model. Therefore, it is necessary to convert the bone names in the animation execution list into index value lists of these bones and their sub-bones according to mapping information between each bone name in the bone model to the bone index value at the initialization stage and when the first virtual object changes the bone model.
That is, in the virtual scene operation process, the terminal determines the animation update interval corresponding to each skeleton group in the current picture based on the rendering size of the virtual object in the current screen space and the configuration data for determining the animation update interval corresponding to each skeleton group acquired from the server. When the rendering size of the virtual object in the screen space is large, that is, when the virtual object is included closer to the virtual camera or the actual model size of the virtual object is large, a small animation update interval can be maintained for each skeleton group of the virtual object in this case; when the rendering size of the virtual object in the screen space is smaller, namely the virtual object is far away from the virtual camera or the actual model size of the virtual object is smaller, for each skeleton group of the virtual object under the condition, the animation updating interval corresponding to the tail end skeleton group in the virtual object is preferentially increased, so that the problem that the performance of the game is influenced due to the fact that the skeleton animation is displayed is solved while the animation effect in the virtual scene is ensured.
Fig. 5 is a schematic diagram illustrating a corresponding skeletal animation update situation under different rendering sizes according to an embodiment of the present application. As shown in fig. 5, when the same virtual object performs the same hand-engaging action, the corresponding rendering sizes are different, and the animation update conditions corresponding to two adjacent frames of pictures of the skeleton of the finger part are also different. When the virtual object is located at a short distance from the virtual camera, the rendering size in the screen space is large, and when the virtual object is located at the first frame 511, the finger portion skeleton of the virtual object is in the expanded state 513, and when the virtual object is located at the second frame 512, the finger portion skeleton of the virtual object is in the slightly curved state 514. When the virtual object is located at a medium distance from the virtual camera, the rendering size in the screen space is slightly smaller than the rendering size at a short distance, the finger portion skeleton of the virtual object is in an expanded state 523 at a first frame 521 at a medium distance, and the finger portion skeleton of the virtual object is in a fully curved state 524 at a second frame 522 at a medium distance. When the virtual object is located at a long distance from the virtual camera, the rendering size in the screen space is small, and the finger portion skeleton of the virtual object is in the expanded state 533 in the long-distance first frame 531 and is still in the expanded state 534 in the long-distance second frame 532.
For example, the terminal may display a calculation process for determining a bone animation update based on the calculation instructions. As shown in table 2 below, the configuration data of the end skeleton group corresponding to the skeleton animation of the first virtual object.
Figure SMS_2
TABLE 2
If the virtual camera is located right above the head of the terminal main control virtual object, that is, if the first scene is a scene displayed at the first view angle, if the distance between the main control virtual object and the virtual object of the enemy camp as the first virtual object in the virtual scene is far, the rendering size of the screen space corresponding to the virtual object of the enemy camp is smaller, and the rendering size is calculated to be 0.0014, and based on the data configured in table 2, the rendering size is smaller than the rendering size of the smallest screen space in the configuration data by 0.002, so that the frame number of the update interval of the skeleton animation of the current frame may be 180. In addition, when the value of the counter corresponding to the end skeleton is smaller than the skeleton animation updating interval frame number 180, the end skeleton does not participate in animation updating, and the number of the skeletons actually participating in updating is only 43 skeleton bones.
The relevant parameters in this process can be shown as ScreenSize (0.001419) TotalNumberOfBones (127) remannnumberofbones (43) updateRate (180) FrameCounter (12).
Wherein, the ScreenSize represents the rendering size in the screen space corresponding to the virtual object; totalNumberOfBones represents the total bone number in the bone model of the virtual object; the Remain NumberOfBones represents the number of bones participating in the updating of the bone animation in the current frame picture of the virtual object; updateRate represents the number of frames of the animation update interval of the end bones (e.g., hand, foot, and skirt bones) of the virtual object of the current frame; the FrameCounter indicates the value of the counter of the skeleton corresponding to the current frame picture.
As the value of the counter corresponding to the skeleton is incremented every frame, when the value of the counter exceeds 180, the number of skeletons participating in the update immediately becomes 127, and for this frame, the skeletons of the whole body of the virtual object participate in the animation update, and then the value of the counter immediately returns to zero to restart counting.
The relevant parameters of the process can be shown as ScreenSize (0.001413) TotalNumberOfBones (127) remalnnumberofbones (127) updateprate (180) FrameCounter (0).
When the main control virtual object gradually approaches to the virtual object of the enemy campaigns, the rendering size of the screen space of the virtual object of the enemy campaigns gradually increases, and when the rendering size of the screen space increases to 0.0024 (between 0.002 and 0.004 in the corresponding configuration data), the frame number of the updating interval of the skeleton animation of the character is reduced to 90, that is to say, the skeleton animation of the tail end skeleton of the first virtual object is updated every 90 frames at the moment.
The relevant parameters of the process can be shown as ScreenSize (0.002409) TotalNumberOfBones (127) remalnnumberofbones (43) updateRate (90) FrameCounter (35).
When the main control virtual object is closer to the first virtual object, the rendering size of the corresponding screen space is also increased continuously, the number of animation update interval frames corresponding to the skeleton animation is gradually reduced, and the update frequency of the tail end skeleton is gradually increased.
The relevant parameters of the process can be shown as ScreenSize (0.004804) TotalNumberOfBones (127) remalnnumberofbones (43) updateRate (30/5/0) FrameCounter (4).
Through the scheme shown in the embodiment, the multi-detail level of the skeletal animation can effectively reduce the time-consuming performance burrs of the terminal animation on the animation thread, and the following test can be performed.
On the same terminal equipment, the UE4 development building type is used for packaging, and when the main control virtual object and 20 other virtual objects are respectively used for fight under the two conditions of starting and not starting the skeleton animation LOD, the corresponding skeleton animation performance cost is tested. During the test, the master virtual object does not enable the skeletal animation LOD.
The specific test results are shown in table 3 below. As can be seen from the data in table 3, the average per frame overhead of the animation on the main thread is 3.36ms and the average per frame overhead on the asynchronous thread is 3.89ms without the skeletal animation LOD enabled. While in the case of enabling the skeletal animation LOD, the average overhead per frame of the animation on the main thread is 2.98ms, the time consumption is reduced by 11.3%, the average overhead per frame on the asynchronous thread is 2.46ms, and the time consumption is reduced by 36.8%.
Figure SMS_3
TABLE 3 Table 3
Wherein, on the data with the maximum time consumption, the maximum time consumption of the animation on the main thread is found to be 8.68ms and the maximum time consumption on the asynchronous thread is found to be 21.12ms under the condition that the skeletal animation LOD is not enabled. While in the case of enabling the skeletal animation LOD, the maximum time consumption of the animation on the main thread is 10.66ms, the animation is improved by 18.6%, the maximum time consumption on the asynchronous thread is 10.88ms, and the animation is reduced by 48.5%. Fig. 6 is a schematic diagram of animation time consumption on an animation thread according to an embodiment of the present application, and as shown in fig. 6, by comparing an animation overhead schematic diagram 61 on a main thread and an asynchronous thread when a bone animation LOD is not formed with an animation overhead schematic diagram 62 on a main thread and an asynchronous thread when a bone animation LOD is opened, it can be found that the bone animation LOD can effectively reduce performance burrs of animation time consumption on the animation thread.
In summary, according to the scheme shown in the embodiment of the present application, by acquiring the rendering size corresponding to at least one skeleton group of the first virtual object, determining the respective animation update interval of at least one skeleton group negatively related to the rendering size in the skeleton animation, and then updating the skeleton animation of the first virtual object based on the animation update interval, so that when the skeleton animation is updated, the frequency of updating the skeleton animation can be different through different skeleton groups, for the skeleton group with a larger rendering size, a higher frequency refresh is used, a display effect is ensured, for the skeleton group with a smaller rendering size, a lower frequency refresh is used, and therefore, processing resources and electric quantity resources are saved, and the consumption of processing resources and electric quantity resources is reduced while the display effect of the skeleton animation of the virtual object is ensured.
Fig. 7 is a block diagram of a bone animation updating apparatus according to an exemplary embodiment, as shown in fig. 7, for use in a computer device to perform all or part of the steps of the method shown in the corresponding embodiment of fig. 2 or 3. The bone animation updating apparatus may include:
the interface display module 710 is configured to display a virtual scene interface, where the virtual scene interface is configured to display a picture obtained by shooting a virtual scene with a virtual camera;
The picture display module 720 is configured to display a first scene picture in the virtual scene interface, where the first scene picture includes a first virtual object, and the first virtual object corresponds to at least one skeleton group;
an animation updating module 730, configured to update, in the first scene frame, a skeletal animation of the first virtual object; at least one of the skeletal groups has a respective animation update interval in the skeletal animation, and the animation update interval of the skeletal group is inversely related to the rendering size of the skeletal group.
In one possible implementation, the animation update module 730 includes:
a distance acquisition sub-module, configured to acquire a first distance between the virtual camera and the first virtual object;
a size determination submodule, configured to determine a rendering size corresponding to at least one bone group, respectively, based on the first distance;
the interval determining submodule is used for determining an animation updating interval corresponding to at least one skeleton group respectively based on rendering sizes corresponding to at least one skeleton group respectively;
and the animation updating sub-module is used for updating the skeleton animation of the first virtual object in the first scene picture based on the animation updating intervals respectively corresponding to the skeleton groups.
In one possible implementation, the animation updating sub-module includes:
a list determining unit, configured to determine an animation execution list corresponding to the current frame based on the animation update interval; the animation execution list comprises names of the skeleton groups which need to be updated in the skeleton animation in the skeleton model corresponding to the first virtual object of the current frame;
and the animation updating unit is used for updating the skeleton animation corresponding to the first virtual object in the first scene picture based on the animation execution list corresponding to the current frame picture.
In one possible implementation, at least a first bone group is included in a bone model responsive to the first virtual object; the animation update interval corresponding to the first skeleton group is a first update interval;
the list determining unit is configured to determine, based on the list of the plurality of users,
detecting a first counter value corresponding to the first bone group; the first counter is used for recording the corresponding frame pictures when the corresponding skeleton animation update is carried out last time on the first skeleton group, and the interval frame number between the frame pictures is away from the current frame picture;
and in response to the first counter value being greater than or equal to the first updating interval, adding the first skeleton group into the animation execution list corresponding to the current frame picture, and zeroing the first counter value.
In a possible implementation, the list determining unit is further configured to,
and in response to the first counter value being smaller than the first updating interval, accumulating the first counter value, wherein the first skeleton group does not join the animation execution list corresponding to the current frame picture.
In one possible implementation, the bone group in any one of the bone models is included in an initial state in response to the animation execution list;
the list determining unit is configured to determine, based on the list of the plurality of users,
in response to the first counter value being less than the first update interval, removing the first skeleton group from the animation execution list corresponding to the current frame picture, and determining the animation execution list corresponding to the current frame picture; the first bone set is any one of the bone sets in the bone model.
In one possible implementation, the animation updating unit is configured to, in response to a request from the user,
acquiring a skeleton identifier corresponding to at least one skeleton group in the animation execution list;
and in the first scene picture, updating the skeleton animation of the skeleton group corresponding to the skeleton mark in the skeleton model in the current frame picture.
In one possible implementation, the interval determination submodule includes:
a mapping acquisition unit, configured to acquire a configuration mapping table; the configuration mapping table is used for indicating the corresponding relation between the rendering size and the animation updating interval respectively configured by the at least one skeleton group;
and the first interval determining unit is used for determining the animation updating interval respectively corresponding to the at least one skeleton group from the configuration mapping table based on the rendering size.
In one possible implementation, the interval determination submodule includes:
a second interval determining unit configured to determine, in response to the at least one bone group including a first bone group and a second bone group, an animation update interval to which the first bone group and the second bone group respectively correspond, based on the rendering size and a position of the first bone group and the second bone group in the bone model;
and under the same rendering size, the distance between the skeleton group and the tail end of the skeleton model is inversely related to the animation updating interval corresponding to the skeleton group.
In one possible implementation, the bone group in the bone model is at least one of a stem bone group and a terminal bone group; the main skeleton group is located in a skeleton tree corresponding to the skeleton model, and is close to the root; the terminal bone group is the bone group located in the bone tree near a leaf node.
In one possible implementation, in response to the rendering size being less than or equal to a first threshold, the animation update interval corresponding to the end bone group is greater than the animation update interval corresponding to the backbone bone group;
responsive to the rendering size being greater than the first threshold, the animation update interval corresponding to the end skeletal group is equal to the animation update interval corresponding to the backbone skeletal group.
In summary, according to the scheme shown in the embodiment of the present application, by acquiring the rendering size corresponding to at least one skeleton group of the first virtual object, determining the respective animation update interval of at least one skeleton group negatively related to the rendering size in the skeleton animation, and then updating the skeleton animation of the first virtual object based on the animation update interval, so that when the skeleton animation is updated, the frequency of updating the skeleton animation can be different through different skeleton groups, for the skeleton group with a larger rendering size, a higher frequency refresh is used, a display effect is ensured, for the skeleton group with a smaller rendering size, a lower frequency refresh is used, and therefore, processing resources and electric quantity resources are saved, and the consumption of processing resources and electric quantity resources is reduced while the display effect of the skeleton animation of the virtual object is ensured.
Fig. 8 is a schematic diagram of a computer device, according to an example embodiment. The computer device may be implemented as a distributed system in the various method embodiments described above. The computer apparatus 800 includes a central processing unit (CPU, central Processing Unit) 801, a system Memory 804 including a random access Memory (Random Access Memory, RAM) 802 and a Read-Only Memory (ROM) 803, and a system bus 805 connecting the system Memory 804 and the central processing unit 801. The computer device 800 also includes a basic input/output system 806 that helps to transfer information between various devices within the computer, and a mass storage device 807 for storing an operating system 813, application programs 814, and other program modules 815.
The mass storage device 807 is connected to the central processing unit 801 through a mass storage controller (not shown) connected to the system bus 805. The mass storage device 807 and its associated computer-readable media provide non-volatile storage for the computer device 800. That is, the mass storage device 807 may include a computer readable medium (not shown) such as a hard disk or a compact disk-read Only Memory (CD-ROM) drive.
The computer readable medium may include computer storage media and communication media without loss of generality. Computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media includes RAM, ROM, flash memory or other solid state memory technology, CD-ROM, or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices. Of course, those skilled in the art will recognize that the computer storage medium is not limited to the one described above. The system memory 804 and mass storage device 807 described above may be collectively referred to as memory.
The computer device 800 may be connected to the internet or other network device through a network interface unit 811 connected to the system bus 805.
The memory further comprises one or more programs stored in the memory, by which the central processing unit 801 implements all or part of the steps of the method shown in fig. 2 or 3.
Fig. 9 is a block diagram of a computer device 900, shown in accordance with an exemplary embodiment. The computer device 900 may be a user terminal such as a smart phone, tablet, MP3 player (Moving Picture Experts Group Audio Layer III, mpeg 3), MP4 (Moving Picture Experts Group Audio Layer IV, mpeg 4) player, notebook or desktop. Computer device 900 may also be referred to by other names of user devices, portable terminals, laptop terminals, desktop terminals, and the like.
In general, the computer device 900 includes: a processor 901 and a memory 902.
Processor 901 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. The processor 901 may be implemented in at least one hardware form of DSP (Digital Signal Processing ), FPGA (Field-Programmable Gate Array, field programmable gate array), PLA (Programmable Logic Array ). The processor 901 may also include a main processor and a coprocessor, the main processor being a processor for processing data in an awake state, also referred to as a CPU (Central Processing Unit ); a coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 901 may integrate a GPU (Graphics Processing Unit, image processor) for rendering and drawing of content required to be displayed by the display screen. In some embodiments, the processor 901 may also include an AI (Artificial Intelligence ) processor for processing computing operations related to machine learning.
The memory 902 may include one or more computer-readable storage media, which may be non-transitory. The memory 902 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in memory 902 is used to store at least one instruction for execution by processor 901 to implement all or part of the steps in the methods provided by the method embodiments in the present application.
In some embodiments, the computer device 900 may also optionally include: a peripheral interface 903, and at least one peripheral. The processor 901, memory 902, and peripheral interface 903 may be connected by a bus or signal line. The individual peripheral devices may be connected to the peripheral device interface 903 via buses, signal lines, or circuit boards. Specifically, the peripheral device includes: at least one of radio frequency circuitry 904, a display 905, a camera assembly 906, audio circuitry 907, a positioning assembly 908, and a power source 909.
The peripheral interface 903 may be used to connect at least one peripheral device associated with an I/O (Input/Output) to the processor 901 and the memory 902.
The Radio Frequency circuit 904 is configured to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals.
The display 905 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display 905 is a touch display, the display 905 also has the ability to capture touch signals at or above the surface of the display 905. The touch signal may be input as a control signal to the processor 901 for processing. At this time, the display 905 may also be used to provide virtual buttons and/or a virtual keyboard, also referred to as soft buttons and/or a soft keyboard. In some embodiments, the display 905 may be one, providing a front panel of the computer device 900; in other embodiments, the display 905 may be at least two, respectively disposed on different surfaces of the computer device 900 or in a folded design; in still other embodiments, the display 905 may be a flexible display disposed on a curved surface or a folded surface of the computer device 900. Even more, the display 905 may be arranged in an irregular pattern other than rectangular, i.e., a shaped screen. The display 905 may be made of LCD (Liquid Crystal Display ), OLED (Organic Light-Emitting Diode) or other materials.
The camera assembly 906 is used to capture images or video.
The audio circuit 907 may include a microphone and a speaker.
The location component 908 is used to locate the current geographic location of the computer device 900 to enable navigation or LBS (Location Based Service, location-based services).
The power supply 909 is used to power the various components in the computer device 900.
In some embodiments, computer device 900 also includes one or more sensors 910. The one or more sensors 910 include, but are not limited to: acceleration sensor 911, gyroscope sensor 912, pressure sensor 913, fingerprint sensor 914, optical sensor 915, and proximity sensor 916.
Those skilled in the art will appreciate that the architecture shown in fig. 9 is not limiting of the computer device 900, and may include more or fewer components than shown, or may combine certain components, or employ a different arrangement of components.
In an exemplary embodiment, a non-transitory computer readable storage medium is also provided, including instructions, for example, a memory including at least one instruction, at least one program, a set of codes, or a set of instructions, executable by a processor to perform all or part of the steps of the methods shown in the corresponding embodiments of fig. 2 or 3. For example, the non-transitory computer readable storage medium may be a ROM (Read-Only Memory), a random access Memory (Random Access Memory, RAM), a CD-ROM (Compact Disc Read-Only Memory), a magnetic tape, a floppy disk, an optical data storage device, and the like.
According to one aspect of the present application, there is provided a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the terminal reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the terminal performs the bone animation updating method provided in various alternative implementations of the above aspect.
In an exemplary embodiment, a computer program product or a computer program is also provided, the computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the methods shown in the above embodiments.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the application following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the application pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It is to be understood that the present application is not limited to the precise arrangements and instrumentalities shown in the drawings, which have been described above, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (15)

1. A method for updating a skeletal animation, the method comprising:
displaying a virtual scene interface, wherein the virtual scene interface is used for displaying pictures obtained by shooting a virtual scene through a virtual camera;
displaying a first scene picture in the virtual scene interface, wherein the first scene picture comprises a first virtual object, and the first virtual object corresponds to at least one skeleton group;
updating the skeleton animation of the first virtual object in the first scene picture; at least one of the skeletal groups has a respective animation update interval in the skeletal animation, and the animation update interval of the skeletal group is inversely related to the rendering size of the skeletal group.
2. The method of claim 1, wherein updating the skeletal animation of the first virtual object in the first scene picture comprises:
acquiring a first distance between the virtual camera and the first virtual object;
Determining rendering sizes respectively corresponding to at least one bone group based on the first distance;
determining an animation updating interval corresponding to at least one skeleton group respectively based on rendering sizes corresponding to at least one skeleton group respectively;
and updating the skeleton animation of the first virtual object in the first scene picture based on the animation updating intervals respectively corresponding to the skeleton groups.
3. The method according to claim 2, wherein updating the skeletal animation of the first virtual object in the first scene based on the animation update interval respectively corresponding to the skeletal groups comprises:
determining an animation execution list corresponding to the current frame picture based on the animation update interval; the animation execution list comprises names of the skeleton groups which need to be updated in the skeleton animation in the skeleton model corresponding to the first virtual object of the current frame;
and updating the skeleton animation corresponding to the first virtual object in the first scene picture based on the animation execution list corresponding to the current frame picture.
4. A method according to claim 3, wherein at least a first bone group is included in the bone model responsive to the first virtual object; the animation update interval corresponding to the first skeleton group is a first update interval;
The determining the animation execution list corresponding to the current frame picture based on the animation update interval comprises the following steps:
detecting a first counter value corresponding to the first bone group; the first counter is used for recording the corresponding frame pictures when the corresponding skeleton animation update is carried out last time on the first skeleton group, and the interval frame number between the frame pictures is away from the current frame picture;
and in response to the first counter value being greater than or equal to the first updating interval, adding the first skeleton group into the animation execution list corresponding to the current frame picture, and zeroing the first counter value.
5. The method according to claim 4, wherein the method further comprises:
and in response to the first counter value being smaller than the first updating interval, accumulating the first counter value, wherein the first skeleton group does not join the animation execution list corresponding to the current frame picture.
6. The method of claim 4, wherein the list of animation executions includes any one of the bone groups in the bone model in an initial state in response to the animation;
the determining the animation execution list corresponding to the current frame picture based on the animation update interval comprises the following steps:
In response to the first counter value being less than the first update interval, removing the first skeleton group from the animation execution list corresponding to the current frame picture, and determining the animation execution list corresponding to the current frame picture; the first bone set is any one of the bone sets in the bone model.
7. A method according to claim 3, wherein said updating said skeletal animation corresponding to said first virtual object in said first scene based on said animation execution list corresponding to a current frame picture comprises:
acquiring a skeleton identifier corresponding to at least one skeleton group in the animation execution list;
and in the first scene picture, updating the skeleton animation of the skeleton group corresponding to the skeleton mark in the skeleton model in the current frame picture.
8. The method of claim 2, wherein the determining the animation update interval for each of the at least one bone group based on the rendering size for each of the at least one bone group comprises:
acquiring a configuration mapping table; the configuration mapping table is used for indicating the corresponding relation between the rendering size and the animation updating interval respectively configured by the at least one skeleton group;
And determining the animation updating interval corresponding to the at least one skeleton group respectively from the configuration mapping table based on the rendering size.
9. A method according to claim 3, wherein said determining an animation update interval for each of at least one of said bone groups based on a respective rendering size for each of at least one of said bone groups comprises:
responsive to the at least one bone group comprising a first bone group and a second bone group, determining an animation update interval for each of the first bone group and the second bone group based on the rendering size and a position of the first bone group and the second bone group in the bone model;
and under the same rendering size, the distance between the skeleton group and the tail end of the skeleton model is inversely related to the animation updating interval corresponding to the skeleton group.
10. A method according to claim 3, wherein the bone group in the bone model is at least one of a main bone group and a terminal bone group; the main skeleton group is located in a skeleton tree corresponding to the skeleton model, and is close to the root; the terminal bone group is the bone group located in the bone tree near a leaf node.
11. The method of claim 10, wherein the animation update interval for the end bone group is greater than the animation update interval for the backbone bone group in response to the rendering size being less than or equal to a first threshold;
responsive to the rendering size being greater than the first threshold, the animation update interval corresponding to the end skeletal group is equal to the animation update interval corresponding to the backbone skeletal group.
12. A bone animation updating device, the device comprising:
the interface display module is used for displaying a virtual scene interface, and the virtual scene interface is used for displaying pictures obtained by shooting a virtual scene through a virtual camera;
the picture display module is used for displaying a first scene picture in the virtual scene interface, wherein the first scene picture comprises a first virtual object, and the first virtual object corresponds to at least one skeleton group;
the animation updating module is used for updating the skeleton animation of the first virtual object in the first scene picture; at least one of the skeletal groups has a respective animation update interval in the skeletal animation, and the animation update interval of the skeletal group is inversely related to the rendering size of the skeletal group.
13. The apparatus of claim 12, wherein the animation update module comprises:
a distance acquisition sub-module, configured to acquire a first distance between the virtual camera and the first virtual object;
a size determination submodule, configured to determine a rendering size corresponding to at least one bone group, respectively, based on the first distance;
the interval determining submodule is used for determining an animation updating interval corresponding to at least one skeleton group respectively based on rendering sizes corresponding to at least one skeleton group respectively;
and the animation updating sub-module is used for updating the skeleton animation of the first virtual object in the first scene picture based on the animation updating intervals respectively corresponding to the skeleton groups.
14. A computer device comprising a processor and a memory having stored therein at least one instruction, at least one program, code set, or instruction set that is loaded and executed by the processor to implement the bone animation updating method of any of claims 1-11.
15. A computer readable storage medium having stored therein at least one computer program loaded and executed by a processor to implement the bone animation updating method of any of claims 1 to 11.
CN202110362955.1A 2021-04-02 2021-04-02 Bone animation updating method, device, equipment and storage medium Active CN112927332B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110362955.1A CN112927332B (en) 2021-04-02 2021-04-02 Bone animation updating method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110362955.1A CN112927332B (en) 2021-04-02 2021-04-02 Bone animation updating method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112927332A CN112927332A (en) 2021-06-08
CN112927332B true CN112927332B (en) 2023-06-09

Family

ID=76174055

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110362955.1A Active CN112927332B (en) 2021-04-02 2021-04-02 Bone animation updating method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112927332B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113457162B (en) * 2021-07-16 2023-09-19 腾讯科技(深圳)有限公司 Virtual object display method and related device
CN114004922B (en) * 2021-10-29 2023-11-24 腾讯科技(深圳)有限公司 Bone animation display method, device, equipment, medium and computer program product
CN114299201A (en) * 2022-01-05 2022-04-08 腾讯科技(深圳)有限公司 Animation frame display method, device, equipment and storage medium
CN114359469B (en) * 2022-01-07 2023-06-09 腾讯科技(深圳)有限公司 Method, device, equipment and medium for generating master control object projection

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6304297B1 (en) * 1998-07-21 2001-10-16 Ati Technologies, Inc. Method and apparatus for manipulating display of update rate
CN103021008A (en) * 2012-12-11 2013-04-03 湖南师范大学 Bone animation processing method based on programmable graphics processing unit (GPU)
CN104461662A (en) * 2014-12-25 2015-03-25 上海恺英网络科技有限公司 Unity3d bone animation plugin SmoothMoves loading optimizing method
CN108970113A (en) * 2018-07-26 2018-12-11 广州多益网络股份有限公司 A kind of collision checking method, device, equipment and medium
CN111228797A (en) * 2020-01-13 2020-06-05 腾讯科技(深圳)有限公司 Data processing method, data processing device, computer and readable storage medium
CN111667544A (en) * 2020-07-02 2020-09-15 腾讯科技(深圳)有限公司 Animation data compression method, device, equipment and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3880603B2 (en) * 2005-02-22 2007-02-14 株式会社コナミデジタルエンタテインメント Image processing apparatus, image processing method, and program
US8593463B2 (en) * 2009-10-27 2013-11-26 Microsoft Corporation Controlling animation frame rate of applications
CA2711874C (en) * 2010-08-26 2011-05-31 Microsoft Corporation Aligning animation state update and frame composition
GB2554287A (en) * 2015-05-22 2018-03-28 Naturalmotion Ltd Animating a virtual object in a virtual world

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6304297B1 (en) * 1998-07-21 2001-10-16 Ati Technologies, Inc. Method and apparatus for manipulating display of update rate
CN103021008A (en) * 2012-12-11 2013-04-03 湖南师范大学 Bone animation processing method based on programmable graphics processing unit (GPU)
CN104461662A (en) * 2014-12-25 2015-03-25 上海恺英网络科技有限公司 Unity3d bone animation plugin SmoothMoves loading optimizing method
CN108970113A (en) * 2018-07-26 2018-12-11 广州多益网络股份有限公司 A kind of collision checking method, device, equipment and medium
CN111228797A (en) * 2020-01-13 2020-06-05 腾讯科技(深圳)有限公司 Data processing method, data processing device, computer and readable storage medium
CN111667544A (en) * 2020-07-02 2020-09-15 腾讯科技(深圳)有限公司 Animation data compression method, device, equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Skeletal Animation Optimization Tips and Tricks;Peyman Massoudi;《https://www.gamedev.net/tutorials/programming/graphics/skeletal-animation-optimization-tips-and-tricks-r3988/》;全文 *
Skeletal Animation(骨骼动画);CG迷途大熊猫;《https://www.cnblogs.com/lai3d/archive/2009/12/22/1629749.html》;全文 *

Also Published As

Publication number Publication date
CN112927332A (en) 2021-06-08

Similar Documents

Publication Publication Date Title
CN112927332B (en) Bone animation updating method, device, equipment and storage medium
JP5887458B1 (en) A game system for searching for a route of a non-player character based on a player&#39;s movement history
US20230050933A1 (en) Two-dimensional figure display method and apparatus for virtual object, device, and storage medium
WO2021238870A1 (en) Information display method and apparatus, and device and storage medium
CN111013142A (en) Interactive effect display method and device, computer equipment and storage medium
CN111672116B (en) Method, device, terminal and storage medium for controlling virtual object release technology
CN112717407B (en) Virtual object control method, device, terminal and storage medium
CN112717404B (en) Virtual object movement processing method and device, electronic equipment and storage medium
CN111672111A (en) Interface display method, device, equipment and storage medium
CN110570500B (en) Character drawing method, device, equipment and computer readable storage medium
CN110457200B (en) Test case generation method and equipment, storage medium and electronic equipment thereof
JP7250403B2 (en) VIRTUAL SCENE DISPLAY METHOD, DEVICE, TERMINAL AND COMPUTER PROGRAM
CN111228813B (en) Virtual object control method, device, equipment and storage medium
JP2022552306A (en) VIRTUAL CHARACTER CONTROL METHOD, APPARATUS AND DEVICE IN VIRTUAL ENVIRONMENT
WO2022184128A1 (en) Skill release method and apparatus for virtual object, and device and storage medium
CN114067042A (en) Image rendering method, device, equipment, storage medium and program product
US20230285855A1 (en) Virtual scene display method and apparatus, terminal, and storage medium
US20230321535A1 (en) Coordinate axis display method and apparatus applied to virtual environments, terminal, and medium
CN111589114B (en) Virtual object selection method, device, terminal and storage medium
CN114344903A (en) Method, terminal and storage medium for controlling virtual object to pick up virtual item
US20230401772A1 (en) Animation frame display method and apparatus, device, and storage medium
CN113034651B (en) Playing method, device, equipment and storage medium of interactive animation
CN112619131B (en) Method, device and equipment for switching states of virtual props and readable storage medium
CN114307150A (en) Interaction method, device, equipment, medium and program product between virtual objects
CN114359469A (en) Method, apparatus, device and medium for generating main control object projection

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40045992

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant