Animation playing method, device, equipment, readable storage medium and program product

By receiving control operations of virtual objects and using intermediate animation data in benchmark animation resources for scaling and adjustment, the problem of low efficiency in virtual firearm action data configuration is solved, and the efficiency of animation configuration and resource sharing is achieved.

CN114037783BActive Publication Date: 2025-06-20TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111628772.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2021-10-15
Filing Date
2021-12-28
Publication Date
2025-06-20
Estimated Expiration
2041-12-28

AI Technical Summary

Technical Problem

The prior art is less efficient when configuring the opening/closing action data of virtual firearms, and requires personalized configuration for each virtual firearm and firearm configuration.

Method used

By receiving the control operation of the virtual object, intermediate animation data in the reference animation resource corresponding to the target action is obtained, and scale and adjust based on the posture of the virtual object and the displacement vector in the animation resource to generate adaptive animation data to realize animation playback.

Benefits of technology

This improves the efficiency of animation configuration, reduces resource usage and equipment calculation, and enables virtual objects to share the same animation resources in different virtual guns.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114037783B_ABST
    Figure CN114037783B_ABST
Patent Text Reader

Abstract

The present application discloses an animation playing method, device, equipment, readable storage medium and program product, which relates to the field of interface interaction. The method includes: receiving a control operation on a virtual object, and controlling the virtual object to be adjusted from a first form holding a virtual prop to a second form; obtaining a first displacement vector corresponding to the first form and the second form based on the posture of the virtual object; obtaining a second displacement vector corresponding to the first form and the second form in a reference animation resource; and playing animation data based on the scaling ratio corresponding to the first displacement vector and the second displacement vector. The reference animation resource is an animation resource corresponding to a group of virtual props. When performing a target action, when the virtual object holds any one of the group of virtual props, the reference animation resource can be used for scaling adjustment, so as to realize animation rendering and playing, improve the animation configuration efficiency corresponding to the target action, and reduce the resource occupation amount and the calculation amount of the device.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application claims the priority of a Chinese patent application with the application number 202111204137.5 and the invention title "Animation Playing Method, Device, Equipment, Readable Storage Medium and Program Product" filed on October 15, 2021, the entire content of which is incorporated herein by reference. Technical Field

[0002] Embodiments of this application relate to the field of interface interaction, and particularly to an animation playing method, device, equipment, readable storage medium and program product. Background Art

[0003] In a game application or some applications based on a virtual environment, a player can usually control a virtual object to perform various actions in the virtual environment, such as: a firearm aiming action, a firearm sighting-off action, a running action, etc. Among them, the firearm aiming action refers to the action of a virtual object holding a virtual firearm switching from the hip-fire state to the aiming-sight aiming state.

[0004] In the related art, due to various parameters of different virtual firearms, such as the length of the gun barrel and the position of the handle, developers need to separately configure different aiming action data or sighting-off action data for different virtual firearms.

[0005] However, due to the large variety of virtual firearms and the fact that different firearm accessories may also affect firearm parameters, developers need to configure aiming / sighting-off action data for each virtual firearm and its corresponding firearm configuration, resulting in a low configuration efficiency of aiming / sighting-off animations. Summary of the Invention

[0006] Embodiments of this application provide an animation playing method, device, equipment, readable storage medium and program product, which can improve the efficiency in the animation configuration process. The technical solution is as follows:

[0007] On the one hand, an animation playing method is provided, and the method includes:

[0008] Receiving a control operation on a virtual object, where the control operation is used to control the virtual object to perform a target action, and the target action is used to control the virtual object to adjust from a first form of holding a virtual prop to a second form;

[0009] Obtaining a first displacement vector corresponding to the first form and the second form based on the posture of the virtual object;

[0010] Obtain a second displacement vector corresponding to the first form and the second form in the reference animation resource, where the reference animation resource is an adaptive animation resource corresponding to the prop type of the virtual prop and the target action, and the reference animation resource further includes intermediate animation data of the target action, and the intermediate animation data is used to indicate the action process of the target action;

[0011] Adjust the intermediate animation data based on the scaling ratio corresponding to the first displacement vector and the second displacement vector to obtain animation data for the virtual object to perform the target action;

[0012] Play the animation of the virtual object performing the target action based on the animation data.

[0013] On the other hand, an animation playback device is provided, and the device includes:

[0014] A receiving module, configured to receive a control operation on a virtual object, where the control operation is used to control the virtual object to perform a target action, and the target action is used to control the virtual object to adjust from a first form holding a virtual prop to a second form;

[0015] An obtaining module, configured to obtain a first displacement vector corresponding to the first form and the second form based on the posture of the virtual object;

[0016] The obtaining module is further configured to obtain a second displacement vector corresponding to the first form and the second form in the reference animation resource, where the reference animation resource is an adaptive animation resource corresponding to the prop type of the virtual prop and the target action, and the reference animation resource further includes intermediate animation data of the target action, and the intermediate animation data is used to indicate the action process of the target action;

[0017] A playback module, configured to adjust the intermediate animation data based on the scaling ratio corresponding to the first displacement vector and the second displacement vector to obtain animation data for the virtual object to perform the target action; and play the animation of the virtual object performing the target action based on the animation data.

[0018] On the other hand, an animation playback method is provided, and the method includes:

[0019] Receive a control operation on a virtual object, where the control operation is used to control the virtual object to perform a target action, and the target action is used to control the virtual object to adjust from a first form holding a virtual prop to a second form;

[0020] Display the animation of the virtual object performing the target action based on the control operation;

[0021] Wherein, during the execution of the target action, a target body part of the virtual object changes along a target change path, and the target change path is obtained by adjusting a scaling ratio on the basis of a reference change path, and the scaling ratio corresponds to the virtual prop held by the virtual object.

[0022] On the other hand, an animation playing device is provided, and the device includes:

[0023] A receiving module, configured to receive a control operation on a virtual object, where the control operation is used to control the virtual object to execute a target action, and the target action is used to control the virtual object to be adjusted from a first form holding a virtual prop to a second form;

[0024] A display module, configured to display an animation of the virtual object executing the target action based on the control operation;

[0025] Wherein, during the execution of the target action, a target body part of the virtual object changes along a target change path, and the target change path is obtained by adjusting a scaling ratio on the basis of a reference change path, and the scaling ratio corresponds to the virtual prop held by the virtual object.

[0026] On the other hand, a computer device is provided, and the computer device includes a processor and a memory, and at least one instruction, at least one program, a code set or an instruction set is stored in the memory, 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 animation playing method as described in any one of the foregoing embodiments of the present application.

[0027] On the other hand, a computer-readable storage medium is provided, and at least one instruction, at least one program, a code set or an instruction set is stored in the storage medium, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by a processor to implement the animation playing method as described in any one of the foregoing embodiments of the present application.

[0028] On the other hand, a computer program product or a computer program is provided, and the computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the animation playing method as described in any one of the foregoing embodiments.

[0029] The beneficial effects brought by the technical solutions provided in the embodiments of the present application at least include:

[0030] Since the reference animation resource is an adaptive animation resource corresponding to the prop type and target action of the virtual prop, that is, the reference animation resource is an animation resource corresponding to a group of virtual props. When performing the target action, when the virtual object holds any one of the group of virtual props, the reference animation resource can be used for scaling adjustment, so as to realize the animation rendering and playback, improve the animation configuration efficiency corresponding to the target action, and reduce the resource occupancy and the calculation amount of the device. Brief Description of the Drawings

[0031] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0032] Figure 1 It is a schematic diagram of the aiming animation configuration in the related art provided by an exemplary embodiment of the present application;

[0033] Figure 2 It is a schematic diagram of the aiming animation configuration method provided by an exemplary embodiment of the present application;

[0034] Figure 3 It is a block diagram of the structure of a terminal provided by an exemplary embodiment of the present application;

[0035] Figure 4 It is a schematic diagram of the implementation environment provided by an exemplary embodiment of the present application;

[0036] Figure 5 It is a flowchart of the animation playback method provided by an exemplary embodiment of the present application;

[0037] Figure 6 Based on Figure 5 It is a schematic diagram of the determination method of the first displacement vector provided by the embodiment shown;

[0038] Figure 7 It is a flowchart of the animation playback method provided by another exemplary embodiment of the present application;

[0039] Figure 8 Based on Figure 7 It is a schematic diagram of the aiming process provided by the embodiment shown;

