Method, device, storage medium and electronic device for realizing animation of target model

Through the animation implementation method of the sub-face film model, the high hardware consumption problem caused by the particle system is solved, and the animation effect of efficiently displaying smoke and other models in mobile terminals is achieved, reducing power consumption and improving authenticity.

CN114663560BActive Publication Date: 2025-08-22NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210289383.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-22
Publication Date
2025-08-22
Estimated Expiration
2042-03-22

AI Technical Summary

Technical Problem

In the prior art, the animation effects of models such as smoke in game scenes are generated by particle systems, resulting in high hardware consumption and huge performance consumption, making it difficult to display a large amount of smoke effects in mobile terminals.

Method used

Using a target model composed of multiple sub-facet models, by obtaining the coordinates and texture maps of the sub-facet model, determining the displacement and offset data between animation frames, adjusting the vertex position using the virtual camera direction, and mapping the texture map to achieve animation effects.

Benefits of technology

It reduces the power consumption of electronic devices, saves performance, realizes the animation effect of using the target model in a large number of mobile terminals, avoids misleading, and improves the authenticity of the animation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114663560B_ABST
    Figure CN114663560B_ABST
Patent Text Reader

Abstract

The embodiment of the present application discloses a method, device, storage medium and electronic device for realizing animation of a target model. The method includes: obtaining a target model composed of multiple sub-patch models, a texture map of the target model, and the coordinates of the sub-patch model, wherein the texture map includes multiple sub-texture maps; determining the displacement data of the vertices of the sub-patch model in each frame between the starting motion position of the starting frame and the target motion position of the target frame according to the coordinates of the sub-patch model; determining the offset data of the vertices of the sub-patch model in each frame according to the target shooting direction of the virtual camera; determining the target position of the vertices of the sub-patch model in each frame according to the displacement data and the offset data, and mapping the sub-texture map to the sub-patch model according to the target position to realize the animation effect of the target model. The embodiment of the present application can reduce the power consumption of electronic equipment, save its performance, and avoid the occurrence of goofs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of live broadcast technology, and in particular to a method, device, computer-readable storage medium, and electronic device for realizing animation of a target model. Background Art

[0002] Currently, most animation effects for models like smoke in game scenes are generated using the engine's built-in particle system. This system emits multiple individual particles to create models like smoke, which consumes a lot of hardware. Furthermore, because each particle in the particle system is a separate model and requires independent movement, each particle requires separate calculation, resulting in a significant performance hit. This makes it nearly impossible to display large amounts of smoke effects on mobile devices. Summary of the Invention

[0003] The embodiments of the present application provide a method, device, computer-readable storage medium and electronic device for realizing animation of a target model, which can reduce the power consumption of the electronic device, save the performance of the electronic device, and make it possible to use the animation effects of the target model in a large number of mobile terminals.

[0004] The present invention provides a method for implementing animation of a target model, including:

[0005] Acquire a target model composed of a plurality of sub-patch models, a texture map of the target model, and coordinates of the sub-patch models, wherein the texture map includes the same number of sub-texture maps as the sub-patch models;

[0006] Determining a starting motion position of the sub-mesh model in a starting frame and a target motion position of the target frame of the animation according to the coordinates of the sub-mesh model, and determining displacement data of vertices of the sub-mesh model in each frame between the starting frame and the target frame according to the starting motion position and the target motion position;

[0007] Determining the offset data of the vertices of the sub-face model in each frame according to the target shooting direction of the virtual camera;

[0008] Determining target positions of vertices of the sub-face model in each frame according to the displacement data and the offset data;

[0009] According to the target position, the sub-texture map is mapped to the sub-face model to achieve an animation effect of the target model.

[0010] The present application also provides a device for implementing animation of a target model, including:

[0011] An acquisition module, configured to acquire a target model composed of a plurality of sub-patch models, a texture map of the target model, and coordinates of the sub-patch models, wherein the texture map includes the same number of sub-texture maps as the sub-patch models;

[0012] a first determining module, configured to determine, based on the coordinates of the sub-mesh model, a starting motion position of the sub-mesh model in a starting frame of the animation and a target motion position of the target frame, and to determine, based on the starting motion position and the target motion position, displacement data of vertices of the sub-mesh model in each frame corresponding to the starting frame and the target frame;

[0013] A second determining module is used to determine the offset data of the vertices of the sub-face model in each frame according to the target shooting direction of the virtual camera;

[0014] A third determining module is configured to determine a target position of a vertex of the sub-face model in each frame according to the displacement data and the offset data;

[0015] A mapping module is used to map the sub-texture map to the sub-face model according to the target position to achieve an animation effect of the target model.

[0016] An embodiment of the present application further provides a computer-readable storage medium storing a computer program, wherein the computer program is suitable for being loaded by a processor to execute the steps in the method for implementing animation of a target model as described in any of the above embodiments.

[0017] An embodiment of the present application also provides an electronic device, which includes a memory and a processor, wherein a computer program is stored in the memory, and the processor executes the steps in the target model animation implementation method described in any of the above embodiments by calling the computer program stored in the memory.

[0018] The target model animation implementation method, device, computer-readable storage medium, and electronic device provided in the embodiments of the present application utilize the mergibility of sub-patch models to form an overall target model based on multiple sub-patch models, and simultaneously process the displacement data and offset data of the vertices of the multiple sub-patch models in each frame between the start frame and the target frame of the animation, and map the sub-texture map included in the target model to the sub-patch model to achieve the animation effect of the target model. Compared with the particle system, the embodiments of the present application process the vertices of multiple sub-patch models, that is, based on the processing of the vertices of the sub-patch models, and then utilize the mergibility of the target model to quickly achieve the animation effect of the target model, reduce the power consumption of the electronic device, save the performance of the electronic device, and realize the large-scale use of the animation effect of the target model in mobile terminals. In addition, because the offset data of the vertices of the sub-patch model is also determined in each frame according to the target shooting direction of the virtual camera, the sub-patch model maintains the direction of the sub-patch model and the virtual camera at the target shooting direction during the movement of each frame, avoiding the occurrence of artifacts and improving the animation authenticity of the target model. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0020] Figure 1 A flowchart of a method for implementing animation of a target model provided in an embodiment of the present application.

[0021] Figure 2 A schematic diagram of the arrangement of the sub-face model provided in an embodiment of the present application.

[0022] Figure 3 A schematic diagram of a texture map provided in an embodiment of the present application.

[0023] Figure 4 Another flowchart of the method for implementing animation of a target model provided in an embodiment of the present application.

[0024] Figure 5 Another flowchart of the method for implementing animation of a target model provided in an embodiment of the present application.

[0025] Figure 6 This is a schematic diagram of an embodiment of the present application after adding a target model to the game engine.

[0026] Figure 7 A schematic diagram of the animation implementation result of the target model provided in an embodiment of the present application.

[0027] Figure 8 A schematic diagram of the structure of the target model animation implementation device provided in an embodiment of the present application.

[0028] Figure 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0029] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without making creative efforts are within the scope of protection of this application.

[0030] The embodiments of the present application provide a method, device, computer-readable storage medium and electronic device for realizing the animation of a target model. Specifically, the method for realizing the animation of the target model of the embodiment of the present application can be performed by an electronic device, wherein the electronic device can be a terminal or a server or other device. The terminal can be a smart phone, a tablet computer, a laptop computer, a touch screen, a game console, a personal computer (PC, Personal Computer), a personal digital assistant (Personal Digital Assistant, PDA) or other device. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, and cloud storage.

[0031] For example, when the animation implementation method of the target model is run on the terminal, the terminal is used to implement the animation implementation method of the target model in the embodiment of the present application to achieve the animation effect of the target model. For example, a test engineer debugs the animation effect of the target model, etc. Alternatively, when the animation implementation method of the target model is run on the terminal, the terminal stores a game application and is used to present a virtual game scene. The game application includes the animation effect of the target model, and the animation effect of the target model can be implemented by the terminal. The terminal is used to interact with the user through a graphical user interface. The terminal can provide the graphical user interface to the user in a variety of ways, for example, it can be rendered and displayed on the display screen of the terminal, or the graphical user interface can be presented by holographic projection.

[0032] For example, when the animation implementation method of the target model is run on the server, the animation effect of the target model can be realized in the cloud game. In the cloud game operation mode, the operating body of the game application and the game screen presentation body are separated, and the storage and operation of the target model animation implementation method are completed on the cloud game server. The game screen presentation is completed on the cloud game client. The cloud game client is mainly used for receiving and sending data corresponding to the animation effect of the target model and presenting the game screen. This reduces the computing resource consumption of the terminal and improves the picture quality of the screen displayed by the terminal.

[0033] The following will respectively describe in detail a method, device, computer-readable storage medium and electronic device for implementing animation of a target model provided by the embodiments of the present application. It should be noted that the serial numbers of the following embodiments are not intended to limit the preferred order of the embodiments.

[0034] Figure 1 The method for implementing animation of a target model provided in an embodiment of the present application includes the following steps.

[0035] 101 , obtaining a target model composed of a plurality of sub-patch models, a texture map of the target model, and coordinates of the sub-patch models, wherein the texture map includes the same number of sub-texture maps as the sub-patch models.

