Virtual image generation method, device, electronic device and computer-readable storage medium

By applying the layer construction method of the target image obtained by art rendering to the sequence frame pictures of virtual images and finding and replacing the corresponding layers, the problem of virtual image generation dependence on art operations is solved, the combination of art and AI technology is achieved, and the convenience and precision of generation is improved.

CN113487710BActive Publication Date: 2025-03-18GUANGZHOU HUYA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110783976.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-07-12
Publication Date
2025-03-18
Estimated Expiration
2041-07-12

AI Technical Summary

Technical Problem

In the prior art, the generation and driving of virtual images are highly dependent on art operations, which is relatively inconvenient to achieve. Moreover, the generation of virtual images in both art and AI is difficult to compatible, and it is impossible to combine its advantages well.

Method used

By obtaining the sequence frame material picture data, including the results obtained by the art rendering of the target image, the generated sequence frame pictures of the virtual image are split according to the layer construction method of the target image, and the corresponding layers are searched based on the sequence frame material picture data and replaced, realizing the combination of art materials and AI materials.

Benefits of technology

It improves the convenience of virtual image generation, enhances the precision and richness of the generated virtual image, and realizes the effective combination of art and AI technology.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113487710B_ABST
    Figure CN113487710B_ABST
Patent Text Reader

Abstract

The embodiments of the present invention provide a method, device, electronic device and computer-readable storage medium for generating a virtual image, and relate to the field of data processing technology. The method comprises: obtaining sequence frame material picture data, wherein the sequence frame material picture data comprises a target picture, and the target picture is obtained by outputting the result obtained by performing art rendering on each layer of the art material, and the target picture comprises multiple layers. A sequence frame picture of a virtual image to be generated is obtained, and the sequence frame picture is layer-splitting according to the construction method of the layers in the target picture. Then, based on the sequence frame material picture data, the layer of the sequence frame picture is replaced with the corresponding layer of the art material. Thus, a clever application of the art material is achieved, and the convenience of generating a virtual image is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a method, device, electronic device and computer-readable storage medium for generating a virtual image. Background Art

[0002] With the rapid development of the Internet, virtual images are used in more and more scenarios. Nowadays, the generation and driving of virtual images are highly dependent on artistic operations, which makes it inconvenient to implement. Summary of the invention

[0003] One of the purposes of the present invention includes, for example, providing a method, device, electronic device and computer-readable storage medium for generating a virtual image, so as to at least partially improve the convenience of generating a virtual image.

[0004] The embodiments of the present invention can be implemented as follows:

[0005] In a first aspect, the present invention provides a method for generating a virtual image, comprising:

[0006] Obtaining sequence frame material picture data, wherein the sequence frame material picture data includes a target picture, and the target picture is obtained by outputting a result obtained by performing art rendering on each layer of the art material, and the target picture includes multiple layers;

[0007] Obtaining a sequence frame image of a virtual image to be generated, and splitting the sequence frame image into layers according to the layer construction method in the target image;

[0008] Based on the sequence frame material picture data, the corresponding layer is found to replace the layer of the sequence frame picture.

[0009] In an optional implementation manner, the step of obtaining a sequence frame image of the virtual image to be generated and splitting the sequence frame image into layers according to the construction method of the layers in the target image includes:

[0010] According to the target action to be achieved by the virtual image, each frame of the image to be generated is obtained;

[0011] For each frame of the image to be generated, split the frame of the image into layers according to the construction method of the layers in the target image;

[0012] The step of finding the corresponding layer based on the sequence frame material picture data and replacing the layer of the sequence frame picture comprises:

[0013] For each frame of the image to be generated, obtaining a target layer to be replaced in each layer of the frame of the image in the process of achieving the target action;

[0014] The corresponding layer is found from the sequence frame material picture data to replace the target layer.

[0015] In an optional implementation manner, the step of obtaining a sequence frame image of the virtual image to be generated and splitting the sequence frame image into layers according to the construction method of the layers in the target image includes:

[0016] According to the target action to be achieved by the virtual image, a target layer that needs to be replaced in the process of achieving the target action and a sequence of the target layers are obtained;

[0017] Based on the sequence, each of the target layers is edited in a timeline manner, and the actions and parameter values ​​corresponding to each of the target layers at each time point are specified;

