Data processing method and device, electronic equipment and computer readable storage medium
By stitching together first-person and third-person perspective images in the game and using reference skeletal points to generate a target image for realistic animation, the problem of stiff animation in the first-person perspective is solved, thus improving the user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- TENCENT TECHNOLOGY (SHENZHEN) CO LTD
- Filing Date
- 2022-02-16
- Publication Date
- 2026-05-19
AI Technical Summary
In the game, the animation of the game character in the first-person perspective is stiff and cannot realistically show the movements of non-focused parts, resulting in a poor user experience.
By acquiring images from first-person and third-person perspectives, and stitching them together using reference skeletal points, a realistic animated target image is generated, showcasing the complete target object from the first-person perspective.
It achieves realistic animation of the target object from a first-person perspective, enriching the displayed content and enhancing the user experience.
Smart Images

Figure CN116637364B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the fields of games, animation, multimedia and cloud technology. Specifically, this application relates to a data processing method, apparatus, electronic device, computer-readable storage medium and computer program product. Background Technology
[0002] In game applications, the first-person perspective, similar to how the human eye views the world, typically only shows what's in front of the current game character and not what's behind them. It usually only displays the game-related parts of the character's "body," not the entire "body." The third-person perspective, on the other hand, shows the game character's entire body, their actions adapted to the current game environment, and all content within the current game scene.
[0003] To enhance the gaming experience, the movements of visually prominent parts of the game character's "body" are often exaggerated in first-person perspective, or inconsistencies arise between the character's actions in first-person and third-person perspectives. To meet the display requirements of game scenarios, when game characters need to be displayed for both first-person and third-person perspectives, related technologies require two sets of animation resources: one for the first-person perspective and another for the third-person perspective. In actual gameplay, the animation resources corresponding to either the first-person or third-person perspectives are played as needed.
[0004] In a first-person perspective, to better showcase the animation of an animated character's upper body, typically only the visually important parts of the character's "body" are displayed. Therefore, to save workload when creating first-person animation assets, artists often omit the animation of less visually important parts of the character's "body" or set the visually important parts to relatively fixed animations. Without the realistic depiction of the lower body as the animated character moves, the animation of the character appears stiff and less than ideal when displayed in a first-person perspective. Summary of the Invention
[0005] This application provides a data processing method, apparatus, electronic device, storage medium, and computer product that enable realistic animation of the second part of the target object when displaying the target object from a first perspective, enriching the displayed content in the image of the target object from the first perspective and improving the user experience. The specific technical solutions provided by this application are as follows:
[0006] According to one aspect of the embodiments of this application, a data processing method is provided, the method comprising:
[0007] Acquire a first image of the target object corresponding to a first-view perspective, and a second image of the target object corresponding to a third-view perspective;
[0008] Using the reference skeleton points as splicing points, the first sub-image and the second sub-image are spliced together to obtain the target image corresponding to the first image, and the target image is displayed as the image of the target object corresponding to the first viewpoint.
[0009] The first sub-image is the sub-image of the first image that corresponds to the first object part, with the reference bone point as the dividing point; the second sub-image is the sub-image of the second image that corresponds to the second object part, with the reference bone point as the dividing point; and the second object part is the part of the target object other than the first object part.
[0010] According to another aspect of the embodiments of this application, a data processing apparatus is provided, the apparatus comprising:
[0011] The image acquisition module is used to acquire a first image of the target object corresponding to a first perspective and a second image of the target object corresponding to a third perspective;
[0012] The image stitching module is used to stitch the first sub-image and the second sub-image together using the reference skeleton points as stitching points to obtain the target image corresponding to the first image;
[0013] The image display module is used to display the target image as an image of the target object corresponding to the first-person perspective;
[0014] The first sub-image is the sub-image of the first image that corresponds to the first object part, with the reference bone point as the dividing point; the second sub-image is the sub-image of the second image that corresponds to the second object part, with the reference bone point as the dividing point; and the second object part is the part of the target object other than the first object part.
[0015] Optionally, when the image stitching module stitches the first sub-image and the second sub-image together using the reference skeleton points as stitching points to obtain the target image corresponding to the first image, it is specifically used for:
[0016] Obtain the first transformation information of each bone point in the first bone chain corresponding to the first image; obtain the second transformation information of each bone point in the second bone chain corresponding to the second image; the transformation information of a bone point is the transformation information of the bone point relative to its parent bone point; the first bone chain is the bone chain between the reference bone point and the root bone point; the second bone chain is the bone chain between the parent bone point of the reference bone point and the root bone point.
[0017] Based on the first transformation information of each bone point in the first bone chain, the third transformation information of the reference bone point relative to the root bone point is determined.
[0018] Based on the second transformation information of each bone point in the second bone chain, the fourth transformation information of the parent bone point of the reference bone point relative to the root bone point is determined.
[0019] Based on the third and fourth transformation information, determine the target transformation information of the reference skeleton point;
[0020] Using the reference skeleton points as splicing points, and based on the target transformation information of the reference skeleton points, the first sub-image and the second sub-image are spliced together to obtain the target image.
[0021] Optionally, when the image stitching module determines the third transformation information of the reference bone point relative to the root bone point based on the first transformation information of each bone point in the first skeletal chain, it is specifically used for:
[0022] Perform a first operation on the first transformation information of each bone point in the first skeletal chain to obtain third transformation information; the first operation includes:
[0023] Add the displacement information in the first transformation information of each bone point in the first bone chain, add the rotation information in the first transformation information of each bone point in the first bone chain, and multiply the scaling information in the first transformation information of each bone point in the first bone chain.
[0024] Optionally, when determining the target transformation information of the reference skeleton points based on the third and fourth transformation information, the image stitching module is specifically used for:
[0025] Perform a second operation on the fourth transformation information to obtain the processed fourth transformation information; the second operation includes: inverting the displacement information and rotation information in the fourth transformation information respectively;
[0026] Perform the first operation on the third transformation information and the processed fourth transformation information to obtain the target transformation information.
[0027] Optionally, when acquiring a first image of the target object corresponding to a first viewpoint and a second image of the target object corresponding to a third viewpoint, the image acquisition module is specifically used for:
[0028] During the operation of the target application, a first image of the target object corresponding to the first perspective and a second image of the target object corresponding to the third perspective are acquired.
[0029] The first image was obtained in the following way:
[0030] A first image sequence corresponding to a target object from a first perspective is obtained. The first image sequence includes at least two pre-configured first animation keyframes. The first image sequence includes one first keyframe and at least one second keyframe. The first keyframe is an animation keyframe corresponding to the first object part and the second object part of the target object, and the second keyframe is an animation keyframe corresponding to the first object part of the target object.
[0031] The second image was obtained in the following way:
[0032] Acquire a second image sequence corresponding to the target object from a third-person perspective. The second image sequence includes at least two pre-configured second animation keyframes, each of which is an animation keyframe corresponding to the first object part and the second object part of the target object.
[0033] Based on the second image sequence, obtain the second image in the second image sequence that matches the current time.
[0034] Optionally, when the image acquisition module obtains the first image in the first image sequence that matches the current time based on the first image sequence, it specifically performs the following:
[0035] Determine the first time in the time information of the first image sequence that matches the current time;
[0036] If there is a first animation keyframe with a keyframe time of the first time in the first image sequence, the first animation keyframe with a keyframe time of the first time is determined as the first image;
[0037] If there is no first animation keyframe with a keyframe time of the first time in the first image sequence, then the first image is determined based on the two first animation keyframes whose keyframe times are closest to the first time.
[0038] Optionally, when determining the first image based on the two first animation keyframes whose keyframe times are closest to the first time, the image acquisition module is specifically used for:
[0039] Determine the time difference between the keyframe time and the first time for each of the two first animation keyframes;
[0040] Based on the time difference between the two first animation keyframes, the weight of each animation keyframe in the two first animation keyframes is determined, where the weight is negatively correlated with the time difference;
[0041] For each bone point of the target object, according to the weights corresponding to the two first animation keyframes, the transformation information of the bone point corresponding to the two first animation keyframes is weighted and summed to obtain the transformation information of the bone point corresponding to the current time.
[0042] Based on the transformation information of each skeletal point of the target object corresponding to the current time, the two first animation keyframes are fused to obtain the first image.
[0043] According to another aspect of the embodiments of this application, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the above-described method.
[0044] According to another aspect of the embodiments of this application, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the steps of the above-described method.
[0045] According to another aspect of the embodiments of this application, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps of the above-described method.
[0046] The beneficial effects of the technical solutions provided in this application are:
[0047] Based on the data processing method provided in this application embodiment, when displaying an image of a target object corresponding to a first perspective, a reference bone point is used as the segmentation point for the object part. A sub-image of the first object part in the first image of the target object corresponding to the first perspective is taken as the first sub-image, and a sub-image of the second object part in the second image of the target object corresponding to a third perspective is taken as the second sub-image. The first sub-image and the second sub-image are then stitched together using the reference bone point as the stitching point to obtain the target image. By displaying this target image as the image of the target object corresponding to the first perspective, the content of the first object part in the first image and the content of the second object part in the second image can be observed from the first perspective. This allows the second object part to also have realistic animation when the target object in the first perspective moves, making it more realistic, natural, and less stiff, enriching the displayed content in the image of the target object corresponding to the first perspective, and improving the user experience. Attached Figure Description
[0048] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments of this application will be briefly introduced below.
[0049] Figure 1 A flowchart illustrating a data processing method provided in an embodiment of this application;
[0050] Figure 2 A schematic diagram of a first image corresponding to a first viewpoint, as shown in related technologies, is presented.
[0051] Figure 3 This illustration shows a schematic diagram of a target image corresponding to a first-view perspective, as presented in an embodiment of this application.
[0052] Figure 4 This diagram illustrates the correspondence between the two animation keyframes closest to the first time frame and the first time frame in an embodiment of this application.
[0053] Figure 5 A schematic diagram of the skeletal model of the target object in an embodiment of this application is shown;
[0054] Figure 6 A schematic diagram of the skeletal model of the target object shown in the target application in an embodiment of this application is illustrated;
[0055] Figure 7 A schematic diagram of the structure of a data processing system applicable to an embodiment of this application is shown;
[0056] Figure 8 This illustration shows a flowchart of the data processing operation performed by the data processing system in this scenario embodiment;
[0057] Figure 9 A schematic diagram of a data processing apparatus provided in an embodiment of this application is shown;
[0058] Figure 10 A schematic diagram of the structure of an electronic device to which this application embodiment applies is shown. Detailed Implementation
[0059] The embodiments of this application are described below with reference to the accompanying drawings. It should be understood that the embodiments described below with reference to the accompanying drawings are exemplary descriptions for explaining the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions of the embodiments of this application.
[0060] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the terms “comprising” and “including” as used in embodiments of this application mean that the corresponding feature can be implemented as the presented feature, information, data, step, operation, element, and / or component, but do not exclude implementation as other features, information, data, step, operation, element, component, and / or combinations thereof supported by the art. It should be understood that when we say that an element is “connected” or “coupled” to another element, the one element can be directly connected or coupled to the other element, or it can mean that the one element and the other element establish a connection relationship through an intermediate element. Furthermore, “connected” or “coupled” as used herein can include wireless connection or wireless coupling. The term “and / or” as used herein indicates at least one of the items defined by the term; for example, “A and / or B” can be implemented as “A,” or as “B,” or as “A and B.”
[0061] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0062] The following describes some terms and related technologies involved in the embodiments of this application:
[0063] Animated Characters: Virtual characters (corresponding to game characters) drawn using 3D (3D) game engines or DCC software (e.g., Code GearDelphi for Win32 computer, multi-project batch compilation) and 3D graphics modeling and rendering technology. In this embodiment, the animated character data includes character model data and character skeletal data.
[0064] Skeletal animation (i.e., the movement of bones): Each animated character contains at least two main types of data: bones and a model. In game / film animation production, the process of using the posture of the bones to drive the model (changing the appearance of the character model) is called skeletal animation. Skeletal animation refers to binding images of various body parts of a character to a single, interconnected "bone," and creating animation by controlling the position (i.e., position information), rotation direction (i.e., rotation information), and scaling (i.e., scaling information) of these bone points, and then performing skinning. The position, rotation, and scaling information of each bone point can be collectively referred to as the transformation information of that bone point.
[0065] Skeletal animation generally consists of two parts: the skeleton and the skin. The skeleton involves two types of data: its topological structure (connections, parent-child relationships) and its various poses, which are the positional information of the entire skeleton for each action. The skin represents the information of the vertices ("bone points") attached to the skeleton. The process of rigging the skeleton involves determining which bones influence each vertex and the weight of each bone's influence. For example, the skin at the elbow might be influenced by both the upper arm and forearm bones, while areas further away from the elbow might only be affected by the forearm bones. In 3D skeletal animation, each vertex typically supports a maximum of 4-8 bones simultaneously influencing it to accurately represent the overall skinning effect.
[0066] First-person perspective: This refers to the viewpoint from the player's perspective, corresponding to the player's character. For example, this is the perspective in FPS (First-Person Shooter) games. Because FPS games focus on the content in the player character's forward field of vision and the character's manipulation of items (usually controlled by the character's hands), the animation assets for FPS games typically only create the upper body assets of the character.
[0067] Third-person perspective: also known as the third-person view, is the perspective from which a player sees the character controlled by their teammates in a game, or the perspective from a viewpoint other than that of a character controlled by the player.
[0068] Separate upper and lower body: refers to using the upper body from a first-person perspective animation resource and the lower body from a third-person perspective animation resource.
[0069] Skeletal Hierarchy: In a game engine, the skeletal information (i.e., transformation information) of all bones in a skeletal model is stored in an array. This array stores transformation information based on the bone point's name and the index of its parent bone point (joint index). That is, for each bone point, its transformation information is relative to its parent bone point. In a skeletal model, the line connecting any two bone points forms a skeletal chain. Specifically, a bone point or any point in the skeletal model can be selected as the root bone point. Based on the relationship between each bone point and the root bone point, the bone points can be classified into hierarchical levels. With the root bone point's level being the highest level among all bone levels in the skeletal model, the bone levels corresponding to the bone points directly connected to the root bone point are designated as the second highest level, and so on, until the bone level corresponding to each bone point is obtained.
[0070] Model space: The coordinate space used when building a skeletal model. Typically, when building a skeletal model, the location of the root bone point (i.e., the position of the root bone point relative to the origin of the model space) is first determined, and the corresponding skeletal model is built based on the relationship between each bone point and the root bone point. The root bone point can be aligned with the origin in the model space to create the skeletal model.
[0071] Parent bone space: The coordinate space formed with the parent bone point of a given bone point as the origin. The transformation information of a bone point refers to its transformation relative to its parent bone within the parent bone space. Specifically, this includes: the displacement information of a bone point (its coordinate position in the parent bone space); the rotation information of a bone point (the rotation angle, or Euler angle, of its bone point relative to its parent bone point in each coordinate dimension); and the scaling information of a bone point (the scaling ratio of its bone point relative to its parent bone point in each coordinate dimension). A scaling ratio less than 1 indicates a need for reduction; a scaling ratio greater than 1 indicates a need for enlargement. Based on this, the model space can be considered the parent bone space of the root bone point.
[0072] As described above, in related technologies, when displaying animation resources of animated characters from a first-person perspective, there are technical problems such as the animation characters appearing stiff, the effect being less than ideal, and the user experience being poor.
[0073] While first-person perspective typically focuses on the visually prominent parts of a game character's body, the definition of first-person means that in practice, some less visually prominent parts of the character are also displayed. For example, in shooting games, while the focus is on the character's hands and held items, when the character looks down, their legs and feet are usually visible (in this case, the visually prominent parts are the hands, and the less prominent parts are the legs and feet). If the visually prominent parts of the character's body are not animated or are set to fixed animations, the character looking down creates a feeling of floating in mid-air, resulting in a poor gaming experience due to a lack of realism.
[0074] To address this, embodiments of this application provide a data processing method, apparatus, electronic device, computer-readable storage medium, and computer program product. After obtaining a target image by executing the data processing method provided in this application, the target image is displayed as an image of a target object corresponding to a first perspective. This allows for the simultaneous display of content from both the first object portion in the first image and the second object portion in the second image. This enables the second object portion to exhibit realistic animation when the target object in the first perspective moves, resulting in a more realistic, natural, and fluid animation. This enriches the displayed content in the image corresponding to the target object in the first perspective and enhances the user experience.
[0075] The data processing method provided in this application is executed by a data processing device. This data processing device can be any computer device, including but not limited to a user terminal or a server, wherein the server can be a cloud server. The user terminal can be user equipment (UE), a mobile device, a cellular phone, a cordless phone, a personal digital assistant (PDA), a handheld device, a computing device or wearable device, a computer, a smart voice interaction device, a smart home appliance, an in-vehicle terminal, an AR (Augmented Reality) / VR (Virtual Reality) device, a robot, etc. This data processing method can be implemented by a processor calling computer-readable instructions stored in memory.
[0076] Optionally, the data processing method provided in this application embodiment can be implemented based on cloud technology. For example, cloud computing can be used to obtain the transformation information of each skeletal point of the target object corresponding to the current time; and to determine the target transformation information of the reference skeletal point. Based on the transformation information of each skeletal point of the target object corresponding to the current time, two first animation keyframes are fused to obtain a first image; and using the reference skeletal point as the splicing point, the first sub-image and the second sub-image are spliced based on the target transformation information of the reference skeletal point to obtain the target image. Here, 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 local area network to realize the computation, storage, processing, and sharing of data. Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, and application technology applied based on the cloud computing business model. It can form a resource pool, be used on demand, and is flexible and convenient.
[0077] This data processing method can be applied to various scenarios to better showcase the animation of a target object from a first-person perspective. The target object can be a virtual object. For example, this data processing method can be applied to game applications, where the target object can be a game character. The type of game application is not limited in this embodiment; it can be a game application that requires user download and installation, a cloud gaming application, or a game application within a mini-program. Specific game types can include, but are not limited to, action, adventure, simulation, role-playing, and casual games. For example, this method can be used in FPS games to better showcase the animation of a game character (i.e., the target object) from a first-person perspective. In practical applications, multiple objects may exist in the same scene. In such cases, each object can be treated as a separate target object, and the data processing method provided in this embodiment can be executed separately to display the action of the target object based on the target image corresponding to the first image of each target object.
[0078] The technical solutions of this application and their effects are described below through several exemplary embodiments. It should be noted that the following embodiments can be referenced, borrowed from, or combined with each other. Identical terms, similar features, and similar implementation steps in different embodiments will not be repeated.
[0079] Figure 1 This is a flowchart illustrating a data processing method provided in an embodiment of this application. Figure 1 As shown, the data processing method may include steps S110 to S120.
[0080] Step S110: Obtain a first image of the target object corresponding to the first perspective and a second image of the target object corresponding to the third perspective.
[0081] Step S120: Using the reference skeleton point as the splicing point, splice the first sub-image and the second sub-image to obtain the target image corresponding to the first image, and display the target image as the image of the target object corresponding to the first viewpoint;
[0082] The first sub-image is the sub-image of the first image that corresponds to the first object part, with the reference bone point as the dividing point; the second sub-image is the sub-image of the second image that corresponds to the second object part, with the reference bone point as the dividing point; and the second object part is the part of the target object other than the first object part.
[0083] As described above, first-person perspective is the viewpoint of the target object itself, while third-person perspective is the viewpoint of other objects viewing the target object. In game applications, for a game character, first-person perspective is the viewpoint of the player controlling that character, viewed through their user terminal. Third-person perspective is the viewpoint of players controlling other game characters in the application besides the current game character, viewed through their user terminal.
[0084] In the process of game production and operation, animation resources (which can be simply referred to as animation, i.e., the skeletal animation described above) are created according to the different action performances of the game characters. Animation resources are formed when an image sequence is played at a certain frame rate. The image sequence is composed of multiple consecutive images. In this embodiment of the application, in order to more clearly show the specific production process of each animation resource, the images corresponding to each animation resource are used for illustration.
[0085] Optionally, a first image can be obtained from a first image sequence in a first animation resource (which may be simply referred to as the first animation) corresponding to a target object from a first perspective, and a second image can be obtained from a second image sequence in a second animation resource (which may be simply referred to as the second animation) corresponding to a target object from a second perspective. The motion representation of a skeletal point of a target object in the first animation is the skeletal animation of that skeletal point corresponding to the first perspective, and the motion representation of the target object corresponding to the first perspective can be formed by the skeletal animation of all skeletal points of the target object in the first animation.
[0086] Correspondingly, the motion of a skeletal point of a target object in the second animation is the skeletal animation of that skeletal point in the third perspective. The motion of the target object in the third perspective can be formed by the skeletal animation of all the skeletal points of the target object in the third animation.
[0087] A first image sequence and a second image sequence (hereinafter, the first image sequence and the second image sequence are collectively referred to as image sequences) can be set according to actual needs. For example, image sequences corresponding to the state information of the target object (i.e., different states of the target object) and the specific scene information of the target application can be set respectively, and the image sequences can be stored in the database content of a preset storage space. The preset storage space can be local storage space or cloud storage space, and this application embodiment does not limit it. In addition, the image sequences can also be stored on the blockchain based on blockchain technology.
[0088] During the operation of the target application, based on different application scenarios and the state of the target object corresponding to the scenario, image sequences corresponding to the first and third perspectives are determined from the preset storage space, and the determined image sequences are displayed according to different perspectives.
[0089] To more clearly describe the process of realizing the action performance of the target object, this application embodiment uses each frame of image that forms the action performance of the target object as an example to illustrate the data processing method provided in this application embodiment.
[0090] Understandably, in practical applications, a target image can be obtained through any terminal or server. After obtaining the target image, it is displayed through the terminal corresponding to the first-person perspective. For other terminals besides the terminal corresponding to the first-person perspective, a second image of the target object, corresponding to the third-person perspective, is displayed. Specifically, when viewing the target object from the first-person perspective, only a portion of the target object is typically visible in the image; when viewing the target object from the third-person perspective, the entire target object is usually visible.
[0091] In practical implementation, the first image from a first-view perspective corresponding to the current action of the target object and the second image from a third-view perspective corresponding to the current action of the target object can be directly processed. Using a reference skeleton point as the splicing point, the first sub-image corresponding to the first image and the second sub-image corresponding to the second image are spliced together to obtain the target image corresponding to the first image, and then the target image is displayed. Alternatively, each first image in the first-view image sequence corresponding to the current action of the target object can be fused with the second image in the corresponding third-view image sequence to obtain the target image sequence corresponding to the first view, and then the first-view target image sequence is displayed. This application does not limit these two implementation methods.
[0092] The reference bone point can be any specified bone point among all the bone points of the target object, and this application does not impose any restrictions on this. Optionally, the reference bone point can be a lumbar bone point of the target object.
[0093] For a target object, the direction of the bone points from the head to the ankle can be defined as the vertical direction (i.e., up and down). Naturally, the direction perpendicular to the vertical direction is the horizontal direction. By using the reference bone points as dividing points and segmenting the target object's body parts horizontally, the target object's body parts can be divided into two distinct body parts: the body parts corresponding to the upper body and the body parts corresponding to the lower body. Correspondingly, the body parts containing the upper body can be defined as the first body part, and the body parts containing the lower body can be defined as the second body part.
[0094] Taking the target as an example, where the target is walking forward while holding a prop. Figure 2 A schematic diagram of a first image corresponding to a first perspective, as shown in related technologies, is presented. Figure 3 This illustration shows a schematic diagram of a target image corresponding to a first-view perspective, as presented in an embodiment of this application. For example... Figure 2 As shown, in related technologies, based on the first image corresponding to a first-person perspective, only the animation of the target object's hands and props can be seen from the first-person perspective; the movement of the target object's legs is almost completely invisible. For example... Figure 3 As shown in this embodiment, by using the reference bone point as the splicing point, the first sub-image and the second sub-image are spliced together to obtain the target image corresponding to the first image, and the target image is displayed as the image corresponding to the first perspective. The animation of the target object's hand, props and leg movements can be seen from the first perspective (that is, the movement of the target object's legs in the target image is obtained based on the movement of the object part corresponding to the lower body of the target object in the second sub-image, thus realizing the separation of the upper and lower body).
[0095] Based on the data processing method provided in this application embodiment, when displaying an image of a target object corresponding to a first perspective, a target image is obtained by processing a first image of the target object corresponding to the first perspective and a second image of the target object corresponding to a third perspective. This target image is then displayed as an image of the target object corresponding to the first perspective. Compared to related technologies, where only the upper half of the target object can be seen from the first perspective, this method allows the lower half of the target object in the first perspective to have realistic animation when moving, making it more realistic, natural, and less stiff. This enriches the display content in the image of the target object corresponding to the first perspective and improves the user experience.
[0096] Optionally, acquiring the first image of the target object corresponding to the first viewpoint and the second image of the target object corresponding to the third viewpoint includes:
[0097] During the operation of the target application, a first image of the target object corresponding to the first perspective and a second image of the target object corresponding to the third perspective are acquired.
[0098] The first image was obtained in the following way:
[0099] A first image sequence corresponding to a target object from a first perspective is obtained. The first image sequence includes at least two pre-configured first animation keyframes. The first image sequence includes one first keyframe and at least one second keyframe. The first keyframe is an animation keyframe corresponding to the first object part and the second object part of the target object, and the second keyframe is an animation keyframe corresponding to the first object part of the target object.
[0100] The second image was obtained in the following way:
[0101] Acquire a second image sequence corresponding to the target object from a third-person perspective. The second image sequence includes at least two pre-configured second animation keyframes, each of which is an animation keyframe corresponding to the first object part and the second object part of the target object.
[0102] Based on the second image sequence, obtain the second image in the second image sequence that matches the current time.
[0103] The data processing method provided in this application can be applied to the operation of a target application. During the operation of the target application, a first image and a second image are acquired, and the data processing method provided in this application is executed on the first and second images to display the corresponding target image. In this implementation, the target application can be any application, and this application does not impose any restrictions. When this data processing method is applied to an FPS game, the target application can be the corresponding FPS game application, and the target image is displayed in the target application corresponding to the first-person perspective.
[0104] In this embodiment, the first image sequence can be an image sequence corresponding to a first perspective that matches the current time. The second image sequence can be an image sequence corresponding to a third perspective that matches the current time. As an example, when the target object is in a state of walking while performing a throwing action, the first image sequence can be a pre-configured image sequence corresponding to the first perspective that corresponds to the state of walking while performing a throwing action.
[0105] As described above, the target image corresponds to the first viewpoint, and the content displayed in the first object part of the target image is the content in the first object part of the first image. In actual processing, only the first image sequence including the first object part can be designed. To more clearly illustrate the correspondence between the first image and the second image, one animation keyframe (i.e., the first keyframe) corresponding to the first and second object parts of the target object can be set in the first image sequence, and at least one animation keyframe (i.e., the second keyframe) corresponding to the first object part of the target object can be set. The first keyframe can be the first animation keyframe in the first image sequence.
[0106] By pre-configuring the first and second image sequences as described above, it is not necessary to pre-configure all object parts (first object part and second object part) corresponding to the target object in all animation keyframes of the first image sequence, thereby reducing the cost of animation production and correspondingly reducing storage space and storage costs.
[0107] If the first and second images are directly stitched together to obtain a pre-configured target image before the target application runs, and neither the first nor the second image is a keyframe in the animation of the first image sequence, the difference between the frame rate of the animation formed by the pre-configured image sequence and the actual running frame rate of the target application may cause a certain bone point in the actual target image displayed during the target application's operation to deviate from its position in the pre-configured target image. However, if both the first and second images are keyframes in the animation of the first and second image sequences, there will be no difference in the result of stitching the first and second images together and displaying the target object before and during the target application's operation.
[0108] As an example, suppose the first image is not an animation keyframe in the first image sequence, and the second image is not an animation keyframe in the second image sequence. Before the target application runs, the transformation information of the reference bone points in the pre-configured target images is determined as follows: displacement (0,0,110), rotation (0,0,5), and scaling (1,1,1). During the operation of the target application, the actual transformation information of the reference bone points in the displayed target images is as follows: displacement (-2,-2,108), rotation (0.5,0.6,0.4), and scaling (1,1,1). Obviously, there is a difference between the two, which will cause the bone points in the target images to jitter in terms of visual effect.
[0109] In this embodiment of the application, by acquiring a first image matching the current time in a first image sequence and a second image matching the current time in a second image sequence during the operation of the target application, and performing the data processing method provided in this embodiment on the first and second images, the obtained target image can be displayed at the frame rate of the target application. It can also avoid the situation where the skeletal points in the target image jitter in the viewpoint effect due to the difference between at least two of the frame rates of the target application, the pre-configured first image sequence, and the pre-configured second image sequence.
[0110] Optionally, obtaining the first image in the first image sequence that matches the current time, based on the first image sequence, includes:
[0111] Determine the first time in the time information of the first image sequence that matches the current time;
[0112] If there is a first animation keyframe with a keyframe time of the first time in the first image sequence, the first animation keyframe with a keyframe time of the first time is determined as the first image;
[0113] If there is no first animation keyframe with a keyframe time of the first time in the first image sequence, then the first image is determined based on the two first animation keyframes whose keyframe times are closest to the first time.
[0114] The duration of the first image sequence is usually fixed. The timing information of the first image sequence is determined by taking the first animation keyframe in the first image sequence as the start time of the first image sequence, and defining the time corresponding to the first animation keyframe within the duration of the first image sequence.
[0115] The runtime of the target application can be determined by the current time. Based on the runtime of the target application and the duration of the first image sequence, the first time that matches the current time in the time information of the first image sequence can be determined.
[0116] Assuming the target application's runtime is T, and the duration of the first image sequence is T', the first time matching the current time in the time information of the first image sequence can be determined based on T / T'. Specifically, if there is no remainder in the result of T / T', the first time is the time corresponding to the first animation keyframe in the first image sequence; correspondingly, the first animation keyframe in the first image sequence is the first image. If there is a remainder t in the result of T / T', then the first time is that remainder t.
[0117] If a first animation keyframe with keyframe time t exists in the first image sequence, then the first animation keyframe with keyframe time t is determined as the first image. If no first animation keyframe with keyframe time t exists in the first image sequence, then the first image is determined based on the two animation keyframes with keyframe time closest to t.
[0118] Using the above method, the first image in the first image sequence that matches the current time can be accurately obtained.
[0119] Using the same method, the second image in the second image sequence that matches the current time can be accurately obtained.
[0120] Optionally, determining the first image based on the two first animation keyframes whose keyframe times are closest to the first time includes:
[0121] Determine the time difference between the keyframe time and the first time for each of the two first animation keyframes;
[0122] Based on the time difference between the two first animation keyframes, the weight of each animation keyframe in the two first animation keyframes is determined, where the weight is negatively correlated with the time difference;
[0123] For each bone point of the target object, according to the weights corresponding to the two first animation keyframes, the transformation information of the bone point corresponding to the two first animation keyframes is weighted and summed to obtain the transformation information of the bone point corresponding to the current time.
[0124] Based on the transformation information of each skeletal point of the target object corresponding to the current time, the two first animation keyframes are fused to obtain the first image.
[0125] The frame rate of the first image sequence is usually fixed. Based on the frame rate and duration of the first image sequence, the time interval between any two first animation keyframes in the first image sequence can be determined. Assuming the frame rate of the first image sequence is 30 frames per second, the time interval ΔT between any two first animation keyframes in the first image sequence is 0.033 seconds.
[0126] As described above, if there is no first animation keyframe with a keyframe time of the first time in the first image sequence, the two animation keyframes in the first image sequence whose keyframe time is closest to the first time can be determined based on the first time and the keyframe time corresponding to each animation keyframe in the first image sequence.
[0127] Figure 4 This diagram illustrates the correspondence between the two animation keyframes closest to the first time frame in an embodiment of this application and the first time frame. For example... Figure 4 As shown, in the first image sequence, the keyframe time of the first animation keyframe 1 is t1, and the keyframe time of the second animation keyframe 2 is t2. Correspondingly, the time difference between t1 and t is Δt1, and the time difference between t2 and t is Δt2.
[0128] As an example, assuming Δt1 = 0.011, Δt2 = 0.022, and Δt1:Δt2 = 1:2, then the ratio of the weight corresponding to animation keyframe 1 to the weight corresponding to animation keyframe 2 is 2:1. For a skeleton point of the target object, if the transformation information of the skeleton point corresponding to animation keyframe 1 is A1, and the transformation information of the skeleton point corresponding to animation keyframe 2 is A2, then when the transformation information of the skeleton point corresponding to these two first animation keyframes is weighted and summed according to their respective weights, the ratio of the transformation information A1 of the skeleton point corresponding to animation keyframe 1 to the transformation information A2 of the skeleton point corresponding to animation keyframe 2 is 2:1, and the transformation information of the skeleton point corresponding to the current time is 2 / 3. A1+1 / 3 A2. Using the same method, obtain the transformation information of each skeletal point of the target object corresponding to the current time.
[0129] After obtaining the transformation information of each bone point of the target object corresponding to the current time, the two first animation keyframes are fused based on this transformation information to obtain the first image. Specifically, the transformation information of each bone point of the target object corresponding to the current time can be used as the transformation information of each bone point of the target object in the first image, and the two first animation keyframes can be fused to obtain the first image.
[0130] It is understandable that, in addition to the transformation information of each bone point of the target object, the two first animation keyframes also contain scene information related to the display of the target object, clothing information of the target object, etc. Therefore, when fusing the two first animation keyframes, other information in the two first animation keyframes besides the transformation information of each bone point of the target object can also be fused, and the transformation information of each bone point of the target object corresponding to the current time can be used as the transformation information of each bone point in the fused image to obtain the first image.
[0131] Using the above method, the first image that corresponds to the current time and conforms to the current target application's operating scenario can be accurately determined.
[0132] In practical applications, the data processing method provided in this application embodiment can be executed based on all the skeletal points of a target object, or a portion of the skeletal points of the target object can be selected to execute the data processing method provided in this application embodiment. This application embodiment does not impose any restrictions on this.
[0133] Taking the example that the skeletal model of the target object is similar to that of a human skeletal model, Figure 5 A schematic diagram of the skeletal model of the target object in an embodiment of this application is shown. Figure 6 This illustration shows a schematic diagram of the skeletal model of the target object as presented in the target application in an embodiment of this application. For example... Figure 5 and Figure 6 As shown, in the skeletal model of the target object, five skeletal points can be selected from all the skeletal points of the target object to execute the data processing method provided in this application embodiment. The five selected skeletal points are three skeletal points from the waist region to the chest region of the target object, the hip skeletal point (Hip), and the root skeletal point (Root). Among them, the three skeletal points from the waist region to the chest region of the target object are the waist skeletal point (Spine01), the skeletal point 02 (Spine02), and the skeletal point 03 (Spine03). In this skeletal model, Root is a skeletal point that is equidistant from the two ankle skeletal points of the target object when the target object is in a vertical standing state, that is, the two ankle skeletal points of the target object are symmetrical about the root skeletal point. Correspondingly, the skeletal points corresponding to the first object part include Spine01, Spine02, and Spine03, and the skeletal points corresponding to the second object part include Spine01, Hip, and Root.
[0134] In this structure, the child bone point of Root is Hip, the child bone point of Hip is Spine01, the child bone point of Spine01 is Spine02, and the child bone point of Spine02 is Spine03. Conversely, the parent bone point of Spine03 is Spine02, the parent bone point of Spine02 is Spine01, and so on, with the parent bone point of Spine01 being Hip.
[0135] Specifically, the array formed by the transformation information of all skeletal points in the target object corresponding to the first image can be used as the FL (First Person Bone List, transformation information of all skeletal points in the first image of the target object from the first perspective) array, the array formed by the transformation information of all skeletal points in the target object corresponding to the second image can be used as the TL (Three Person Bone List, transformation information of all skeletal points in the second image of the target object from the third perspective) array, and the array formed by the transformation information of all skeletal points in the target object corresponding to the target image can be used as the BL (Blend Bone List, transformation information of all skeletal points in the target image) array.
[0136] In the FL array, the transformation information of Spine01 (i.e., the reference bone point) is FS01 (First Person Spine01Bone, corresponding to the transformation information of the waist bone point in the first image of the target object from the first perspective), the transformation information of the parent bone point Hip of Spine01 (i.e., the parent bone point of the reference bone point) is FH (First Person Hip Bone, corresponding to the transformation information of the hip bone point in the first image of the target object from the first perspective), and the transformation information of the parent bone point Root of Hip (i.e., the root bone point) is FR (First Person Root Bone, corresponding to the transformation information of the root bone point in the first image of the target object from the first perspective). Here, FS01 is the transformation information in the parent bone space F01-Hip (i.e., the parent bone space of the waist bone point in the first image of the target object from the first perspective), and FH is the transformation information in the parent bone space F-Root (i.e., the parent bone space of the hip bone point in the first image of the target object from the first perspective).
[0137] Correspondingly, in the TL array, TS01 (Three Person Spine01 Bone, corresponding to the transformation information of the waist bone points in the second image of the target object from the third-view perspective) is the transformation information under the parent bone space T01-Hip (i.e., the parent bone space of the waist bone points in the second image of the target object from the third-view perspective), and TH (Three Person Hip Bone, corresponding to the transformation information of the hip bone points in the second image of the target object from the third-view perspective) is the transformation information under the parent bone space T-Root (i.e., the parent bone space of the hip bone points in the second image of the target object from the third-view perspective). Furthermore, TR (Three Person Root Bone, corresponding to the transformation information of the root bone points in the second image of the target object from the third-view perspective) should be the same as FR.
[0138] As described above, the transformation information of each skeletal point is relative to the transformation information of its parent skeletal point. That is, in the first image, the transformation information of each skeletal point is relative to the transformation information of its parent skeletal point from the first viewpoint. In the third image, the transformation information of each skeletal point is relative to the transformation information of its parent skeletal point from the third viewpoint. Considering that the transformation information of the parent skeletal point of the reference skeletal point may differ between the first and second images, after stitching the first sub-image and the second sub-image to form the target image using the reference skeletal point as the stitching point, the first object part and the second object part of the target object may not be well connected. This could cause the other object part to shake, regardless of whether the first object part or the second object part is used as the reference.
[0139] As an example, FS01 specifically includes: displacement information (0,0,20), rotation information (0,0,5), and scaling information (1,1,1). FH specifically includes: displacement information (0,0,90), rotation information (0,0,90), and scaling information (1,1,1). FR specifically includes: displacement information (0,0,0), rotation information (0,0,0), and scaling information (1,1,1). TH specifically includes: displacement information (10,10,90), rotation information (5,5,5), and scaling information (1,1,1). TR specifically includes: displacement information (0,0,0), rotation information (0,0,0), and scaling information (1,1,1). In the displacement information, the unit for each dimension can be cm.
[0140] Based on the above, after stitching the first sub-image and the second sub-image together using the reference bone points as stitching points to obtain the target image corresponding to the first image, in BL, BS03 (Blend Spine03 Bone, transformation information of bone point 03 in the target image) is the same as FS03, BS02 (Blend Spine02 Bone, transformation information of bone point 02 in the target image) is the same as FS02, BS01 (Blend Spine01 Bone, transformation information of lumbar bone points in the target image) is the same as FS01, BH (Blend Hip Bone, transformation information of hip bone points in the target image) is the same as TH, and BR (Blend Root Bone, transformation information of root bone points in the target image) is the same as FR and TR. Specifically, BS01 includes: displacement information (0,0,20), rotation information (0,0,5), and scaling information (1,1,1). BH specifically includes: displacement information (10,10,90), rotation information (5,5,5), and scaling information (1,1,1). Clearly, the transformation information BH of the parent bone point of BS01 is different from the transformation information FH of the parent bone point of FS01. That is, in this example, because the transformation information of the parent bone point of the reference bone point differs in the first and second images, after stitching the first sub-image and the second sub-image to form the target image using the reference bone point as the stitching point, the first object part and the second object part of the target object will not be well connected. Regardless of whether the first object part or the second object part is used as the reference, the animation of each bone point will cause the other object part to shake.
[0141] To address this issue, this application also provides the following optional implementation methods to solve the technical problem that the transformation information of the parent bone point of the reference bone point may differ in the first image and the second image, causing the first or second object part of the target object to wobble in the target image. Specifically:
[0142] Optionally, the above-mentioned method of stitching the first sub-image and the second sub-image together using reference skeleton points as stitching points to obtain the target image corresponding to the first image includes:
[0143] Obtain the first transformation information of each bone point in the first bone chain corresponding to the first image; obtain the second transformation information of each bone point in the second bone chain corresponding to the second image; the transformation information of a bone point is the transformation information of the bone point relative to its parent bone point; the first bone chain is the bone chain between the reference bone point and the root bone point; the second bone chain is the bone chain between the parent bone point of the reference bone point and the root bone point.
[0144] Based on the first transformation information of each bone point in the first bone chain, the third transformation information of the reference bone point relative to the root bone point is determined.
[0145] Based on the second transformation information of each bone point in the second bone chain, the fourth transformation information of the parent bone point of the reference bone point relative to the root bone point is determined.
[0146] Based on the third and fourth transformation information, determine the target transformation information of the reference skeleton point;
[0147] Using the reference skeleton points as splicing points, and based on the target transformation information of the reference skeleton points, the first sub-image and the second sub-image are spliced together to obtain the target image.
[0148] When obtaining the first transformation information of each bone point in the first bone chain corresponding to the first image, if the first image is the second keyframe in the first image sequence, the first transformation information of each bone point in the first keyframe corresponding to the second object part can be used as the first transformation information of each bone point in the second keyframe corresponding to the second object part.
[0149] The root bone point can be any bone point among all the bone points of the target object, or it can be any point in the skeletal model of the target object; this application does not impose any restrictions on this. As described above, the model space is the coordinate space used when building the skeletal model. Typically, in different skeletal models, the root bone point is aligned with the origin in the model space to build the skeletal model. Based on this, the coordinate information of the root bone point should be the same from any viewpoint, and the model space corresponding to different skeletal models should be consistent.
[0150] like Figure 5 and Figure 6 As shown, taking the lumbar bone point Spine01 as the reference bone point as an example, the first bone chain is the bone chain between the lumbar bone point Spine01 and the root bone point Root. The first bone chain includes the lumbar bone point Spine01, the hip bone point Hip, and the root bone point Root. The second bone chain is the bone chain between the hip bone point Hip and the root bone point Root. The second bone chain includes the hip bone point Hip and the root bone point Root.
[0151] As described above, the coordinate information of the root bone point should be the same from any viewpoint, and the model space corresponding to different bone models should be consistent. Based on the first transformation information of each bone point in the first bone chain corresponding to the first image, the third transformation information of the reference bone point relative to the root bone point is determined, which can realize the conversion of the first transformation information of the reference bone point to transformation information based on the model space. Based on the second transformation information of each bone point in the second bone chain corresponding to the second image, the fourth transformation information of the parent bone point of the reference bone point relative to the root bone point is determined, which can realize the conversion of the second transformation information of the parent bone point of the reference bone point to transformation information based on the model space.
[0152] The third transformation information is the transformation information of the reference bone point relative to the root bone point in the model space. The fourth transformation information is the transformation information of the parent bone point of the reference bone point relative to the root bone point in the model space.
[0153] Based on the third and fourth transformation information in the model space, the target transformation information of the reference skeleton point is determined, transforming the third transformation information in the model space to the transformation information corresponding to the parent skeleton point in the first view. Then, based on this target transformation information of the reference skeleton point, the first and second sub-images are stitched together. That is, in the model space, the transformation information of the reference skeleton point relative to its parent skeleton point is the target transformation information. Through this operation, the transformation information of each skeleton point corresponding to the first object part of the target object in the target image relative to the root skeleton point can be kept consistent with the transformation information of each skeleton point corresponding to the first object part of the target object in the first image relative to the root skeleton point. Similarly, the transformation information of each skeleton point corresponding to the second object part of the target object in the target image relative to the root skeleton point can be kept consistent with the transformation information of each skeleton point corresponding to the second object part of the target object in the second image relative to the root skeleton point. This achieves better stitching of the first and second sub-images, ensuring a good connection between the first and second object parts of the target object in the target image. This avoids the situation where the transformation information of the parent bone point of the reference bone point may differ between the first and second images, causing the first and second object parts of the target object to not be well connected in the target image, resulting in shaking at the connection point of the first and second object parts of the target object, or shaking of either the first or second object part of the target object.
[0154] Optionally, the above-mentioned determination of the third transformation information of the reference bone point relative to the root bone point based on the first transformation information of each bone point in the first skeletal chain includes:
[0155] Perform a first operation on the first transformation information of each bone point in the first skeletal chain to obtain third transformation information; the first operation includes:
[0156] Add the displacement information in the first transformation information of each bone point in the first bone chain, add the rotation information in the first transformation information of each bone point in the first bone chain, and multiply the scaling information in the first transformation information of each bone point in the first bone chain.
[0157] Based on the preceding description, the transformation information of a bone point is its position relative to its parent bone space, that is, its position in the coordinate space formed with its parent bone point as the origin. The transformation information of each bone point includes its position, rotation, and scaling information relative to its parent bone point. A bone point's displacement information is its coordinate position in its parent bone space; its rotation information is its Euler angles relative to its parent bone point; and its scaling information is the scaling ratio of its bone point relative to its parent bone point in each coordinate dimension of its parent bone space.
[0158] Since the root bone point corresponds to the highest bone level among all bone points in the bone model, based on the parent-child relationships between bone points, it is necessary to determine the transformation information of each bone point in the bone chain from a given bone point to the root bone point. Based on this transformation information, a first operation is sequentially performed with the transformation information of the bone point's parent bone point, until the first operation with the transformation information of the bone points directly connected to the root bone point in the bone chain is completed. This yields the transformation information of the bone point relative to the target bone point. Specifically, based on the bone point's transformation information, a first operation is first performed with the transformation information of its parent bone point to obtain a first result. Then, based on this first result, a first operation is performed with the transformation information of the parent bone point's parent bone point to obtain a second result. This process continues until the first operation with the transformation information of the bone points directly connected to the root bone point in the bone chain is completed, thus obtaining the transformation information of the bone point relative to the target bone point.
[0159] Performing a first operation on the first transformation information of each bone point in the first skeletal chain to obtain third transformation information can specifically include:
[0160] The displacement information in the first transformation information of each bone point in the first bone chain is added together to obtain the displacement information in the third transformation information;
[0161] Add the rotation information in the first transformation information of each bone point in the first bone chain to obtain the rotation information in the third transformation information;
[0162] Multiply the scaling information in the first transformation information of each bone point in the first bone chain by the scaling information in the third transformation information.
[0163] Based on the above, by performing a first operation on the first transformation information of each bone point in the first bone chain, the third transformation information is obtained, thereby realizing the conversion of the first transformation information of the reference bone point to the transformation information based on the model space.
[0164] Taking the example shown earlier, the reference bone point is the lumbar bone point (Spine01). FS01 specifically includes: translation information (0,0,20), rotation information (0,0,5), and scaling information (1,1,1). FH specifically includes: translation information (0,0,90), rotation information (0,0,90), and scaling information (1,1,1). FR specifically includes: translation information (0,0,0), rotation information (0,0,0), and scaling information (1,1,1). Then, the transformation information of the lumbar bone point Spine01 relative to the root bone point Root, i.e., the third transformation information, is MS01 (Mesh Space Spine01 Bone, transformation information of Spine01 in model space). MS01 specifically includes: translation information (0,0,110), rotation information (0,0,5), and scaling information (1,1,1).
[0165] In the same way, by performing the first operation on the second transformation information of each bone point in the second bone chain, the fourth transformation information can be obtained, thus realizing the conversion of the second transformation information of the parent bone point of the reference bone point to the transformation information based on the model space.
[0166] Taking the example shown earlier, the reference bone point is the lumbar bone point (Spine01). TH specifically includes: displacement information (10,10,90), rotation information (5,5,5), and scaling information (1,1,1). TR specifically includes: displacement information (0,0,0), rotation information (0,0,0), and scaling information (1,1,1). Then, the transformation information of the hip bone point relative to the root bone point, i.e., the fourth transformation information, is MH (Mesh Space Hip Bone, transformation information of Hip in model space). MH specifically includes displacement information (10,10,90), rotation information (5,5,5), and scaling information (1,1,1).
[0167] Optionally, the above determination of the target transformation information of the reference skeleton point based on the third transformation information and the fourth transformation information includes:
[0168] Perform a second operation on the fourth transformation information to obtain the processed fourth transformation information; the second operation includes: inverting the displacement information and rotation information in the fourth transformation information respectively;
[0169] Perform the first operation on the third transformation information and the processed fourth transformation information to obtain the target transformation information.
[0170] When performing the second operation on the fourth transformation information, a negative sign can be added before the displacement information in the fourth transformation information to invert the displacement information in the fourth transformation information; a negative sign can be added before the rotation information in the fourth transformation information to invert the rotation information in the fourth transformation information; no processing is performed on the scaling information in the fourth transformation information to perform the second operation on the fourth transformation information.
[0171] Taking the example shown above, the reference bone point is the lumbar bone point (Spine01). The fourth transformation information MH specifically includes displacement information (10,10,90), rotation information (5,5,5), and scaling information (1,1,1). After performing the second operation on the fourth transformation information, the processed fourth transformation information MH' can specifically include: displacement information (-10,-10,-90), rotation information (-5,-5,-5), and scaling information (1,1,1).
[0172] Based on the preceding description of the multiplication operation, when performing the first operation on the third transformation information and the processed fourth transformation information to obtain the target transformation information, it can specifically include:
[0173] The displacement information in the third transformation information is added to the displacement information in the processed fourth transformation information to obtain the displacement information in the target transformation information;
[0174] Add the rotation information in the third transformation information to the rotation information in the processed fourth transformation information to obtain the rotation information in the target transformation information;
[0175] Subtract the scaling information in the third transformation information from the scaling information in the processed fourth transformation information to obtain the scaling information in the target transformation information.
[0176] By first performing the second operation on the fourth transformation information to obtain the processed fourth transformation information, and then performing the first operation on the third transformation information and the processed fourth transformation information to obtain the target transformation information, accurate target transformation information of the reference skeleton points can be obtained.
[0177] Taking the example shown earlier, the reference bone point is the lumbar bone point (Spine01). MS01 specifically includes displacement information (0,0,110), rotation information (0,0,5), and scaling information (1,1,1). The processed fourth transformation information MH' can specifically include: displacement information (-10,-10,-90), rotation information (-5,-5,-5), and scaling information (1,1,1). Therefore, when determining the target transformation information of the reference bone point, that is, converting the transformation information of the reference bone point in model space to the transformation information MS01' of the reference bone point in the first viewpoint, the first operation can be performed on MS01 and MH' to obtain MS01'. MS01' specifically includes: displacement information (-10,-10,20), rotation information (-5,-5,0), and scaling information (1,1,1).
[0178] To better illustrate the practicality of the solutions in this application, the following description, in conjunction with specific application scenarios of the data processing method, explains the solutions in this application. The data processing method provided in this application can be applied to specific scenarios where a target object is displayed from a first-person perspective during the operation of a target application. This method can be implemented as an application or a plugin for an application, enabling a complete display of all actions of the target object from a first-person perspective during the application's operation. Specifically, this application can be an FPS game application, and correspondingly, the animated character displayed can be a game character within that game application.
[0179] Figure 7 A schematic diagram of the structure of a data processing system applicable to an embodiment of this application is shown. For example... Figure 7 As shown, the system may include a first user terminal 11, a second user terminal 12, a server 20, and a network 30. Both the first user terminal 11 and the second user terminal 12 can run clients of the aforementioned target application. During the operation of the target application's client, display content related to the operation process can be shown through the display interfaces of the first user terminal 11 and the second user terminal 12. The first user terminal 11 can be a user terminal used to display images from a first-person perspective (i.e., the perspective of the game player corresponding to the first user terminal), and the second user terminal 12 can be a user terminal used to display images from a third-person perspective (i.e., other devices besides user terminal 11). The first user terminal 11, the second user terminal 12, and the server 20 can all communicate with the server 20 through the network 30. The server 20 is configured with a preset database, which can store at least one first animation sequence and at least one second animation sequence. The data processing method in this embodiment will be described below in conjunction with this data processing system. Figure 8A flowchart illustrating the data processing operation performed by the data processing system in this scenario embodiment is shown, which may include steps S11 to S18.
[0180] Step S11: In response to the user's request to obtain an image of the game character from a first-person perspective, the first user terminal 11 sends an instruction to the server 20 via the network 30 to obtain an image of the game character from a first-person perspective, determined based on the current scene information.
[0181] Step S12: In response to the received acquisition command, the server 20 acquires the animation resources (i.e., the first animation) corresponding to the game character in the first perspective and the animation resources (i.e., the second animation) corresponding to the game character in the third perspective from the preset database, and sends the animation resources corresponding to the game character in the first perspective and the animation resources corresponding to the game character in the third perspective to the user terminal 11 through the network 30.
[0182] Step S13: The first user terminal 11 determines a first image that matches the current time based on the received animation resources corresponding to the game character from the first perspective; and determines a second image that matches the current time based on the received animation resources corresponding to the game character from the third perspective.
[0183] Step S14: The first user terminal 11 acquires the first transformation information of each bone point in the first skeletal chain (i.e., from the waist bone point to the root bone point) corresponding to the first image; and acquires the second transformation information of each bone point in the second skeletal chain (i.e., from the hip bone point to the root bone point) corresponding to the second image; wherein, the hip bone point is the parent bone point of the waist bone point.
[0184] Step S15: The first user terminal 11 converts the transformation information of the lumbar bone points corresponding to the first image to the model space, that is, based on the first transformation information of each bone point in the first bone chain, it determines the third transformation information of the lumbar bone points relative to the root bone points.
[0185] The transformation information of the hip bone points corresponding to the second image is converted to the model space. That is, based on the second transformation information of each bone point in the second bone chain, the fourth transformation information of the hip bone points relative to the root bone points is determined.
[0186] Based on the third and fourth transformation information, the target transformation information is obtained, thereby transforming the lumbar bone points in the model space to the parent bone space of the lumbar bone points in the first view.
[0187] Step S16: The first user terminal 11 acquires the first sub-image of the upper body of the game character in the first image, with the waist bone point as the dividing point, and acquires the second sub-image of the lower body of the game character in the second image, with the waist bone point as the dividing point.
[0188] Using the lumbar skeletal points as stitching points, the first sub-image and the second sub-image are stitched together to obtain the target image.
[0189] Step S17: The first user terminal 11 sends the target image to the client of the target application on the first user terminal 11, so as to display the target image through the display interface corresponding to the target application on the first user terminal 11. In the target image, the movement of the upper body of the game character is consistent with the movement of the upper body of the game character in the first image, and the movement of the lower body of the game character is consistent with the movement of the lower body of the game character in the second image. In this target image, the transformation information of the waist bone points is the target transformation information.
[0190] In the aforementioned data processing system, the second user terminal 12 also displays an image corresponding to the target image and viewed from a third-person perspective through the display interface corresponding to the target application. Alternatively, the second user terminal 12 can display an image corresponding to the perspective of the game player on the second user terminal (i.e., the first-person perspective of the game player on the second user terminal).
[0191] It should be noted that, in practical applications, after obtaining the animation resources corresponding to the game characters in the first-person perspective and the game characters in the third-person perspective through the server 20, the server 20 can also perform the above-mentioned operation of obtaining the target image based on the animation resources corresponding to the game characters in the first-person perspective and the game characters in the third-person perspective, and send the obtained target image to the target application of the first user terminal 11 so as to display the target image through the display interface corresponding to the target application of the first user terminal 11.
[0192] According to another aspect of the embodiments of this application, a data processing apparatus is also provided. Figure 9 A schematic diagram of a data processing apparatus provided in an embodiment of this application is shown. Figure 9 As shown, the device 30 includes an image acquisition module 31, an image stitching module 32, and an image display module 33, wherein...
[0193] Image acquisition module 31 is used to acquire a first image of the target object corresponding to a first perspective and a second image of the target object corresponding to a third perspective;
[0194] The image stitching module 32 is used to stitch the first sub-image and the second sub-image together using the reference skeleton points as stitching points to obtain the target image corresponding to the first image;
[0195] The image display module 33 is used to display the target image as an image of the target object corresponding to the first-view perspective;
[0196] The first sub-image is the sub-image of the first image that corresponds to the first object part, with the reference bone point as the dividing point; the second sub-image is the sub-image of the second image that corresponds to the second object part, with the reference bone point as the dividing point; and the second object part is the part of the target object other than the first object part.
[0197] Optionally, when the image stitching module 32 stitches the first sub-image and the second sub-image together using the reference skeleton points as stitching points to obtain the target image corresponding to the first image, it is specifically used for:
[0198] Obtain the first transformation information of each bone point in the first bone chain corresponding to the first image; obtain the second transformation information of each bone point in the second bone chain corresponding to the second image; the transformation information of a bone point is the transformation information of the bone point relative to its parent bone point; the first bone chain is the bone chain between the reference bone point and the root bone point; the second bone chain is the bone chain between the parent bone point of the reference bone point and the root bone point.
[0199] Based on the first transformation information of each bone point in the first bone chain, the third transformation information of the reference bone point relative to the root bone point is determined.
[0200] Based on the second transformation information of each bone point in the second bone chain, the fourth transformation information of the parent bone point of the reference bone point relative to the root bone point is determined.
[0201] Based on the third and fourth transformation information, determine the target transformation information of the reference skeleton point;
[0202] Using the reference skeleton points as splicing points, and based on the target transformation information of the reference skeleton points, the first sub-image and the second sub-image are spliced together to obtain the target image.
[0203] Optionally, when determining the third transformation information of the reference bone point relative to the root bone point based on the first transformation information of each bone point in the first skeletal chain, the image stitching module 32 is specifically used for:
[0204] Perform a first operation on the first transformation information of each bone point in the first skeletal chain to obtain third transformation information; the first operation includes:
[0205] Add the displacement information in the first transformation information of each bone point in the first bone chain, add the rotation information in the first transformation information of each bone point in the first bone chain, and multiply the scaling information in the first transformation information of each bone point in the first bone chain.
[0206] Optionally, when determining the target transformation information of the reference skeleton points based on the third and fourth transformation information, the image stitching module 32 is specifically used for:
[0207] Perform a second operation on the fourth transformation information to obtain the processed fourth transformation information; the second operation includes: inverting the displacement information and rotation information in the fourth transformation information respectively;
[0208] Perform the first operation on the third transformation information and the processed fourth transformation information to obtain the target transformation information.
[0209] Optionally, when acquiring a first image of the target object corresponding to a first viewpoint and a second image of the target object corresponding to a third viewpoint, the image acquisition module 31 is specifically used for:
[0210] During the operation of the target application, a first image of the target object corresponding to the first perspective and a second image of the target object corresponding to the third perspective are acquired.
[0211] The first image was obtained in the following way:
[0212] A first image sequence corresponding to a target object from a first perspective is obtained. The first image sequence includes at least two pre-configured first animation keyframes. The first image sequence includes one first keyframe and at least one second keyframe. The first keyframe is an animation keyframe corresponding to the first object part and the second object part of the target object, and the second keyframe is an animation keyframe corresponding to the first object part of the target object.
[0213] The second image was obtained in the following way:
[0214] Acquire a second image sequence corresponding to the target object from a third-person perspective. The second image sequence includes at least two pre-configured second animation keyframes, each of which is an animation keyframe corresponding to the first object part and the second object part of the target object.
[0215] Based on the second image sequence, obtain the second image in the second image sequence that matches the current time.
[0216] Optionally, when the image acquisition module 31 obtains the first image in the first image sequence that matches the current time, it is specifically used for:
[0217] Determine the first time in the time information of the first image sequence that matches the current time;
[0218] If there is a first animation keyframe with a keyframe time of the first time in the first image sequence, the first animation keyframe with a keyframe time of the first time is determined as the first image;
[0219] If there is no first animation keyframe with a keyframe time of the first time in the first image sequence, then the first image is determined based on the two first animation keyframes whose keyframe times are closest to the first time.
[0220] Optionally, when determining the first image based on the two first animation keyframes whose keyframe times are closest to the first time, the image acquisition module 31 is specifically used for:
[0221] Determine the time difference between the keyframe time and the first time for each of the two first animation keyframes;
[0222] Based on the time difference between the two first animation keyframes, the weight of each animation keyframe in the two first animation keyframes is determined, where the weight is negatively correlated with the time difference;
[0223] For each bone point of the target object, according to the weights corresponding to the two first animation keyframes, the transformation information of the bone point corresponding to the two first animation keyframes is weighted and summed to obtain the transformation information of the bone point corresponding to the current time.
[0224] Based on the transformation information of each skeletal point of the target object corresponding to the current time, the two first animation keyframes are fused to obtain the first image.
[0225] The apparatus in this application embodiment can execute the method provided in this application embodiment, and the implementation principle is similar. The actions performed by each module in the apparatus of each embodiment of this application correspond to the steps in the method of each embodiment of this application. For detailed functional descriptions of each module of the apparatus, please refer to the descriptions in the corresponding methods shown above, which will not be repeated here.
[0226] Based on the same principles as the data processing methods and apparatus provided in the embodiments of this application, the embodiments of this application also provide an electronic device (such as a server), which may include a memory, a processor, and a computer program stored in the memory. The processor executes the computer program to implement the steps of the method provided in any optional embodiment of this application.
[0227] Optionally, Figure 10 A schematic diagram of the structure of an electronic device to which this application embodiment applies is shown, such as... Figure 10 As shown, Figure 10The illustrated electronic device 4000 includes a processor 4001 and a memory 4003. The processor 4001 and the memory 4003 are connected, for example, via a bus 4002. Optionally, the electronic device 4000 may further include a transceiver 4004, which can be used for data interaction between the electronic device and other electronic devices, such as sending and / or receiving data. It should be noted that in practical applications, the transceiver 4004 is not limited to one type, and the structure of the electronic device 4000 does not constitute a limitation on the embodiments of this application.
[0228] Processor 4001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 4001 may also be a combination that implements computational functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.
[0229] Bus 4002 may include a pathway for transmitting information between the aforementioned components. Bus 4002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. Bus 4002 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 10 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0230] The memory 4003 may be ROM (Read Only Memory) or other types of static storage devices capable of storing static information and instructions, RAM (Random Access Memory) or other types of dynamic storage devices capable of storing information and instructions, or EEPROM (Electrically Erasable Programmable Read Only Memory), CD-ROM (Compact Disc Read Only Memory) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media, other magnetic storage devices, or any other medium capable of carrying or storing computer programs and capable of being read by a computer, without limitation herein.
[0231] The memory 4003 stores computer programs that execute embodiments of this application, and its execution is controlled by the processor 4001. The processor 4001 executes the computer programs stored in the memory 4003 to implement the steps shown in the foregoing method embodiments.
[0232] This application provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it can implement the steps and corresponding content of the aforementioned method embodiments.
[0233] This application also provides a computer program product, including a computer program that, when executed by a processor, can implement the steps and corresponding content of the aforementioned method embodiments.
[0234] The terms "first," "second," "third," "fourth," "1," "2," etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in a sequence other than that shown in the illustrations or text descriptions.
[0235] It should be understood that although arrows indicate various operation steps in the flowcharts of this application's embodiments, the order in which these steps are implemented is not limited to the order indicated by the arrows. Unless explicitly stated herein, in some implementation scenarios of this application's embodiments, the implementation steps in each flowchart can be executed in other orders as required. Furthermore, some or all steps in each flowchart, based on the actual implementation scenario, may include multiple sub-steps or multiple stages. Some or all of these sub-steps or stages can be executed at the same time, and each sub-step or stage can also be executed at different times. In scenarios where execution times differ, the execution order of these sub-steps or stages can be flexibly configured according to requirements, and this application's embodiments do not limit this.
[0236] The above description is only an optional implementation method for some implementation scenarios of this application. It should be noted that for those skilled in the art, other similar implementation methods based on the technical concept of this application without departing from the technical concept of this application also fall within the protection scope of the embodiments of this application.
Claims
1. A data processing method, characterized in that, The method includes: During the operation of the target application, a first image sequence corresponding to the target object from a first perspective is acquired. The first image sequence includes at least two pre-configured first animation keyframes. The first image sequence includes one first keyframe and at least one second keyframe. The first keyframe is an animation keyframe corresponding to a first object part and a second object part of the target object, and the second keyframe is an animation keyframe corresponding to the first object part of the target object. Based on the first image sequence, a first image in the first image sequence that matches the current time is obtained; and... A second image sequence corresponding to a target object from a third-person perspective is obtained. The second image sequence includes at least two pre-configured second animation keyframes, each of which is an animation keyframe corresponding to a first object part and a second object part of the target object. Based on the second image sequence, a second image matching the current time is obtained in the second image sequence. Using the reference skeleton point as the splicing point, the first sub-image and the second sub-image are spliced together to obtain the target image corresponding to the first image, and the target image is displayed as the image of the target object corresponding to the first viewpoint; Wherein, the first sub-image is the sub-image of the first image that corresponds to the first object part with the reference bone point as the dividing point, the second sub-image is the sub-image of the second image that corresponds to the second object part with the reference bone point as the dividing point, and the second object part is the part of the target object other than the first object part.
2. The method according to claim 1, characterized in that, The step of stitching the first sub-image and the second sub-image together using reference skeleton points as stitching points to obtain the target image corresponding to the first image includes: Obtain first transformation information of each bone point in the first bone chain corresponding to the first image; obtain second transformation information of each bone point in the second bone chain corresponding to the second image; the transformation information of a bone point is the transformation information of the bone point relative to its parent bone point, the first bone chain is the bone chain between the reference bone point and the root bone point, and the second bone chain is the bone chain between the parent bone point of the reference bone point and the root bone point. Based on the first transformation information of each bone point in the first bone chain, the third transformation information of the reference bone point relative to the root bone point is determined. Based on the second transformation information of each bone point in the second bone chain, the fourth transformation information of the parent bone point of the reference bone point relative to the root bone point is determined. Based on the third transformation information and the fourth transformation information, the target transformation information of the reference skeleton point is determined; Using the reference skeleton points as splicing points, and based on the target transformation information of the reference skeleton points, the first sub-image and the second sub-image are spliced together to obtain the target image.
3. The method according to claim 2, characterized in that, The step of determining the third transformation information of the reference bone point relative to the root bone point based on the first transformation information of each bone point in the first skeletal chain includes: Perform a first operation on the first transformation information of each bone point in the first skeletal chain to obtain the third transformation information; the first operation includes: Add the displacement information in the first transformation information of each bone point in the first bone chain, add the rotation information in the first transformation information of each bone point in the first bone chain, and multiply the scaling information in the first transformation information of each bone point in the first bone chain.
4. The method according to claim 3, characterized in that, The step of determining the target transformation information of the reference skeleton point based on the third transformation information and the fourth transformation information includes: A second operation is performed on the fourth transformation information to obtain processed fourth transformation information; the second operation includes: inverting the displacement information and rotation information in the fourth transformation information respectively; The first operation is performed on the third transformation information and the processed fourth transformation information to obtain the target transformation information.
5. The method according to any one of claims 1 to 4, characterized in that, The step of obtaining the first image in the first image sequence that matches the current time based on the first image sequence includes: Determine the first time in the time information of the first image sequence that matches the current time; If there is a first animation keyframe in the first image sequence with a keyframe time of the first time, the first animation keyframe with a keyframe time of the first time is determined as the first image. If there is no first animation keyframe with a keyframe time of the first time in the first image sequence, then the first image is determined based on the two first animation keyframes with keyframe times closest to the first time.
6. The method according to claim 5, characterized in that, Determining the first image based on the two first animation keyframes whose keyframe times are closest to the first time includes: Determine the time difference between the keyframe time of each of the two first animation keyframes and the first time; Based on the time difference between the two first animation keyframes, the weight of each animation keyframe in the two first animation keyframes is determined, and the weight is negatively correlated with the time difference. For each bone point of the target object, according to the weights corresponding to the two first animation keyframes, the transformation information of the bone point corresponding to the two first animation keyframes is weighted and summed to obtain the transformation information of the bone point corresponding to the current time. Based on the transformation information of each skeletal point of the target object corresponding to the current time, the two first animation keyframes are fused to obtain the first image.
7. A data processing apparatus, characterized in that, The device includes: An image acquisition module is configured to acquire, during the operation of a target application, a first image sequence corresponding to a target object from a first perspective. The first image sequence includes at least two pre-configured first animation keyframes, and includes one first keyframe and at least one second keyframe. The first keyframe corresponds to an animation keyframe for a first object part and a second object part of the target object, and the second keyframe corresponds to an animation keyframe for the first object part of the target object. Based on the first image sequence, a first image matching the current time is obtained from the first image sequence. A second image sequence corresponding to a target object from a third-person perspective is obtained. The second image sequence includes at least two pre-configured second animation keyframes, each of which is an animation keyframe corresponding to a first object part and a second object part of the target object. Based on the second image sequence, a second image matching the current time is obtained in the second image sequence. The image stitching module is used to stitch the first sub-image and the second sub-image together using the reference skeleton points as stitching points to obtain the target image corresponding to the first image; An image display module is used to display the target image as an image of the target object corresponding to the first viewpoint; Wherein, the first sub-image is the sub-image of the first image that corresponds to the first object part with the reference bone point as the dividing point, the second sub-image is the sub-image of the second image that corresponds to the second object part with the reference bone point as the dividing point, and the second object part is the part of the target object other than the first object part.
8. The apparatus according to claim 7, characterized in that, When the image stitching module stitches the first sub-image and the second sub-image together using reference skeleton points as stitching points to obtain the target image corresponding to the first image, it is used for: Obtain first transformation information of each bone point in the first bone chain corresponding to the first image; obtain second transformation information of each bone point in the second bone chain corresponding to the second image; the transformation information of a bone point is the transformation information of the bone point relative to its parent bone point, the first bone chain is the bone chain between the reference bone point and the root bone point, and the second bone chain is the bone chain between the parent bone point of the reference bone point and the root bone point. Based on the first transformation information of each bone point in the first bone chain, the third transformation information of the reference bone point relative to the root bone point is determined. Based on the second transformation information of each bone point in the second bone chain, the fourth transformation information of the parent bone point of the reference bone point relative to the root bone point is determined. Based on the third transformation information and the fourth transformation information, the target transformation information of the reference skeleton point is determined; Using the reference skeleton points as splicing points, and based on the target transformation information of the reference skeleton points, the first sub-image and the second sub-image are spliced together to obtain the target image.
9. The apparatus according to claim 8, characterized in that, When the image stitching module determines the third transformation information of the reference bone point relative to the root bone point based on the first transformation information of each bone point in the first skeletal chain, it is used to: Perform a first operation on the first transformation information of each bone point in the first skeletal chain to obtain the third transformation information; the first operation includes: Add the displacement information in the first transformation information of each bone point in the first bone chain, add the rotation information in the first transformation information of each bone point in the first bone chain, and multiply the scaling information in the first transformation information of each bone point in the first bone chain.
10. The apparatus according to claim 9, characterized in that, When determining the target transformation information of the reference skeleton point based on the third transformation information and the fourth transformation information, the image stitching module is used to: A second operation is performed on the fourth transformation information to obtain processed fourth transformation information; the second operation includes: inverting the displacement information and rotation information in the fourth transformation information respectively; The first operation is performed on the third transformation information and the processed fourth transformation information to obtain the target transformation information.
11. The apparatus according to any one of claims 7 to 10, characterized in that, When the image acquisition module obtains the first image in the first image sequence that matches the current time based on the first image sequence, it is specifically used for: Determine the first time in the time information of the first image sequence that matches the current time; If there is a first animation keyframe in the first image sequence with a keyframe time of the first time, the first animation keyframe with a keyframe time of the first time is determined as the first image. If there is no first animation keyframe with a keyframe time of the first time in the first image sequence, then the first image is determined based on the two first animation keyframes with keyframe times closest to the first time.
12. The apparatus according to claim 11, characterized in that, When the image acquisition module determines the first image based on the two first animation keyframes whose keyframe times are closest to the first time, it is used to: Determine the time difference between the keyframe time of each of the two first animation keyframes and the first time; Based on the time difference between the two first animation keyframes, the weight of each animation keyframe in the two first animation keyframes is determined, and the weight is negatively correlated with the time difference. For each bone point of the target object, according to the weights corresponding to the two first animation keyframes, the transformation information of the bone point corresponding to the two first animation keyframes is weighted and summed to obtain the transformation information of the bone point corresponding to the current time. Based on the transformation information of each skeletal point of the target object corresponding to the current time, the two first animation keyframes are fused to obtain the first image.
13. An electronic device comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the steps of the method according to any one of claims 1-6.
14. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1-6.
15. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1-6.