Video generation methods, apparatus, electronic devices and storage media

By retrieving animation textures and generating target animation videos when animation playback conditions are detected, the problem of animation video rendering under the limited performance of terminal devices is solved, enabling rapid generation and efficient rendering of target animation videos and improving user experience.

CN115690268BActive Publication Date: 2026-11-10BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211193793.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-28
Publication Date
2026-11-10
Estimated Expiration
2042-09-28

AI Technical Summary

Technical Problem

Existing technologies require storing the model structure of each frame of animation when playing the animation video corresponding to the target object. This results in large data storage requirements and high performance requirements for terminal devices, which may lead to device crashes and stuttering, and a poor user experience.

Method used

When the target object in the video frame to be processed is detected to meet the animation playback conditions, the corresponding animation map of the target object is retrieved, and the target animation video, including vertex animation map, normal map and vertex color map, is generated based on the animation map and playback parameters, thereby reducing data storage and improving rendering efficiency.

Benefits of technology

While reducing data storage, the system can quickly generate target animation videos, improving the response speed of terminal devices and user experience, and achieving efficient animation video rendering.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115690268B_ABST
    Figure CN115690268B_ABST
Patent Text Reader

Abstract

This disclosure provides a video generation method, apparatus, electronic device, and storage medium. The method includes: when a target object in a video frame to be processed is detected to meet animation playback conditions, retrieving an animation texture corresponding to the target object; and determining a target animation video corresponding to the target object based on the animation texture and animation playback parameters corresponding to the target object. The technical solution provided by this disclosure achieves the effect of quickly generating a target animation video corresponding to a target object while reducing the amount of animation data stored, thus improving the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of image processing technology, and more particularly to a video generation method, apparatus, electronic device, and storage medium. Background Technology

[0002] With the continuous development of image processing technology, the video processing functions integrated into related application software are also constantly being enriched. For example, it is possible to play animated videos corresponding to target objects based on terminal devices.

[0003] In existing technologies, when playing an animated video corresponding to a target object, it is usually necessary to store the model structure corresponding to the target object so that the corresponding model structure can be called to render and display during playback.

[0004] However, the above method has the problem of requiring the storage of the model structure corresponding to each frame of the animation video in order to retrieve the corresponding model structure for rendering and display. This results in a large data storage requirement and high performance requirements for the terminal device during rendering. Therefore, under conditions of limited terminal device performance, problems such as device crashes and lag may occur, preventing the corresponding animation video from being rendered and leading to a poor user experience. Summary of the Invention

[0005] This disclosure provides a video generation method, apparatus, electronic device, and storage medium to achieve the effect of quickly generating a target animation video corresponding to a target object while reducing the amount of animation data stored.

[0006] In a first aspect, embodiments of this disclosure provide a video generation method, the method comprising:

[0007] When a target object in a video frame to be processed is detected to meet the animation playback conditions, the animation texture corresponding to the target object is retrieved.

[0008] Based on the animated texture and the animation playback parameters corresponding to the target object, a target animated video corresponding to the target object is determined.

[0009] Secondly, embodiments of this disclosure also provide a video generation apparatus, the apparatus comprising:

[0010] The animation texture retrieval module is used to retrieve the animation texture corresponding to the target object when the target object in the video frame to be processed meets the animation playback conditions.

[0011] The target animation video determination module is used to determine the target animation video corresponding to the target object based on the animation texture and the animation playback parameters corresponding to the target object.

[0012] Thirdly, embodiments of this disclosure also provide an electronic device, the electronic device comprising:

[0013] One or more processors;

[0014] Storage device for storing one or more programs.

[0015] When the one or more programs are executed by the one or more processors, the one or more processors implement the video generation method as described in any embodiment of this disclosure.

[0016] Fourthly, embodiments of this disclosure also provide a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform the video generation method as described in any of the embodiments of this disclosure.

[0017] The technical solution of this disclosure, by detecting that the target object in the video frame to be processed meets the animation playback conditions, retrieves the animation texture corresponding to the target object, and then determines the target animation video corresponding to the target object based on the animation texture and the animation playback parameters corresponding to the target object. This solves the problem that the corresponding target animation video cannot be rendered when rendering the target animation video under the condition of limited terminal device performance. It achieves the effect of quickly generating the target animation video corresponding to the target object while reducing the amount of animation data storage, thus improving the user experience. Attached Figure Description

[0018] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale.

[0019] Figure 1 This is a schematic diagram of the process for creating vertex animation textures provided in the embodiments of this disclosure;

[0020] Figure 2 This is a schematic diagram of a vertex animation texture provided in an embodiment of this disclosure;

[0021] Figure 3 This is a schematic flowchart of a video generation method provided in an embodiment of this disclosure;

[0022] Figure 4 This is a schematic flowchart of a video generation method provided in an embodiment of this disclosure;

[0023] Figure 5 This is a schematic diagram of the structure of a video generation device provided in an embodiment of this disclosure;

[0024] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation

[0025] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.

[0026] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.

[0027] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below.

[0028] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.

[0029] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".

[0030] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.

[0031] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.

[0032] For example, upon receiving a user's active request, a prompt message is sent to the user to explicitly inform them that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the software or hardware, such as the electronic device, application, server, or storage medium performing the operations of this disclosed technical solution, based on the prompt message.

[0033] As an optional but non-limiting implementation, in response to a user's active request, sending a prompt message to the user can be done via a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0034] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.

[0035] It is understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and related provisions.

[0036] Before introducing this technical solution, an exemplary application scenario can be provided. The technical solution of this disclosure embodiment can be applied to any display screen where an animated video of a target object needs to be played. For example, the display interface may include multiple target objects. When an animated video corresponding to any target object needs to be played, an animation texture corresponding to the target object can be pre-stored. When the target object triggers the animation playback condition, the corresponding animation texture can be retrieved to determine the corresponding target animated video based on the animation texture. The pixel value of each pixel in the animation texture can represent the display position of the target model corresponding to the target object in the display interface, thereby rendering the target animated video corresponding to the target object while reducing data storage requirements.

[0037] Based on this, we can first introduce how to generate the target model corresponding to the target object and the animation texture corresponding to the target object.

[0038] Figure 1 This is a schematic diagram of the process of creating vertex animation textures according to the embodiments of this disclosure. The embodiments of this disclosure are applicable to scenarios in which a corresponding animation texture is generated based on a preset animation of a predetermined target object, and a target animation video is constructed in real-time rendering based on the animation texture. The technical solution provided by the embodiments of this disclosure can be implemented by software or hardware, and optionally, it can be executed by a server.

[0039] like Figure 1 As shown, the method includes:

[0040] S110. Create a target model corresponding to the target object, and a preset animation video corresponding to the target object.

[0041] In this embodiment, the target object can be any object displayed on the display interface or any object added to the display interface. In practical applications, if an object needs to have a corresponding animated texture created, this object can be used as the target object. For example, the target object can be a tree or a flower. Correspondingly, the target model can be a 3D model built based on the target object. The target model is composed of at least one facet, and each facet can be composed of at least three vertices. The facets can be used as a mesh model, and the vertices can be used as model vertices.

[0042] In practical applications, the target object can be a dynamically growing object. For example, during the process of a sapling growing into a large tree, any form of the tree during its growth can be considered the target object. When the target object is growing, the number of vertices in its corresponding target model can be considered to be consistent. By adjusting the display position of each model vertex, different model structures can be determined to obtain target models corresponding to different growth stages of the target object.