[0036] The target model can be a large-scale cluster model such as smoke, a starry sky, the Milky Way, or a meteorite. The target model includes multiple sub-patch models, each of which is a patch. The specific patch shape can be determined based on the specific scenario or pre-set to a preset shape, such as a square, rectangle, or triangle. In this case, the side length of the square, the length and width of the rectangle, or the side length of the triangle are also stored. The multiple sub-patch models are arranged in a preset order and form the target model. Each sub-patch model has corresponding coordinates. The coordinates of the sub-patch model can be the center coordinates of the sub-patch model's center point, or the coordinates of a vertex of the sub-patch model. The coordinates of each vertex of the sub-patch model can be calculated based on the center coordinates of the sub-patch model's center point. The coordinates of the sub-patch model's center point and other vertices can also be calculated based on the coordinates of a vertex of the sub-patch model. The coordinates of the sub-patch model are world coordinates in the world coordinate system. The coordinates of the sub-patch model can be saved as Excel or Word files, as images, or in other ways. Correspondingly, the coordinates of the sub-face model are obtained from Excel, Word files, or images.

[0037] In the embodiment of the present application, the target model is smoke, the shape of the sub-patch model is a square, and the coordinates of the sub-patch model include the center coordinates of the center point of the sub-patch model. For example, in a preset three-dimensional application such as 3dmax, several sub-patch models are generated, such as 36 square sub-patch models, and the 36 sub-patch models are combined into the shape of smoke. The coordinate axis of each sub-patch model is centered, and the coordinate origin of the coordinate axis of each sub-patch model corresponds to the center point of the sub-patch model. Figure 2 FIG. 1 is a schematic diagram of a sub-patch model provided in an embodiment of the present application. Multiple sub-patch models (eg, 36 sub-patch models) form the shape of the target model smoke.

[0038] The texture map of the target model includes the same number of sub-texture maps as the sub-patch models. For example, if there are 36 sub-patch models, the number of sub-texture maps is also 36. The texture map can be composed of multiple sub-texture maps. For example, the texture map is a picture, and the picture includes 36 sub-texture maps, or the texture map can be multiple pictures, such as 6 pictures, each picture corresponds to 6 sub-texture maps; the texture map can also be multiple pictures, each picture corresponds to a sub-texture map, etc. Among them, at least two sub-texture maps are different. In the embodiment of the present application, the texture map is composed of multiple sub-texture maps as an example. For example Figure 3 , which is a schematic diagram of a texture map provided by an embodiment of the present application, includes a plurality of sub-texture maps, for example, 36. In some embodiments, the sub-texture maps in the texture map can be 6*6, that is, arranged in the order of 6 rows and 6 columns.

[0039] 102. Determine the starting motion position of the sub-mesh model in the starting frame of the animation and the target motion position of the target frame according to the coordinates of the sub-mesh model, and determine the displacement data of the vertices of the sub-mesh model in each frame between the starting frame and the target frame according to the starting motion position and the target motion position.

[0040] The animation of the sub-face model is composed of multiple frames (pictures), such as the start frame, the target frame, and each frame between the start frame and the target frame.

[0041] In one case, the above-mentioned step of determining the starting motion position of the sub-patch model in the starting frame of the animation and the target motion position of the target frame based on the coordinates of the sub-patch model includes: determining the coordinates of the sub-patch model as the starting motion position of the sub-patch model in the starting frame of the animation; obtaining preset displacement data corresponding to the sub-patch model; and determining the target motion position of the sub-patch model in the target frame of the animation based on the starting motion position and the preset displacement data.

[0042] The coordinates of each sub-patch model are different, and therefore, the starting motion position of each sub-patch model is different. The preset displacement data corresponding to each sub-patch model can be exactly the same, for example, the preset displacement data corresponding to the first sub-patch model is (1, 2, 3), the preset displacement data corresponding to the second sub-patch model is (1, 2, 3), ..., and the preset displacement data corresponding to the nth sub-patch model is (1, 2, 3). The preset displacement data corresponding to each sub-patch model can also be completely different, for example, the preset displacement data corresponding to the first sub-patch model is (1, 2, 3), the preset displacement data corresponding to the second sub-patch model is (2, 2, 1), ..., and the preset displacement data corresponding to the nth sub-patch model is (3, 2, 1). The preset displacement data corresponding to each sub-patch model can also be partially the same and partially different. When the preset displacement data corresponding to each sub-patch model is exactly the same, the motion trajectory formed by each sub-patch model is the same. When the preset displacement data corresponding to each sub-patch model is completely different, the motion trajectory formed by each sub-patch model is different.

[0043] The preset displacement data corresponding to each sub-patch model may be one displacement data or multiple displacement data.

[0044] When the preset displacement data for each sub-patch model is a single displacement data, the step of determining the target motion position of the sub-patch model in the target frame of the animation based on the starting motion position and the preset displacement data includes: adding the starting motion position and the preset displacement data to obtain the target motion position of the sub-patch model in the target frame of the animation. For example, the coordinates of the first sub-patch model are determined as the starting motion position of the first sub-patch model in the starting frame of the animation, the starting motion position of the first sub-patch model is added to the preset displacement data corresponding to the first sub-patch model to obtain the target motion position of the first sub-patch model in the target frame of the animation, the coordinates of the second sub-patch model are determined as the starting motion position of the second sub-patch model in the starting frame of the animation, the starting motion position of the second sub-patch model is added to the preset displacement data corresponding to the second sub-patch model to obtain the target motion position of the target frame corresponding to the second sub-patch model, and so on and so forth, to obtain the starting motion position of each sub-patch model in the starting frame of the animation and the target motion position of the target frame.

[0045] When the preset displacement data includes displacement data, for example, including first displacement data, second displacement data, ..., Nth displacement data, the above-mentioned step of determining the target motion position of the sub-patch model in the target frame of the animation based on the starting motion position and the preset displacement data includes: adding the starting motion position and the first displacement data in the preset displacement data to obtain the target motion position of the sub-patch model in the first target frame of the animation; when the sub-patch model moves to the target motion position of the first target frame, or in the next motion stage, using the target motion position of the first target frame as a new starting motion position, adding the new starting motion position and the second displacement data in the preset displacement data to obtain the target motion position of the sub-patch model in the second target frame of the animation; ...; and so on, adding the new starting motion position and the Nth displacement data in the preset displacement data to obtain the target motion position of the sub-patch model in the Nth target frame of the animation.

[0046] The above embodiment determines the target motion position of the sub-patch model based on the starting motion position and the preset displacement data. The motion trajectory of the sub-patch model can be pre-set by the preset displacement data, and the sub-patch model can be made to move according to the motion trajectory. Moreover, since each sub-patch model synthesizes the target model, multiple sub-patch models can simultaneously determine their corresponding starting motion positions and target motion positions, thereby improving the efficiency of determining the corresponding starting motion positions and target motion positions.

[0047] In one embodiment, an identifier of each sub-patch model may be set, and the identifier of the sub-patch model corresponds to the coordinates of the sub-patch model one by one. In this way, each sub-patch model stores the corresponding identifier and coordinates. The identifiers of the sub-patch models may be arranged in a preset order, for example, the identifiers are from 1 to 36, representing the first sub-patch model to the 36th sub-patch model, respectively.

[0048] Correspondingly, the above-mentioned step of determining the starting motion position of the sub-patch model in the starting frame of the animation and the target motion position of the target frame based on the coordinates of the sub-patch model includes: obtaining the starting sampling identifier of the starting frame of the animation, and the starting sampling identifier corresponds to one of the identifiers of the sub-patch model; sampling the coordinates corresponding to the starting sampling identifier from the coordinates of the sub-patch model as the starting motion position of the sub-patch model in the starting frame of the animation; updating the starting sampling identifier to obtain the target sampling identifier of the target frame, and the target sampling identifier corresponds to another one of the identifiers of the sub-patch model; sampling the coordinates corresponding to the target sampling identifier from the coordinates of the sub-patch model as the target motion position of the sub-patch model in the target frame of the animation.

[0049] At the same time, each sub-patch model has a different starting sampling identifier. The starting sampling identifier of each sub-patch model can be updated based on preset data to obtain a target sampling identifier. When updating the starting sampling identifier, the preset data corresponding to each sub-patch model can be the same or different. If the preset data corresponding to each sub-patch model is the same, the target sampling identifier of each sub-patch model is different. The following examples in the embodiments of this application use this situation as an example.

[0050] Since the starting sampling identifier of the sub-patch model is one of the identifiers of the sub-patch model, the target sampling identifier is another of the identifiers of the sub-patch model, and the identifier of the sub-patch model corresponds to the coordinates one-to-one, therefore, according to the starting sampling identifier, a coordinate in the coordinates of the sub-patch model corresponding to the starting sampling identifier can be sampled, and the coordinate is used as the starting movement position of the sub-patch model in the starting frame of the animation. According to the target sampling identifier, a coordinate in the coordinates of the sub-patch model corresponding to the target sampling identifier can be sampled, and the coordinate is used as the target movement position of the sub-patch model in the target frame of the animation.

[0051] For each sub-patch model, the identifier corresponding to the current position of the sub-patch model is used as the starting sampling identifier of the starting frame of the animation, and the target sampling identifier is obtained after the starting sampling identifier is updated.