[0040] Figure 9 Based on Figure 7 It is a schematic diagram of the reference aiming animation resource provided by the embodiment shown;

[0041] Figure 10 It is a flowchart of the animation playback method provided by another exemplary embodiment of the present application;

[0042] Figure 11 It is a schematic diagram of the overall process of the aiming animation provided by an exemplary embodiment of the present application;

[0043] Figure 12 It is a flowchart of an animation playing method provided by another exemplary embodiment of the present application;

[0044] Figure 13 It is a structural block diagram of an animation playing device provided by an exemplary embodiment of the present application;

[0045] Figure 14 It is a structural block diagram of an animation playing device provided by another exemplary embodiment of the present application;

[0046] Figure 15 It is a structural block diagram of a terminal provided by an exemplary embodiment of the present application. Detailed implementation manners

[0047] To make the objectives, technical solutions and advantages of the present application clearer, the following will further describe the embodiments of the present application in detail with reference to the accompanying drawings.

[0048] In a game application or some applications based on a virtual environment, a player can usually control a virtual object to perform various actions in the virtual environment, such as: a firearm aiming action, a firearm sighting-off action, etc. Among them, the firearm aiming action refers to an action in which a virtual object holds a virtual firearm and switches from the hip-fire state to the state of aiming with a sight. In the embodiments of the present application, virtual firearms, virtual bullets, sights, etc. are virtual props in the game application.

[0049] Illustrate with the firearm aiming action as an example. Figure 1 It is a schematic diagram of the related art aiming animation configuration provided by an exemplary embodiment of the present application. As Figure 1 shown, in the related art, when configuring the aiming action of a virtual firearm, it is implemented by configuring each firearm separately. For example, the virtual firearm 110 is correspondingly configured with an aiming animation 111; the virtual firearm 120 is correspondingly configured with an aiming animation 121, etc. However, in the above schematic diagram, due to the variety of virtual firearms and the fact that different firearm accessories may also affect firearm parameters, developers need to configure aiming / sighting-off action data for each type of virtual firearm and its corresponding firearm configuration, and the configuration efficiency of aiming / sighting-off animations is relatively low.

[0050] Figure 2 It is a schematic diagram of an aiming animation configuration method provided by an exemplary embodiment of the present application. As Figure 2As shown, first, obtain the coordinates 211 of the first position point of the hand of the current virtual object, and determine the coordinates 212 of the second position point of the hand of the virtual object after aiming based on the virtual firearm held by the virtual object, so as to obtain the first displacement vector 210 between the coordinates of the first position point and the coordinates of the second position point.

[0051] Obtain the starting position point coordinates 221 and the ending position point coordinates 222 in the reference aiming animation resource, and an individual determines the second displacement vector 220 based on the starting position point coordinates 221 and the ending position point coordinates 222.

[0052] Determine the scaling ratio of the aiming animation resource according to the first displacement vector 210 and the second displacement vector 220, so as to perform scaling adjustment on the hand position in the aiming animation resource, and obtain the aiming animation corresponding to the virtual firearm held by the current virtual object.

[0053] The terminal in this application can be a desktop computer, a laptop computer, a mobile phone, a tablet computer, an e-book reader, an MP3 (Moving Picture Experts Group Audio Layer III) player, an MP4 (Moving Picture Experts Group Audio Layer IV) player, and so on. An application program that supports a virtual environment is installed and run in the terminal, such as an application program that supports a three-dimensional virtual environment. The application program can be any one of a virtual reality application program, a three-dimensional map program, a third-person shooting game (FPS), a first-person shooting game (FPS), and a multiplayer online battle arena game (MOBA). Optionally, the application program can be a stand-alone version of the application program, such as a stand-alone three-dimensional game program, or a network online version of the application program.

[0054] Figure 3 The structural block diagram of an electronic device provided by an exemplary embodiment of this application is shown. The electronic device 300 includes: an operating system 320 and an application program 322.

[0055] The operating system 320 is basic software that provides secure access to the computer hardware for the application program 322.

[0056] The application 322 is an application that supports a virtual environment. Optionally, the application 322 is an application that supports a three-dimensional virtual environment. The application 322 can be any one of a virtual reality application, a three-dimensional map program, a TPS game, an FPS game, an MOBA game, and a multiplayer shooting survival game. The application 322 can be a stand-alone version of the application, such as a stand-alone three-dimensional game program, or a networked online version of the application.

[0057] Figure 4 The structural block diagram of a computer system provided by an exemplary embodiment of the present application is shown. The computer system 400 includes: a first device 420, a server 440, and a second device 460.

[0058] The first device 420 installs and runs an application that supports a virtual environment. The application can be any one of a virtual reality application, a three-dimensional map program, a TPS game, an FPS game, an MOBA game, and a multiplayer shooting survival game. The first device 420 is a device used by a first user. The first user uses the first device 420 to control a first virtual object located in the virtual environment to perform activities, and the activities include but are not limited to: adjusting the body posture, crawling, walking, running, cycling, jumping, driving, picking up, shooting, attacking, throwing, etc. At least one of them. Schematically, the first virtual object is a first virtual character, such as an imitation character or an anime character.

[0059] The first device 420 is connected to the server 440 through a wireless network or a wired network.

[0060] The server 440 includes at least one of a server, multiple servers, a cloud computing platform, and a virtualization center. The server 440 is used to provide background services for an application that supports a three-dimensional virtual environment. Optionally, the server 440 undertakes the main computing work, and the first device 420 and the second device 460 undertake the secondary computing work; or, the server 440 undertakes the secondary computing work, and the first device 420 and the second device 460 undertake the main computing work; or, the server 440, the first device 420, and the second device 460 adopt a distributed computing architecture for collaborative computing.

[0061] The second device 460 is installed with and runs an application that supports a virtual environment. The application can be any one of a virtual reality application, a 3D map program, a first-person shooter (FPS) game, a multiplayer online battle arena (MOBA) game, and a multiplayer shooting survival game. The second device 460 is a device used by a second user. The second user uses the second device 460 to control a second virtual object located in the virtual environment to perform activities, which include but are not limited to at least one of: adjusting body posture, crawling, walking, running, cycling, jumping, driving, picking up, shooting, attacking, and throwing. Schematically, the second virtual object is a second virtual character, such as an emulated human character or an anime character.

[0062] Optionally, the first virtual character and the second virtual character are in the same virtual environment. Optionally, the first virtual character and the second virtual character can belong to the same team, the same organization, have a friendship relationship, or have temporary communication permissions. Optionally, the first virtual character and the second virtual character can also belong to different teams, different organizations, or two hostile groups.

[0063] Optionally, the applications installed on the first device 420 and the second device 460 are the same, or the applications installed on the two devices are of the same type but on different control system platforms. The first device 420 can generally refer to one of multiple devices, and the second device 460 can generally refer to one of multiple devices. This embodiment only uses the first device 420 and the second device 460 as examples for illustration. The device types of the first device 420 and the second device 460 are the same or different, and the device types include at least one of: game console, desktop computer, smart phone, tablet computer, e-book reader, MP3 player, MP4 player, and laptop computer. The following embodiments use a desktop computer as an example for illustration.

[0064] Those skilled in the art can know that the number of the above devices can be more or less. For example, the above devices can be only one, or there can be dozens or hundreds of the above devices, or even more. The embodiments of the present application do not limit the number and device types of the devices.

[0065] It should be noted that the above-mentioned server 440 can be implemented as a physical server or a cloud server in the cloud. Among them, cloud technology refers to a hosting technology that unifies a series of resources such as hardware, software, and networks within a wide area network or a local area network to achieve data calculation, storage, processing, and sharing. Cloud technology is the general term for network technology, information technology, integration technology, management platform technology, application technology, etc. based on the cloud computing business model, which can form a resource pool, be used on demand, and be flexible and convenient. Cloud computing technology will become an important support. The background services of the technical network system require a large amount of computing and storage resources, such as video websites, picture websites, and more portal websites. With the highly developed application of the Internet industry, in the future, each item may have its own identification mark and needs to be transmitted to the background system for logical processing. Data at different levels will be processed separately, and various industry data requires the support of a powerful system background, which can only be achieved through cloud computing.

[0066] In some embodiments, the method provided in the embodiments of the present application can be applied to a cloud game scenario, so as to complete the calculation of data logic during the game process through a cloud server, and the terminal is responsible for the display of the game interface.