[0043] In this embodiment, the preset animation video can be a video reflecting the growth process of the target object. The preset animation video includes at least two preset video frames. For example, when the target object is a tree, the corresponding preset animation video can be a video frame constructed based on the tree's growth information at each time point. For instance, a video frame depicting the growth process from a sapling to a towering tree can be used as the preset video frame.

[0044] In practical applications, during the application development phase, a target model corresponding to the target object can be created based on the shape and pixel information of the target object. At the same time, the growth process of the target object can be analyzed to determine the growth status of the target object at different timestamps, thereby determining the spatial position information of each model vertex in the target model at the corresponding timestamp, and generating corresponding preset video frames. By stitching together the preset video frames, a preset animation video can be obtained.

[0045] S120. Create a vertex animation texture based on the vertex information of at least one model vertex on the target model in the corresponding preset video frame.

[0046] In this embodiment, after obtaining the preset animation video, the model structure of the target model in each preset video frame of the preset animation video can be determined to obtain the vertex information of each model vertex in the corresponding preset video. The vertex information can be spatial position information. In practical applications, after obtaining the vertex information of each model vertex in the corresponding video frame, the vertex information in each preset video frame can be analyzed and processed, and based on the processed vertex information, a corresponding vertex animation texture can be generated. Those skilled in the art should understand that a vertex animation texture (VAT) can be a texture that stores the position information of the model vertices of the target model in the corresponding preset video frame.

[0047] The following is a detailed introduction to the content information of vertex animation textures: Vertex animation textures include multiple pixels. The row number of a pixel corresponds to the nth frame of the preset video frame in the preset animation video, and the column corresponds to the mth model vertex. The model vertices are the vertices of each mesh model that constitute the target model, and the target model corresponds to the target object.

[0048] In this embodiment, the vertex animation map can be composed of at least one row of animation data and at least one column of animation data. The rows in the vertex animation map can represent each preset video frame contained in the preset animation video; that is, each row of pixel information can correspond to each video frame in the preset animation video, and the row arrangement order in the vertex animation map can match the arrangement order of the preset video frames in the preset video. The columns in the vertex animation map can represent each model vertex. For example, if the target model has a total of 100 model vertices and the preset animation video has 20 preset video frames, then the final generated vertex animation map will have 100 columns and 20 rows. The advantage of this setup is that the animation data of each preset video frame in the preset animation video can be stored in a single vertex animation map, reducing the memory occupied by the terminal device and thus improving the generation efficiency of the target animation video.

[0049] It should be noted that the total number of vertices of the target model can be predetermined, and the vertices of each model can be arranged in a preset order and assigned corresponding numbers. In this case, the total number of columns in the vertex animation texture can be matched with the total number of vertices of the target model, and the arrangement order of each column in the vertex animation texture can be determined according to the number corresponding to each vertex of the model.

[0050] Those skilled in the art should understand that in vertex animation mapping, the pixel information of each model vertex of the target model can be stored in a row of data, and the sequence number of each model vertex with pixel information in each preset video frame can be determined, so that the pixel information of each model vertex in the corresponding preset video frame can be stored in the corresponding column.

[0051] Optionally, the pixel value of a pixel is used to represent the spatial location information of the m-th model vertex in the n-th preset video frame.

[0052] In this embodiment, the pixel values ​​of each pixel in the vertex animation texture can correspond to the spatial position information of the model vertices in a preset video frame. For example, such as... Figure 2 As shown, the target model has a total of 8 vertices, and the preset animation video can contain n preset video frames. The preset animation video corresponding to the target model is converted into a vertex animation map. The rows in the vertex animation map can represent the n preset video frames, and the columns in the vertex animation map can represent the total number of vertices in the target model. Furthermore, the model vertices contained in different rows can be inconsistent. For example, the nth row, i.e., the nth frame, can correspond to 8 model vertices. The pixel values ​​in the first row and second column of the vertex animation map can correspond to the spatial position information of vertex 1 in the 0th frame. The advantage of this setting is that the animation data of each preset video frame in the preset animation video can be stored in a single vertex animation map, which can reduce the memory occupied by the terminal device and thus improve the generation efficiency of the target animation video.

[0053] The following section explains the specific process of creating vertex animation textures.

[0054] Optionally, based on the vertex information of at least one model vertex on the target model in the corresponding preset video frame, a vertex animation texture is created, including: for each preset video frame, determining the target vertex information of at least one model vertex on the target model in the current preset video frame; and determining the vertex animation texture based on the playback position of the current preset video frame in the preset animation video and the storage column of at least one model vertex in the vertex animation texture.

[0055] The target vertex information includes spatial location. In practical applications, for each preset video frame, the target vertex information of each model vertex on the target model in the current preset video frame can be determined, that is, the spatial coordinates of each model vertex. Then, based on the timestamp information displayed in the current preset video frame, the playback position of the current preset video frame in the preset animation video is determined. Furthermore, based on the target vertex information of each model vertex in each preset video frame, the storage columns in the vertex animation map are determined. That is, each model vertex in the corresponding preset video frame can correspond to a column in the vertex animation map, so that the vertex animation map is determined based on the playback position and each storage column. The advantage of this setting is that it can reduce the amount of data storage, storing all the vertex animation data in multiple video frames into a single vertex animation map, and then implementing the rendering process based on the vertex animation map, thereby improving rendering efficiency.

[0056] Optionally, based on the playback position of the current preset video frame in the preset animation video and the storage column of at least one model vertex in the vertex animation map, the vertex animation map is determined, including: determining the storage row of the target vertex information of at least one model vertex in the current preset video frame in the vertex animation map; based on the storage row and the storage column of each model vertex in the vertex animation map, converting the target vertex information into pixel values ​​and filling them into the vertex animation map, so as to determine the target animation video of the target object based on the vertex animation map.

[0057] In practical applications, after determining the playback position of the current preset video frame within the preset animation video, the storage row of the target vertex information of each model vertex in the current preset video frame in the vertex animation map can be determined based on the playback position. That is, based on the playback position, the row in the vertex animation map corresponding to the current preset video frame can be determined, and the data stored in that row can correspond to the target vertex information of each model vertex. Then, based on the target vertex information of each model vertex in each preset video frame, the storage column in the vertex animation map is determined. That is, each model vertex in the corresponding preset video frame can correspond to a column in the vertex animation map. For example, if the current preset video frame is the 5th frame of the preset animation video, and this frame contains 50 model vertices whose target vertex information can be detected, then the corresponding storage row in the vertex animation map can be determined to be the 5th row, and the storage column can be the corresponding column of the 50 model vertices whose target vertex information can be detected in the vertex animation map.

[0058] Furthermore, based on the storage rows and columns, the range of target vertex information, and the range of vertex animation maps, a linear mapping can be performed on each target vertex to obtain the corresponding pixel values. These pixel values ​​are then filled into the vertex animation map to obtain a vertex animation map corresponding to the target object. This allows for the determination of the target animation video corresponding to the target object in subsequent applications based on the vertex animation map. The advantage of this setup is that it reduces data storage by storing all vertex animation data from multiple video frames into a single vertex animation map, thereby improving rendering efficiency.