[0052] For example, when the preset data is 1, for the first sub-patch model, the corresponding starting sampling identifier of the starting frame is 1, and the first coordinate is sampled from the coordinates of the sub-patch model as the starting motion position of the first sub-patch model in the starting frame of the animation. The preset data is used to update the starting sampling identifier, and the target sampling identifier is 2. The second coordinate is sampled from the coordinates of the sub-patch model as the target motion position of the first sub-patch model in the target frame of the animation; for the second sub-patch model, the corresponding starting sampling identifier of the starting frame is 2, and the second coordinate is sampled from the coordinates of the sub-patch model as the starting motion position of the second sub-patch model in the starting frame of the animation, and the preset data is used to update the starting sampling identifier , the target sampling identifier is 3, and the third coordinate is sampled from the coordinates of the sub-patch model as the target motion position of the second sub-patch model in the target frame of the animation; ..., and so on, for the 36th sub-patch model, the corresponding starting sampling identifier of the starting frame is 36, and the 36th coordinate is sampled from the coordinates of the sub-patch model as the starting motion position of the 36th sub-patch model in the starting frame of the animation. The starting sampling identifier is updated using the preset data, and the target sampling identifier is mod(37,36)=1 (because the identifiers of the sub-patch models include 1-36), and the first coordinate is sampled from the coordinates of the sub-patch model as the target motion position of the 36th sub-patch model in the target frame of the animation.

[0053] When the sub-patch model moves to the target motion position of the target frame, or in the next motion stage, for the first sub-patch model, the corresponding starting sampling identifier of the starting frame is 2, and the second coordinate is sampled from the coordinates of the sub-patch model as the starting motion position of the first sub-patch model in the starting frame of the animation. The preset data is used to update the starting sampling identifier to obtain a target sampling identifier of 3, and the third coordinate is sampled from the coordinates of the sub-patch model as the target motion position of the first sub-patch model in the target frame of the animation; for the second sub-patch model, the corresponding starting sampling identifier of the starting frame is 3, and the third coordinate is sampled from the coordinates of the sub-patch model as the starting motion position of the second sub-patch model in the starting frame of the animation. The preset data is used to update the starting sampling identifier to obtain a target sampling identifier of 4, and the fourth coordinate is sampled from the coordinates of the sub-patch model as the target motion position of the second sub-patch model in the target frame of the animation; and so on.

[0054] It can be understood that the first sub-patch model starts from its corresponding coordinate (the first coordinate), first moves to the position corresponding to the coordinate of the second sub-patch model, and then moves to the position corresponding to the coordinate of the third sub-patch model,..., after moving to the position corresponding to the coordinate of the 36th sub-patch model, it starts from the position corresponding to the coordinate of the first sub-patch model again,...; the second sub-patch model starts from its corresponding coordinate (the second coordinate), first moves to the position corresponding to the coordinate of the third sub-patch model, and then moves to the position corresponding to the coordinate of the fourth sub-patch model,..., after moving to the position corresponding to the coordinate of the 36th sub-patch model, it starts from the position corresponding to the coordinate of the first sub-patch model, and then moves to the position corresponding to the coordinate of the second sub-patch model,..., and so on. Each other sub-patch model moves according to the same rule until the animation stops, such as after receiving a stop command, the animation stops.

[0055] In this way, the coordinates of the multiple sub-mesh models form a motion trajectory, and each sub-mesh model starts from its corresponding coordinates and moves according to the motion trajectory until the animation stops. In this case, the preset data is 1, and the coordinates of the multiple sub-mesh models form a motion trajectory. The individual sub-mesh models move according to the motion trajectory, making the animation of the target model smoke natural and more effective. Moreover, the multiple sub-mesh models are synthesized into the target model, so the corresponding starting and target motion positions of multiple sub-mesh models can be determined simultaneously, improving the efficiency of determining the corresponding starting and target motion positions.

[0056] The above explanation is based on the preset data being 1. The preset data can also be integers such as 2 or 3. When the preset data is 2 or 3, its motion trajectory is not the trajectory corresponding to the coordinates of each sub-patch model, but the trajectory formed by obtaining the coordinates of every 1 or 2 sub-patch models from the coordinates of each sub-patch model.

[0057] When the coordinates of the sub-patch model are the center coordinates of the center point of the sub-patch model, the determined starting motion position and target motion position of the sub-patch model can be expressed by the center coordinates of the center point of the sub-patch model. When the coordinates of the sub-patch model are the coordinates of the vertices of the sub-patch model, the determined starting motion position and target motion position of the sub-patch model can be expressed by the coordinates of the vertices.

[0058] After determining the starting motion position of the sub-mesh model in the starting frame of the animation and the target motion position in the target frame, the displacement data of the vertices of the sub-mesh model in each frame between the starting frame and the target frame are determined according to the starting motion position and the target motion position.

[0059] In one embodiment, the above-mentioned step of determining the displacement data of the vertices of the sub-patch model in each frame between the starting frame and the target frame based on the starting motion position and the target motion position includes: using a preset time function to interpolate the starting motion position and the target motion position to obtain multiple interpolation positions; determining the displacement data of the vertices of the sub-patch model in each frame based on the starting motion position, multiple interpolation positions and the target motion position.

[0060] The preset time function may be a time function provided by a game engine, such as a time function, etc. The game engine may be an Unreal Engine (UE), such as UE4, or another engine that implements similar functions or a self-developed engine.

[0061] The time function provided by the UE4 engine is used to set parameters such as the movement speed and movement time between the starting movement position and the target movement position, so as to determine the number of frames required to move between the starting movement position and the target movement position. The linear interpolation function is used to interpolate between the starting movement position and the target movement position to obtain multiple interpolation positions arranged in sequence.

[0062] The displacement data of the vertices of the sub-patch model in each frame between the starting frame and the target frame are determined based on the starting motion position, multiple interpolation positions and the target motion position. For example, the displacement data of the vertices of the sub-patch model in the first frame between the starting frame and the target frame are determined based on the starting motion position and the first interpolation position. For example, the difference between the starting motion position and the first interpolation position is used as the motion offset value of the center coordinate of the center point of the sub-patch model in the first frame. According to information such as the side length of the sub-patch model and the center coordinate of the center point, the coordinates of the four vertices of the sub-patch model can be determined. According to the motion offset value and the coordinates of the four vertices, the displacement data of the vertices (4 vertices) of the sub-patch model in the first frame can be determined. The displacement data of the vertices of the sub-patch model in the second frame between the starting frame and the target frame are determined based on the second interpolation position and the first interpolation position. ..., the displacement data of the vertices of the sub-patch model in the last frame between the starting frame and the target frame are determined based on the last interpolation position and the target motion position. The displacement data of the vertices in each frame may include the coordinates of the vertices in each frame, and may also include the starting coordinates and motion offset values ​​of the vertices in each frame.

[0063] In a specific implementation, the above steps can be completed using a game engine, such as the Unreal Engine mentioned above. The above determination of the displacement data of the vertices in each frame between the start frame and the target frame of the animation can be completed in a shader.

[0064] Among them, shaders are used to implement rendering. Shaders mainly include vertex shaders and pixel shaders. Vertex shaders are mainly responsible for calculating the geometric relationships of vertices, while pixel shaders are mainly responsible for calculating the color of the source image.

[0065] Determining the displacement data of the vertices of multiple sub-face models in each frame of the animation's starting frame and target frame is completed in the vertex shader. The image sensor is used in parallel calculation within the shader to simultaneously determine the displacement data of the vertices of multiple sub-face models in each frame of the animation's starting frame and target frame, thereby improving the efficiency of determining the displacement data of the vertex. Since the calculation is for the displacement data of the vertex, this application is implemented based on vertex animation, which is different from the implementation method of the example system in the prior art.

[0066] 103 , determining offset data of vertices of the sub-mesh model in each frame according to the target shooting direction of the virtual camera.

[0067] Among them, the virtual camera includes a camera from the player's perspective in the game scene or a camera with other appropriate perspectives set according to the needs of the game scene. In virtual games, the target model is generally used for players to view, so the virtual camera is used as an example of a camera from the player's perspective. This step can be performed in the camera space (camera coordinate system), and this case is used as an example for explanation. Finally, the data in the camera space needs to be converted to data in the world coordinate system; it can also be performed in other perspective coordinate systems, and finally it can be converted to data in the world coordinate system.

[0068] In one embodiment, the above step 103 includes: determining the target coordinates of the vertices of the sub-patch model in each frame according to the target shooting direction of the virtual camera; and determining the offset data of the vertices of the sub-patch model in each frame according to the difference between the coordinates of the vertices of the sub-patch model in each frame and the target coordinates.

[0069] Among them, the target shooting direction can be any pre-set direction that meets the needs of the game scene, such as the 60-degree direction between the virtual camera and the vertex normal of the sub-mesh model. First, calculate the coordinates of the vertices of the sub-mesh model in each frame, obtain the angle between the sub-mesh model and the virtual camera in each frame (which can be obtained using the game engine), and according to the corresponding angle and vertex coordinates in each frame, calculate the target coordinates of the vertices of the sub-mesh model under the target shooting direction, and use the difference between the coordinates of the vertices of the sub-mesh model in each frame and the target coordinates as the offset data of the vertices of the sub-mesh model in each frame. In one embodiment, BillBoard technology can also be used to keep the vertex normal of each sub-mesh model and the direction of the virtual camera in the target shooting direction.