[0018] Based on the action and parameter value, a corresponding layer is found from the sequence frame material picture data to replace the target layer.

[0019] In an optional embodiment, each of the layers corresponds to at least one component of the virtual image, and the layers are combined to form the virtual image, and the target layer is at least one layer where the components involved in the virtual image achieving the target action are located;

[0020] The step of finding a corresponding layer from the sequence frame material picture data to replace the target layer comprises:

[0021] Finding the layer where the components involved in achieving the target action of the virtual image are located from the sequence frame material picture data;

[0022] Cut out the components involved in the target action from the found layer;

[0023] The cut component is attached to the area where the component is located in the target layer.

[0024] In an optional embodiment, the method further includes a step of obtaining a target image, the step comprising:

[0025] Triangle the completed art material;

[0026] The result of each triangle transformation of the art material is output as a target image.

[0027] In an optional embodiment, the method further includes a step of obtaining a target image, the step comprising:

[0028] Triangle the completed art material;

[0029] The layer where the component on which the triangle transformation is applied is located is used as the layer to be output, and the triangle transformation result of the layer to be output is output as the target image;

[0030] Each layer corresponds to at least one component of the virtual image.

[0031] In an optional implementation, the sequence frame images are generated by AI.

[0032] In a second aspect, an embodiment of the present invention provides a virtual image generation device, comprising:

[0033] An information acquisition module, used to obtain sequence frame material picture data, wherein the sequence frame material picture data includes a target picture, and the target picture is obtained by outputting a result obtained by performing art rendering on each layer of the art material, and the target picture includes multiple layers;

[0034] The information processing module is used to obtain the sequence frame pictures of the virtual image to be generated, split the layers of the sequence frame pictures according to the construction method of the layers in the target picture; based on the sequence frame material picture data, find the corresponding layers to replace the layers of the sequence frame pictures.

[0035] In a third aspect, the present invention provides an electronic device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for generating a virtual image as described in any one of the aforementioned implementations is implemented.

[0036] In a fourth aspect, the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium includes a computer program, and when the computer program is executed, the electronic device where the computer-readable storage medium is located is controlled to execute the virtual image generation method described in any one of the aforementioned implementation modes.

[0037] The beneficial effects of the embodiments of the present invention include, for example: by outputting the results of art rendering for each layer of the art material as a target image, forming sequence frame material image data, and performing corresponding layer splitting on the sequence frame image of the virtual image to be generated, so that based on the sequence frame material image data, the corresponding layers of the art material can be used to replace the layers of the sequence frame image, thereby realizing the clever application of the art material and improving the convenience of virtual image generation. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0039] Figure 1 A schematic diagram of layer disassembly of a virtual image provided by an embodiment of the present invention is shown.

[0040] Figure 2 A schematic diagram of generating a virtual image based on art provided by an embodiment of the present invention is shown.

[0041] Figure 3 A schematic diagram of AI-based virtual image generation provided by an embodiment of the present invention is shown.

[0042] Figure 4 A schematic diagram of an application scenario provided by an embodiment of the present invention is shown.

[0043] Figure 5 A schematic flow chart of a method for generating a virtual image provided by an embodiment of the present invention is shown.

[0044] Figure 6 A schematic diagram of generating a target image provided by an embodiment of the present invention is shown.

[0045] Figure 7 A schematic diagram of generating a sequence frame image based on AI provided by an embodiment of the present invention is shown.

[0046] Figure 8 A schematic diagram of generating an eye sequence based on AI provided by an embodiment of the present invention is shown.

[0047] Fig. 9 A schematic diagram of generating a mouth sequence based on AI provided by an embodiment of the present invention is shown.

[0048] Fig.10 A schematic diagram of generating an eyebrow sequence based on AI provided by an embodiment of the present invention is shown.

[0049] Fig.11 A schematic diagram of combining expression actions using a material editing tool provided by an embodiment of the present invention is shown.

[0050] Fig.12 A schematic diagram of a combined full-image expression or action provided by an embodiment of the present invention is shown.

[0051] Fig.13A schematic diagram of a sequence of components generated based on AI provided by an embodiment of the present invention is shown.

[0052] Fig.14 A schematic diagram of an original image of a virtual image provided by an embodiment of the present invention is shown.

[0053] Fig.15 A schematic diagram of a full-image expression of a virtual image provided by an embodiment of the present invention is shown.