[0059] The technical solution of this disclosure, by creating a target model corresponding to the target object and a preset animation video corresponding to the target object, and then creating a vertex animation texture based on the vertex information of at least one model vertex on the target model on the corresponding preset video frame, solves the problem of storing the model structure corresponding to each video frame in the terminal device before playing the target animation video corresponding to the target object, thereby reducing the amount of data storage and improving the response speed of the terminal device.

[0060] Building upon the above embodiments, in order to render target animation videos that more closely match the target objects in the real scene, normal maps can also be created. The following sections will detail how to create normal maps and the benefits of doing so.

[0061] Based on this, in addition to the above technical solutions, it also includes: determining the normal information of at least one model vertex in the current preset video frame; and filling the normal information into a normal map that matches the corresponding pixel in the vertex animation map.

[0062] In this embodiment, the normal map can be a map where normals are drawn on each model vertex, and the direction of the normals is marked by RGB colors. The normal map stores the direction of the normals of each model vertex in tangent space; that is, the Z-axis is the direction of the normals of the model vertex, the X-axis is the direction of the tangents of the model vertex, and the Y-axis is the direction of the secondary tangents of the model vertex. It should be noted that in the normal map, the range of each coordinate axis can be within the range of [-1, 1]. Similar to the vertex animation map, the rows of the normal map can be used to represent each preset video frame of the preset animation video, and the columns of the normal map can be used to represent the model vertices in the corresponding preset video frames. Unlike the vertex animation map, the normal map is generated based on the normal information of each model vertex in the target model. Therefore, the pixel value of each pixel in the normal map can be used to represent the normal information corresponding to the model vertex in the corresponding preset video frame.

[0063] In practical applications, for each preset video frame, the vertex position information of each model vertex in the current preset video frame can be determined, and the corresponding normal information can be determined based on the vertex position information. Furthermore, the position information of the pixel points corresponding to each model vertex in the current preset video frame in the vertex animation map can be determined, and the pixel points that are consistent with the position information of these pixel points can be determined in the normal map, so that the normal information can be filled into the corresponding pixel points of the normal map.

[0064] The advantage of this setup is that it allows for the creation of a normal map corresponding to the vertex animation map. This enables the vertex animation map and the normal map to be combined in subsequent applications to render the target object, improving the stereoscopic rendering effect of the target object and further enhancing the display effect of the target animation video.

[0065] It's worth noting that in order to achieve rich color effects in the rendered target animation video, vertex color maps can be created in advance. The following sections will detail how to create vertex color maps and their benefits.

[0066] Based on the above technical solutions, it also includes: determining the color information of at least one model vertex in the current preset video frame; and filling the color information into a vertex color map that matches the corresponding pixel in the vertex animation map.

[0067] In this embodiment, the vertex color map can be a map used to represent the color information of each model vertex. Similar to the vertex animation map, the rows of the vertex color map can be used to represent each preset video frame in the preset animation video, and the columns of the vertex color map can be used to represent the model vertices in the corresponding preset video frames; unlike the vertex animation map, the pixel values ​​of the pixels in the vertex color map can be used to represent the color information of each model vertex in the corresponding preset video frame.

[0068] In practical applications, for each preset video frame, the color information of each model vertex in the current preset video frame can be determined based on the color information displayed in the current preset video frame. Furthermore, the position information of the pixel points corresponding to each model vertex in the current preset video frame can be determined in the vertex animation texture map, and each pixel point consistent with the position information of these pixel points can be determined in the vertex color texture map, so that each color information can be filled into the corresponding position in the vertex color texture map.

[0069] The advantage of this setup is that it allows for the creation of vertex color maps corresponding to vertex animation maps. This enables the combination of vertex color maps, normal maps, and vertex animation maps in subsequent applications to render the target object. The rendered target object can then possess a rich array of color effects, further enhancing the display quality of the target animation video.

[0070] Figure 3 This is a schematic flowchart of a video generation method provided in this disclosure. This disclosure is applicable to the situation where a target animation video corresponding to a target object is determined based on a pre-built animation texture. The method can be executed by a video generation device, which can be implemented in the form of software and / or hardware. Optionally, it can be implemented by an electronic device, such as a mobile terminal, a PC, or a server.

[0071] like Figure 3 As shown, the method includes:

[0072] S210. When the target object in the video frame to be processed is detected to meet the animation playback conditions, the animation texture corresponding to the target object is retrieved.

[0073] The apparatus for executing the method for generating special effects videos provided in this embodiment can be integrated into application software that supports special effects video processing functions. This software can be installed on an electronic device, optionally a mobile terminal or a PC. The application software can be a type of software for image / video processing; specific application software will not be detailed here, as long as it can perform image / video processing. Alternatively, it can be a specially developed application program for adding and displaying special effects, or it can be integrated into a corresponding page, allowing users to process special effects videos through the integrated page on a PC.

[0074] It should be noted that a video frame may include multiple target objects, or the user may add target objects to the video frame. Therefore, the technical solution based on this example can generate a target animation video corresponding to the target objects. For each target object, the solution provided in this disclosure embodiment can be used to determine its corresponding target animation video.

[0075] In this embodiment, the video frame to be processed can be a frame from the currently playing video, or, when the user adds a target object to the video frame, the video frame corresponding to the addition of the target object can be used as the video frame to be processed. Accordingly, the video frame to be processed includes the target object, which can be any object displayed or added to the video frame to be processed. For example, the target object can be a tree or a flower, etc.

[0076] In practical applications, the animation texture corresponding to the target object can usually be retrieved only when certain animation playback conditions are triggered. The animation playback conditions include at least one of the following: the target object is displayed in the video frame to be processed; the target object is clicked; or the display duration of the target object is detected to have reached a preset display duration threshold.

[0077] In practical implementation, target objects can be predefined. This means that objects can be pre-marked as target objects based on requirements, so that when an object appears in the video frame to be processed, the animation playback condition is considered met. Alternatively, the image information of the target objects can be pre-stored in the terminal device. When several images are detected in the video frame to be processed, and the target object's preset image information is among those images, the animation playback condition is determined to be met. Another implementation method is to pre-set the association between the target object and the animation playback trigger control. When a click on the target object is detected, the animation playback control is triggered, thus confirming that the animation playback condition is met. Alternatively, when the target object is detected and placed in the video frame to be processed, the animation playback condition is considered triggered. Yet another implementation method is to display a countdown timer on the display interface while displaying the target object in the video frame to be processed. The countdown time is the preset display duration threshold for the corresponding target object. It can be understood that when the display duration of the target object in the video frame to be processed reaches the preset duration threshold, i.e., when the countdown reaches zero, the animation playback condition is determined to be met. The advantages of this setting are that it increases the diversity of animation playback conditions and enhances the interactivity between the user and the display interface.

[0078] The animation texture can be an image containing rendering information corresponding to the target object. This texture may contain multiple pixels, with each row representing a specific video frame and each column representing the display position of each vertex on the target model corresponding to the target object within the corresponding video frame. Optionally, the animation texture may include vertex animation textures, normal maps, and vertex color maps. The target model can be created based on the structure corresponding to the target object when it has fully grown. The target model can consist of multiple faces, and each face can consist of at least three model vertices. The position information of each model vertex in the corresponding video frame can be recorded in the animation texture to obtain the corresponding animation texture.

[0079] It should also be noted that the model structure varies for different target objects. Therefore, animation textures corresponding to different target objects can be created to determine the corresponding target animation video based on the corresponding animation textures.