[0070] During the movement of the sub-patch model, the perspective of the virtual camera may be constantly changing. In this way, the target model that you actually want to see also changes with the perspective of the virtual camera. The target model is composed of sub-patch models, and the sub-patch model is two-dimensional. If the two-dimensional sub-patch model does not change with the perspective of the virtual camera, the two-dimensional sub-patch model may appear to be out of place. For example, at one moment you see the front of the sub-patch model, while at another moment you see the side of the sub-patch model. Therefore, the purpose of this step is to rotate the sub-patch model so that the vertex normal of the sub-patch model and the direction of the virtual camera remain in the target shooting direction, so as to minimize the occurrence of out of place phenomena in the sub-patch model when the perspective of the virtual camera changes.

[0071] Among them, since the center coordinates of the center point of the sub-patch model are saved, the center point can be used as the position of the rotation axis (the center point is along the axis of the virtual camera) so that the vertex normal of each sub-patch model and the direction of the virtual camera are the target shooting direction.

[0072] In one embodiment, the target shooting direction is parallel to the normal direction of the vertices of the sub-patch model, that is, the target shooting direction is a direction perpendicular to the sub-patch model. In this way, no matter how the viewing angle of the virtual camera changes, the vertices are rotated to a direction parallel to the normals of the virtual camera and the vertices of the sub-patch model, that is, the vertices are rotated to a direction perpendicular to the virtual camera and the sub-patch model. The sub-patch model will not appear out of place when the viewing angle of the virtual camera changes.

[0073] 104 , determining target positions of vertices of the sub-patch model in each frame according to the displacement data and the offset data.

[0074] The displacement data and offset data of the vertices of the sub-patch model in each frame are added together to obtain the target positions of the vertices of the sub-patch model in each frame. Determining the target positions of the vertices of the sub-patch model in each frame can be implemented in a vertex shader.

[0075] In one embodiment, the target positions of the vertices of the sub-patch model in each frame are set to be connected to the world coordinate offset node in the game engine, so that the world coordinate offset node controls the movement of the vertices of the sub-patch model according to the target positions of the vertices of the sub-patch model in each frame.

[0076] 105 , mapping the sub-texture map to the sub-face model according to the target position to achieve the animation effect of the target model.

[0077] The sub-texture map is mapped to the sub-face model so that each vertex in the sub-face model has corresponding mapping information. After rendering, the animation effect of the target model is obtained.

[0078] To map a sub-texture map to a sub-patch model, it is necessary to determine the sub-texture map corresponding to the sub-patch model in each frame, and then map the corresponding sub-texture map to the sub-patch model according to the target position of the vertices of the sub-patch model in each frame.

[0079] In one case, each sub-patch model corresponds to a sub-texture map, and each sub-texture map corresponds to a sub-texture map identifier. During the movement of each sub-patch model vertex, the sub-texture map corresponding to the sub-patch model can remain unchanged. In this way, the sub-texture map identifier corresponding to the sub-patch model can be determined based on the identification information of the sub-patch model, and the sub-texture map identifier can be sampled from the texture map to obtain the sub-texture map corresponding to the sub-texture map identifier. Then, according to the target position of the sub-patch model vertex in each frame, the corresponding sub-texture map is mapped to the sub-patch model. For example, the identifier of the first sub-patch model is 1, and the corresponding sub-texture map identifier is also 1. Then, the sub-texture map with the sub-texture map identifier of 1 is sampled from the texture map, and according to the target position of the first sub-patch model vertex in each frame, the sub-texture map with the sub-texture map identifier of 1 is mapped to the sub-patch model.

[0080] In one embodiment, as each vertex of a sub-patch model moves, the sub-texture map corresponding to the sub-patch model also changes, making the animation effect of the simulated target model more realistic, improving the authenticity of the target model's animation effect, and enhancing the user experience. Accordingly, the step of mapping the sub-texture map to the sub-patch model based on the target position includes: determining a sub-texture map identifier corresponding to the target position; sampling from the texture map based on the sub-texture map identifier to obtain a sub-texture map corresponding to the sub-texture map identifier; and mapping the sub-texture map to the sub-patch model.

[0081] The coordinates of the sub-patch model (which can be the coordinates of the center point or the coordinates of the vertices) are set to correspond to the sub-texture map identifiers one by one, for example, the coordinates of the first sub-patch model correspond to the first sub-texture map identifier, the coordinates of the second sub-patch model correspond to the second sub-texture map identifier, etc. The corresponding sub-texture map identifiers are determined according to the target positions of the vertices of the sub-patch model in each frame, wherein when the target position matches a coordinate in the coordinates of the sub-patch model (if the coordinates of the sub-patch model are the center coordinates of the center point, the coordinates are converted to the vertex coordinates of different vertices and the vertex coordinates are matched with the target position), the sub-texture map identifier corresponding to the coordinate is obtained. When the target position does not match any coordinate in the coordinates of the sub-patch model, the sub-texture map identifier corresponding to the coordinates of the sub-patch model preceding the target position is obtained, and sampling is performed from the texture map according to the sub-texture map identifier to obtain the sub-texture map corresponding to the sub-texture map identifier. Then, according to the target positions of the vertices of the sub-patch model in each frame, the corresponding sub-texture map is mapped to the sub-patch model.

[0082] For example, when the preset data is 1, the sub-texture map corresponding to the vertex of the first sub-patch model is identified as 1 when the vertex starts to move in the starting frame, and the sub-texture map with the sub-texture map identification 1 is sampled from the texture map, and the sub-texture map with the sub-texture map identification 1 is mapped to the first sub-patch model according to the target position of the vertex of the first sub-patch model in the starting frame; when the vertex of the first sub-patch model moves to the coordinates of the second sub-patch model (if the coordinates of the sub-patch model are the center coordinates of the center point, they need to be converted into the coordinates of the vertex, and the coordinates of the second sub-patch model are the target movement positions of the target frame), the corresponding sub-texture map identification is 2, and the sub-texture map with the sub-texture map identification 2 is sampled from the texture map, and the sub-texture map with the sub-texture map identification 2 is mapped to the first sub-patch model according to the target position of the vertex of the first sub-patch model in the frame; ..., and so on, and the following will not be repeated. Among them, the sub-texture map corresponding to the vertex of the first sub-patch model in each frame from the starting frame of the movement to the coordinate of the second sub-patch model (the target movement position of the target frame) is still the sub-texture map with the sub-texture map identifier of 1, until the vertex of the first sub-patch model moves to the coordinate of the second sub-patch model, it is replaced by the sub-texture map with the sub-texture map identifier of 2,..., and so on.

[0083] When the vertices of the second sub-patch model start moving in the starting frame, the corresponding sub-texture map is identified as 2. The sub-texture map with the sub-texture map identification 2 is sampled from the texture map, and according to the target position of the vertices of the second sub-patch model in the starting frame, the sub-texture map with the sub-texture map identification 2 is mapped to the second sub-patch model, and so on. The following will not be repeated.

[0084] For example, when the preset data is 2, the sub-texture map identifier of the vertex of the first sub-patch model is 1 when the starting frame of the movement begins, and the sub-texture map with the sub-texture map identifier 1 is sampled from the texture map, and according to the target position of the vertex of the first sub-patch model in the starting frame, the sub-texture map with the sub-texture map identifier 1 is mapped to the first sub-patch model; when the vertex of the first sub-patch model moves to the coordinates of the third sub-patch model (the target movement position of the target frame), the corresponding sub-texture map identifier is 3, and the sub-texture map with the sub-texture map identifier 3 is sampled from the texture map, and according to the target position of the vertex of the first sub-patch model in the frame, the sub-texture map with the sub-texture map identifier 3 is mapped to the first sub-patch model, and so on. Among them, the sub-texture map corresponding to the vertex of the first sub-patch model in each frame from the starting frame of the movement to the coordinates of the third sub-patch model (the target movement position of the target frame) is still the sub-texture map with the sub-texture map identifier of 1, until the vertex of the first sub-patch model moves to the coordinates of the third sub-patch model, it is replaced by the sub-texture map with the sub-texture map identifier of 3,..., and so on.

[0085] In one embodiment, after obtaining the sub-texture map corresponding to the sub-texture map identifier, the method further includes: setting the transparency of the sub-texture map; and mapping the sub-texture map with the set transparency to the sub-face model. It is understood that the transparency of each sub-texture map can be set so that each sub-texture map is displayed according to the corresponding transparency, thereby improving the realism of the animation effect of the target model.

[0086] In one embodiment, after sampling to obtain a sub-texture map, the corresponding sub-texture map is set to be connected to a color node so that the color node renders the pixels (e.g., RGB pixel values) on the sub-texture map to the corresponding sub-patch model; the transparency of the sub-texture map is set to be connected to a transparency node so that the transparency node renders the pixel values ​​of the sub-texture map according to the transparency.

[0087] Specifically, the color node can be an Emissive Color node, and the transparency node can be an Opacity node. Both color and transparency nodes are provided by the game engine. The Emissive Color node renders the pixels (e.g., RGB channel values) of the sampled sub-texture map onto the corresponding sub-face model. The transparency node retrieves the transparency of the alpha channel of the corresponding sub-texture map and uses the sampled transparency to control the transparency of each pixel, achieving transparency control and simulating the translucent effect of smoke, for example.

[0088] Mapping sub-texture maps to sub-face models can be performed in a pixel shader. Within the pixel shader, the image sensor GPU is used for parallel calculations to simultaneously determine sub-texture maps for multiple, for example, 36, sub-face models. These sub-texture maps are then mapped to the sub-face models, improving mapping efficiency and the efficiency of animation implementation for the target model.