[0067] In some embodiments, the above-mentioned server 440 can also be implemented as a node in a blockchain system. Blockchain is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, and encryption algorithm. Blockchain, essentially a decentralized database, is a string of data blocks generated by using cryptographic methods. Each data block contains information about a batch of network transactions, which is used to verify the validity (anti-counterfeiting) of the information and generate the next block. Blockchain can include the blockchain underlying platform, the platform product service layer, and the application service layer.

[0068] Combined with the above introduction of terms and the description of the implementation environment, the animation playback method provided in the embodiments of the present application will be described. Please refer to Figure 5 , which shows the flowchart of the animation playback method provided by an exemplary embodiment of the present application. Taking the application of this method in a terminal as an example for description, as Figure 5 shown, the method includes:

[0069] Step 501, receive a control operation on a virtual object, where the control operation is used to control the virtual object to perform a target action.

[0070] The target action is used to control the virtual object to adjust from the first form of holding the virtual prop to the second form. The first form is used to indicate the form of the virtual object before performing the target action, and the second form is used to indicate the form of the virtual object after performing the target action. The first form and the second form are mainly used to indicate the performance form of the virtual object, that is, the state of the virtual object.

[0071] In some embodiments, the target action includes at least one of the following actions:

[0072] First, the opening / closing of the scope action, wherein the opening of the scope action refers to the action of the virtual object holding a virtual firearm and adjusting from the hip-fire state to the state of observing through the scope, and conversely, the closing of the scope action refers to the action of the virtual object holding a virtual firearm and adjusting from the state of observing through the scope to the hip-fire state.

[0073] The first form corresponding to the aiming action is the hip-firing state of the virtual object holding the virtual firearm, and the second form corresponding to the aiming action is the state of the virtual object holding the virtual firearm and observing through the scope.

[0074] Second, the throwing action, wherein the throwing action refers to the action of the virtual object throwing the throwing prop it holds. Since different throwing props have different corresponding weights, the amplitude of the throwing action during throwing is also different.

[0075] The first form corresponding to the throwing action is the state in which the hand of the virtual object accumulates force backwards, and the second form corresponding to the throwing action is the state in which the hand of the virtual object releases the throwing prop.

[0076] It should be noted that the above-mentioned implementation methods of the target actions are only illustrative examples, and this embodiment does not limit the action type of the target action.

[0077] In the embodiment of the present application, the target action is implemented as a mirror opening / closing action for description.

[0078] For example, taking aiming as an example, an aiming control operation is received, and the aiming control operation is used to control the virtual object to perform an aiming action on the virtual firearm. Before aiming, the virtual environment is observed from the first or third person perspective of the virtual object, and after aiming, the virtual environment is observed through the sight matching part assembled on the virtual firearm held by the virtual object.

[0079] Step 502: Acquire a first displacement vector corresponding to the first form and the second form based on the posture of the virtual object.

[0080] The posture of a virtual object is used to indicate the position where the body part of the virtual object is located. In some embodiments, the posture of the virtual object is used to indicate the position where a specified body part of the virtual object is located. For example, the posture of the virtual object is used to indicate the position where the hand of the virtual object is located; or, the posture of the virtual object is used to indicate the positions of at least two body parts of the virtual object. For example, the posture of the virtual object is used to indicate the positions of the hand and the head of the virtual object.

[0081] In the embodiments of the present application, the posture of the virtual object is used to indicate the position point coordinates of the target body position of the virtual object. Taking the action of aiming as an example, the posture of the virtual object is used to indicate the position point coordinates of the hand position of the virtual object in the virtual environment. Optionally, based on the posture of the virtual object, a first displacement vector corresponding to the target body position of the virtual object in the first form and the second form is obtained. Schematically, taking the action of aiming as an example for illustration, when performing the aiming action, the virtual object lifts the virtual firearm from the waist to in front of the eyes. Among them, the position of the virtual firearm is adjusted by the lifting of the hand position. Therefore, when determining the first displacement vector, the first displacement vector corresponding to the hand position of the virtual object in the first form and the second form is obtained.

[0082] Among them, since the first form is the form of the virtual object before performing the target action, that is, the first form is the current form. First, the first position point coordinates of the target body position of the virtual object in the current first form are obtained, the target adjustment position of the virtual prop is determined, and based on the target adjustment position, the second position point coordinates of the target body position of the virtual object in the second form are determined. The difference between the second position point coordinates and the first position point coordinates is used as the first displacement vector.

[0083] Taking the virtual prop as a virtual firearm and the target action as the aiming action as an example, the target adjustment position is the position where the virtual firearm is located after aiming. When determining the target adjustment position, first, the coincidence position of the aiming reticle and the center point of the observation range of the virtual object after the virtual firearm is aimed is determined, and the coincidence position of the aiming reticle and the center point of the observation range is used as the target adjustment position of the virtual firearm.

[0084] That is, when the target action is realized as the aiming action, in the process of determining the first displacement vector, the first position point coordinates corresponding to the first form are directly determined according to the current hand position of the virtual object; the second position point coordinates corresponding to the second form are determined by inversely deducing the position where the hand of the virtual object is located when the virtual firearm is at the coincidence position according to the coincidence position of the aiming reticle and the center point of the observation range after the virtual firearm is aimed. Among them, the first position point coordinates and the second position point coordinates are determined based on the world coordinate system; or, the first position point coordinates and the second position point coordinates are determined based on the coordinate system corresponding to the virtual object.

[0085] Schematically, based on the position of the current virtual object in the virtual environment and with the world coordinate system as the reference, determine the coordinate of the first position point of the current hand position; aiming at making the reticle of the sight coincide with the center of the observation range, determine the target adjustment position of the virtual firearm, and based on the target adjustment position and with the world coordinate system as the reference, determine the coordinate of the second position point of the hand position. That is, obtain the coordinate of the first position point of the hand of the virtual object before the current sighting, and based on the target adjustment position, determine the coordinate of the second position point of the hand of the virtual object after the sighting. Subtract the coordinate of the first position point from the coordinate of the second position point to obtain the first displacement vector.

[0086] Schematically, please refer to Figure 6 , in the virtual environment, there is a virtual object 600. When the virtual object 600 fires in the hip-fire state, the virtual object 600 is in the first form, and determine the hand position coordinate of the virtual object 600 in this first form; when the virtual object 600 fires in the sighted state, the virtual object 600 is in the second form, and the reticle of the sight of the virtual firearm coincides with the center of the observation range of the virtual object with respect to the virtual environment, obtain the position of the virtual firearm, and thus infer the hand position coordinate of the virtual object 600 at the position of the virtual firearm. Determine the difference between the two hand position coordinates as the first displacement vector.

[0087] The first displacement vector represents the hand movement amplitude required for the virtual object to perform the sighting action on the current virtual firearm.

[0088] Step 503, obtain the second displacement vector corresponding to the first form and the second form in the reference animation resource.

[0089] The reference animation resource is an adaptive animation resource corresponding to the prop type and the target action of the virtual prop, and the reference animation resource further includes the intermediate animation data of the target action, and the intermediate animation data is used to indicate the action process of the target action.

[0090] Among them, the reference animation resource is set for virtual props of the same type, or for a group of virtual props of the same type of virtual props.

[0091] Schematically, the virtual firearms share the same reference animation resource; or, the virtual firearms include virtual rifles, virtual sniper rifles, and virtual pistols. Among them, the virtual rifles share the same reference animation resource, the virtual sniper rifles share the same reference animation resource, and the virtual pistols share the same reference animation resource; or, cluster the virtual firearms into at least two firearm clusters according to the firearm characteristics, and the virtual firearms in each firearm cluster share the same reference animation resource. The embodiments of the present application do not limit this.

[0092] Among them, the reference animation resource includes pre-set animation resources corresponding to the target action, including coordinate data corresponding to the target body position of the virtual object. Optionally, taking the aiming action as an example, the reference animation resource includes a sequence of animation frames during the aiming process, and each frame contains data of each bone point of the virtual object (displacement, rotation, scaling, etc.). Usually, the game engine plays the animation according to the animation frames to make the action performance.

[0093] That is, obtain the hand bone point data corresponding to the first animation frame in the reference animation resource and the hand bone point data corresponding to the last animation frame, and determine the second displacement vector according to the difference between the two hand bone point data. Among them, the second displacement vector represents the hand movement amplitude of the aiming action in the reference animation resource.