[0080] It should be noted that animation textures can be pre-stored in the terminal device's storage space during the application development phase. In order to facilitate the retrieval of the corresponding animation textures, a relationship between the target object and the corresponding animation texture can be pre-established so that the corresponding target texture can be retrieved from the storage space based on the relationship.

[0081] Optionally, retrieve the animation texture corresponding to the target object, including: retrieving the animation texture of the target object from the texture library based on the object identifier of the target object or its display position in the video frame to be processed.

[0082] In this embodiment, after the growth animation of the target object is constructed, a corresponding object identifier can be set for each target object. Optionally, the name of each target object can be used as the corresponding object identifier. After establishing the association between the object identifier and the animation texture, each animation texture is stored in the texture library. In practical applications, when a target object in the video frame to be processed is detected to meet the animation playback conditions, the object identifier of the target object can be determined, and the animation texture corresponding to the target object can be retrieved from the texture library based on the object identifier.

[0083] Another implementation method is to predetermine the display position of the target object in the video frame to be processed. When the target object is displayed at the corresponding position, the corresponding animation texture can be retrieved from the texture library based on the display position. For example, when the target object is a tree, its display position in the video frame to be processed can be above the ground. Of course, the coordinates of the ground can be predetermined so that when the coordinates of the ground within the range of the tree's display position are detected, the animation texture corresponding to the tree can be retrieved. The advantage of this setup is that it enables fast retrieval of animation textures, thereby rendering the effect of the target animation video corresponding to the target object.

[0084] S220. Based on the animation texture and the animation playback parameters corresponding to the target object, determine the target animation video corresponding to the target object.

[0085] In this embodiment, the animation playback parameters can be parameters that determine the playback status of the target animation video, or they can be understood as parameters such as the number of frames played or the playback duration when playing the target animation video. The animation playback parameters can be user-defined parameters during the development phase. Optionally, the animation playback parameters may include the target number of frames in the target animation video. The target animation video can be a video used to characterize the animation display effect of the target object at different timestamps. For example, when the target object is a tree, the target animation video can be a video used to characterize the complete growth process of the tree from sapling to mature tree. Correspondingly, the target number of frames can be the total number of animation video frames contained in the target animation video.

[0086] Optionally, based on the animation texture and the animation playback parameters corresponding to the target object, the target animation video corresponding to the target object is determined, including: determining the target animation video corresponding to the target object according to the target frame number and the number of rows of the vertex animation texture.

[0087] In practical applications, after retrieving the animation map corresponding to the target object and determining the target frame rate of the target animation video, the vertex animation map contains animation data from the preset animation video. Furthermore, since each row of animation data in the vertex animation map represents each preset video frame in the preset animation video, the target animation video can be generated based on the number of rows in the vertex animation map and the target frame rate of the target animation video. The advantage of this setup is that it allows the target animation video to better match the preset animation video, thereby improving the display effect of the target animation video.

[0088] It should be noted that, in order to improve the display effect of the target animation video on the display interface, when constructing the animation map corresponding to the target object, in addition to the vertex animation map, normal maps and vertex color maps can also be included. When retrieving the animation map corresponding to the target object, a set of animation maps can be retrieved. This set of animation maps can include vertex animation maps, normal maps, and vertex color maps. Based on this set of animation maps, the target animation video can be rendered onto the target object.

[0089] Optionally, the animation texture also includes a normal map, where the pixel values ​​of the pixels in the normal map are used to represent the normal information of the model vertices in the corresponding preset video frames.

[0090] In practical applications, by determining the normal map corresponding to the target object, surfaces with low detail can exhibit precise lighting directions and reflection effects with high detail. For example, after baking a normal map from a high-detail model, it can be applied to the normal map channel of a low-detail model to give its surface a rendering effect with light and shadow distribution. Furthermore, rendering the target object based on the normal map allows for the determination of the rendering plane facing the user in different video frames. This determines which planes need to be rendered and which do not, ensuring that the target object rendering plane in each video frame is the user-facing target object plane when the final target animation video is played on the display interface. The advantage of this setup is that it reduces the area and computational content required during target object rendering, thus optimizing the rendering effect.

[0091] Based on the above technical solutions, the method further includes: obtaining pixel information in the normal map based on the pixel position information of the pixel points in the vertex animation map, determining the normal information of the corresponding model vertex based on the pixel information, and generating the target animation video based on the normal information.

[0092] In this embodiment, pixel position information can be used to characterize the position of each pixel in the vertex animation map. Pixel information can include rendering height values ​​and a lot of information about rendering surface details.

[0093] In practice, the pixel position information of each pixel in the vertex animation map can be determined first. Then, this pixel position information is mapped to the normal map to obtain the corresponding pixel information. Further, this pixel information can be mapped to the target model to obtain the corresponding normal information. Based on the normal information of each model vertex, the rendering plane of the target object can be determined, and corresponding video frames can be generated. By stitching these video frames together, the target animation video can be obtained. The advantage of this setup is that it allows the target object in the animation video to present a more three-dimensional rendering effect, and it adds detail information to the target object during the rendering process, thereby improving the display effect of the target animation video.

[0094] Optionally, the animation texture also includes a vertex color map, where the pixel values ​​of each pixel in the vertex color map are used to represent the color information of each model vertex in the corresponding preset video frame.

[0095] It's important to note that since the pixel information contained in the vertex color map represents the color information of each model's vertices, rendering a target object based solely on vertex color information may result in relatively poor rendering quality. Therefore, after determining the vertex color information, it's also possible to determine the color information of the mesh plane containing each model vertex, thus obtaining a target model with complete color information. This allows us to determine the display color of the target object in the target animation video. The advantage of this approach is that it adds color information to the target object in the animation video, improving its display quality, making it more realistic, and enhancing the user experience.

[0096] Based on this, in addition to the above technical solutions, the method further includes: obtaining pixel information in the vertex color map based on the pixel position information of the pixel points in the vertex animation map; determining the color information of the corresponding model vertices in the target model based on the pixel information and pixel position information; and obtaining the display color of the target object in the target animation video by interpolating the color information of each model vertex.

[0097] In this embodiment, pixel information can be the color channel information of each pixel in the vertex color map. In specific implementation, the pixel position information of each pixel in the vertex animation map can be determined first, and the pixel position information can be mapped to the vertex color map to obtain the pixel information in the vertex color map. Further, based on the pixel information and pixel position information, the color information of each model vertex in the target model can be determined. Then, the color information of each model vertex can be subjected to interpolation processing such as smoothing and blending to obtain the color information of the mesh model where each model vertex is located. In this way, the complete color information of the target model can be obtained, and the target object can be rendered based on the processed target model, thereby finally obtaining the display color of the target object in the target animation video.

[0098] For example, when the color information of the model vertices is red, blue, and green, after interpolating the colors of each model vertex, the color information of the corresponding model plane can be a gradient of the three colors based on the distance between any point in the mesh model plane and each model vertex. That is, the color information of the mesh model plane near the red model vertex can be a deep red, and the color depth gradually decreases as the distance between any point in the mesh model plane and the red model vertex increases; the color information of the mesh model plane near the blue model vertex can be a deep blue, and the color depth gradually decreases as the distance between any point in the mesh model plane and the red model vertex increases; the color information of the mesh model plane near the green model vertex can be a deep green, and the color depth gradually decreases as the distance between any point in the mesh model plane and the red model vertex increases. The advantage of this setting is that it can give the rendered target object a rich color and a smooth color-changing effect, improving the display effect of the target animation video, making it more realistic, and enhancing the user experience.