[0054] Fig.16 A schematic diagram of art material of a virtual image body in a dog-holding series provided by an embodiment of the present invention is shown.

[0055] Fig.17 A schematic diagram of art materials of a virtual image body in a keyboard series provided by an embodiment of the present invention is shown.

[0056] Fig.18 An exemplary structural block diagram of a virtual image generating device provided by an embodiment of the present invention is shown.

[0057] Icon: 100 - electronic device; 110 - memory; 120 - processor; 130 - communication module; 140 - virtual image generation device; 141 - information acquisition module; 142 - information processing module. DETAILED DESCRIPTION

[0058] Nowadays, the generation and driving of virtual images are highly dependent on art, which is inconvenient to implement. The driving of traditional 2D images requires artists to draw the materials in advance, bind the skin according to the materials, and then output the action by triangulating the texture. In the solution of generating virtual images based on art, the disassembly layers are designed and defined by the artists according to the image, and there is no unified format and standard.

[0059] like Figure 1 As shown in FIG. 1 , a schematic diagram of one of the layer disassembly is enumerated, wherein the various components of the avatar (such as head, face, body, eyes, nose, mouth, eyebrows, hands, legs, etc.) can be flexibly disassembled. For example, each component can be disassembled into a layer, and for another example, more than two components can be flexibly disassembled into a layer. Accordingly, each layer may correspond to one or more than two components.

[0060] For example, to generate and drive a traditional 2D virtual image, the artist must first break the image down into multiple layers and draw them separately. Then, the layers must be combined and set in engines such as Spine, E-mote, and Live2D to create the skin and output the action.

[0061] like Figure 2The figure below is a schematic diagram of one of the virtual image generation methods based on art and posture sequence. Different conditions and latent interpolation are set based on the timeline, and the virtual image of each character on the timeline can be generated by driving the action engine of triangle transformation. The animation generation can be realized by playing the virtual image in time sequence. For example, Figure 2 Playing vertically, the avatar can complete the action of jumping and turning in circles.

[0062] However, the entire process is highly dependent on art and has a high threshold. The entire image, from creation, drawing to driving, takes a long time, is difficult to mass-produce, and is very inconvenient to implement.

[0063] In recent years, with the advancement of AI (Artificial Intelligence) technology, 2D image-driven applications generated in the form of image sequence frames have also increased. For example, the expression or action of a virtual image can be generated in the form of sequence frames based on AI using deep learning methods.

[0064] like Figure 3 As shown in the figure, it is a schematic diagram of one of the AI-based methods, which inputs the original image, sets actions and parameter values, and obtains various expressions (such as happy, sad, angry, disgusted, condescending, looking up (uwamedukai), surprised (gangimari-gao), etc.).

[0065] AI has the ability to generate unlimited action materials. However, the number of disassembled layers that can be used for AI training is relatively small, making it difficult to learn and generate sophisticated, rich and diverse virtual images through AI, which limits the application scenarios of this method.

[0066] Given that art can generate exquisite, rich and diverse art materials, and AI can generate unlimited action materials, if the two can be combined, it can ensure the convenience of virtual image generation and the richness of the generated virtual images.

[0067] However, research has found that it is difficult to combine the two virtual image generation methods of art and AI. The reasons include: the generation of virtual images based on art is generally based on the triangle variable drive of art materials, and the generation of virtual images based on AI is generally based on the sequence frame drive of AI. The two are essentially two completely different drive methods and are incompatible. In addition, there is no unified format and standard for the layer disassembly performed by art, and the corresponding art materials are often not usable by AI. This makes it impossible to combine the advantages of the two (such as the exquisiteness and richness of art materials, and the ability of AI to generate unlimited action materials) well.

[0068] Based on the above research, an embodiment of the present invention provides a virtual image generation solution, which can connect and combine materials generated by both fine arts and AI, freely combine and reconstruct expressions based on the materials generated by the two methods, realize ever-changing emotional expressions and fine arts movements, and realize the combination of AI generation and fine arts rendering. For example, while generating the expression or action of a virtual image in the form of a sequence of frames based on AI, it is compatible with the action effects produced by a traditional action engine based on triangle transformation, thereby unifying the expression generated by AI and the action designed by art into the same framework. Compared with the solution of generating virtual images based on fine arts, the convenience of virtual image generation is improved. Compared with the solution of generating virtual images based on AI, the sophistication and richness and diversity of virtual images are improved.