[0094] Step 504, adjust the intermediate animation data based on the scaling ratios corresponding to the first displacement vector and the second displacement vector to obtain the animation data for the virtual object to perform the target action.

[0095] Among them, the first displacement vector represents the movement amplitude required for the virtual object to perform the target action, while the second displacement vector represents the movement amplitude configured in the reference animation resource. That is, the scaling ratio determined according to the first displacement vector and the second displacement vector is used to indicate the coordinate adjustment ratio in the reference animation resource. After adjusting the coordinates of the animation data in the reference animation resource according to the adjustment ratio, the adaptive animation data for the current virtual object to perform the target action on the virtual prop is obtained.

[0096] Step 505, play the animation of the virtual object performing the target action based on the animation data.

[0097] In summary, for the animation playing method provided by the embodiments of the present application, since the reference animation resource is an adaptive animation resource corresponding to the prop type and the target action of the virtual prop, that is, the reference animation resource is an animation resource corresponding to a group of virtual props. When performing the target action, when the virtual object holds any one of the group of virtual props, the reference animation resource can be used for scaling adjustment to realize animation rendering and playing, improving the animation configuration efficiency corresponding to the target action and reducing the resource occupancy and the calculation amount of the device.

[0098] In an optional embodiment, the reference animation resource is determined according to the prop type of the virtual prop. Figure 7 It is a flowchart of an animation playing method provided by another exemplary embodiment of the present application. Taking the application of this method to a terminal as an example for illustration, as Figure 7 shown, this method includes:

[0099] Step 701, receive a control operation on the virtual object, and the control operation is used to control the virtual object to perform a target action.

[0100] Among them, the target action is used to control the virtual object to adjust from the first form holding the virtual prop to the second form.

[0101] Schematically, taking aiming as an example, an aiming control operation is received, and the aiming control operation is used to control the virtual object to perform an aiming action on the virtual firearm.

[0102] Step 702: Obtain a first displacement vector corresponding to the first form and the second form based on the posture of the virtual object.

[0103] The first form is the form of the virtual object before performing the target action, that is, the first form is the current form. First, obtain the coordinate of the first position point of the target body position of the virtual object in the current first form, determine the target adjustment position of the virtual prop, determine the coordinate of the second position point of the target body position of the virtual object in the second form based on the target adjustment position, and use the difference between the coordinate of the second position point and the coordinate of the first position point as the first displacement vector.

[0104] The first displacement vector represents the hand movement amplitude required for the virtual object to perform an aiming action on the current virtual firearm.

[0105] Optionally, taking the aiming action as an example, when the virtual environment is running, obtain the hand position V1 when the currently equipped virtual firearm is hip-fired, and the hand position V2 when aiming, and calculate V3 = V2 - V1, where V3 is the above-mentioned first displacement vector.

[0106] Schematically, as Figure 8 shown, it shows a schematic diagram of the aiming process provided by an exemplary embodiment of the present application. The virtual object 800 holds the virtual firearm 810. Before aiming the virtual firearm 810, the hand position coordinate of the virtual object 800 when hip-firing is V1(50, 50, 50), and the hand position coordinate after aiming is V2(25, 25, 75). Then, the first displacement vector can be calculated as V3(-25, -25, 25) = V2 - V1 according to the hand position coordinate when hip-firing and the hand position coordinate after aiming.

[0107] Step 703: Determine the prop type of the virtual prop.

[0108] In some embodiments, when determining the prop type of the virtual prop, determine the functional classification type to which the virtual prop belongs; or, determine the sub-classification type of the effect class to which the virtual prop belongs. Among them, the functional classification type is used to indicate the prop function implemented by the virtual prop, such as: attack function, cover function, etc.; the sub-classification type of the effect class is used to indicate the next-level classification in the functional classification.

[0109] Schematically, when determining the functional classification type to which a virtual item belongs, for example: determining that the virtual item belongs to any one of virtual firearms, virtual throwing items, and virtual accessories; when determining the subdivision type to which the virtual item belongs, taking virtual firearms as an example, for example: determining that the virtual item belongs to any one of virtual rifles, virtual sniper rifles, and virtual pistols.

[0110] Step 704, obtain the reference animation resources corresponding to the item type and the target action.

[0111] Among them, the reference animation resources are the animation resources preset for the corresponding item type and action type.

[0112] Optionally, the reference animation resources are animation resources of the superimposed type. The skeletal data in the animation resources of the superimposed type is the data obtained by subtracting the first frame of the animation provided by the art from each frame of the animation. This part of the data is usually referred to as superimposed data or incremental data.

[0113] The reference animation resources are the adaptive animation resources corresponding to the item type of the virtual item and the target action, and the reference animation resources also include the intermediate animation data of the target action, and the intermediate animation data is used to indicate the action process of the target action.

[0114] That is to say, the reference animation resources are applicable to the virtual items belonging to this item type and during the execution of this target action. That is to say, when any virtual item belonging to this item type is held by the execution object and executes this target action, animation rendering can be performed on the basis of this reference animation resource.

[0115] In some embodiments, if the reference animation resources are the resources corresponding to the functional classification type of the virtual item, then determine the functional classification type of the virtual item; or, if the reference animation resources are the resources corresponding to the effect class subdivision type of the virtual item, then determine the effect class subdivision type of the virtual item.

[0116] Optionally, taking the virtual item including virtual firearms as an example, then obtain the reference animation resources corresponding to the virtual firearms and the target action; or, obtain the reference animation resources corresponding to the firearm type of the virtual firearms and the target action. In some embodiments, obtain the reference animation resources corresponding to the firearm type of the virtual firearms, the firearm accessory parameters of the virtual firearms, and the target action.

[0117] Step 705, obtain the starting position point coordinates and the ending position point coordinates of the target body position of the virtual object in the reference animation resources.

[0118] Schematically, taking the aiming action as an example, then obtain the position A1 of the hand in the first frame and the position A2 of the hand in the last frame in the reference aiming animation resource when the virtual environment is running.

[0119] Among them, the starting position point coordinates and the ending position point coordinates of the target body position are relative to the world coordinate system in the virtual environment; or, the starting position point coordinates and the ending position point coordinates of the target body position are relative to the object coordinate system corresponding to the virtual object.

[0120] Step 706, take the difference between the ending position point coordinates and the starting position point coordinates as the second displacement vector.

[0121] Taking the above-mentioned aiming action as an example, after obtaining the position A1 of the hand in the first frame and the position A2 of the hand in the last frame in the reference aiming animation resource, calculate A3 = A2 - A1, where A3 represents the above-mentioned second displacement vector.

[0122] Schematically, as Figure 9 shown, it shows a schematic diagram of the reference aiming animation resource provided by an exemplary embodiment of the present application. During the aiming process, the hand position of the virtual object moves from the starting position point 910 to the ending position point 920. Among them, the hand position coordinates of the starting position point 910 are A1(40, 40, 40), and the hand position coordinates of the ending position point 920 are A2(30, 30, 45). Then, according to the hand position coordinates of the starting position point 910 and the hand position coordinates of the ending position point 920, the second displacement vector can be calculated as A3(-10, -10, 5) = A2 - A1.

[0123] Among them, the second displacement vector represents the hand movement amplitude of the aiming action in the reference animation resource.

[0124] Step 707, adjust the intermediate animation data based on the scaling ratios corresponding to the first displacement vector and the second displacement vector, and obtain the animation data for the virtual object to perform the target action for playback.

[0125] Among them, the first displacement vector represents the movement amplitude required for the virtual object to perform the target action, and the second displacement vector represents the movement amplitude configured in the reference animation resource. That is, the scaling ratio determined according to the first displacement vector and the second displacement vector is used to indicate the coordinate adjustment ratio in the reference animation resource. After adjusting the coordinates of the animation data in the reference animation resource according to the adjustment ratio, the adaptive animation data for the current virtual object to perform the target action on the virtual prop is obtained.

[0126] In summary, for the animation playing method provided in the embodiments of the present application, since the reference animation resource is an adaptive animation resource corresponding to the prop type of the virtual prop and the target action, that is, the reference animation resource is an animation resource corresponding to a group of virtual props. When performing the target action, when the virtual object holds any one of the group of virtual props, the reference animation resource can be used for scaling adjustment, so as to realize animation rendering and playing, improve the animation configuration efficiency corresponding to the target action, and reduce the resource occupancy and the computing amount of the device.