[0089] In the embodiment of the present application, the mergibility of sub-face models is utilized to form an overall target model, and the image processor is used in the shader to simultaneously process the displacement data, offset and sub-texture maps of the vertices of multiple sub-face models, and finally form the animation effect of the target model. Compared with the particle system, the embodiment of the present application is based on vertex animation, utilizes the mergibility of the target model, and uses hardware to simultaneously realize the processing of multiple sub-face models, quickly realizes the animation effect of the target model, reduces the power consumption of electronic devices, saves the performance of electronic devices, and realizes the use of the animation effect of the target model in a large number of mobile terminals; in addition, the offset data of the sub-face model is also determined in each frame, so that during the movement, the direction of the sub-face model and the virtual camera is kept as the target camera direction, avoiding the occurrence of goofs and improving the animation authenticity of the target model.

[0090] It should be noted that each particle in the particle system is a separate model and cannot be combined for calculation. Each particle (such as each sub-face model) needs to be calculated separately. For example, each particle needs to calculate displacement data, orientation and other information separately, which consumes a lot of performance. In addition, the calculation of the model obtained by the particle system is completed by the CPU and the GPU cannot be used. Therefore, the particle system cannot be used in mobile terminals to simulate the animation effects of a large number of particles.

[0091] In one embodiment, if Figure 4 As shown, before the step of determining the starting motion position of the sub-mesh model in the starting frame of the animation and the target motion position of the target frame according to the coordinates of the sub-mesh model, step 202 is also included.

[0092] 202. Determine rotation data for rotating the sub-face model.

[0093] The method includes: generating a rotation value; and rotating the sub-face model along the center coordinates of the sub-face model according to the rotation value to obtain rotation data of the sub-face model.

[0094] In some embodiments, the generated rotation value may be a random rotation value; based on the random rotation value, the sub-mesh model is randomly rotated along the center coordinate of the sub-mesh model to obtain the rotation data of the sub-mesh model. A random function may be used to generate a random rotation value, or a random function may be used to generate a random value first, and then the random value may be processed using a trigonometric function to obtain a random rotation value. Other methods may also be used to generate random rotation values, such as using a hash function to generate a random rotation value. The random rotation value may be a random value between [0, 1]. After generating the random rotation value, the sub-mesh model is randomly rotated along the center coordinate of the sub-mesh model using a trigonometric function to obtain random rotation data of the sub-mesh model, and the random rotation data is three-dimensional data.

[0095] like Figure 2 As shown in the figure, in a pre-set 3D application, several sub-mesh models are initially arranged in a regular pattern, such as horizontally and vertically. This can cause the target model's smoke animation to appear somewhat stiff, making the effect less than ideal. To enhance the realism of the smoke animation, a random rotation is added to each sub-mesh model to simulate the randomness of the smoke and improve its realism.

[0096] It should be noted that step 202 above can be performed before entering the shader, that is, the addition of random rotation data is performed on the initial coordinates, that is, the random rotation of the initial position is added. In addition, the random rotation is rotated on the surface where the sub-face model is located, and not rotated in other directions.

[0097] After obtaining the rotation data of the center coordinates corresponding to the center point of the sub-patch model, the rotation data of the vertices of the sub-patch model can be obtained.

[0098] Correspondingly, step 104 includes step 205. Specifically, step 205 is as follows.

[0099] 205 , determining target positions of vertices of the sub-face model in each frame according to the displacement data, the offset data, and the rotation data.

[0100] The displacement data, offset data, and rotation data of the vertices in each frame are added together to obtain the target positions of the vertices of the sub-patch model in each frame.

[0101] Other steps 201, 203, 204, and 206 in this embodiment are consistent with the above-mentioned steps 101, 102, 103, and 105. Please refer to the description of the relevant content above and the details will not be repeated here.

[0102] In some other embodiments, the movement formed by the vertex displacement data, the movement corresponding to the vertex facing the virtual camera, and the movement corresponding to the random rotation data, that is, the three kinds of movement can be added together to obtain the animation result of the vertices of the sub-face model in each frame.

[0103] In this embodiment, in the initial state when the sub-patch model starts to move, the sub-patch model is rotated along the center coordinates of the sub-patch model to break the regularity of the initial placement of the sub-patch model, so as to simulate the randomness of the smoke according to the rotation data and improve the animation realism of the smoke.

[0104] Figure 5 The present invention provides a flowchart of a method for implementing animation of a target model according to an embodiment of the present invention. The method for implementing animation of a target model includes the following steps.

[0105] 301 : Generate a target model composed of a plurality of sub-patch models, arrange the plurality of sub-patch models in a preset order, and set an identifier for each sub-patch model.

[0106] Generate multiple sub-surface models, such as in a preset 3D application such as 3dmax, where each sub-surface model is the same and multiple sub-surface models are combined into the shape of smoke, such as Figure 2 The multiple sub-face models are arranged in a certain order, and an identifier of each sub-face model is set, for example, the identifiers of the sub-face models from bottom to top are 1-36.

[0107] 302. Store the coordinates and identifier of the sub-face model into the RGB channel and A channel of the image respectively.

[0108] Multiple sub-patch models are selected sequentially from bottom to top, and the coordinates and identifiers of the selected sub-patch models are stored in the RGB channels and A (Alpha) channel of the image, respectively. The coordinates of the sub-patch models include the center coordinates of the sub-patch model's center point. Specifically, for example, a command can be used to obtain the coordinates and identifiers of the sub-patch models and store them in the RGB channels and alpha channel of the image. In one embodiment, a preset plug-in, such as the PivotPainter plug-in, can be called within a preset 3D application. This preset plug-in can be implemented in Unreal Engine UE4. In this preset plug-in, the value of the Texture RGB parameter is set to Pivot Position (16-bit), and the value of the TextureAlpha parameter is set to Selection Order, so that the coordinates (including the center coordinates) and identifier of each sub-patch model are stored in the RGB channels and A channel of the image, respectively. The values ​​of the A channel of the image are stored as decimals in the range [0, 1]. The preset plug-in automatically converts the integer identifier information to a decimal in the range [0, 1].

[0109] 303 : Export the image storing the coordinates and identifiers of the sub-face model into a coordinate map of a preset type.

[0110] You can use commands to export an image containing the coordinates and identifiers of a sub-mesh model as a preset coordinate map. You can also trigger export controls in a preset plugin, such as the "Process The Selected Object Hierarchy" control, to automatically generate a preset coordinate map. This coordinate map stores the coordinates and identifiers of the sub-mesh model. The preset type is .exr.

[0111] 304, generate a texture map.

[0112] For example, a texture map is made by splicing multiple sub-texture maps. The texture map can be a picture including 36 sub-texture maps corresponding to 6 rows and 6 columns. The 36 sub-texture maps form a sequence frame map of smoke.

[0113] The execution order of steps 301 to 303 and step 304 is not limited, and step 304 may be executed first, and then steps 301 to 303.

[0114] 305 , obtaining a target model, a coordinate map, and a texture map, and importing the target model, the coordinate map, and the texture map into a game engine.

[0115] Game engines such as UE4 engine, etc. Figure 6The following figure shows the target model imported into the game engine. This target model is formed by merging each sub-face model. The merging ability of target models is a key factor in improving performance and a key feature that distinguishes it from traditional particle systems. Once the sub-face models are merged into the target model, the shader can utilize the powerful parallel computing capabilities of the GPU to simultaneously calculate the state of each sub-face model at the vertex level, reducing power consumption and performance of electronic devices.

[0116] The following steps are all completed in the game engine.

[0117] 306 , determining rotation data for rotating the sub-face model.

[0118] Wherein, the coordinates of the sub-patch model include the center coordinates of the center point of the sub-patch model. Wherein, the step of determining the rotation data of the rotation of the sub-patch model includes: generating a rotation value, and rotating the sub-patch model along the center coordinates of the sub-patch model according to the rotation value to obtain the rotation data of the sub-patch model. For details, please refer to the description of the corresponding part above. The center coordinates of the center point of the sub-patch model can be obtained by the following steps: sampling the RGB values ​​in the coordinate map to obtain the center coordinates of the center point of each sub-patch model. Wherein, the RGB values ​​can be sampled in sequence, and the center coordinates of the center points of the corresponding sub-patch models are also obtained in sequence. The center coordinates of the center point of the sub-patch model can also be determined by the UV value of the sub-patch model.

[0119] 307 , parsing the RGB channel values ​​of the coordinate map to obtain the coordinates of the sub-patch model, parsing the A channel value in the coordinate map, and converting the A channel value into an integer to obtain the identifier of the sub-patch model.

[0120] The RGB channel values ​​in the coordinate map are obtained in sequence and parsed to obtain the coordinates of the sub-patch model in the corresponding order. The A channel values ​​in the coordinate map are obtained in sequence. The values ​​after parsing and converting to integers are the identifiers of each sub-patch model in the corresponding order. Each identifier of the sub-patch model plays an important role. When sampling the coordinates of the sub-patch model, the sample is selected according to the identifier.

[0121] 308 , determining the starting motion position of the sub-mesh model in the starting frame of the animation and the target motion position of the target frame according to the coordinates of the sub-mesh model, and determining the displacement data of the vertices of the sub-mesh model in each frame between the starting frame and the target frame according to the starting motion position and the target motion position.

[0122] 309 , determining the offset data of the vertices of the sub-mesh model in each frame according to the target shooting direction of the virtual camera.