[0069] The defects existing in the above solutions are the results obtained by the inventors after practice and careful research. Therefore, the discovery process of the above problems and the solutions proposed in the embodiments of the present invention for the above problems below should all be the contributions made by the inventors in the invention process.

[0070] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.

[0071] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0072] It should be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0073] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.

[0074] It should be noted that, in the absence of conflict, the features in the embodiments of the present invention may be combined with each other.

[0075] Please refer to Figure 4 , is a block diagram of an electronic device 100 provided in this embodiment. The electronic device 100 in this embodiment may be a server, a processing device, a processing platform, etc. capable of interacting and processing graphics and images. The electronic device 100 includes a memory 110, a processor 120, and a communication module 130. The memory 110, the processor 120, and the communication module 130 are electrically connected to each other directly or indirectly to achieve data transmission or interaction. For example, these components may be electrically connected to each other via one or more communication buses or signal lines.

[0076] The memory 110 is used to store programs or data. The memory 110 may be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), etc.

[0077] The processor 120 is used to read / write data or programs stored in the memory 110 and execute corresponding functions.

[0078] The communication module 130 is used to establish a communication connection between the electronic device 100 and other communication terminals through the network, and to send and receive data through the network.

[0079] It should be understood that Figure 4 The structure shown is only a schematic diagram of the structure of the electronic device 100. The electronic device 100 may also include Figure 4 More or fewer components as shown, or with Figure 4 Different configurations are shown. Figure 4 Each component shown in the figure can be implemented by hardware, software or a combination thereof.

[0080] Please refer to Figure 5 , which is a flow chart of a method for generating a virtual image provided by an embodiment of the present invention, can be Figure 4 The electronic device 100 executes, for example, the processor 120 in the electronic device 100. The virtual image generation method includes S110, S120 and S130.

[0081] S110, obtaining sequence frame material picture data.

[0082] The sequence frame material picture data includes a target picture, and the target picture is obtained by outputting the result of performing art rendering on each layer of the art material, and the target picture includes multiple layers.

[0083] S120, obtaining a sequence frame image of the virtual image to be generated, and splitting the sequence frame image into layers according to the layer construction method in the target image;

[0084] S130, based on the sequence frame material picture data, find out the corresponding layer to replace the layer of the sequence frame picture.

[0085] Based on the above scheme, flexible application of art materials can be achieved, and the convenience of virtual image generation can be improved.

[0086] In S110, the sequence frame material image data includes target images obtained based on art, and may also include others, for example, some user-defined images, some images generated based on AI, some images obtained based on big data collection and screening, etc.

[0087] The virtual image generated based on art can include multiple layers, and the corresponding art materials are rendered for each layer and superimposed, and the virtual image is generated after superposition. The traditional triangle deformation drive is based on a picture of a virtual image, and the shape of at least one part of the virtual image in the picture is changed by triangle deformation, such as stretching and deforming at least one part of the virtual image, so as to obtain different virtual images. Exemplarily, picture A includes virtual image A. In order to make virtual image A show the action from not smiling to smiling, the layers where the corners of the mouth, eyebrows, eyes, etc. of virtual image A in picture A are located can be stretched, deformed and displayed multiple times by triangle deformation, thereby showing the picture of virtual image A from not smiling to smiling. It can be seen that the virtual image generated based on art corresponds to the same picture, and each layer of the picture has undergone different stretching deformations at different time points.

[0088] like Figure 6 As shown, through the study of the implementation principle of generating virtual images based on art, in order to realize the application of art materials generated in the process of generating virtual images based on art, in this embodiment, the result of each triangle transformation of the virtual image in the picture is output as a target picture. Then, in the process of triangle transformation of the virtual image in the picture, a series of target pictures can be output, and all target pictures can be used as sequence frame material picture data in the subsequent process of generating virtual images. Please refer to Figure 6 , the eyes, blush and other parts of the triangle are output as target images respectively, so that a variety of art materials can be obtained.

[0089] The target image can be obtained in a variety of ways. For example, the completed art material can be triangulated, and the triangulation result of each art material can be output as the target image. For another example, the completed art material can be triangulated, and the layer where the component is located by the triangulation is used as the layer to be output, and the triangulation result of the layer to be output is output as the target image. Each layer corresponds to at least one component of the virtual image.