[0127] For the method provided in this embodiment, the reference animation resource is determined according to the prop type of the virtual prop, that is, the reference animation resource can be applied to any virtual prop that conforms to the prop type of the virtual prop, avoiding the need to independently configure animation resources for each virtual prop, reducing the resource consumption in the animation resource configuration process, improving the animation resource configuration efficiency, and at the same time improving the accuracy of the animation resource configuration.

[0128] In an alternative embodiment, the scaling ratio is used to multiply the intermediate animation data. Figure 10 It is a flowchart of the animation playing method provided in another exemplary embodiment of the present application. Taking the application of this method to a terminal as an example for illustration, as Figure 10 shown, the method includes:

[0129] Step 1001, receive a control operation on the virtual object, where the control operation is used to control the virtual object to perform a target action.

[0130] The target action is used to control the virtual object to adjust from the first form holding the virtual prop to the second form.

[0131] Illustratively, taking aiming as an example, receive an aiming control operation, where the aiming control operation is used to control the virtual object to perform an aiming action on the virtual firearm.

[0132] Step 1002, obtain a first displacement vector corresponding to the first form and the second form based on the posture of the virtual object.

[0133] The first form is the form of the virtual object before performing the target action, that is, the first form is the current form. First, obtain the coordinate of the first position point of the target body position of the virtual object in the current first form, determine the target adjustment position of the virtual prop, determine the coordinate of the second position point of the target body position of the virtual object in the second form based on the target adjustment position, and use the difference between the second position point coordinate and the first position point coordinate as the first displacement vector.

[0134] The first displacement vector represents the hand movement amplitude required for the virtual object to perform an aiming action on the current virtual firearm.

[0135] Step 1003: Obtain the second displacement vector corresponding to the first form and the second form in the reference animation resource.

[0136] The reference animation resource is an adaptive animation resource corresponding to the prop type of the virtual prop and the target action. The reference animation resource also includes the intermediate animation data of the target action, and the intermediate animation data is used to indicate the action process of the target action.

[0137] Among them, the reference animation resource is set for virtual props of the same type, or for a group of virtual props of the same type of virtual props.

[0138] Taking the aiming action as an example, obtain the hand bone point data corresponding to the first frame of the animation in the reference animation resource and the hand bone point data corresponding to the last frame of the animation. Determine the second displacement vector according to the difference between the two hand bone point data. Among them, the second displacement vector represents the hand movement amplitude of the aiming action in the reference animation resource.

[0139] Step 1004: Determine the scaling ratio based on the ratio between the first displacement vector and the second displacement vector.

[0140] Illustratively, taking the above first displacement vector V3(-25, -25, 25) and the second displacement vector A3(-10, -10, 5) as an example, the ratio between the first displacement vector and the second displacement vector is determined as the scaling ratio, that is, the scaling ratio S3(2.5, 2.5, 5) = V3 / A3.

[0141] Step 1005: Use the product of the scaling ratio and the intermediate animation data as the animation data for the virtual object to perform the target action.

[0142] In some embodiments, the target action includes the aiming action, and the intermediate animation data includes the position data of the hand of the virtual object during the aiming process. Then, the product of the scaling ratio and the position data of the hand during the aiming process is used as the animation data of the hand position when the virtual object performs the aiming action.

[0143] Illustratively, when playing the aiming animation, use S3 to scale the displacement data V of each frame of the bone output in the reference animation resource, that is, the final result obtained is R = S3 × V.

[0144] In some embodiments, the starting position of the hand of the virtual object during the aiming process starts from the first position point coordinate of the virtual object in the first form, and the ending position of the hand ends at the second position point coordinate of the virtual object in the second form.

[0145] In some embodiments, during the adjustment of the hand position, the arm bones are synchronously adjusted based on the bone binding system. Among them, the bone binding system is a system in the game animation system that corrects the arm effect. The bone binding system is used to adjust the animation effect of the entire arm according to the position of the hand bone points through preset constraint calculations.

[0146] Step 1006, play the animation of the virtual object performing the target action based on the animation data.

[0147] Among them, the first displacement vector represents the movement amplitude required for the virtual object to perform the target action, while the second displacement vector represents the movement amplitude configured in the reference animation resource. That is, the scaling ratio determined according to the first displacement vector and the second displacement vector is used to indicate the coordinate adjustment ratio in the reference animation resource. After adjusting the coordinates of the animation data in the reference animation resource according to the adjustment ratio, the adaptive animation data of the current virtual object performing the target action on the virtual prop is obtained.

[0148] In summary, for the animation playback method provided by the embodiments of the present application, since the reference animation resource is an adaptive animation resource corresponding to the prop type and target action of the virtual prop, that is, the reference animation resource is an animation resource corresponding to a group of virtual props. When performing the target action, when the virtual object holds any one of the group of virtual props, the reference animation resource can be used for scaling adjustment, so as to realize animation rendering and playback, improve the animation configuration efficiency corresponding to the target action, and reduce the resource occupancy and the calculation amount of the device.

[0149] For the method provided in this embodiment, after calculating the scaling ratio, the reference animation resource is scaled and adjusted through the scaling ratio, and the action animation corresponding to the current virtual prop and the target action can be obtained, improving the adaptability of the animation rendering.

[0150] Figure 11 It is a schematic diagram of the overall process of the aiming animation provided by an exemplary embodiment of the present application. As Figure 11 shown, this process includes:

[0151] Step 1101, the player clicks the aiming control.

[0152] That is, the player triggers the aiming control and inputs an aiming instruction. After the virtual firearm receives the aiming instruction, it instructs the virtual character to play the aiming animation.

[0153] Step 1102, animation update.

[0154] That is, when the animation logic of the player character is updated, the hand position point V1 before aiming and the hand position point V2 during aiming are obtained, and the vector V3 = V2 - V1 is calculated.

[0155] Step 1103, Obtain animation resource data.

[0156] Obtain the starting point A1 and the ending point A2 of the hand displacement from the animation resource, and calculate the vector A3 = A2 - A1.

[0157] Step 1104, Calculate the scaling ratio according to the actual displacement.

[0158] Divide V3 by A3 to obtain a ratio data S3.

[0159] Step 1105, Obtain the aiming animation resource according to the scaling ratio.

[0160] Scale each frame of the animation data in the aiming process according to the ratio data S3 in real time. This can adapt the hand animation of the current actual virtual firearm from hip shooting to aiming.

[0161] It should be noted that in the above example, the aiming animation is taken as an example for illustration. This animation playing method can also be applied to the scope - closing animation or prop throwing. The embodiments of the present application do not limit this.

[0162] In summary, for the animation playing method provided by the embodiments of the present application, since the reference animation resource is an adaptive animation resource corresponding to the prop type of the virtual prop and the target action, that is, the reference animation resource is an animation resource corresponding to a group of virtual props. When performing the target action, when the virtual object holds any one of the group of virtual props, the reference animation resource can be used for scaling adjustment, so as to realize the animation rendering and playing, improve the animation configuration efficiency corresponding to the target action, and reduce the resource occupancy and the calculation amount of the device.

[0163] Figure 12 It is a flowchart of the animation playing method provided by another exemplary embodiment of the present application. Taking the application of this method to a terminal as an example for illustration, as Figure 12 shown, this method includes:

[0164] Step 1201, Receive a control operation on the virtual object. The control operation is used to control the virtual object to perform a target action. Among them, the target action is used to control the virtual object to adjust from the first form holding a virtual prop to the second form. Among them, the first form is used to represent the form of the virtual object before performing the target action, and the second form is used to represent the form of the virtual object after performing the target action. Among them, the first form and the second form are mainly used to indicate the presentation form of the virtual object, that is, the state in which the virtual object is located.

[0165] In some embodiments, the target action includes aiming / scope - closing actions, throwing actions, etc.

[0166] In the embodiments of the present application, the example of the target action being the action of opening / closing the scope is used for illustration.

[0167] Schematically, taking the opening of the scope as an example, a scope-opening control operation is received, and the scope-opening control operation is used to control the virtual object to perform a scope-opening action on the virtual firearm. Among them, before opening the scope, the virtual environment is observed from the first or third-person perspective of the virtual object, and after opening the scope, the virtual environment is observed through the sight matching part assembled on the virtual firearm held by the virtual object.

[0168] Step 1202, display an animation of the virtual object performing the target action based on the control operation.