[0123] 310 , determining target positions of vertices of the sub-patch model in each frame according to the displacement data, the offset data, and the rotation data.

[0124] 311, mapping the sub-texture map to the sub-face model according to the target position to achieve the animation effect of the target model.

[0125] For the steps not described in detail in this embodiment, please refer to the corresponding description in the above embodiment, which will not be repeated here. Figure 7 shown.

[0126] This embodiment uses a preset plug-in to save the coordinates and identification information of the sub-face model to a preset type of image (coordinate map). Subsequently, only the coordinates and identification in the preset type of coordinate map need to be read for use, so as to quickly determine the coordinates and identification information of the sub-face model, thereby improving efficiency. For other beneficial effects achieved in this embodiment, please refer to the corresponding description of the above embodiment.

[0127] All of the above technical solutions can be combined in any way to form optional embodiments of the present application, and will not be described in detail here.

[0128] In order to better implement the target model animation implementation method of the present application embodiment, the present application embodiment also provides a target model animation implementation device. Figure 8 The target model animation implementation apparatus 400 may include an acquisition module 401 , a first determination module 402 , a second determination module 403 , a third determination module 404 and a mapping module 405 .

[0129] The acquisition module 401 is used to acquire a target model composed of multiple sub-patch models, a texture map of the target model, and the coordinates and identifiers of the sub-patch models, where the texture map includes the same number of sub-texture maps as the sub-patch models.

[0130] The first determination module 402 is used to determine the starting motion position of the sub-mesh model in the starting frame of the animation and the target motion position of the target frame based on the coordinates of the sub-mesh model, and determine the displacement data of the vertices of the sub-mesh model in each frame between the starting frame and the target frame based on the starting motion position and the target motion position.

[0131] Among them, when the first determination module 402 executes the step of determining the starting motion position of the sub-patch model in the starting frame of the animation and the target motion position of the target frame according to the coordinates of the sub-patch model, it specifically performs: determining the coordinates of the sub-patch model as the starting motion position of the sub-patch model in the starting frame of the animation; obtaining the preset displacement data corresponding to the sub-patch model; and determining the target motion position of the sub-patch model in the target frame of the animation based on the starting motion position and the preset displacement data.

[0132] Among them, each sub-patch model is correspondingly provided with an identifier of the sub-patch model, and the identifier of the sub-patch model corresponds one-to-one to the coordinates of the sub-patch model. When the first determination module 402 executes the step of determining the starting motion position of the sub-patch model in the starting frame of the animation and the target motion position of the target frame according to the coordinates of the sub-patch model, it specifically performs: obtaining the starting sampling identifier of the starting frame of the animation, and the starting sampling identifier corresponds to one of the identifiers of the sub-patch model; sampling the coordinates corresponding to the starting sampling identifier from the coordinates of the sub-patch model as the starting motion position of the sub-patch model in the starting frame of the animation; updating the starting sampling identifier to obtain the target sampling identifier of the target frame, and the target sampling identifier corresponds to another one of the identifiers of the sub-patch model; sampling the coordinates corresponding to the target sampling identifier from the coordinates of the sub-patch model as the target motion position of the sub-patch model in the target frame of the animation.

[0133] Among them, the first determination module 402, when executing the step of determining the displacement data of the vertices of the sub-patch model in each frame between the starting frame and the target frame according to the starting motion position and the target motion position, specifically performs: using a preset time function to interpolate the starting motion position and the target motion position to obtain multiple interpolation positions; and determining the displacement data of the vertices of the sub-patch model in each frame according to the starting motion position, multiple interpolation positions and the target motion position.

[0134] The second determining module 403 is configured to determine the offset data of the vertices of the sub-mesh model in each frame according to the target shooting direction of the virtual camera.

[0135] Among them, the second determination module 403 is specifically used to determine the target coordinates of the vertices of the sub-patch model in each frame according to the target shooting direction of the virtual camera; and determine the offset data of the vertices of the sub-patch model in each frame according to the difference between the coordinates of the vertices of the sub-patch model in each frame and the target coordinates.

[0136] In one case, the target shooting direction is parallel to the normal direction of the vertices of the sub-mesh model.

[0137] The third determining module 404 is configured to determine the target position of the vertices of the sub-patch model in each frame according to the displacement data and the offset data.

[0138] The mapping module 405 is configured to map the sub-texture map to the sub-face model according to the target position to achieve an animation effect of the target model.

[0139] Among them, the mapping module 405 is specifically used to determine the sub-texture map identifier corresponding to the target position; sample from the texture map according to the sub-texture map identifier to obtain the sub-texture map corresponding to the sub-texture map identifier; and map the sub-texture map to the sub-patch model.

[0140] The mapping module 405 is further configured to set the transparency of the sub-texture map after obtaining the sub-texture map corresponding to the sub-texture map identifier; and map the sub-texture map with the set transparency to the sub-patch model.

[0141] Alternatively, as Figure 8 As shown, before the acquisition module 401, the target model animation realization device 400 also includes: a generation module 406. The generation module 406 is used to generate the target model composed of multiple sub-patch models, the multiple sub-patch models are arranged in a preset order, and an identifier of each sub-patch model is set; the coordinates and identifiers of the sub-patch models are stored in the RGB channel and alpha channel of the image respectively; and the image storing the coordinates and identifiers of the sub-patch models is exported as a coordinate map of a preset type. In one embodiment, the generation module 406 is also used to generate a texture map. Correspondingly, the acquisition module 401 is used to obtain the target model composed of multiple sub-patch models, the texture map of the target model, and the coordinate map; parse the values ​​of the RGB channels of the coordinate map to obtain the coordinates of the sub-patch model; parse the alpha value of the alpha channel of the coordinate map, and convert the alpha value into an integer to obtain the identifier of the sub-patch model.

[0142] The coordinates of the sub-face model include the center coordinates of the center point of the sub-face model. Optionally, Figure 8 As shown, the target model animation implementation device 400 further includes a fourth determination module 407. The fourth determination module 407 is configured to generate a rotation value; based on the rotation value, the sub-mesh model is rotated along the center coordinates of the sub-mesh model to obtain rotation data for the sub-mesh model. Correspondingly, the third determination module 404 is configured to determine the target position of the vertices of the sub-mesh model in each frame based on the displacement data, the offset data, and the rotation data.

[0143] All of the above technical solutions can be arbitrarily combined to form optional embodiments of the present application. Please refer to the description of the corresponding parts above for the beneficial effects achieved, and no further details will be given here.

[0144] Accordingly, the embodiment of the present application also provides an electronic device, which may be a terminal or a server. Figure 9 As shown, Figure 9 Schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device 500 includes a processor 501 having one or more processing cores, a memory 502 having one or more computer-readable storage media, and a computer program stored in the memory 502 and executable on the processor. The processor 501 is electrically connected to the memory 502. It will be understood by those skilled in the art that the electronic device structure shown in the figure does not constitute a limitation of the electronic device, and may include more or fewer components than shown, or combine certain components, or arrange the components differently.

[0145] The processor 501 is the control center of the electronic device 500. It uses various interfaces and lines to connect various parts of the entire electronic device 500. By running or loading software programs (computer programs) and / or modules stored in the memory 502, and calling data stored in the memory 502, it executes various functions of the electronic device 500 and processes data, thereby monitoring the electronic device 500 as a whole.

[0146] In the embodiment of the present application, the processor 501 in the electronic device 500 loads instructions corresponding to one or more application processes into the memory 502 according to the following steps, and the processor 501 runs the application stored in the memory 502, thereby implementing the following functions, for example:

[0147] A target model composed of multiple sub-patch models, a texture map of the target model, and the coordinates of the sub-patch model are obtained, wherein the texture map includes the same number of sub-texture maps as the sub-patch models; a starting motion position of the sub-patch model in the starting frame of the animation and a target motion position of the target frame are determined according to the coordinates of the sub-patch model, and displacement data of the vertices of the sub-patch model in each frame between the starting frame and the target frame are determined according to the starting motion position and the target motion position; offset data of the vertices of the sub-patch model in each frame are determined according to the target shooting direction of the virtual camera; target positions of the vertices of the sub-patch model in each frame are determined according to the displacement data and the offset data; and according to the target position, the sub-texture map is mapped to the sub-patch model to achieve the animation effect of the target model.

[0148] Among them, when the processor 501 executes the step of determining the offset data of the vertices of the sub-patch model in each frame according to the target shooting direction of the virtual camera, it specifically performs: determining the target coordinates of the vertices of the sub-patch model in each frame according to the target shooting direction of the virtual camera; determining the offset data of the vertices of the sub-patch model in each frame according to the difference between the coordinates of the vertices of the sub-patch model in each frame and the target coordinates.

[0149] The target shooting direction is parallel to the normal direction of the vertices of the sub-face model.

[0150] Among them, when the processor 501 executes the step of mapping the sub-texture map to the sub-patch model according to the target position, it specifically performs: determining the sub-texture map identifier corresponding to the target position; sampling from the texture map according to the sub-texture map identifier to obtain the sub-texture map corresponding to the sub-texture map identifier; and mapping the sub-texture map to the sub-patch model.

[0151] After obtaining the sub-texture map corresponding to the sub-texture map identifier, the processor 501 further executes: setting the transparency of the sub-texture map; and mapping the sub-texture map with the set transparency to the sub-patch model.