[0099] It should be noted that after obtaining the target animation video, it can be played back to ensure that the target animation video corresponding to the target object is displayed on the screen.

[0100] In addition to the above technical solutions, it also includes: playing the target animation video according to the preset playback parameters.

[0101] In this embodiment, playback parameters can be parameters used to characterize the playback status of the target animation video, or they can be understood as parameters such as playback duration or playback method when playing the target animation video. Playback parameters can be parameters that are custom-defined and generated by the user during the application development phase. Optionally, playback parameters include loop playback or single playback.

[0102] In practical applications, different playback parameters can be pre-set for each target animation video. After identifying the target animation video corresponding to the target object, the corresponding playback parameters can be determined based on the video identifier of the target animation video, allowing the target animation video to be played according to these parameters. Optionally, the target animation video can be played in a loop or played only once. The advantage of this setup is that it increases the diversity of video playback and improves the display effect of the target animation video.

[0103] The technical solution of this disclosure, by detecting that the target object in the video frame to be processed meets the animation playback conditions, retrieves the animation texture corresponding to the target object, and then determines the target animation video corresponding to the target object based on the animation texture and the animation playback parameters corresponding to the target object. This solves the problem that the corresponding target animation video cannot be rendered when rendering the target animation video under the condition of limited terminal device performance. It achieves the effect of quickly generating the target animation video corresponding to the target object while reducing the amount of animation data storage, thus improving the user experience.

[0104] Figure 4 This is a schematic flowchart of a video generation method provided in this embodiment. Based on the foregoing embodiments, when generating a target animation video corresponding to a target object, it can further determine whether the target frame number matches the number of rows in the vertex animation texture, and generate the corresponding target animation video based on the determination result. Specific implementation details can be found in the technical solution of this embodiment. Technical terms that are the same as or corresponding to those in the above embodiments will not be repeated here.

[0105] like Figure 4 As shown, the method specifically includes the following steps:

[0106] S310. When the target object in the video frame to be processed is detected to meet the animation playback conditions, the animation texture corresponding to the target object is retrieved.

[0107] S320. Determine if the target frame number and the number of rows of the vertex animation texture are consistent. If yes, execute S330-S350; otherwise, execute S360-S380.

[0108] It should be noted that the generation method for the target animation video when the target frame rate is equal to the number of rows in the vertex animation map is different from the generation method when the target frame rate is not equal to the number of rows in the vertex animation map.

[0109] In practice, after determining the vertex animation map corresponding to the target object and the target number of frames in the target animation video, the vertex animation map is generated based on the preset animation video, and the number of rows in the vertex animation map can represent the total number of preset video frames in the preset animation video. In actual applications, the target number of frames and the total number of preset video frames can be the same or different. Therefore, it is possible to determine whether the target number of frames and the number of rows in the vertex animation map are consistent, so as to determine the target animation video corresponding to the target object based on the judgment result.

[0110] S330: Read the pixel values ​​of each row in the vertex animation texture in sequence, and convert the pixel values ​​into target space information.

[0111] In this embodiment, when the target frame number is consistent with the number of rows in the vertex animation map, it can be determined that the target frame number of the target animation video is consistent with the preset video frame number of the preset animation video frame. Since the pixel value of each row in the vertex animation map corresponds to the spatial position information of each model vertex in the target model in the corresponding preset video frame, the pixel value of each row in the vertex animation map can be read sequentially. Furthermore, for each row in the vertex animation map, based on the value range of each pixel value in the vertex animation map and the value range of the spatial position information of each model vertex in the target model, the pixel value of the current row can be converted into the spatial position information of each model vertex through a linear mapping. At this time, the spatial position information can be used as the target spatial information, thereby obtaining the target spatial information of each model vertex in each video frame.

[0112] S340. Based on the target space information, determine the display information of each model vertex in the corresponding video frame.

[0113] In this embodiment, the display information can be the rendering information of each model vertex in the video frame. In practical applications, after obtaining the target space information of each model vertex in each video frame, the display information of each model vertex in the corresponding video frame can be determined based on the target space information, thereby obtaining the display information of each model vertex of the target model in each video frame.

[0114] S350: Based on the display information of each model vertex, determine the target animation video.

[0115] In practical applications, after determining the display information of each model vertex, the target object can be rendered based on the display information, and corresponding video frames can be generated. By stitching the video frames together, the target animation video corresponding to the target object can be obtained.

[0116] The advantage of this setup is that it allows the generation of a target animation video using only the animation data stored in the vertex animation texture. This achieves the effect of quickly generating the target animation video while reducing data storage, saving the generation time and improving the user experience.

[0117] S360. Determine the number of animated video frames to be inserted between two adjacent preset video frames.

[0118] In this embodiment, if the target frame count is greater than the number of rows in the vertex animation map, it can be determined that the target frame count of the target animation video is greater than the preset frame count of the preset animation video. In this case, in order to make the frame count of the preset animation video consistent with the frame count of the target animation video, frame interpolation can be used. The interpolated animation video frames can be new animation video frames added between two adjacent preset video frames.

[0119] In practical applications, we can first determine the difference between the target frame number and the number of rows of the vertex animation map to obtain the difference in the number of video frames between the preset animation video and the target animation video. Furthermore, based on this difference in the number of video frames, we can determine the total number of animation video frames to be inserted into the preset animation video. Finally, based on the total number of inserted frames, we can determine the number of animation video frames to be inserted into two adjacent preset video frames.

[0120] It should be noted that when determining the number of animation video frames to be inserted between two adjacent preset video frames, the total number of inserted frames can be evenly distributed between each pair of adjacent preset video frames, or the total number of inserted frames can be randomly distributed between each pair of adjacent preset video frames. This disclosure does not specifically limit this.

[0121] S370. Based on the pixel values ​​and insertion counts of the same model vertex in two adjacent rows of the vertex animation texture, determine the target space information of each model vertex in the target model in the inserted animation video frame and the preset video frame.

[0122] In practical applications, the pixel values ​​of each row in the vertex animation texture can be read sequentially, and each pixel value can be converted into target space information through linear mapping to obtain the target space information of each model vertex in each preset video frame. At the same time, for the inserted animation video frame, the pixel values ​​of each model vertex in the inserted animation video frame can be determined first through linear interpolation, and then each pixel value can be converted into the target space information of each model vertex in the corresponding inserted animation video frame through linear mapping.

[0123] Specifically, the pixel values ​​corresponding to the same model vertex in two adjacent rows of the vertex animation texture, as well as the number of inserted animation video frames, can be determined. Then, based on linear interpolation, the pixel values ​​of the same model vertex in two adjacent rows in each inserted animation video frame can be determined. Furthermore, each pixel value is converted into target space information through linear mapping, thus obtaining the target space information of each model vertex in the inserted animation video frame.

[0124] S380. Generate the target animation video based on the inserted animation video frames and preset video frames.

[0125] In practical applications, after determining the target spatial information of each model vertex in the inserted animation video frame and the preset video frame, the display information of each model vertex in the inserted animation video frame and the preset video frame can be determined. Based on this display position information, the target object can be rendered to obtain the target animation video corresponding to the target object.

[0126] The advantage of this setting is that it solves the problem of the frame rate not being equal between the animated video and the preset animated video. Furthermore, by determining the pixel information of the inserted frame based on the pixel information of two adjacent frames, more accurate image information can be obtained, thereby improving the display effect of the target animated video.