[0090] Art materials can be flexibly defined, for example, they can be a complete avatar or one or more parts of the avatar. Accordingly, the output target image can be an image corresponding to a complete avatar with different expressions and actions, or an image corresponding to one or more parts of the avatar. When the image containing the avatar includes multiple layers, a sequence of actions can be generated by rendering different art materials on each layer at different time points.

[0091] In S120, AI can be used to generate sequence frame images, such as sequence frame images of various expressions or actions of a virtual image. The sequence frame images can be split into layers according to the layer construction method in the target image to achieve convenient application of the target image and realize the combination of AI and art.

[0092] The sequence frame images generated by AI may be generated as a whole image, or may be generated partially and then combined. This embodiment does not limit this.

[0093] See also Figure 7 In one implementation, when the sequence frame image generated by AI is a full-image image, an expression image corresponding to this set of parameters can be generated by setting the action and parameter value of each component. Figure 7 As shown in the figure, by moving and setting parameters of eyebrows, eyes, mouth, iris, head, neck, etc., you can generate Figure 7 An emoticon of an avatar winking.

[0094] In the case where the sequence frame pictures generated by AI are generated as a whole picture, the sequence frame pictures of the virtual image to be generated can be obtained in the following way: according to the target action to be achieved by the virtual image, each frame picture to be generated is obtained. Each sequence frame picture can be generated by setting the action and parameter value of each component in each frame picture to be generated respectively. For each frame picture to be generated, the layer of the frame picture can be split according to the construction method of the layer in the target picture. For each frame picture to be generated, the target layer that needs to be replaced in each layer of the frame picture in the process of achieving the target action is obtained, and the corresponding layer is found from the sequence frame material picture data to replace the target layer, thereby obtaining each sequence frame picture.

[0095] For example, when the target action is blinking, and the components of the avatar are located in separate layers, in the process of the avatar completing the blinking action, the layer where the eyes are located needs to be replaced in each layer of each frame image, that is, the layer where the eyes are located is the target layer. A series of layers of art materials involved in the process of completing the blinking action are found from the sequence frame material image data, and the layers where the eyes are located in each sequence frame image are replaced. The sequence frame images after the layer replacement are displayed, that is, the animation of the avatar completing the blinking action can be played.

[0096] In another implementation, when the sequence frame images generated by AI are partially generated and then combined, the target layers that need to be replaced in the process of achieving the target action and the sequence of the target layers can be obtained according to the target action to be achieved by the virtual image. Based on the sequence, each target layer is edited in a timeline manner, and the actions and parameter values ​​corresponding to each target layer at each time point are specified. Based on the actions and parameter values, the corresponding layers are found from the sequence frame material image data to replace the target layers.

[0097] For example, if the target action to be achieved by the avatar involves multiple parts such as eyes, mouth, and eyebrows, then the layers that need to be replaced include the layer where the eyes are located, the layer where the mouth is located, the layer where the eyebrows are located, etc. In this case, a sequence of different parts such as eyes, mouth, and eyebrows (such as left eye, right eye, left eyebrow, right eyebrow, mouth, etc.) can be generated by AI. Figure 8 As shown in Figure 1, a sequence of AI-generated eyes is shown. Fig. 9 As shown in , a sequence of AI-generated mouths is shown. Fig.10 The figure shows the sequence of eyebrows generated by AI. Based on the sequence of generated components, you can edit them in a timeline manner and combine different expressions by specifying the corresponding component actions and parameter values ​​at different time points. Fig.11 , provides a schematic diagram of using the material editing tool to combine facial expressions, where the 2D refined material refers to the generated parts. Fig.12 , which is a schematic diagram of a full-image expression or action formed by one of the combinations.

[0098] Using the above solution, whether it is generated by the whole picture or by generating and combining the parts separately, an AI-generated expression or action sequence will be obtained. Each picture in the sequence is split into layers, and the corresponding layer is found from the sequence frame material picture data to replace the target layer, so as to generate an action combining AI material and art material.