[0169] Among them, during the execution of the target action, the target body part of the virtual object changes along the target change path, and the target change path is obtained by adjusting the scaling ratio on the basis of the reference change path, and the scaling ratio corresponds to the virtual prop held by the virtual object.

[0170] In some embodiments, the target change path corresponds to a first displacement vector, the reference change path corresponds to a second displacement vector, and the target change path is a path obtained by adjusting the reference change path based on the scaling ratio corresponding to the first displacement vector and the second displacement vector.

[0171] Optionally, the first displacement vector is a displacement vector corresponding to the first form and the second form obtained based on the posture of the virtual object;

[0172] The second displacement vector is a displacement vector corresponding to the first form and the second form obtained based on the reference animation resource, and the reference animation resource is an adaptive animation resource corresponding to the prop type of the virtual prop and the target action.

[0173] Optionally, based on the posture of the virtual object, obtain the first displacement vector corresponding to the target body position of the virtual object in the first form and the second form. Schematically, taking the scope-opening action as an example for illustration, when performing the scope-opening action, the virtual object raises the virtual firearm from the waist to in front of the eyes. Among them, the position of the virtual firearm is adjusted by the raising of the hand position. Therefore, when determining the first displacement vector, obtain the first displacement vector corresponding to the hand position of the virtual object in the first form and the second form.

[0174] The reference animation resource includes the pre-set animation resource corresponding to the target action, which includes the coordinate data corresponding to the target body position of the virtual object. Optionally, taking the scope-opening action as an example, the reference animation resource includes a sequence of animation frames during the scope-opening process, and each frame contains the data (displacement, rotation, scaling, etc.) of each bone point of the virtual object. Usually, the game engine plays the animation according to the animation frames to make the action performance.

[0175] That is, obtain the hand bone point data corresponding to the first animation frame and the hand bone point data corresponding to the last animation frame in the reference animation resource, and determine the second displacement vector according to the difference between the two hand bone point data. The second displacement vector represents the hand movement amplitude of the camera-on action in the reference animation resource.

[0176] The reference animation resource includes pre-set animation resources corresponding to the target action, including coordinate data corresponding to the target body position of the virtual object. Optionally, taking the camera-on action as an example, the reference animation resource includes a sequence of animation frames during the camera-on process, and each frame contains the data (displacement, rotation, scaling, etc.) of each bone point of the virtual object. Usually, the game engine plays the animation according to the animation frames to make the action performance.

[0177] That is, obtain the hand bone point data corresponding to the first animation frame and the hand bone point data corresponding to the last animation frame in the reference animation resource, and determine the second displacement vector according to the difference between the two hand bone point data. The second displacement vector represents the hand movement amplitude of the camera-on action in the reference animation resource.

[0178] Figure 13 It is a structural block diagram of an animation playback device provided by an exemplary embodiment of the present application. As Figure 13 shown, the device includes:

[0179] A receiving module 1310, configured to receive a control operation on the virtual object, where the control operation is used to control the virtual object to perform a target action, and the target action is used to control the virtual object to adjust from a first form holding a virtual prop to a second form;

[0180] An obtaining module 1320, configured to obtain a first displacement vector corresponding to the first form and the second form based on the posture of the virtual object;

[0181] The obtaining module 1320 is further configured to obtain a second displacement vector corresponding to the first form and the second form in the reference animation resource, where the reference animation resource is an adaptive animation resource corresponding to the prop type of the virtual prop and the target action, and the reference animation resource further includes intermediate animation data of the target action, and the intermediate animation data is used to indicate the action process of the target action;

[0182] A playback module 1330, configured to adjust the intermediate animation data based on the scaling ratio corresponding to the first displacement vector and the second displacement vector, and obtain animation data for the virtual object to perform the target action for playback.

[0183] In an alternative embodiment, the obtaining module 1320 is further configured to obtain the coordinate of the first position point of the target body position of the virtual object in the current first form.

[0184] As Figure 14 shown, the apparatus further includes:

[0185] A determining module 1340, configured to determine the target adjustment position of the virtual prop; determine the coordinate of the second position point of the target body position of the virtual object in the second form based on the target adjustment position; and use the difference between the second position point coordinate and the first position point coordinate as the first displacement vector.

[0186] In an alternative embodiment, the virtual prop is a virtual firearm, and the target action is a sighting action.

[0187] The determining module 1340 is further configured to determine the coincident position of the sight center of the sighting scope and the center point of the observation range of the virtual object after the virtual firearm is sighted; and use the coincident position of the sight center of the sighting scope and the center point of the observation range as the target adjustment position of the virtual firearm.

[0188] In an alternative embodiment, the obtaining module 1320 is further configured to obtain the coordinate of the first position point of the hand of the virtual object before the current sighting.

[0189] The determining module 1340 is further configured to determine the coordinate of the second position point of the hand of the virtual object after the sighting based on the target adjustment position.

[0190] In an alternative embodiment, the apparatus further includes:

[0191] A determining module 1340, configured to determine the prop type of the virtual prop;

[0192] The obtaining module 1320 is further configured to obtain the reference animation resource corresponding to the prop type and the target action; obtain the coordinate of the starting position point and the coordinate of the ending position point of the target body position of the virtual object in the reference animation resource, where the coordinate of the starting position point corresponds to the first form, and the coordinate of the ending position point corresponds to the second form;

[0193] The determining module 1340 is further configured to use the difference between the coordinate of the ending position point and the coordinate of the starting position point as the second displacement vector.

[0194] In an alternative embodiment, the virtual prop includes a virtual firearm;

[0195] The obtaining module 1320 is further configured to obtain the reference animation resource corresponding to the virtual firearm and the target action;

[0196] Or,

[0197] The obtaining module 1320 is further configured to obtain the reference animation resource corresponding to the firearm type of the virtual firearm and the target action.

[0198] In an alternative embodiment, the apparatus further includes:

[0199] A determining module 1340, configured to determine the scaling ratio based on the ratio between the first displacement vector and the second displacement vector; and use the product of the scaling ratio and the intermediate animation data as the animation data for the virtual object to perform the target action.

[0200] In an alternative embodiment, the target action includes a sighting action, and the intermediate animation data includes the position data of the virtual object's hand during the sighting process;

[0201] The determining module 1340 is further configured to use the product of the scaling ratio and the position data of the hand during the sighting process as the animation data of the hand position when the virtual object performs the sighting action.

[0202] In an alternative embodiment, the receiving module 1310 is further configured to receive a sighting control operation for controlling the virtual object to perform the sighting action on the virtual firearm.

[0203] In an alternative embodiment, the playing module 1330 is further configured to synchronously adjust the arm bones based on the bone binding system during the adjustment process of the hand position.

[0204] The present application provides another animation playing apparatus, and the apparatus includes:

[0205] A receiving module, configured to receive a control operation for a virtual object, where the control operation is used to control the virtual object to perform a target action, and the target action is used to control the virtual object to adjust from a first form holding a virtual prop to a second form;

[0206] A display module, configured to display an animation of the virtual object performing the target action based on the control operation;

[0207] Wherein, during the execution of the target action, a target body part of the virtual object changes along a target change path, and the target change path is obtained by adjusting a reference change path through a scaling ratio, and the scaling ratio corresponds to the virtual prop held by the virtual object.

[0208] In an optional embodiment, the target change path corresponds to a first displacement vector, and the reference change path corresponds to a second displacement vector;

[0209] The target change path is a path obtained by adjusting the reference change path based on a scaling ratio corresponding to the first displacement vector and the second displacement vector.

[0210] In an optional embodiment, the first displacement vector is a displacement vector corresponding to the first form and the second form obtained based on the posture of the virtual object;

[0211] The second displacement vector is a displacement vector corresponding to the first form and the second form obtained based on reference animation resources, and the reference animation resources are adaptive animation resources corresponding to the prop type of the virtual prop and the target action.

[0212] In summary, for the animation playing device provided in the embodiments of the present application, since the reference animation resources are adaptive animation resources corresponding to the prop type of the virtual prop and the target action, that is, the reference animation resources are animation resources corresponding to a group of virtual props. When performing the target action, when the virtual object holds any one of the props in the group of virtual props, the reference animation resources can be used for scaling adjustment, so as to realize animation rendering and playing, improve the animation configuration efficiency corresponding to the target action, and reduce the resource occupancy and the calculation amount of the device.