[0127] The technical solution of this disclosure, when the target object in the video frame to be processed meets the animation playback conditions, retrieves the animation texture corresponding to the target object, then determines whether the number of target frames and the number of rows of vertex animation textures are consistent, and based on the determination result, determines the corresponding target animation video generation method, thereby finally obtaining the target animation video corresponding to the target object. This achieves the effect of making the target animation video more closely match the preset animation video, and enhances the diversity of target animation video generation methods so that a target animation video corresponding to the target object can be obtained in different situations.

[0128] Figure 5 This is a schematic diagram of the structure of a video generation device provided in an embodiment of this disclosure, as shown below. Figure 5 As shown, the device includes: an animation texture retrieval module 410 and a target animation video determination module 420.

[0129] The animation texture retrieval module 410 is used to retrieve the animation texture corresponding to the target object when the target object in the video frame to be processed is detected to meet the animation playback conditions.

[0130] The target animation video determination module 420 is used to determine the target animation video corresponding to the target object based on the animation texture and the animation playback parameters corresponding to the target object.

[0131] Based on the above technical solutions, the animation playback conditions include at least one of the following:

[0132] The target object is displayed in the video frame to be processed;

[0133] Click on the target object;

[0134] The display duration of the target object has been detected to have reached a preset display duration threshold.

[0135] Based on the above technical solutions, the animation texture retrieval module 410 is specifically used to retrieve the animation texture of the target object from the texture library according to the object identifier of the target object or its display position in the video frame to be processed.

[0136] Based on the above technical solutions, the animation texture includes a vertex animation texture, which includes multiple pixels. The row number of the pixel corresponds to the nth frame of the preset video frame in the preset animation video, and the column corresponds to the mth model vertex. The model vertex is the vertex of each mesh model that constitutes the target model, and the target model corresponds to the target object.

[0137] Based on the above technical solutions, the pixel value of the pixel is used to characterize the spatial position information of the m-th model vertex in the n-th preset video frame.

[0138] Based on the above technical solutions, the animation playback parameters include the target frame number of the animation video. The target animation video determination module 420 is specifically used to determine the target animation video corresponding to the target object based on the target frame number and the number of rows of the vertex animation texture.

[0139] Based on the above technical solutions, the target animation video determination module 420 includes: a pixel value reading unit, a display information determination unit, and a target animation video determination unit.

[0140] A pixel value reading unit is used to read the pixel values ​​of each row in the vertex animation texture sequentially if the target frame number is equal to the number of rows, and convert the pixel values ​​into target space information.

[0141] The display information determination unit is used to determine the display information of each model vertex in the corresponding video frame based on the target space information.

[0142] The target animation video determination unit is used to determine the target animation video based on the display information of each model vertex.

[0143] Based on the above technical solutions, the target animation video determination module 420 also includes: an insertion quantity determination unit, a target spatial information determination unit, and a target animation video generation unit.

[0144] An insertion quantity determination unit is used to determine the number of animation video frames to be inserted into two adjacent preset video frames if the target number of frames is greater than the number of rows.

[0145] The target spatial information determination unit is used to determine the target spatial information of each model vertex in the target model in the inserted animation video frame and the preset video frame based on the pixel value corresponding to the same model vertex in two adjacent rows of the vertex animation texture and the number of insertions.

[0146] The target animation video generation unit is used to generate the target animation video based on the inserted animation video frame and the preset video frame.

[0147] Based on the above technical solutions, the animation texture also includes a normal map, where the pixel values ​​of the pixels in the normal map are used to represent the normal information of the model vertices in the corresponding preset video frames.

[0148] Based on the above technical solutions, the device further includes: a normal information determination module.

[0149] The normal information determination module is used to obtain pixel information in the normal map based on the pixel position information of the pixel points in the vertex animation map, to determine the normal information of the corresponding model vertex based on the pixel information, and to generate the target animation video based on the normal information.

[0150] Based on the above technical solutions, the animation texture also includes a vertex color texture, where the pixel values ​​of the pixels in the vertex color texture are used to represent the color information of each model vertex in the corresponding preset video frame.

[0151] Based on the above technical solutions, the device further includes: a pixel information acquisition module, a color information determination module, and a display color determination module.

[0152] The pixel information acquisition module is used to acquire pixel information in the vertex color map based on the pixel position information of the pixel points in the vertex animation texture map;

[0153] The color information determination module is used to determine the color information of the corresponding model vertices in the target model based on the pixel information and the pixel position information.

[0154] The color determination module is used to obtain the display color of the target object in the target animation video by interpolating the color information of each model vertex.

[0155] Based on the above technical solutions, the device further includes: a target animation video playback module.

[0156] The target animation video playback module is used to play the target animation video according to preset playback parameters; wherein, the playback parameters include loop playback or single playback.

[0157] Based on the above technical solutions, the device further includes: a target model creation module and a vertex animation texture creation module.

[0158] The target model creation module is used to create a target model corresponding to the target object and a preset animation video corresponding to the target object before retrieving the animation texture corresponding to the target object; wherein, the preset animation video includes at least two preset video frames;

[0159] The vertex animation texture creation module is used to create the vertex animation texture based on the vertex information of at least one model vertex on the target model in the corresponding preset video frame.

[0160] Based on the above technical solutions, the vertex animation texture creation module includes: a target vertex information determination submodule and a vertex animation texture determination submodule.

[0161] The target vertex information determination submodule is used to determine the target vertex information of at least one model vertex on the target model in the current preset video frame for each preset video frame; wherein, the target vertex information includes spatial position;

[0162] The vertex animation texture determination submodule is used to determine the vertex animation texture based on the playback position of the current preset video frame in the preset animation video and the storage column of the at least one model vertex in the vertex animation texture.

[0163] Based on the above technical solutions, the vertex animation texture determination submodule includes: a storage row determination unit and a pixel value filling unit.

[0164] A storage row determination unit is used to determine the storage row of the target vertex information of at least one model vertex in the current preset video frame in the vertex animation texture.

[0165] A pixel value filling unit is used to convert the target vertex information into pixel values ​​and fill them into the vertex animation map based on the storage row and the storage column of each model vertex in the vertex animation map, so as to determine the target animation video of the target object based on the vertex animation map.

[0166] Based on the above technical solutions, the device further includes: a normal information determination module and a normal information filling module.

[0167] The normal information determination module is used to determine the normal information of at least one model vertex in the current preset video frame;

[0168] The normal information filling module is used to fill the normal information into a normal map that matches the corresponding pixel in the vertex animation map.

[0169] Based on the above technical solutions, the device further includes: a color information determination module and a color information filling module.

[0170] The color information determination module is used to determine the color information of at least one model vertex in the current preset video frame;

[0171] The color information filling module is used to fill the color information into a vertex color map that matches the corresponding pixel in the vertex animation texture map.

[0172] The technical solution of this disclosure, by detecting that the target object in the video frame to be processed meets the animation playback conditions, retrieves the animation texture corresponding to the target object, and then determines the target animation video corresponding to the target object based on the animation texture and the animation playback parameters corresponding to the target object. This solves the problem that the corresponding target animation video cannot be rendered when rendering the target animation video under the condition of limited terminal device performance. It achieves the effect of quickly generating the target animation video corresponding to the target object while reducing the amount of animation data storage, thus improving the user experience.