[0099] In this embodiment, since each layer corresponds to at least one component of the virtual image, the layers are combined to form the virtual image, and accordingly, the target layer is at least one layer where the components involved in the virtual image achieving the target action are located. Therefore, the step of finding the corresponding layer from the sequence frame material picture data to replace the target layer may include: finding the layer where the components involved in the virtual image achieving the target action are located from the sequence frame material picture data, cutting out the components involved in the target action from the found layer, and attaching the cut components to the area where the components are located in the target layer. In this way, no matter how the layers of the components are distributed, the smallest component unit (one component) can be cut out and applied, thereby further ensuring the flexibility of virtual image generation.

[0100] It is understandable that the sequence frame material image data can also be used in other ways. For example, given that the various components that make up the facial features often form various expressions together, in order to improve the efficiency of virtual image generation, for each expression, the facial features involved in the expression can be divided into the same layer, so that in the process of virtual image generation, a single layer can be replaced to generate a virtual image with corresponding expression movements. For another example, given that the various components that make up the limbs of the body often form various movements together, in order to improve the efficiency of virtual image generation, for each posture, the various components of the limbs of the body involved in the posture can be divided into the same layer, so that in the process of virtual image generation, a single layer can be replaced to generate a virtual image with corresponding posture movements.

[0101] In order to more clearly illustrate the implementation scheme of the embodiment of the present invention, the following scenario is taken as an example for illustration.

[0102] If the target image in the sequence frame material image data includes multiple layers, the layer structure of the target image is the same as the layer structure of the AI ​​material. For the blinking action, if AI performs partial recombination, the sequence of each component generated by AI can be as follows: Fig.13 shown.

[0103] After generating the sequence of each component, AI will Fig.13 The corresponding generated components are pasted to the corresponding areas of the original image, such as Fig.14 By Fig.13 The components generated in the Fig.14 In this case, Fig.15 The expressions shown in the full picture.

[0104] For the art materials of the art painting, by outputting the triangle transformation results of each art material as the target image, a series of art materials that can be used by AI can be obtained. For example, the art material of the virtual image body in the dog holding series can be as follows Fig.16 As shown in the figure, the art material of the virtual avatar body in the keyboard series can be Fig.17 shown.

[0105] The AI ​​generated Fig.15 The expression material shown is similar to the one generated by art. Fig.16 , Fig.17 Combined with the body materials shown, you can get Fig.15 The full image of the avatar with the expression shown and holding a dog and typing on the keyboard. It is understandable that since the layer structure of the target image including the art material is the same as the layer structure of the AI ​​material, Fig.16 , Fig.17 The layer where the body material shown replaces the layer generated by AI Fig.15 The combination of the two can be achieved by adding the body material of the full image of the expression shown in the layer where it is located.

[0106] The above is only one example of the combination of AI and art. It can be understood that through the flexible division of layers and specific settings in each scene, AI and art can also be adaptively combined in many other ways. This embodiment does not give examples one by one.

[0107] In order to execute the corresponding steps in the above embodiments and various possible methods, a method for implementing a virtual image generation device is provided below. Fig.18 , Fig.18 A functional module diagram of a virtual image generation device 140 provided in an embodiment of the present invention. The virtual image generation device 140 can be applied to Figure 4 The electronic device 100 is shown. It should be noted that the basic principle and technical effects of the virtual image generation device 140 provided in this embodiment are the same as those of the above embodiments. For the sake of brief description, for the parts not mentioned in this embodiment, reference can be made to the corresponding contents in the above embodiments. The virtual image generation device 140 includes an information acquisition module 141 and an information processing module 142.

[0108] The information acquisition module 141 is used to obtain sequence frame material picture data, wherein the sequence frame material picture data includes a target picture, and the target picture is obtained by outputting the result obtained by performing art rendering on each layer of the art material, and the target picture includes multiple layers;

[0109] The information processing module 142 is used to obtain the sequence frame images of the virtual image to be generated, split the layers of the sequence frame images according to the layer construction method in the target image; based on the sequence frame material image data, find the corresponding layer to replace the layer of the sequence frame image.

[0110] On the basis of the above, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium includes a computer program, and when the computer program is executed, the electronic device where the computer-readable storage medium is located is controlled to execute the above-mentioned virtual image generation method.

[0111] By adopting the virtual image generation scheme in the embodiment of the present invention, art materials and AI materials are unified into the same framework, so that the virtual image generation form combining art materials and AI materials can be realized. The human design cost of art is liberated on a large scale, so that each user can have his own exclusive virtual image. Each component can be generated separately and can be freely combined to achieve richer expressions or actions, which greatly reduces the size of the material package sent to the client, and can combine expressions and actions in real time, which is more convenient to achieve, and significantly improves the sophistication and richness of the virtual image's expressions and actions.