[0152] Among them, when the processor 501 executes the step of determining the starting motion position of the sub-patch model in the starting frame of the animation and the target motion position of the target frame according to the coordinates of the sub-patch model, it specifically performs: determining the coordinates of the sub-patch model as the starting motion position of the sub-patch model in the starting frame of the animation; obtaining the preset displacement data corresponding to the sub-patch model; and determining the target motion position of the sub-patch model in the target frame of the animation based on the starting motion position and the preset displacement data.

[0153] Among them, each sub-patch model is correspondingly provided with an identifier of the sub-patch model, and the identifier of the sub-patch model corresponds one-to-one to the coordinates of the sub-patch model. When the processor 501 executes the step of determining the starting motion position of the sub-patch model in the starting frame of the animation and the target motion position of the target frame according to the coordinates of the sub-patch model, it specifically performs: obtaining the starting sampling identifier of the starting frame of the animation, and the starting sampling identifier corresponds to one of the identifiers of the sub-patch model; sampling the coordinates corresponding to the starting sampling identifier from the coordinates of the sub-patch model as the starting motion position of the sub-patch model in the starting frame of the animation; updating the starting sampling identifier to obtain the target sampling identifier of the target frame, and the target sampling identifier corresponds to another one of the identifiers of the sub-patch model; sampling the coordinates corresponding to the target sampling identifier from the coordinates of the sub-patch model as the target motion position of the sub-patch model in the target frame of the animation.

[0154] Among them, when the processor 501 executes the step of determining the displacement data of the vertices of the sub-patch model in each frame between the starting frame and the target frame based on the starting motion position and the target motion position, it specifically performs: using a preset time function to interpolate the starting motion position and the target motion position to obtain multiple interpolation positions; and determining the displacement data of the vertices of the sub-patch model in each frame based on the starting motion position, multiple interpolation positions and the target motion position.

[0155] Among them, before the step of obtaining the coordinates of the sub-patch model, the processor 501 also performs: generating the target model composed of multiple sub-patch models, arranging the multiple sub-patch models in a preset order, and setting the identifier of each sub-patch model; storing the coordinates and identifiers of the sub-patch model into the RGB channel and alpha channel of the image respectively; and exporting the image that saves the coordinates and identifiers of the sub-patch model as a coordinate map of a preset type.

[0156] Among them, when the processor 501 executes the step of obtaining a target model composed of multiple sub-patch models, a texture map of the target model, and the coordinates and identification of the sub-patch model, it specifically performs: obtaining a target model composed of multiple sub-patch models, a texture map of the target model and the coordinate map; parsing the values ​​of the RGB channels of the coordinate map to obtain the coordinates of the sub-patch model; parsing the alpha value of the alpha channel of the coordinate map, and converting the alpha value into an integer to obtain the identification of the sub-patch model.

[0157] Among them, before executing the step of determining the target position of the vertices of the sub-patch model in each frame according to the displacement data and the offset data, the processor 501 also executes: generating a rotation value; rotating the sub-patch model along the coordinates of the sub-patch model according to the rotation value to obtain the rotation data of the vertices of the sub-patch model; correspondingly, when executing the step of determining the target position of the vertices of the sub-patch model in each frame according to the displacement data and the offset data, the processor 501 specifically executes: determining the target position of the vertices of the sub-patch model in each frame according to the displacement data, the offset data and the rotation data.

[0158] The specific implementation of each of the above operations and the beneficial effects achieved can be found in the previous embodiments and will not be described in detail here.

[0159] Optional, such as Figure 9 As shown, the electronic device 500 further includes: a touch screen 503, a radio frequency circuit 504, an audio circuit 505, an input unit 506, and a power supply 507. Among them, the processor 501 is electrically connected to the touch screen 503, the radio frequency circuit 504, the audio circuit 505, the input unit 506, and the power supply 507 respectively. Those skilled in the art will understand that Figure 9 The electronic device structure shown in the figure does not constitute a limitation to the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0160] The touch screen 503 can be used to display a graphical user interface and receive user actions on the operation instructions generated by the graphical user interface. The touch screen 503 can include a display panel and a touch panel. Among them, the display panel can be used to display information input by the user or information provided to the user and various graphical user interfaces of the electronic device, and these graphical user interfaces can be composed of graphics, text, icons, videos and any combination thereof. Optionally, a liquid crystal display (LCD), an organic light emitting diode (OLED), or the like can be used to configure the display panel. The touch panel can be used to collect user touch operations on or near it (such as the user uses any suitable object or accessory such as a finger, stylus, etc. on or near the touch panel), and generate corresponding operation instructions, and the operation instructions execute corresponding programs. The touch panel can cover the display panel, and when the touch panel detects a touch operation on or near it, it is transmitted to the processor 501 to determine the type of touch event, and then the processor 501 provides corresponding visual output on the display panel according to the type of touch event. In the embodiment of the present application, the touch panel and the display panel can be integrated into the touch display screen 503 to implement input and output functions. However, in some embodiments, the touch panel and the display panel can be used as two independent components to implement input and output functions. In other words, the touch display screen 503 can also be used as part of the input unit 506 to implement input functions.

[0161] In the embodiment of the present application, the touch display screen 503 is used to present a graphical user interface and receive operation instructions generated by the user acting on the graphical user interface.

[0162] The radio frequency circuit 504 may be used to transmit and receive radio frequency signals, so as to establish wireless communication with a network device or other electronic devices through wireless communication, and to transmit and receive signals with the network device or other electronic devices.

[0163] The audio circuit 505 can be used to provide an audio interface between the user and the electronic device through a speaker and microphone. The audio circuit 505 can convert the received audio data into an electrical signal and transmit it to the speaker, which then converts it into a sound signal for output. The microphone, on the other hand, converts the collected sound signal into an electrical signal, which is received by the audio circuit 505 and converted into audio data. The audio data is then output to the processor 501 for processing, and then transmitted to another electronic device through the radio frequency circuit 504, or the audio data is output to the memory 502 for further processing. The audio circuit 505 may also include an earphone jack to provide communication between an external headset and the electronic device.

[0164] The input unit 506 may be configured to receive input digital, character information, or user feature information (such as fingerprint, iris, or facial information), and to generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control.

[0165] The power supply 507 is used to supply power to the various components of the electronic device 500. Optionally, the power supply 507 can be logically connected to the processor 501 via a power management system, thereby enabling the power management system to manage charging, discharging, and power consumption. The power supply 507 can also include one or more DC or AC power supplies, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and other arbitrary components.

[0166] although Figure 9 Not shown in the figure, the electronic device 500 may further include a camera, a sensor, a wireless fidelity module, a Bluetooth module, etc., which will not be described in detail here.

[0167] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0168] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be completed by instructions (computer programs) or by controlling related hardware through instructions (computer programs). The instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.

[0169] To this end, an embodiment of the present application provides a computer-readable storage medium storing a plurality of computer programs, which can be loaded by a processor to execute the steps of any of the target model animation implementation methods provided in the embodiments of the present application. For example, the computer program can execute the following steps:

[0170] A target model composed of multiple sub-patch models, a texture map of the target model, and the coordinates of the sub-patch model are obtained, wherein the texture map includes the same number of sub-texture maps as the sub-patch models; a starting motion position of the sub-patch model in the starting frame of the animation and a target motion position of the target frame are determined according to the coordinates of the sub-patch model, and displacement data of the vertices of the sub-patch model in each frame between the starting frame and the target frame are determined according to the starting motion position and the target motion position; offset data of the vertices of the sub-patch model in each frame are determined according to the target shooting direction of the virtual camera; target positions of the vertices of the sub-patch model in each frame are determined according to the displacement data and the offset data; and according to the target position, the sub-texture map is mapped to the sub-patch model to achieve the animation effect of the target model.

[0171] Among them, the processor calls the computer program and specifically executes: determining the target coordinates of the vertices of the sub-patch model in each frame according to the target shooting direction of the virtual camera; determining the offset data of the vertices of the sub-patch model in each frame according to the difference between the coordinates of the vertices of the sub-patch model in each frame and the target coordinates.

[0172] The target shooting direction is parallel to the normal direction of the vertices of the sub-face model.

[0173] Among them, the processor calls the computer program and specifically executes: determining the sub-texture map identifier corresponding to the target position; sampling from the texture map according to the sub-texture map identifier to obtain the sub-texture map corresponding to the sub-texture map identifier; and mapping the sub-texture map to the sub-patch model.

[0174] The processor calls a computer program, and after obtaining the sub-texture map corresponding to the sub-texture map identifier, further executes: setting the transparency of the sub-texture map; and mapping the sub-texture map with the set transparency to the sub-patch model.

[0175] Among them, the processor calls the computer program and specifically executes: determining the coordinates of the sub-patch model as the starting movement position of the sub-patch model in the starting frame of the animation; obtaining preset displacement data corresponding to the sub-patch model; and determining the target movement position of the sub-patch model in the target frame of the animation based on the starting movement position and the preset displacement data.