[0173] The video generation apparatus provided in this disclosure can execute the video generation method provided in any embodiment of this disclosure, and has the corresponding functional modules and beneficial effects of executing the method.

[0174] It is worth noting that the various units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be realized; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the protection scope of the embodiments of this disclosure.

[0175] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Refer to the following... Figure 6 It illustrates an electronic device suitable for implementing embodiments of the present disclosure (e.g., Figure 6The diagram below shows the structure of the terminal device or server 500. The terminal device in this embodiment may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), and vehicle terminals (e.g., vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 6 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.

[0176] like Figure 6 As shown, electronic device 500 may include a processing unit (e.g., central processing unit, graphics processor, etc.) 501, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 502 or a program loaded from storage device 508 into random access memory (RAM) 503. The RAM 503 also stores various programs and data required for the operation of electronic device 500. The processing unit 501, ROM 502, and RAM 503 are interconnected via bus 504. An edit / output (I / O) interface 505 is also connected to bus 504.

[0177] Typically, the following devices can be connected to I / O interface 505: input devices 506 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 507 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 508 including, for example, magnetic tapes, hard disks, etc.; and communication devices 509. Communication device 509 allows electronic device 500 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 6 An electronic device 500 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.

[0178] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 509, or installed from a storage device 508, or installed from a ROM 502. When the computer program is executed by the processing device 501, it performs the functions defined in the methods of embodiments of this disclosure.

[0179] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.

[0180] The electronic device provided in this embodiment and the video generation method provided in the above embodiments belong to the same inventive concept. Technical details not described in detail in this embodiment can be found in the above embodiments, and this embodiment has the same beneficial effects as the above embodiments.

[0181] This disclosure provides a computer storage medium storing a computer program that, when executed by a processor, implements the video generation method provided in the above embodiments.

[0182] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.

[0183] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.

[0184] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.

[0185] The aforementioned computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to:

[0186] When a target object in a video frame to be processed is detected to meet the animation playback conditions, the animation texture corresponding to the target object is retrieved.

[0187] Based on the animated texture and the animation playback parameters corresponding to the target object, a target animated video corresponding to the target object is determined.

[0188] Alternatively, the aforementioned computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to:

[0189] When a target object in a video frame to be processed is detected to meet the animation playback conditions, the animation texture corresponding to the target object is retrieved.

[0190] Based on the animated texture and the animation playback parameters corresponding to the target object, a target animated video corresponding to the target object is determined.

[0191] Computer program code for performing the operations of this disclosure can be written in one or more programming languages ​​or a combination thereof, including but not limited to object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0192] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0193] The units described in the embodiments of this disclosure can be implemented in software or in hardware. The name of a unit does not necessarily limit the unit itself; for example, the first acquisition unit can also be described as "a unit that acquires at least two Internet Protocol addresses".

[0194] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.

[0195] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0196] According to one or more embodiments of this disclosure, [Example 1] provides a video generation method, the method comprising:

[0197] When a target object in a video frame to be processed is detected to meet the animation playback conditions, the animation texture corresponding to the target object is retrieved.

[0198] Based on the animated texture and the animation playback parameters corresponding to the target object, a target animated video corresponding to the target object is determined.

[0199] According to one or more embodiments of this disclosure, [Example 2] provides a video generation method, which further includes:

[0200] Optionally, the target object is displayed in the video frame to be processed;

[0201] Click on the target object;

[0202] The display duration of the target object has been detected to have reached a preset display duration threshold.

[0203] According to one or more embodiments of this disclosure, [Example 3] provides a video generation method, which further includes:

[0204] Optionally, the animated texture of the target object can be retrieved from the texture library based on the object identifier of the target object or its display position in the video frame to be processed.

[0205] According to one or more embodiments of this disclosure, [Example 4] provides a video generation method, which further includes:

[0206] Optionally, the animation texture includes a vertex animation texture, which includes multiple pixels. The row number of the pixel corresponds to the nth frame of the preset video frame in the preset animation video, and the column corresponds to the mth model vertex. The model vertex is the vertex of each mesh model that constitutes the target model, and the target model corresponds to the target object.

[0207] According to one or more embodiments of this disclosure, [Example 5] provides a video generation method, which further includes:

[0208] Optionally, the pixel value of the pixel is used to characterize the spatial position information of the m-th model vertex in the n-th preset video frame.

[0209] According to one or more embodiments of this disclosure, [Example Six] provides a video generation method, which further includes:

[0210] Optionally, the animation playback parameters include the target number of animation videos, and the target animation video corresponding to the target object is determined based on the target number of frames and the number of rows of the vertex animation map.

[0211] According to one or more embodiments of this disclosure, [Example Seven] provides a video generation method, which further includes:

[0212] Optionally, if the target number of frames is equal to the number of rows, then the pixel values ​​of each row in the vertex animation texture are read sequentially, and the pixel values ​​are converted into target space information;

[0213] Based on the target space information, determine the display information of each model vertex in the corresponding video frame;

[0214] The target animation video is determined based on the display information of each model vertex.

[0215] According to one or more embodiments of this disclosure, [Example Eight] provides a video generation method, which further includes:

[0216] Optionally, if the target number of frames is greater than the number of rows, the number of animation video frames to be inserted into two adjacent preset video frames is determined.

[0217] Based on the pixel values ​​corresponding to the same model vertex in two adjacent rows of the vertex animation texture and the number of insertions, the target space information of each model vertex in the target model in the inserted animation video frame and the preset video frame is determined;

[0218] The target animation video is generated based on the inserted animation video frames and the preset video frames.

[0219] According to one or more embodiments of this disclosure, [Example Nine] provides a video generation method, which further includes:

[0220] Optionally, the animation texture may further include a normal map, wherein the pixel values ​​of the pixels in the normal map are used to represent the normal information of the model vertices in the corresponding preset video frames.

[0221] According to one or more embodiments of this disclosure, [Example 10] provides a video generation method, which further includes:

[0222] Optionally, based on the pixel position information of the pixels in the vertex animation map, pixel information in the normal map is obtained, so as to determine the normal information of the corresponding model vertex based on the pixel information, and generate the target animation video based on the normal information.

[0223] According to one or more embodiments of this disclosure, [Example 11] provides a video generation method, which further includes:

[0224] Optionally, the animation texture also includes a vertex color texture, wherein the pixel values ​​of the pixels in the vertex color texture are used to represent the color information of each model vertex in the corresponding preset video frame.

[0225] According to one or more embodiments of this disclosure, [Example Twelve] provides a video generation method, which further includes:

[0226] Optionally, pixel information in the vertex color map can be obtained based on the pixel position information of the pixels in the vertex animation map;

[0227] Based on the pixel information and the pixel position information, determine the color information of the corresponding model vertices in the target model;

[0228] The display color of the target object in the target animation video is obtained by interpolating the color information of each model vertex.

[0229] According to one or more embodiments of this disclosure, [Example Thirteen] provides a video generation method, which further includes:

[0230] Optionally, the target animation video can be played according to preset playback parameters;

[0231] The playback parameters include loop playback or single playback.

[0232] According to one or more embodiments of this disclosure, [Example Fourteen] provides a video generation method, which further includes:

[0233] Optionally, a target model corresponding to the target object and a preset animation video corresponding to the target object are created; wherein the preset animation video includes at least two preset video frames;

[0234] The vertex animation texture is created based on the vertex information of at least one model vertex on the target model in the corresponding preset video frame.