[0213] It should be noted that: for the animation playing device provided in the above embodiments, only the above division of each functional module is used as an example for illustration. In practical applications, the above functions can be allocated to different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the animation playing device provided in the above embodiments and the embodiments of the animation playing method belong to the same concept, and the specific implementation process can be seen in the method embodiments, which will not be repeated here.

[0214] Figure 15 FIG. shows a structural block diagram of a terminal 1500 provided by an exemplary embodiment of the present application. The terminal 1500 may be: a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio LayerIII), an MP4 (Moving Picture Experts Group AudioLayer IV) player, a laptop computer or a desktop computer. The terminal 1500 may also be referred to by other names such as user equipment, portable terminal, laptop terminal, desktop terminal, etc.

[0215] Generally, the terminal 1500 includes a processor 1501 and a memory 1502.

[0216] The processor 1501 may include one or more processing cores, such as a quad-core processor, an octa-core processor, etc. The processor 1501 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), or PLA (Programmable Logic Array). The processor 1501 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the wake state, also known as the CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 1501 may be integrated with a GPU (Graphics Processing Unit), and the GPU is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 1501 may further include an AI (Artificial Intelligence) processor, and the AI processor is used to process computational operations related to machine learning.

[0217] The memory 1502 may include one or more computer-readable storage media, and the computer-readable storage media may be non-transitory. The memory 1502 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices and flash storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 1502 is used to store at least one instruction, and the at least one instruction is used to be executed by the processor 1501 to implement the animation playback method provided in the method embodiments of the present application.

[0218] In some embodiments, the terminal 1500 may further optionally include a peripheral device interface 1503 and at least one peripheral device. The processor 1501, the memory 1502, and the peripheral device interface 1503 may be connected through a bus or signal lines. Each peripheral device may be connected to the peripheral device interface 1503 through a bus, signal lines, or a circuit board. Specifically, the peripheral devices include at least one of a radio frequency circuit 1504, a display screen 1505, a camera assembly 1506, an audio circuit 1507, and a power supply 1508.

[0219] The peripheral device interface 1503 can be used to connect at least one I / O (Input / Output) related peripheral device to the processor 1501 and the memory 1502. In some embodiments, the processor 1501, the memory 1502, and the peripheral device interface 1503 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 1501, the memory 1502, and the peripheral device interface 1503 can be implemented on a separate chip or circuit board, and this embodiment does not limit this.

[0220] The radio frequency circuit 1504 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 1504 communicates with the communication network and other communication devices through electromagnetic signals. The radio frequency circuit 1504 converts an electrical signal into an electromagnetic signal for transmission, or converts the received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 1504 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and so on. The radio frequency circuit 1504 can communicate with other terminals through at least one wireless communication protocol. The wireless communication protocol includes but is not limited to: the World Wide Web, a metropolitan area network, an intranet, generations of mobile communication networks (2G, 3G, 4G, and 5G), a wireless local area network, and / or a WiFi (Wireless Fidelity) network. In some embodiments, the radio frequency circuit 1504 may further include a circuit related to NFC (Near Field Communication), and this application does not limit this.

[0221] The display screen 1505 is used to display the UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof. When the display screen 1505 is a touch display screen, the display screen 1505 also has the ability to collect touch signals on or above the surface of the display screen 1505. The touch signals can be input as control signals to the processor 1501 for processing. At this time, the display screen 1505 can also be used to provide virtual buttons and / or a virtual keyboard, also known as soft buttons and / or a soft keyboard. In some embodiments, there may be one display screen 1505, which is provided on the front panel of the terminal 1500; in other embodiments, there may be at least two display screens 1505, which are respectively provided on different surfaces of the terminal 1500 or are in a folding design; in still other embodiments, the display screen 1505 may be a flexible display screen, which is provided on the curved surface or the folding surface of the terminal 1500. Even further, the display screen 1505 can also be set to an irregular non-rectangular shape, that is, a special-shaped screen. The display screen 1505 can be prepared using materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).

[0222] The camera module 1506 is used to capture images or videos. Optionally, the camera module 1506 includes a front camera and a rear camera. Generally, the front camera is provided on the front panel of the terminal, and the rear camera is provided on the back of the terminal. In some embodiments, there are at least two rear cameras, which are any one of a main camera, a depth-of-field camera, a wide-angle camera, and a telephoto camera, to implement functions such as background blurring by fusing the main camera and the depth-of-field camera, panoramic shooting by fusing the main camera and the wide-angle camera, and VR (Virtual Reality) shooting functions or other fused shooting functions. In some embodiments, the camera module 1506 may also include a flash. The flash can be a single-color-temperature flash or a two-color-temperature flash. A two-color-temperature flash refers to a combination of a warm-light flash and a cold-light flash, which can be used for light compensation under different color temperatures.

[0223] The audio circuit 1507 may include a microphone and a speaker. The microphone is used to collect sound waves of the user and the environment, and convert the sound waves into electrical signals for input to the processor 1501 for processing, or input to the radio frequency circuit 1504 to achieve voice communication. For the purpose of stereo collection or noise reduction, there may be multiple microphones, which are respectively arranged at different parts of the terminal 1500. The microphone may also be an array microphone or an omnidirectional collection microphone. The speaker is used to convert the electrical signal from the processor 1501 or the radio frequency circuit 1504 into sound waves. The speaker may be a traditional thin film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert the electrical signal into sound waves audible to humans, but also convert the electrical signal into sound waves inaudible to humans for uses such as ranging. In some embodiments, the audio circuit 1507 may further include a headphone jack.

[0224] The power supply 1508 is used to supply power to each component in the terminal 1500. The power supply 1508 may be alternating current, direct current, a disposable battery or a rechargeable battery. When the power supply 1508 includes a rechargeable battery, the rechargeable battery may be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery charged through a wired line, and a wireless rechargeable battery is a battery charged through a wireless coil. The rechargeable battery may also be used to support fast charging technology.

[0225] In some embodiments, the terminal 1500 further includes one or more sensors 1510. The one or more sensors 1510 include but are not limited to: an acceleration sensor 1511, a gyroscope sensor 1512, a pressure sensor 1513, an optical sensor 1514, and a proximity sensor 1515.

[0226] The acceleration sensor 1511 can detect the magnitude of acceleration on the three coordinate axes of the coordinate system established with the terminal 1500. For example, the acceleration sensor 1511 can be used to detect the components of the gravitational acceleration on the three coordinate axes. The processor 1501 can control the display screen 1505 to display the user interface in a landscape view or a portrait view according to the gravitational acceleration signal collected by the acceleration sensor 1511. The acceleration sensor 1511 can also be used for collecting game or user's motion data.

[0227] The gyroscope sensor 1512 can detect the body direction and rotation angle of the terminal 1500. The gyroscope sensor 1512 can cooperate with the acceleration sensor 1511 to collect the 3D actions of the user on the terminal 1500. According to the data collected by the gyroscope sensor 1512, the processor 1501 can achieve the following functions: motion sensing (such as changing the UI according to the user's tilting operation), image stabilization during shooting, game control, and inertial navigation.

[0228] The pressure sensor 1513 can be disposed on the side frame of the terminal 1500 and / or the lower layer of the display screen 1505. When the pressure sensor 1513 is disposed on the side frame of the terminal 1500, it can detect the holding signal of the user on the terminal 1500, and the processor 1501 can perform left / right hand recognition or quick operation according to the holding signal collected by the pressure sensor 1513. When the pressure sensor 1513 is disposed on the lower layer of the display screen 1505, the processor 1501 can control the operable controls on the UI interface according to the pressure operation of the user on the display screen 1505. The operable controls include at least one of button controls, scroll bar controls, icon controls, and menu controls.

[0229] The optical sensor 1514 is used to collect the ambient light intensity. In one embodiment, the processor 1501 can control the display brightness of the display screen 1505 according to the ambient light intensity collected by the optical sensor 1514. Specifically, when the ambient light intensity is high, the display brightness of the display screen 1505 is increased; when the ambient light intensity is low, the display brightness of the display screen 1505 is decreased. In another embodiment, the processor 1501 can also dynamically adjust the shooting parameters of the camera module 1506 according to the ambient light intensity collected by the optical sensor 1514.

[0230] The proximity sensor 1515, also known as the distance sensor, is usually disposed on the front panel of the terminal 1500. The proximity sensor 1515 is used to collect the distance between the user and the front of the terminal 1500. In one embodiment, when the proximity sensor 1515 detects that the distance between the user and the front of the terminal 1500 is gradually decreasing, the processor 1501 controls the display screen 1505 to switch from the lit state to the off state; when the proximity sensor 1515 detects that the distance between the user and the front of the terminal 1500 is gradually increasing, the processor 1501 controls the display screen 1505 to switch from the off state to the lit state.

[0231] Those skilled in the art can understand that Figure 15 the structure shown does not limit the terminal 1500, and it may include more or fewer components than shown in the figure, or combine some components, or adopt different component arrangements.

[0232] Optionally, the computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), solid state drives (SSD), or optical discs, etc. Among them, the random access memory may include resistive random access memory (ReRAM) and dynamic random access memory (DRAM). The serial numbers of the embodiments of the present application above are only for description and do not represent the superiority or inferiority of the embodiments.