[0112] In several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

[0113] In addition, the functional modules in the various embodiments of the present invention may be integrated together to form an independent part, or each module may exist independently, or two or more modules may be integrated to form an independent part.

[0114] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.

[0115] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for generating a virtual image, characterized in that: include: Obtaining sequence frame material picture data, wherein the sequence frame material picture data includes a target picture, and the target picture is obtained by outputting a result obtained by performing art rendering on each layer of the art material, and the target picture includes multiple layers; Obtaining a sequence frame image of a virtual image to be generated, and splitting the sequence frame image into layers according to the layer construction method in the target image; wherein the sequence frame image is generated in its entirety or partially and then combined; Based on the sequence frame material picture data, the corresponding layer is found to replace the layer of the sequence frame picture.

2. The method for generating a virtual image according to claim 1, characterized in that: The step of obtaining a sequence frame picture of the virtual image to be generated and splitting the sequence frame pictures into layers according to the construction method of the layers in the target picture includes: According to the target action to be achieved by the virtual image, each frame of the image to be generated is obtained; For each frame of the image to be generated, split the frame of the image into layers according to the construction method of the layers in the target image; The step of finding the corresponding layer based on the sequence frame material picture data and replacing the layer of the sequence frame picture comprises: For each frame of the image to be generated, obtaining a target layer to be replaced in each layer of the frame of the image in the process of achieving the target action; The corresponding layer is found from the sequence frame material picture data to replace the target layer.

3. The method for generating a virtual image according to claim 1, characterized in that: The step of obtaining a sequence frame picture of the virtual image to be generated and splitting the sequence frame pictures into layers according to the construction method of the layers in the target picture includes: According to the target action to be achieved by the virtual image, a target layer that needs to be replaced in the process of achieving the target action and a sequence of the target layers are obtained; Based on the sequence, each of the target layers is edited in a timeline manner, and the actions and parameter values ​​corresponding to each of the target layers at each time point are specified; Based on the action and parameter value, a corresponding layer is found from the sequence frame material picture data to replace the target layer.

4. The method for generating a virtual image according to claim 2 or 3, characterized in that: Each of the layers corresponds to at least one component of the virtual image, and the layers are combined to form the virtual image, and the target layer is at least one layer where the components involved in the virtual image achieving the target action are located; The step of finding a corresponding layer from the sequence frame material picture data to replace the target layer comprises: Finding the layer where the components involved in achieving the target action of the virtual image are located from the sequence frame material picture data; Cut out the components involved in the target action from the found layer; The cut component is attached to the area where the component is located in the target layer.

5. The method for generating a virtual image according to claim 1, characterized in that: The method further comprises the step of obtaining a target image, the step comprising: Triangle the completed art material; The result of each triangle transformation of the art material is output as a target image.

6. The method for generating a virtual image according to claim 1, characterized in that: The method further comprises the step of obtaining a target image, the step comprising: Triangle the completed art material; The layer where the component on which the triangle transformation is applied is located is used as the layer to be output, and the triangle transformation result of the layer to be output is output as the target image; Each layer corresponds to at least one component of the virtual image.

7. The method for generating a virtual image according to claim 1, characterized in that: The sequence frame images are generated by AI.

8. A virtual image generating device, characterized in that: include: An information acquisition module, used to obtain sequence frame material picture data, wherein the sequence frame material picture data includes a target picture, and the target picture is obtained by outputting a result obtained by performing art rendering on each layer of the art material, and the target picture includes multiple layers; An information processing module, used for obtaining a sequence frame image of a virtual image to be generated, and splitting the sequence frame image into layers according to the construction method of the layers in the target image; Based on the sequence frame material picture data, find out the corresponding layer to replace the layer of the sequence frame picture; The sequence frame images are generated as a whole image or partially and then combined.

9. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the virtual image generation method according to any one of claims 1 to 7 when executing the program.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a computer program, and when the computer program is executed, the electronic device where the computer-readable storage medium is located is controlled to execute the virtual image generation method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method and system for generating and using facial expression for virtual image created by free combination

    CN106204698A

  • Interaction method and device of intelligent voice assistant, equipment and storage medium

    CN110767220A