[0235] According to one or more embodiments of this disclosure, [Example Fifteen] provides a video generation method, which further includes:

[0236] Optionally, for each preset video frame, determine the target vertex information of at least one model vertex on the target model in the current preset video frame; wherein, the target vertex information includes spatial position;

[0237] The vertex animation map is determined based on the playback position of the current preset video frame in the preset animation video and the storage column of the at least one model vertex in the vertex animation map.

[0238] According to one or more embodiments of this disclosure, [Example Sixteen] provides a video generation method, which further includes:

[0239] Optionally, the target vertex information of at least one model vertex in the current preset video frame is determined in the storage row of the vertex animation texture;

[0240] Based on the storage row and the storage column of each model vertex in the vertex animation map, the target vertex information is converted into pixel values ​​and filled into the vertex animation map to determine the target animation video of the target object based on the vertex animation map.

[0241] According to one or more embodiments of this disclosure, [Example Seventeen] provides a video generation method, which further includes:

[0242] Optionally, determine the normal information of at least one model vertex in the current preset video frame;

[0243] The normal information is filled into the normal map that matches the corresponding pixel in the vertex animation map.

[0244] According to one or more embodiments of this disclosure, [Example 18] provides a video generation method, which further includes:

[0245] Optionally, determine the color information of at least one model vertex in the current preset video frame;

[0246] The color information is filled into a vertex color map that matches the corresponding pixel in the vertex animation map.

[0247] According to one or more embodiments of this disclosure, [Example Nineteen] provides a video generation apparatus, the apparatus comprising:

[0248] The animation texture retrieval module is used to retrieve the animation texture corresponding to the target object when the target object in the video frame to be processed meets the animation playback conditions.

[0249] The target animation video determination module is used to determine the target animation video corresponding to the target object based on the animation texture and the animation playback parameters corresponding to the target object.

[0250] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.

[0251] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.

[0252] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims.

Claims

1. A video generation method, characterized in that, include: When a target object in a video frame to be processed is detected to meet the animation playback conditions, the animation texture corresponding to the target object is retrieved. Based on the animation texture and the animation playback parameters corresponding to the target object, determine the target animation video corresponding to the target object; The animation texture includes a vertex animation texture, and the animation playback parameters include the target frame number of the target animation video. The target animation video is generated based on the number of rows in the vertex animation texture and the target frame number. The animation texture includes a vertex animation texture, which includes multiple pixels. The row number of the pixel corresponds to the nth frame of the preset video frame in the preset animation video, and the column number corresponds to the mth model vertex. The model vertex is the vertex of each mesh model that constitutes the target model, and the target model corresponds to the target object. The columns of the vertex animation texture are arranged sequentially according to the corresponding numbers of the vertices of each mesh model of the target model. The numbers are obtained by arranging the vertices of each mesh model according to a preset order.

2. The method according to claim 1, characterized in that, The process of retrieving the animation texture corresponding to the target object includes: Based on the object identifier of the target object or its display position in the video frame to be processed, retrieve the animation texture of the target object from the texture library.

3. The method according to claim 1, characterized in that, The pixel value of the pixel is used to represent the spatial position information of the m-th model vertex in the n-th preset video frame.

4. The method according to claim 1, characterized in that, The animation playback parameters include the target frame number of the target animation video. Determining the target animation video corresponding to the target object based on the animation texture and the animation playback parameters corresponding to the target object includes: The target animation video corresponding to the target object is determined based on the target frame number and the number of rows of the vertex animation texture.

5. The method according to claim 1, characterized in that, The animation texture also includes a normal map, where the pixel values ​​of the pixels in the normal map are used to represent the normal information of the model vertices in the corresponding preset video frames.

6. The method according to claim 5, characterized in that, Also includes: Based on the pixel position information of the pixels in the vertex animation map, the pixel information in the normal map is obtained, the normal information of the corresponding model vertex is determined based on the pixel information, and the target animation video is generated based on the normal information.

7. The method according to claim 1 or 5, characterized in that, The animation texture also includes a vertex color texture, where the pixel values ​​of each pixel in the vertex color texture are used to represent the color information of each model vertex in the corresponding preset video frame.

8. The method according to claim 7, characterized in that, Also includes: Based on the pixel position information of the pixels in the vertex animation texture, obtain the pixel information in the vertex color texture; Based on the pixel information and the pixel position information, determine the color information of the corresponding model vertices in the target model; The display color of the target object in the target animation video is obtained by interpolating the color information of each model vertex.

9. The method according to claim 1, characterized in that, Before retrieving the animation texture corresponding to the target object, the method further includes: Create a target model corresponding to the target object, and a preset animation video corresponding to the target object; wherein the preset animation video includes at least two preset video frames; The vertex animation texture is created based on the vertex information of at least one model vertex on the target model in the corresponding preset video frame.

10. The method according to claim 9, characterized in that, The step of creating the vertex animation texture based on the vertex information of at least one model vertex on the target model in a corresponding preset video frame includes: For each preset video frame, determine the target vertex information of at least one model vertex on the target model in the current preset video frame; wherein, the target vertex information includes spatial position; The vertex animation map is determined based on the playback position of the current preset video frame in the preset animation video and the storage column of the at least one model vertex in the vertex animation map.

11. The method according to claim 10, characterized in that, The step of determining the vertex animation map based on the playback position of the current preset video frame in the preset animation video and the storage column of the at least one model vertex in the vertex animation map includes: Determine the storage row of the vertex animation texture for the target vertex information of at least one model vertex in the current preset video frame; Based on the storage row and the storage column of each model vertex in the vertex animation map, the target vertex information is converted into pixel values ​​and filled into the vertex animation map to determine the target animation video of the target object based on the vertex animation map.

12. The method according to claim 10, characterized in that, Also includes: Determine the normal information of at least one model vertex in the current preset video frame; The normal information is filled into the normal map that matches the corresponding pixel in the vertex animation map.

13. The method according to claim 10 or 12, characterized in that, Also includes: Determine the color information of at least one model vertex in the corresponding preset video frame; The color information is filled into a vertex color map that matches the corresponding pixel in the vertex animation map.

14. A video generation apparatus, characterized in that, include: The animation texture retrieval module is used to retrieve the animation texture corresponding to the target object when the target object in the video frame to be processed meets the animation playback conditions. The target animation video determination module is used to determine the target animation video corresponding to the target object based on the animation texture and the animation playback parameters corresponding to the target object; The animation texture includes a vertex animation texture, and the animation playback parameters include the target frame number of the target animation video. The target animation video is generated based on the number of rows in the vertex animation texture and the target frame number. The animation texture includes a vertex animation texture, which includes multiple pixels. The row number of the pixel corresponds to the nth frame of the preset video frame in the preset animation video, and the column number corresponds to the mth model vertex. The model vertex is the vertex of each mesh model that constitutes the target model, and the target model corresponds to the target object. The columns of the vertex animation texture are arranged sequentially according to the corresponding numbers of the vertices of each mesh model of the target model. The numbers are obtained by arranging the vertices of each mesh model according to a preset order.

15. An electronic device, characterized in that, The electronic device includes: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the video generation method as described in any one of claims 1-13.

16. A storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform the video generation method as described in any one of claims 1-13.

Citation Information

Patent Citations

  • Animation generation method, animation playing method and related devices

    CN112037311A

  • Animation playing method and device and computer equipment

    CN112419430A