[0233] Those of ordinary skill in the art can understand that all or part of the steps to implement the above embodiments can be completed by hardware, or can be completed by instructing relevant hardware through a program. The program can be stored in a computer-readable storage medium. The storage medium mentioned above can be read-only memory, a magnetic disk, or an optical disc, etc.

[0234] The above are only optional embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A method for playing an animation, characterized in that, The method includes: Receiving a control operation for a virtual object, the control operation being used to control the virtual object to perform a target action, and the target action being used to control the virtual object to adjust from a first form holding a virtual prop to a second form; Obtaining a first displacement vector corresponding to the first form and the second form based on the posture of the virtual object; the posture of the virtual object is used to indicate the position where the body part of the virtual object is located. Specifically, obtaining the coordinate of the first position point of the target body position of the virtual object in the first form; obtaining the coordinate of the second position point of the target body position of the virtual object in the second form; the first displacement vector is the difference between the coordinate of the second position point and the coordinate of the first position point; Obtaining a second displacement vector corresponding to the first form and the second form in a reference animation resource, the reference animation resource being an adaptive animation resource corresponding to the prop type of the virtual prop and the target action, and the reference animation resource further includes intermediate animation data of the target action, and the intermediate animation data is used to indicate the action process of the target action; Adjusting the intermediate animation data based on the scaling ratio corresponding to the first displacement vector and the second displacement vector to obtain the animation data for the virtual object to perform the target action; Playing the animation of the virtual object performing the target action based on the animation data.

2. The method according to claim 1, characterized in that, The obtaining the coordinate of the second position point of the target body position of the virtual object in the second form includes: Determining the target adjustment position of the virtual prop; Determining the coordinate of the second position point of the target body position of the virtual object in the second form based on the target adjustment position.

3. The method according to claim 2, characterized in that, The virtual prop is a virtual firearm, and the target action is a sighting action; The determining the target adjustment position of the virtual prop includes: Determining the coincidence position of the sight center of the aiming scope and the center point of the observation range of the virtual object after the virtual firearm is sighted; Taking the coincidence position of the sight center and the observation range center point as the target adjustment position of the virtual firearm.

4. The method according to claim 3, characterized in that, The obtaining the coordinate of the first position point of the target body position of the virtual object in the current first form includes: Obtaining the coordinate of the first position point of the hand of the virtual object before the current sighting; The determining the coordinate of the second position point of the target body position of the virtual object in the second form based on the target adjustment position includes: Determining the coordinate of the second position point of the hand of the virtual object after the sighting based on the target adjustment position.

5. The method according to any one of claims 1 to 4, characterized in that, The obtaining the second displacement vector corresponding to the first form and the second form in the reference animation resource includes: Determining the prop type of the virtual prop; Obtaining the reference animation resource corresponding to the prop type and the target action; Obtaining the coordinate of the starting position point and the coordinate of the ending position point of the target body position of the virtual object in the reference animation resource, the coordinate of the starting position point corresponds to the first form, and the coordinate of the ending position point corresponds to the second form; Use the difference between the coordinates of the termination position point and the coordinates of the starting position point as the second displacement vector.

6. The method according to claim 5, characterized in that, The virtual prop includes a virtual firearm; The obtaining of the reference animation resource corresponding to the prop type and the target action includes: Obtain the reference animation resource corresponding to the virtual firearm and the target action; Or, Obtain the reference animation resource corresponding to the firearm type of the virtual firearm and the target action.

7. The method according to any one of claims 1 to 4, characterized in that, The adjusting of the intermediate animation data based on the scaling ratio corresponding to the first displacement vector and the second displacement vector to obtain the animation data of the virtual object performing the target action includes: Determine the scaling ratio based on the ratio between the first displacement vector and the second displacement vector; Use the product of the scaling ratio and the intermediate animation data as the animation data of the virtual object performing the target action.

8. The method according to claim 7, characterized in that, The target action includes a sighting action, and the intermediate animation data includes the position data of the hand of the virtual object during the sighting process; The using the product of the scaling ratio and the intermediate animation data as the animation data of the virtual object performing the target action includes: Use the product of the scaling ratio and the position data of the hand during the sighting process as the animation data of the hand position when the virtual object performs the sighting action.

9. The method according to claim 8, characterized in that, The receiving of the control operation for the virtual object includes: Receive a sighting control operation for controlling the virtual object to perform the sighting action on the virtual firearm.

10. The method according to claim 8, characterized in that, The method further includes: During the adjustment of the hand position, synchronously adjust the arm bones based on the bone binding system.

11. An animation playing method, characterized in that, The method includes: Receive a control operation for the virtual object, the control operation being used to control the virtual object to perform a target action for controlling the virtual object to adjust from a first form holding a virtual prop to a second form; Display the animation of the virtual object performing the target action based on the control operation; During the execution of the target action, the target body part of the virtual object changes along a target change path, which is obtained by adjusting the scale ratio on the basis of a reference change path, and the scale ratio corresponds to the virtual prop held by the virtual object; the target change path corresponds to a first displacement vector, and the reference change path corresponds to a second displacement vector; the target change path is a path obtained by adjusting the reference change path based on the scale ratio corresponding to the first displacement vector and the second displacement vector; the first displacement vector is a displacement vector obtained based on the posture of the virtual object; the posture of the virtual object is used to indicate the position of the body part of the virtual object, and the first displacement vector is determined based on the difference between the coordinates of the first position point of the target body position of the virtual object in the first form and the coordinates of the second position point of the target body position of the virtual object in the second form; the second displacement vector is a displacement vector obtained based on reference animation resources, and the reference animation resources are adaptive animation resources corresponding to the prop type of the virtual prop and the target action.

12. An animation playing device, characterized in that, The device includes: a receiving module, configured to receive a control operation on a virtual object, where the control operation is used to control the virtual object to execute a target action, and the target action is used to control the virtual object to be adjusted from a first form holding a virtual prop to a second form; an obtaining module, configured to obtain a first displacement vector corresponding to the first form and the second form based on the posture of the virtual object; the posture of the virtual object is used to indicate the position of the body part of the virtual object, where the coordinates of the first position point of the target body position of the virtual object in the first form are obtained; the coordinates of the second position point of the target body position of the virtual object in the second form are obtained; the first displacement vector is the difference between the second position point coordinates and the first position point coordinates; The obtaining module is further configured to obtain a second displacement vector corresponding to the first form and the second form in the reference animation resources, where the reference animation resources are adaptive animation resources corresponding to the prop type of the virtual prop and the target action, and the reference animation resources further include intermediate animation data of the target action, and the intermediate animation data is used to indicate the action process of the target action; a playing module, configured to adjust the intermediate animation data based on the scale ratio corresponding to the first displacement vector and the second displacement vector to obtain animation data for the virtual object to execute the target action; and play the animation of the virtual object executing the target action based on the animation data.

13. A computer device, characterized in that, The computer device includes a processor and a memory, and at least one program is stored in the memory, and the at least one program is loaded and executed by the processor to implement the animation playing method according to any one of claims 1 to 11.

14. A computer-readable storage medium, characterized in that, At least one program is stored in the storage medium, and the at least one program is loaded and executed by a processor to implement the animation playing method according to any one of claims 1 to 11.

15. A computer program product, characterized in that, It includes a computer program or instruction, and when the computer program or instruction is executed by a processor, it implements the animation playing method according to any one of claims 1 to 11.

Citation Information

Patent Citations

  • Game system, game system control method, and non-volatile recording medium

    CN107847800A

  • Animation playing method and device based on virtual environment, equipment and storage medium

    CN111273780A