[0176] Among them, each sub-patch model is correspondingly provided with an identifier of the sub-patch model, and the identifier of the sub-patch model corresponds one-to-one to the coordinates of the sub-patch model. The processor calls the computer program and specifically executes: obtaining the starting sampling identifier of the starting frame of the animation, and the starting sampling identifier corresponds to one of the identifiers of the sub-patch model; sampling the coordinates corresponding to the starting sampling identifier from the coordinates of the sub-patch model as the starting movement position of the sub-patch model in the starting frame of the animation; updating the starting sampling identifier to obtain the target sampling identifier of the target frame, and the target sampling identifier corresponds to another one of the identifiers of the sub-patch model; sampling the coordinates corresponding to the target sampling identifier from the coordinates of the sub-patch model as the target movement position of the sub-patch model in the target frame of the animation.

[0177] The processor calls the computer program and specifically performs the following steps: interpolating the starting motion position and the target motion position using a preset time function to obtain multiple interpolation positions; and determining the displacement data of the vertices of the sub-face model in each frame based on the starting motion position, the multiple interpolation positions, and the target motion position.

[0178] Among them, the processor calls a computer program, and before the step of obtaining the coordinates of the sub-patch model, further executes: generating the target model composed of multiple sub-patch models, the multiple sub-patch models are arranged in a preset order, and the identifier of each sub-patch model is set; storing the coordinates and identifiers of the sub-patch model into the RGB channel and alpha channel of the image respectively; and exporting the image that saves the coordinates and identifiers of the sub-patch model as a coordinate map of a preset type.

[0179] The processor calls the computer program and specifically executes the following steps: obtaining a target model composed of a plurality of sub-patch models, a texture map of the target model, and the coordinate map; parsing the values ​​of the RGB channels of the coordinate map to obtain the coordinates of the sub-patch model; parsing the alpha value of the alpha channel of the coordinate map, and converting the alpha value into an integer to obtain the identifier of the sub-patch model.

[0180] Among them, the processor calls the computer program and also executes: generating a rotation value; rotating the sub-patch model along the coordinates of the sub-patch model according to the rotation value to obtain the rotation data of the vertices of the sub-patch model; correspondingly, the processor calls the computer program and also specifically executes: determining the target position of the vertices of the sub-patch model in each frame according to the displacement data, the offset data and the rotation data.

[0181] The specific implementation of each of the above operations and the beneficial effects achieved can be found in the previous embodiments and will not be described in detail here.

[0182] The storage medium may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0183] Since the computer program stored in the storage medium can execute the steps in any method for realizing the animation of a target model provided in the embodiments of the present application, the beneficial effects that can be achieved by any method for realizing the animation of a target model provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.

[0184] The above is a detailed introduction to the animation implementation method, device, storage medium and electronic device of a target model provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, based on the ideas of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A method for realizing animation of a target model, characterized in that: include: Acquire a target model composed of a plurality of sub-patch models, a texture map of the target model, and coordinates of the sub-patch models, wherein the texture map includes the same number of sub-texture maps as the sub-patch models; Determining a starting motion position of the sub-mesh model in a starting frame and a target motion position of the target frame of the animation according to the coordinates of the sub-mesh model, and determining displacement data of vertices of the sub-mesh model in each frame between the starting frame and the target frame according to the starting motion position and the target motion position; Determining the offset data of the vertices of the sub-face model in each frame according to the target shooting direction of the virtual camera; Determining target positions of vertices of the sub-face model in each frame according to the displacement data and the offset data; According to the target position, the sub-texture map is mapped to the sub-face model to achieve an animation effect of the target model.

2. The method for realizing animation of a target model according to claim 1, characterized in that: The step of determining the offset data of the vertices of the sub-face model in each frame according to the target shooting direction of the virtual camera includes: Determining target coordinates of vertices of the sub-face model in each frame according to a target shooting direction of the virtual camera; The offset data of the vertices of the sub-mesh model in each frame are determined according to the difference between the coordinates of the vertices of the sub-mesh model in each frame and the target coordinates.

3. The method for realizing animation of a target model according to claim 1 or 2, characterized in that: The target shooting direction is parallel to the normal direction of the vertices of the sub-face model.

4. The method for realizing animation of a target model according to claim 1, characterized in that: The step of mapping the sub-texture map to the sub-face model according to the target position includes: Determine the sub-texture map identifier corresponding to the target position; Sampling from the texture map according to the sub-texture map identifier to obtain a sub-texture map corresponding to the sub-texture map identifier; The sub-texture map is mapped into the sub-patch model.

5. The method for realizing animation of a target model according to claim 4, characterized in that: After obtaining the sub-texture map corresponding to the sub-texture map identifier, the method further includes: Set the transparency of the sub-texture map; The sub-texture map with the transparency set is mapped into the sub-patch model.

6. The method for realizing animation of a target model according to claim 1, characterized in that: Each sub-patch model is correspondingly provided with an identifier of the sub-patch model, and the identifier of the sub-patch model corresponds one-to-one with the coordinates of the sub-patch model. The step of determining the starting motion position of the sub-patch model in the starting frame of the animation and the target motion position of the target frame according to the coordinates of the sub-patch model includes: Obtaining a starting sampling identifier of a starting frame of the animation, wherein the starting sampling identifier corresponds to one of the identifiers of the sub-face model; Sampling the coordinates corresponding to the starting sampling identifier from the coordinates of the sub-mesh model as the starting motion position of the sub-mesh model at the starting frame of the animation; Updating the starting sampling identifier to obtain a target sampling identifier of a target frame, wherein the target sampling identifier corresponds to another identifier of the sub-patch model; Coordinates corresponding to the target sampling identifier are sampled from the coordinates of the sub-patch model as the target motion position of the sub-patch model in the target frame of the animation.

7. The method for realizing animation of a target model according to claim 1, characterized in that: The step of determining the starting motion position of the sub-mesh model in the starting frame and the target motion position of the target frame of the animation according to the coordinates of the sub-mesh model comprises: Determining the coordinates of the sub-face model as the starting motion position of the sub-face model at the starting frame of the animation; Obtaining preset displacement data corresponding to the sub-face model; A target movement position of the sub-mesh model in a target frame of the animation is determined according to the starting movement position and the preset displacement data.

8. The method for realizing animation of a target model according to claim 1, characterized in that: The step of determining the displacement data of the vertices of the sub-face model in each frame between the starting frame and the target frame according to the starting motion position and the target motion position comprises: interpolating the starting motion position and the target motion position using a preset time function to obtain a plurality of interpolated positions; The displacement data of the vertices of the sub-mesh model in each frame are determined according to the starting motion position, the multiple interpolation positions and the target motion position.

9. The method for realizing animation of a target model according to claim 6, characterized in that: Before the step of obtaining a target model composed of a plurality of sub-face models, a texture map of the target model, and coordinates of the sub-face models, the method further includes: Generating the target model composed of a plurality of sub-face models, arranging the plurality of sub-face models in a preset order, and setting an identifier for each sub-face model; Storing the coordinates and identifier of the sub-face model in the RGB channel and alpha channel of the image respectively; Exporting the image storing the coordinates and identification of the sub-face model into a coordinate map of a preset type; The identification of the sub-face model is obtained in the following way: The alpha value of the alpha channel of the coordinate map is parsed, and the alpha value is converted into an integer to obtain an identifier of the sub-patch model.

10. The method for realizing animation of a target model according to claim 9, characterized in that: The step of obtaining a target model composed of a plurality of sub-face models, a texture map of the target model, and coordinates of the sub-face models includes: Acquire a target model composed of a plurality of sub-face models, a texture map of the target model, and the coordinate map; The values ​​of the RGB channels of the coordinate map are parsed to obtain the coordinates of the sub-patch model.

11. The method for realizing animation of a target model according to claim 1, characterized in that: Before the step of determining the starting motion position of the sub-surface model at the starting frame and the target motion position of the target frame of the animation according to the coordinates of the sub-surface model, the method further includes: Generate rotation value; According to the rotation value, the sub-mesh model is rotated along the coordinates of the sub-mesh model to obtain rotation data of the vertices of the sub-mesh model; The step of determining the target position of the vertices of the sub-face model in each frame according to the displacement data and the offset data comprises: The target positions of the vertices of the sub-patch model in each frame are determined according to the displacement data, the offset data and the rotation data.

12. A device for realizing animation of a target model, characterized in that: include: An acquisition module, configured to acquire a target model composed of a plurality of sub-patch models, a texture map of the target model, and coordinates of the sub-patch models, wherein the texture map includes the same number of sub-texture maps as the sub-patch models; a first determining module, configured to determine, based on the coordinates of the sub-mesh model, a starting motion position of the sub-mesh model in a starting frame of the animation and a target motion position of the target frame, and to determine, based on the starting motion position and the target motion position, displacement data of vertices of the sub-mesh model in each frame corresponding to the starting frame and the target frame; A second determining module is used to determine the offset data of the vertices of the sub-face model in each frame according to the target shooting direction of the virtual camera; A third determining module is configured to determine a target position of a vertex of the sub-face model in each frame according to the displacement data and the offset data; A mapping module is used to map the sub-texture map to the sub-face model according to the target position to achieve an animation effect of the target model.

13. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and the computer program is suitable for being loaded by a processor to execute the steps in the method for realizing animation of a target model according to any one of claims 1 to 11.

14. An electronic device, characterized in that: The electronic device includes a memory and a processor, wherein a computer program is stored in the memory, and the processor executes the steps of the target model animation implementation method according to any one of claims 1 to 11 by calling the computer program stored in the memory.

Citation Information

Patent Citations

  • Animation generation method, animation playing method and related devices

    CN112037311A

  • Virtual object wind animation rendering method and device, storage medium and electronic device

    CN112200896A