Virtual character model generation method and device, storage medium and electronic equipment
By generating target images to generate parameters and constructing three-dimensional models, the problems of low accuracy and efficiency of 3D character models are solved, and higher accuracy and higher efficiency are achieved.
Patent Information
- Application Number
- CN202411709422.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-02-21
AI Technical Summary
In the prior art, the accuracy of the 3D character model is low and the generation efficiency is low, mainly because the two-dimensional original painting of the three-view is difficult to completely restore the overall characteristics of the character, and requires manual painting and engraving.
By determining the target image generation parameters required to generate the 2D original painting of the virtual character, generating the 2D original painting, and building the original 3D model based on this, extracting the model wiring grid and map, adding skin pore texture maps, and finally generating the target 3D model.
It improves the accuracy and generation efficiency of 3D character models, solves the problem that it is difficult to completely restore characters in two-dimensional original paintings, and reduces the need for manual painting and engraving.
Smart Images

Figure CN119494927A_ABST
Abstract
Description
Background Art
[0002] In some related technical schemes, the specific production process of the 3D character model in the 3D game character can be achieved in the following way: first, the model painter hand-draws the two-dimensional original painting of the three views; secondly, the model sculptor sculpts the 3D model based on the two-dimensional original painting using 3D modeling software; then, the 3D model obtained by the sculpting is UV unfolded and textured to obtain the 3D character model.
[0003] However, the above scheme has the following defects: on the one hand, it is difficult for the two-dimensional original painting of the three-view to completely restore the overall features of the character, so that the accuracy of the obtained 3D character model is low; on the other hand, due to the need for manual painting and carving, the generation efficiency of the 3D character model is low.
[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0005] The purpose of the present disclosure is to provide a method for generating a virtual character model, a device for generating a virtual character model, a computer-readable storage medium and an electronic device, thereby at least to a certain extent overcoming the problems of low accuracy and low generation efficiency of 3D character models caused by limitations and defects of related technologies.
[0006] According to one aspect of the present disclosure, a method for generating a virtual character model is provided, comprising:
[0007] Determining target image generation parameters required for generating a two-dimensional original picture of a virtual character, and generating the two-dimensional original picture of the virtual character based on the target image generation parameters;
[0008] Constructing an original three-dimensional model corresponding to the virtual character according to the two-dimensional original painting, and extracting a model wiring grid and a model texture in the original three-dimensional model;
[0009] Adding a skin pore texture map to the original three-dimensional model according to the model wiring grid and the model map;
[0010] A target model map is generated according to the skin pore texture map and a basic model map corresponding to the two-dimensional original painting, and the original three-dimensional model is rendered based on the target model map to obtain a target three-dimensional model of the virtual character.
[0011] According to one aspect of the present disclosure, there is provided a device for generating a virtual character model, comprising:
[0012] A two-dimensional original picture generation module, used to determine target image generation parameters required for generating a two-dimensional original picture of a virtual character, and generate the two-dimensional original picture of the virtual character based on the target image generation parameters;
[0013] A model texture extraction module, used to construct an original three-dimensional model corresponding to the virtual character according to the two-dimensional original painting, and extract a model wiring grid and a model texture in the original three-dimensional model;
[0014] A texture map adding module, used for adding a skin pore texture map to the original three-dimensional model according to the model wiring grid and the model map;
[0015] The target three-dimensional model generation module is used to generate a target model map according to the skin pore texture map and the basic model map corresponding to the two-dimensional original painting, and render the original three-dimensional model based on the target model map to obtain the target three-dimensional model of the virtual character.
[0016] According to one aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method for generating a virtual character model described in any one of the above is implemented.
[0017] According to one aspect of the present disclosure, there is provided an electronic device, including:
[0018] Processor; and
[0019] A memory, configured to store executable instructions of the processor;
[0020] The processor is configured to execute any one of the above-mentioned methods for generating a virtual character model by executing the executable instructions.
[0021] A method for generating a virtual character model provided by an embodiment of the present disclosure comprises the following steps: on the one hand, determining target image generation parameters required for generating a two-dimensional original painting of the virtual character, and generating the two-dimensional original painting of the virtual character based on the target image generation parameters; then constructing an original three-dimensional model corresponding to the virtual character according to the two-dimensional original painting, and extracting a model wiring grid and a model map in the original three-dimensional model; then adding a skin pore texture map to the original three-dimensional model according to the model wiring grid and the model map; finally, generating a target model map according to the skin pore texture map and a basic model map corresponding to the two-dimensional original painting, and rendering the original three-dimensional model based on the target model map to obtain a target three-dimensional model of the virtual character; since the two-dimensional original painting of multiple angles can be automatically generated, the problem in the related art that the overall features of the character cannot be fully restored by the two-dimensional original painting of three views, thereby improving the accuracy of the target three-dimensional model; on the other hand, the problem in the related art that the generation efficiency of the 3D character model is low due to the need for manual painting and carving, thereby improving the generation efficiency of the target three-dimensional model.
[0022] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.
[0024] Figure 1 The following schematically shows a flow chart of a method for generating a virtual character model according to an exemplary embodiment of the present disclosure.
[0025] Figure 2 A structural example diagram of a skeleton detection model according to an example embodiment of the present disclosure is schematically shown.
[0026] Figure 3 A structural example diagram of a deep graph network module according to an example embodiment of the present disclosure is schematically shown.
[0027] Figure 4 A method flow chart schematically illustrates a specific generation process of a skeleton detection model according to an example embodiment of the present disclosure.
[0028] Figure 5 A method flow chart schematically illustrates a specific training process of a content generation model according to an exemplary embodiment of the present disclosure.
[0029] Figure 6 A diagram schematically illustrates an example scenario of an X / Y chart script according to an example embodiment of the present disclosure.
[0030] Figure 7 A scene example diagram of a two-dimensional original painting obtained according to an example embodiment of the present disclosure is schematically shown.
[0031] Figure 8 A diagram schematically shows an example scenario of a model wiring grid according to an example embodiment of the present disclosure.
[0032] Fig. 9 An example diagram schematically shows an obtained target model map according to an example embodiment of the present disclosure.
[0033] Fig.10 A scene example diagram of a target three-dimensional model obtained according to an example embodiment of the present disclosure is schematically shown.
[0034] Fig.11 A block diagram schematically shows a device for generating a virtual character model according to an exemplary embodiment of the present disclosure.
[0035] Fig.12 An electronic device for implementing a method for generating a virtual character model according to an exemplary embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0036] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as being limited to the examples set forth herein; on the contrary, these embodiments are provided so that the present disclosure will be more comprehensive and complete, and the concepts of the example embodiments are fully conveyed to those skilled in the art. The described features, structures, or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known technical solutions are not shown or described in detail to avoid obscuring various aspects of the present disclosure.
[0037] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.
[0038] In some related technical solutions, the specific production process of the 3D character model of the 3D game character can be achieved in the following ways: first, the model painter draws the original painting by hand; that is, the model painter needs to be able to draw the three views of the front, side and back of the character according to the specific character setting; secondly, the model sculptor sculpts the 3D model based on the 3D modeling software; that is, the model sculptor can use software such as Autodesk Maya, Blender, ZBrush and other software for 3D modeling and sculpting; in the actual sculpting process, the model sculptor needs to sculpt according to the 3 views of the original painting; then, UV unfolding and mapping are performed: that is, after completing the basic model sculpting, UV unfolding and mapping are still required, and software such as Substance Painter or 3DCoat are used to add textures and materials to the model; finally, material adjustments are performed in the engine: that is, because the camera angle and material lighting effects in the engine are different from those of Substance, after the low-poly model and texture are imported into the engine, the model texture and material must be adjusted again according to the shader and lighting in the engine. However, since the above-mentioned original paintings are usually hand-drawn three-view drawings (such as front view, side view and back view), their realism and detail are not high enough to fully match the lighting and material effects of the game engine; therefore, the above-mentioned generation method has the following problems: on the one hand, the limitations of the angle and completion of the original painting: that is, the hand-drawn original painting usually only provides three views of the front, side and back, and the half-side angle is missing, and it is difficult to ensure that the proportion and appearance of the character are consistent at each angle; and high-precision carving based on three views also brings great challenges to 3D modelers, making it difficult for modelers to completely restore the appearance of the character, resulting in low accuracy of the obtained character; on the other hand, the difference between the original painting and the actual effect: That is, there are significant differences between the lighting and material effects of the original painting and the game engine, which causes the characters to behave unnaturally in the 3D environment. This requires modelers to spend a lot of time making adjustments to achieve visual consistency, thereby reducing the efficiency of character generation; on the other hand, the feedback process is lengthy: that is, in the actual application process, the model reviewers' feedback on the appearance of the model is highly subjective and does not include specific opinions, which requires modelers to make repeated modifications. Therefore, in addition to extending the production cycle, it also increases communication costs and the chance of rework; further, there are reverse process modifications: that is, in the process of model modification, each modification will return from the later stage to the earlier stage, causing the entire cycle to be infinitely lengthened.
[0039] In other related technical solutions, the specific production process of the 3D character model of the 3D game character can also be based on the facial modeling plug-in Facebuilder for model generation; wherein, Facebuilder is a plug-in in the Blender software, which automatically generates 3D geometric figures that match the source image, and the user can adjust the result by dragging the "pin" in the 3D viewport. Among them, the specific production process of generating the 3D character model of the game character based on Facebuilder can be achieved in the following ways: first, hand-drawn original paintings; specifically, in the process of drawing the original paintings, it is necessary to provide high-quality, multi-angle facial original paintings and references to ensure that the original paintings have good lighting conditions and clear details. The original painter needs to have a solid painting foundation. The multi-angle appearance of the painted character must be consistent and accurate enough; secondly, create a basic model; specifically, in the process of creating the basic model, you can import multi-angle original paintings, and the Facebuilder plug-in will automatically generate a basic 3D facial model based on the imported images. Then use the manual adjustment tools provided by the plug-in to adjust the key points of the face to ensure that the model is closely aligned with the facial features of the picture; then, texture mapping; specifically, during the texture mapping process, the plug-in will automatically perform texture mapping, apply the skin texture information on the 2D picture to the 3D model and perform texture repair; further, detail carving and repair; specifically, in the process of detail processing, due to the limitation of the original painting accuracy, it is also necessary to use carving software to repair and adjust the model; finally, the material adjustment in the engine; specifically, after the low-poly model and texture are imported into the engine, the model texture and material must be adjusted again according to the shader, perspective test and lighting in the engine. However, due to certain limitations of the Facebuilder plug-in, it has very high requirements for the angle and number of source images. Only when the more images are taken and the more complete the angles are, the more the generated model will match better. Therefore, modeling based on Facebuilder has the following problems: On the one hand, there are limitations on angles and number: that is, Facebuilder requires a large number of high-quality source images from different angles to generate accurate 3D models. Therefore, original paintings that only rely on three views cannot meet this requirement, and the appearance of the generated model may not meet the project requirements. On the other hand, insufficient detail capture leads to incomplete facial features: that is, due to the limitations of the angle and details of the original painting, Facebuilder may not be able to fully capture and reproduce the detailed characteristics of the character, which makes the resulting 3D model less accurate.
[0040] Based on this, this exemplary embodiment first provides a method for generating a virtual character model, which can be run on a terminal device, a server, a server cluster or a cloud server, etc. Of course, those skilled in the art can also run the method disclosed in this disclosure on other platforms as required, and this exemplary embodiment does not specifically limit this. Figure 1 As shown, the method for generating the virtual role model may include the following steps:
[0041] Step S110. Determine target image generation parameters required for generating a two-dimensional original picture of a virtual character, and generate the two-dimensional original picture of the virtual character based on the target image generation parameters;
[0042] Step S120: constructing an original three-dimensional model corresponding to the virtual character according to the two-dimensional original painting, and extracting a model wiring grid and a model map in the original three-dimensional model;
[0043] Step S130. Adding a skin pore texture map to the original three-dimensional model according to the model wiring grid and the model map;
[0044] Step S140. Generate a target model map according to the skin pore texture map and the basic model map corresponding to the two-dimensional original painting, and render the original three-dimensional model based on the target model map to obtain a target three-dimensional model of the virtual character.
[0045] In the above-mentioned method for generating a virtual character model, on the one hand, by determining the target image generation parameters required for generating a two-dimensional original painting of the virtual character, and generating the two-dimensional original painting of the virtual character based on the target image generation parameters; then, an original three-dimensional model corresponding to the virtual character is constructed according to the two-dimensional original painting, and the model wiring grid and the model map in the original three-dimensional model are extracted; then, a skin pore texture map is added to the original three-dimensional model according to the model wiring grid and the model map; finally, a target model map is generated according to the skin pore texture map and the basic model map corresponding to the two-dimensional original painting, and the original three-dimensional model is rendered based on the target model map to obtain a target three-dimensional model of the virtual character. Since the two-dimensional original painting of multiple angles can be automatically generated, the problem of low accuracy of the obtained 3D character model in the related art due to the difficulty in completely restoring the overall characteristics of the character in the two-dimensional original painting of three views is solved, thereby improving the accuracy of the target three-dimensional model; on the other hand, the problem of low generation efficiency of the 3D character model in the related art due to the need for manual painting and carving is also solved, thereby improving the generation efficiency of the target three-dimensional model.
[0046] Hereinafter, the method for generating a virtual character model according to an exemplary embodiment of the present disclosure will be explained and illustrated in detail with reference to the accompanying drawings.
[0047] First, the technical implementation principle of the example embodiment of the present disclosure is explained and illustrated. Specifically, in the process of actual application, the traditional unified engraving technology solution and the Facebuilder production process have many shortcomings, which lead to many difficulties in the production process of 3D models. In order to solve these difficulties, the example embodiment of the present disclosure provides a new method for generating a virtual character model. Based on the solution recorded in the example embodiment of the present disclosure, it can solve the problem that the 2D pictures produced by the traditional original painting process cannot meet the production needs of the 3D model, the cumbersome production process and the long production cycle in the 3D modeling process, the uncertainty of frequent modifications and adjustments in the 3D modeling process, and the low matching degree with the original painting in the 3D modeling process; further, based on the solution recorded in the example embodiment of the present disclosure, it can also make the 2D original painting meet the 3D modeling needs. The needs of model production can be met; and, the deep learning neural network model of the three-view original painting can be used to generate a 2D original painting that meets the needs of the 3D model through a text description or sketch input by the user, thereby replacing manual modeling with automated modeling; further, based on the scheme recorded in the exemplary embodiment of the present disclosure, a basic 3D model can be automatically generated, and key points can be adjusted to ensure the consistency between the model and the original painting; at the same time, since the accuracy and number of the character original paintings determine the accuracy of the final model, the future appearance of the 3D character can be intuitively predicted through multiple accurate 2D original paintings before the model is made; and the entire process of the generation process of the 2D original painting and the 3D model can be generated through data, thereby greatly improving the generation efficiency of the 3D character model.
[0048] Secondly, the model involved in the exemplary embodiments of the present disclosure is explained and illustrated.
[0049] (1) Control-net: Specifically, the ControlNet described herein is a neural network structure that can guide a stable diffusion model through additional conditions (such as image edges, image skeleton points, etc.), which allows training and fine-tuning of pre-trained models on small data sets. Furthermore, in the control model, there is also a region detection model and a skeleton detection model; wherein the region detection model can be used to detect the original edge image of the virtual character, and the skeleton detection model can be used to detect the original skeleton image of the virtual character; wherein the region detection model described herein may include but is not limited to a face region detection model, a hand region detection model, and a foot region detection model; the skeleton detection model described herein may include but is not limited to a face skeleton detection model, a hand skeleton detection model, and a foot skeleton detection model, etc.
[0050] In an exemplary embodiment, the skeleton detection model described above may be a graph convolutional neural network model; specifically, refer to Figure 2 As shown, the graph convolutional neural network model may include a first normalization layer 210, a second normalization layer 220, a deep graph network module 230, a first pooling layer 240, a second pooling layer 250, a first splicing layer 260, a first fully connected layer 270, and a support vector machine classification model 280. The first normalization layer and the second normalization layer are connected to the deep graph network module and then connected to the first splicing layer, and the support vector machine classification model is connected to the first splicing layer through the first fully connected layer. Further, refer to Figure 3 As shown, the deep graph network module described herein may include a first Einstein summation module 301, a second Einstein summation module 302, a second splicing layer 303, a first reconstruction dimension module 304, a first dimension transposition module 305, a second fully connected layer 306, a second dimension transposition module 307, a third normalization layer 308, and a first activation layer 309. At the same time, the first Einstein summation module and the second Einstein summation module are respectively connected to the second splicing layer, and the second splicing layer, the first reconstruction dimension module, the first dimension transposition module, the second fully connected layer, the second dimension transposition module, the third normalization layer, and the first activation layer are sequentially connected.
[0051] In an exemplary embodiment, referring to Figure 4 As shown, the specific generation process of the skeleton detection model may include the following steps:
[0052] Step S410, obtaining a generated regional image, and constructing a data set according to the generated regional image and an actual orientation label of the generated regional image;
[0053] Step S420, extracting posture skeleton points of the generated regional image in the data set, and inputting the posture skeleton points into a graph convolutional neural network model to obtain a predicted orientation label;
[0054] Step S430, constructing a loss function according to the predicted orientation label and the actual orientation label, and training the graph convolutional neural network model based on the loss function to obtain the skeleton detection model.
[0055] The following will be combined Figure 2 as well as Figure 3Steps S410 to S430 are explained and illustrated. First, a generated regional image is obtained; wherein the generated regional image recorded here can be an original painting obtained by hand-drawing, or an image generated based on a machine learning model, and this example does not impose special restrictions on this; at the same time, the generated regional image recorded here can include but is not limited to a generated facial regional image, a hand regional image or a foot regional image, etc.; then, the generated regional image is annotated to obtain an actual orientation label; wherein the actual orientation label recorded here can be left, right, forward, upward, downward, etc., and at the same time, under the categories of left, right, forward, upward, downward, etc., specific angles can also be included, such as 45 degrees to the left, etc.; when the annotation is completed, a data set can be constructed according to the actual orientation label and the corresponding generated regional image; secondly, after obtaining the data set, the posture skeleton points of the generated regional image in the data set can be extracted, and then the posture skeleton data can be calculated based on the posture skeleton points, and finally the posture skeleton points and the posture skeleton data are input into the graph convolutional neural network model together to obtain a predicted orientation label. For example, taking the generated regional image as a facial image, the generated facial image can be standardized to obtain the actual orientation label and then construct a data set. Then, the posture skeleton data is determined based on the posture skeleton points of the generated facial image and corresponding model training is performed.
[0056] In an exemplary embodiment, the specific processing process of the graph convolutional neural network on the posture skeleton points and posture skeleton data can be as follows:
[0057] First, the posture skeleton points and the posture skeleton data are normalized by using the first normalization layer and the second normalization layer, respectively, to obtain normalized skeleton point data and normalized skeleton data; the normalized skeleton point data and the normalized skeleton data are summed by using the first Einstein summation module and the second Einstein summation module in the depth map network module, to obtain the first summation result and the second summation result;
[0058] Secondly, the first sum operation result and the second sum operation result are spliced by using the second splicing layer included in the depth map network module to obtain a second splicing feature, and the second splicing feature is reconstructed and dimensionally transposed by the first dimension reconstruction module and the first dimension transposition module to obtain the bone point and the associated features of the bone;
[0059] Then, the second fully connected layer and the second dimension transposition module are used to perform full connection processing and dimension transposition processing on the associated features of the bone points and the bones, and the third normalization layer and the first activation layer are used to perform normalization processing and activation processing on the associated features of the processed bone points and the bones, so as to obtain the first associated features between the bone points and the bones and the second associated features between the bones and the bone points;
[0060] Further, the first pooling layer and the second pooling layer are used to perform dimensionality reduction processing on the first association feature and the second association feature, and the first splicing layer is used to splice the first association feature and the second association feature after the dimensionality reduction processing to obtain a first splicing feature;
[0061] Finally, the first concatenated feature is mapped to a preset orientation category through the first fully connected layer, and the probability of each orientation category is determined through the support vector machine classification model, and a predicted orientation label is obtained according to the probability of the orientation category.
[0062] Furthermore, after obtaining the predicted orientation label, the cross entropy loss function L1 can be constructed according to the predicted orientation label and the actual orientation label, which can be specifically shown in the following formula (1):
[0063]
[0064] Where n is the number of samples, y i ' is the predicted orientation label, y i is the actual orientation label.
[0065] (2) Content generation model: The content generation model described herein may be a Stable Diffusion model, i.e., a stable diffusion model, referred to as the SD model, which is a text-to-image content generation model. The images generated by the model itself are diverse. Therefore, in order to obtain the content generation model required by this embodiment, the Stable Diffusion model may be fine-tuned and trained using models such as LoRA (i.e., Low-Rank Adaptation) to obtain the content generation model. Of course, the SD model may also be fine-tuned and trained based on fine-tuning training methods such as the Dream Booth model, that is, additional learning and training is performed on the basis of the SD model, and information for controlling the style of the generated image is injected into the SD model. In this way, the model finally obtained by training can be used as the preset generation model, which can realize that after inputting a picture of any subject object, an image with multi-angle and multi-personality characteristics corresponding to the subject object can be output.
[0066] Furthermore, the specific training process of the content generation model is explained and illustrated using LoRA. Figure 5As shown in the figure, the specific training process of the content generation model can be achieved in the following ways:
[0067] Step S510, collecting virtual appearance parameters of the virtual character and real appearance parameters of the real character.
[0068] Specifically, the appearance parameters recorded here may include but are not limited to proportion parameters, shape parameters and other detail parameters of facial features, etc., and this example does not impose any special restrictions on this; the virtual characters recorded here refer to the characters that need to be generated in the game, and the specific character image settings can be manually drawn by game developers; the real characters recorded here can be real characters in reality, and this example does not impose any special restrictions on this.
[0069] Step S520, training a low-rank adaptation model based on the virtual appearance parameters and the real appearance parameters to obtain virtual low-rank matrix parameters corresponding to the virtual character and real low-rank matrix parameters corresponding to the real character.
[0070] Specifically, the low-rank adaptation model recorded here is also the LoRA model recorded above; during the training of the LoRA model, only the head area can be trained separately, or other parts of the body can be trained. This example does not impose any special restrictions on this.
[0071] Step S530, fine-tuning the stable diffusion model based on the virtual low-rank matrix parameters and the real low-rank matrix parameters to obtain the content generation large model.
[0072] Specifically, the stable diffusion model is fine-tuned based on the virtual low-rank matrix parameters and the real low-rank matrix parameters to obtain the content generation large model, which can be achieved in the following way: the original model parameters in the stable diffusion model are fine-tuned based on the virtual low-rank matrix parameters and the real low-rank matrix parameters to obtain the content generation large model; wherein the original model parameters include sampling iteration steps, sampling method parameters, prompt word relevance parameters, image seed parameters, image size parameters, model number parameters, model weight parameters, redrawing amplitude parameters, termination layer number, high-definition resolution restoration parameters and at least one of magnification; the prompt word relevance parameters are used to characterize the correlation between the virtual character and the real character, the model weight parameters are used to characterize the target appearance parameters of the two-dimensional original painting, and the redrawing amplitude parameters are used to characterize the amplitude of the virtual character that needs to be redrawn. That is, in the actual application process, the CFG (Configuration) index (prompt word correlation parameter) and sampling iteration steps (the initial setting of the CFG index is 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, and the initial setting of the sampling iteration steps is 10, 20, 30, 40, 50, 60) can be adjusted through the X / Y chart script to gradually optimize the training parameters of the model (Lora: virtual character: 0.6, Lora: real character: 0.4). Record the effect after each adjustment and generate a matrix chart for comparison. Finally, the optimal parameters are: Steps (sampling iteration steps): 25; Sampler (sampling method parameter): Euler a; CFG scale (prompt word relevance parameter): 5; Seed (image seed parameter): 299158947; Size (image size parameter): 512x768; Model hash (model number parameter): 79e42fb744; Model (model weight parameter): perfectWorld_v2Baked; Denoising strength (redrawing amplitude parameter): 0.5; Clip skip (termination layer number): 2; Hires upscale (high-definition resolution repair parameter): 2; Hires upscaler (magnification factor): Latent (bicubic antialiased)), to ensure that the generation effect meets the expected results.
[0073] It should be noted that the X / Y chart script recorded here refers to the similarity chart script between virtual characters and real characters. For details, please refer to Figure 6 As shown; the horizontal axis can represent the real character, and the vertical axis can represent the virtual character.
[0074] The following will be combined Figure 2-Figure 6 right Figure 1The method for generating the virtual character model shown in the figure is further explained and illustrated. Specifically:
[0075] In step S110, target image generation parameters required for generating a two-dimensional original picture of a virtual character are determined, and the two-dimensional original picture of the virtual character is generated based on the target image generation parameters.
[0076] In this exemplary embodiment, first, target image generation parameters required for generating a two-dimensional original painting of a virtual character are determined; specifically, the specific determination process of the target image generation parameters can be implemented in the following manner: first, a content generation node and an image generation node corresponding to the content generation model are created, and a two-dimensional image generation interface is generated based on the content generation node and the image generation node; secondly, in response to input operations on the content generation node and the image generation node in the two-dimensional image generation interface, the target image generation parameters required for generating a two-dimensional original painting of the virtual character are determined; wherein the content generation nodes recorded here may include model nodes, model control nodes, and digital nodes corresponding to the model nodes, etc.; the image generation nodes recorded here may include text and image generation nodes and text nodes corresponding to the text and image generation nodes, etc.
[0077] In an exemplary embodiment, in response to input operations on content generation nodes and image generation nodes in a two-dimensional image generation interface, determining the target image generation parameters required for generating a two-dimensional original painting of a virtual character can be achieved in the following manner: in response to input operations on model control nodes in the two-dimensional image generation interface, determining the edge parameters and / or bone parameters required for generating a two-dimensional original painting of the virtual character; and / or in response to input operations on digital nodes under model nodes in the two-dimensional image generation interface, determining the model parameters required for generating a two-dimensional original painting of the virtual character; in response to input operations on text nodes corresponding to text and image generation nodes in the two-dimensional image generation interface, determining text keywords required for generating a two-dimensional original painting of the virtual character; and obtaining the target image generation parameters based on the text keywords, edge parameters and / or bone parameters and / or model parameters. Among them, in response to the input operation of the model control node in the two-dimensional image generation interface, the edge parameters and / or bone parameters required for generating the two-dimensional original image of the virtual character are determined, which is achieved in the following manner: in response to the selection operation of the original edge image and / or the original bone image, the target edge image and / or the target bone image are determined from the original edge image and / or the original bone image; the target edge image and / or the target bone image are uploaded to the model control node to obtain the edge parameters and / or bone parameters; at the same time, the original edge image and the original bone image recorded here are obtained in the following manner: calling the area detection model and the bone detection model in the model control node, and detecting the original edge images of the virtual character at different angles based on the area detection model; and determining the original bone images of the virtual character at different angles based on the bone detection model.
[0078] Below, the specific determination process of the target image generation parameters will be further explained and illustrated. Specifically, when the aforementioned content generation large model, LoRA model and bone detection model training are completed, the specific generation process of the two-dimensional original painting can be directly made into a node applet with comfyUI to obtain a two-dimensional image generation interface. Subsequent operations only need to adjust the LoRA parameters and some other parameters based on the two-dimensional image generation interface. Further, in the process of generating the two-dimensional image generation interface, first, set the applet node to facilitate subsequent activation in the applet for easy sharing; secondly, establish a text node and enter the corresponding positive and negative keywords; then, create a digital node to adjust the corresponding lora parameters and output image size respectively; finally, create a model node, controlnet, and Wenshengtu node, and finally get the two-dimensional image generation interface. Based on this method, a complete standardized production process can be realized to help the project save and precipitate pipeline experience; at the same time, it can also support one-click sharing, which can be saved as a file for sharing and use among project members; further, it can also save labor costs and avoid the problem of low production efficiency due to the fact that the production process of assets of the same category (such as game characters) is almost the same, but still requires manual repetitive operations.
[0079] Further, after obtaining the two-dimensional image generation interface, the model weight parameters and LoRA matrix parameters of the large text-image generation model can be determined based on the digital nodes under the model node; the selected target edge image and target bone image are uploaded to the model control node controlnet, and the text node is filled with text keywords to obtain the target image generation parameters. Among them, the text keywords recorded here can include frown, Serious, heroic, grim, etc., or other keywords, and this example does not impose special restrictions on this; the reason why text keywords need to be entered is to further improve the accuracy of the two-dimensional original painting under the keyword scene.
[0080] Secondly, after obtaining the target image generation parameters, the two-dimensional original painting of the virtual character can be generated based on the target image generation parameters; specifically, it can be achieved in the following way: based on the control model under the model control node, the content generation model under the control model node generates a two-dimensional original painting according to the text keywords, edge parameters and / or bone parameters and / or model parameters and text keywords of the virtual character. That is, after obtaining the target image generation parameters, the two-dimensional original painting from multiple angles can be obtained by running the text-image generation model based on the control model; among them, taking the two-dimensional original painting as a two-dimensional head original painting as an example, the obtained two-dimensional original painting can refer to Figure 7 shown.
[0081] In step S120, an original three-dimensional model corresponding to the virtual character is constructed according to the two-dimensional original painting, and a model wiring grid and a model map in the original three-dimensional model are extracted.
[0082] In this exemplary embodiment, first, an original three-dimensional model corresponding to the virtual character is constructed according to the two-dimensional original painting; specifically, it can be implemented in the following manner: first, the basic character model of the virtual character is determined, and the position of the sub-parts included in the basic character model is located according to the two-dimensional original painting to obtain the model positioning result; the position of the sub-parts in the model positioning result is adjusted to obtain the original three-dimensional model. That is, in the actual application process, first, the basic character model can be loaded from the game development engine; wherein, the basic character model recorded here refers to the most original model, and does not include any other materials; secondly, the obtained multi-angle two-dimensional original painting is imported into the game engine; the relevant plug-in in the game engine will locate the position of the sub-parts of the basic character model according to the imported two-dimensional original painting; after the positioning is completed, the position of the sub-parts can also be adjusted twice; wherein, the secondary adjustment can be adjusted manually or adaptively, and this example does not impose any special restrictions on this.
[0083] For example, taking the original three-dimensional model as the original three-dimensional head model, the specific implementation process is: first, the basic character model can be loaded from the game development engine; wherein, the basic character model recorded here refers to the most original face model, excluding any facial features or other materials such as hair; secondly, the obtained multi-angle two-dimensional original painting is imported into the game engine; the relevant plug-ins in the game engine will locate the facial features of the basic character model according to the imported two-dimensional original painting; when the positioning is completed, the position of the facial features can be adjusted for the second time to obtain the original three-dimensional head model; at the same time, the specific generation process of the original three-dimensional hand model and the original three-dimensional foot model is similar to the specific generation process of the original three-dimensional head model, and no further details will be given here.
[0084] Secondly, extract the model wiring grid and model map in the original 3D model; taking the face area model as an example, the specific model wiring grid of the face area can be referred to Fig. 9 As shown; at the same time, the model texture recorded here may include but is not limited to a model face texture, a model hand texture and a model foot texture; for the model face texture, it may be Vface; for the model hand texture and the model foot texture, they may be selected according to actual needs, and this example does not impose any special restrictions on this; at the same time, the reason why the model wiring grid and the model texture need to be extracted is to ensure that the geometric structure of the three-dimensional model can be seamlessly connected with the two-dimensional original painting, so as to further improve the accuracy of the target three-dimensional model.
[0085] In step S130, a skin pore texture map is added to the original three-dimensional model according to the model wiring grid and the model map.
[0086] Specifically, in the process of adding skin pore texture map, the model wiring grid and model map can be imported into Zbrush for high-precision detail carving, so as to realize the addition of skin pore texture map; on this basis, the obtained target three-dimensional model can be made more realistic.
[0087] In step S140, a target model map is generated according to the skin pore texture map and the basic model map corresponding to the two-dimensional original painting, and the original three-dimensional model is rendered based on the target model map to obtain a target three-dimensional model of the virtual character.
[0088] In this example embodiment, first, a target model map is generated according to a skin pore texture map and a base model map corresponding to a two-dimensional original painting; specifically, this can be achieved in the following manner: the base model map corresponding to the two-dimensional original painting is obtained, and the skin pore texture map is optimized according to the original color map, the original normal map, the original roughness map, and the original regional feature map of the base model map to obtain the target model map. That is, in the actual application process, the base model map and the skin pore texture map can be imported into Substance for map optimization to obtain the target model map; at the same time, the map optimization process can be implemented from multiple different dimensions such as the original color map (basecolor), the original normal map (Normal), the original roughness map (Roughness), and the original regional feature map (Spec), thereby obtaining the target model map to ensure that the target model map can perform well under different lighting conditions. It should be noted that since the 2D original painting can include the 2D head original painting, the 2D hand original painting and the 2D foot original painting, the basic model texture recorded here can include the basic head model texture, the basic hand model texture and the basic foot model texture, etc.; in the actual application process, the textures of different areas can be selected for use to obtain the corresponding target model texture. Further, taking the head model texture as an example, the target model texture obtained can refer to Fig. 9 shown.
[0089] Secondly, based on the target model map, the original 3D model is rendered to obtain the target 3D model of the virtual character; wherein the target 3D model may include a 3D head model, a 3D hand model, a 3D foot model, etc.; further, in the actual application process, the low-poly model (original 3D model) and the target model map can be directly imported into the game engine, and the face map material can be added in the game engine to obtain the target 3D model; wherein, taking the head model map as an example, the obtained target 3D model can be referred to Fig.10 shown.
[0090] Finally, after obtaining the target three-dimensional model, the three-dimensional head model, the three-dimensional hand model and the three-dimensional foot model can be assembled to obtain a complete virtual character model.
[0091] So far, the method for generating a virtual character model recorded in the exemplary embodiment of the present disclosure has been fully realized. Based on the above-mentioned contents, it can be known that the method for generating a virtual character model recorded in the exemplary embodiment of the present disclosure can, on the one hand, improve the accuracy of the target three-dimensional model obtained, improve the generation efficiency of the target three-dimensional model, make the 2D original painting meet the 3D production requirements, and reduce the differentiation between the two links; on the other hand, reduce the amount of manual operation, and the whole process can be controlled through data processing results; at the same time, reduce the time cost and reduce the process of repeated modifications.
[0092] The following are embodiments of the device disclosed herein, which can be used to execute the method embodiments disclosed herein. For details not disclosed in the device embodiments disclosed herein, please refer to the method embodiments disclosed herein.
[0093] The exemplary embodiment of the present disclosure also provides a device for generating a virtual character model. Fig.11 As shown, the device for generating a virtual character model may include a two-dimensional original picture generating module 1110, a model map extracting module 1120, a texture map adding module 1130 and a target three-dimensional model generating module 1140. Among them:
[0094] The two-dimensional original picture generation module 1110 may be used to determine target image generation parameters required for generating a two-dimensional original picture of a virtual character, and generate the two-dimensional original picture of the virtual character based on the target image generation parameters;
[0095] The model texture extraction module 1120 may be used to construct an original three-dimensional model corresponding to the virtual character according to the two-dimensional original painting, and extract the model wiring grid and the model texture in the original three-dimensional model;
[0096] A texture map adding module 1130 may be used to add a skin pore texture map to the original three-dimensional model according to the model wiring grid and the model map;
[0097] The target three-dimensional model generation module 1140 can be used to generate a target model map according to the skin pore texture map and the basic model map corresponding to the two-dimensional original painting, and render the original three-dimensional model based on the target model map to obtain the target three-dimensional model of the virtual character.
[0098] In an exemplary embodiment of the present disclosure, the content generation node includes at least one of a model node, a model control node, and a digital node corresponding to the model node; the image generation node includes a text-image generation node and / or a text node corresponding to the text-image generation node;
[0099] Among them, in response to input operations on content generation nodes and image generation nodes in a two-dimensional image generation interface, target image generation parameters required for generating a two-dimensional original painting of a virtual character are determined, including: in response to input operations on model control nodes in the two-dimensional image generation interface, edge parameters and / or bone parameters required for generating a two-dimensional original painting of a virtual character are determined; and / or in response to input operations on digital nodes under model nodes in the two-dimensional image generation interface, model parameters required for generating a two-dimensional original painting of a virtual character are determined; in response to input operations on text nodes corresponding to text and image generation nodes in the two-dimensional image generation interface, text keywords required for generating a two-dimensional original painting of a virtual character are determined; and the target image generation parameters are obtained according to the text keywords, edge parameters and / or bone parameters and / or model parameters.
[0100] In an exemplary embodiment of the present disclosure, in response to an input operation to a model control node in the two-dimensional image generation interface, edge parameters and / or bone parameters required for generating a two-dimensional original image of a virtual character are determined, including: in response to a selection operation to an original edge image and / or an original bone image, a target edge image and / or a target bone image is determined from the original edge image and / or the original bone image; and the target edge image and / or the target bone image is uploaded to the model control node to obtain the edge parameters and / or bone parameters.
[0101] In an exemplary embodiment of the present disclosure, the original edge image and the original skeleton image are obtained in the following manner: calling the region detection model and the skeleton detection model in the model control node, and detecting the original edge images of the virtual character at different angles based on the region detection model; and determining the original skeleton images of the virtual character at different angles based on the skeleton detection model.
[0102] In an exemplary embodiment of the present disclosure, the skeleton detection model is obtained in the following manner: acquiring a generated regional image, and constructing a data set based on the generated regional image and the actual orientation label of the generated regional image; extracting the posture skeleton points of the generated regional image in the data set, and inputting the posture skeleton points into a graph convolutional neural network model to obtain a predicted orientation label; constructing a loss function based on the predicted orientation label and the actual orientation label, and training the graph convolutional neural network model based on the loss function to obtain the skeleton detection model.
[0103] In an exemplary embodiment of the present disclosure, the content generation large model is obtained in the following manner: collecting the virtual appearance parameters of the virtual character and the real appearance parameters of the real character; training a low-rank adaptation model based on the virtual appearance parameters and the real appearance parameters to obtain virtual low-rank matrix parameters corresponding to the virtual character and real low-rank matrix parameters corresponding to the real character; fine-tuning a stable diffusion model based on the virtual low-rank matrix parameters and the real low-rank matrix parameters to obtain the content generation large model.
[0104] In an exemplary embodiment of the present disclosure, the stable diffusion model is fine-tuned based on the virtual low-rank matrix parameters and the real low-rank matrix parameters to obtain the content generation large model, including: fine-tuning the original model parameters in the stable diffusion model based on the virtual low-rank matrix parameters and the real low-rank matrix parameters to obtain the content generation large model; wherein the original model parameters include sampling iteration steps, sampling mode parameters, prompt word relevance parameters, image seed parameters, image size parameters, model number parameters, model weight parameters, redrawing amplitude parameters, termination layer number, high-definition resolution restoration parameters and at least one of magnification; the prompt word relevance parameters are used to characterize the correlation between the virtual character and the real character, the model weight parameters are used to characterize the target appearance parameters of the two-dimensional original painting, and the redrawing amplitude parameters are used to characterize the amplitude of the virtual character that needs to be redrawn.
[0105] In an exemplary embodiment of the present disclosure, a two-dimensional original painting of the virtual character is generated based on the target image generation parameters, including: based on the control model under the model control node, a content generation large model under the control model node generates a two-dimensional original painting according to the edge parameters, bone parameters, model parameters and text keywords of the virtual character.
[0106] In an exemplary embodiment of the present disclosure, an original three-dimensional model corresponding to the virtual character is constructed based on a two-dimensional original painting, including: determining a basic character model of the virtual character, and locating the positions of sub-parts included in the basic character model according to the two-dimensional original painting to obtain a model positioning result; and adjusting the positions of the sub-parts in the model positioning result to obtain the original three-dimensional model.
[0107] In an exemplary embodiment of the present disclosure, a target model map is generated according to the skin pore texture map and a basic model map corresponding to the two-dimensional original painting, including: obtaining the basic model map corresponding to the two-dimensional original painting, and optimizing the skin pore texture map according to the original color map, original normal map, original roughness map and original regional feature map of the basic model map to obtain the target model map.
[0108] In an exemplary embodiment of the present disclosure, the two-dimensional original picture includes at least one of a two-dimensional head original picture, a two-dimensional hand original picture, and a two-dimensional foot original picture; the target three-dimensional model includes at least one of a three-dimensional head model, a three-dimensional hand model, and a three-dimensional foot model;
[0109] Wherein, the device for generating the virtual character model further comprises:
[0110] The target three-dimensional model splicing module can be used to generate a complete virtual character model based on the three-dimensional head model, the three-dimensional hand model and the three-dimensional foot model.
[0111] The specific details of each module in the above-mentioned virtual character model generation device have been described in detail in the corresponding virtual character model generation method, so they will not be repeated here.
[0112] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.
[0113] In addition, although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.
[0114] In an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.
[0115] Those skilled in the art will appreciate that various aspects of the present disclosure may be implemented as systems, methods or program products. Therefore, various aspects of the present disclosure may be specifically implemented in the following forms, namely: complete hardware implementation, complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to herein as "circuits", "modules" or "systems".
[0116] Refer to the following Fig.12 1200 according to this embodiment of the present disclosure is described. Fig.12 The electronic device 1200 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0117] like Fig.12 As shown, the electronic device 1200 is in the form of a general computing device. The components of the electronic device 1200 may include, but are not limited to: the at least one processing unit 1210, the at least one storage unit 1220, a bus 1230 connecting different system components (including the storage unit 1220 and the processing unit 1210), and a display unit 1240.
[0118] The storage unit stores program codes, which can be executed by the processing unit 1210, so that the processing unit 1210 performs the steps according to various exemplary embodiments of the present disclosure described in the above “Exemplary Method” section of this specification. For example, the processing unit 1210 can perform the following steps: Figure 1 The step S110 shown in the figure is as follows: determining target image generation parameters required for generating a two-dimensional original painting of a virtual character, and generating the two-dimensional original painting of the virtual character based on the target image generation parameters; step S120: constructing an original three-dimensional model corresponding to the virtual character according to the two-dimensional original painting, and extracting a model wiring grid and a model map in the original three-dimensional model; step S130: adding a skin pore texture map to the original three-dimensional model according to the model wiring grid and the model map; step S140: generating a target model map according to the skin pore texture map and a basic model map corresponding to the two-dimensional original painting, and rendering the original three-dimensional model based on the target model map to obtain a target three-dimensional model of the virtual character.
[0119] The storage unit 1220 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 12201 and / or a cache storage unit 12202 , and may further include a read-only storage unit (ROM) 12203 .
[0120] The storage unit 1220 may also include a program / utility 12204 having a set (at least one) of program modules 12205, such program modules 12205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0121] Bus 1230 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0122] The electronic device 1200 may also communicate with one or more external devices 1300 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 1200, and / or communicate with any device that enables the electronic device 1200 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 1250. In addition, the electronic device 1200 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 1260. As shown, the network adapter 1260 communicates with other modules of the electronic device 1200 via a bus 1230. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 1200, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0123] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation of the present disclosure.
[0124] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the above method of the present specification is stored. In some possible implementations, various aspects of the present disclosure may also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps according to various exemplary implementations of the present disclosure described in the above "Exemplary Method" section of the present specification.
[0125] According to the program product for implementing the above method in the embodiment of the present disclosure, it can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present disclosure is not limited thereto. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.
[0126] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0127] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0128] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
[0129] Program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).
[0130] In addition, the above-mentioned figures are only schematic illustrations of the processes included in the method according to the exemplary embodiments of the present disclosure, and are not intended to be limiting. It is easy to understand that the processes shown in the above-mentioned figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.
[0131] Other embodiments of the present disclosure will be readily apparent to those skilled in the art after considering the specification and practicing the inventions invented herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not invented by the present disclosure. The specification and examples are to be considered merely exemplary, and the true scope and spirit of the present disclosure are indicated by the claims.
Claims
1. A method for generating a virtual character model, characterized in that: include: Determining target image generation parameters required for generating a two-dimensional original picture of a virtual character, and generating the two-dimensional original picture of the virtual character based on the target image generation parameters; Constructing an original three-dimensional model corresponding to the virtual character according to the two-dimensional original painting, and extracting a model wiring grid and a model texture in the original three-dimensional model; Adding a skin pore texture map to the original three-dimensional model according to the model wiring grid and the model map; A target model map is generated according to the skin pore texture map and a basic model map corresponding to the two-dimensional original painting, and the original three-dimensional model is rendered based on the target model map to obtain a target three-dimensional model of the virtual character.
2. The method for generating a virtual character model according to claim 1, characterized in that: Determine the target image generation parameters required to generate the two-dimensional original painting of the virtual character, including: Creating content generation nodes and image generation nodes corresponding to the content generation macromodel, and generating a two-dimensional image generation interface according to the content generation nodes and image generation nodes; In response to input operations on content generation nodes and image generation nodes in the two-dimensional image generation interface, target image generation parameters required for generating a two-dimensional original image of a virtual character are determined.
3. The method for generating a virtual character model according to claim 2, characterized in that: The content generation node includes at least one of a model node, a model control node and a digital node corresponding to the model node; the image generation node includes a text-image generation node and / or a text node corresponding to the text-image generation node; Wherein, in response to input operations on the content generation node and the image generation node in the two-dimensional image generation interface, determining the target image generation parameters required for generating the two-dimensional original image of the virtual character includes: In response to an input operation on a model control node in the two-dimensional image generation interface, determining edge parameters and / or bone parameters required for generating a two-dimensional original image of a virtual character; and / or In response to an input operation on a digital node under a model node in the two-dimensional image generation interface, determining a model parameter required for generating a two-dimensional original image of a virtual character; In response to an input operation on a text node corresponding to a text-image generation node in the two-dimensional image generation interface, determining text keywords required for generating a two-dimensional original image of a virtual character; The target image generation parameters are obtained according to the text keywords, edge parameters and / or bone parameters and / or model parameters.
4. The method for generating a virtual character model according to claim 3, characterized in that: In response to an input operation on a model control node in the two-dimensional image generation interface, edge parameters and / or bone parameters required for generating a two-dimensional original image of a virtual character are determined, including: In response to a selection operation on an original edge image and / or an original bone image, determining a target edge image and / or a target bone image from the original edge image and / or the original bone image; The target edge image and / or target bone image are uploaded to the model control node to obtain the edge parameters and / or bone parameters.
5. The method for generating a virtual character model according to claim 4, characterized in that: The original edge image and the original bone image are obtained in the following manner: Calling the region detection model and the skeleton detection model in the model control node, and detecting the original edge images of the virtual character at different angles based on the region detection model; The original skeleton images of the virtual character at different angles are determined based on the skeleton detection model.
6. The method for generating a virtual character model according to claim 5, characterized in that: The skeleton detection model is obtained by: Acquire the generated region image, and construct a data set according to the generated region image and the actual orientation label of the generated region image; Extracting posture skeleton points of the generated regional images in the data set, and inputting the posture skeleton points into a graph convolutional neural network model to obtain a predicted orientation label; A loss function is constructed according to the predicted orientation label and the actual orientation label, and a graph convolutional neural network model is trained based on the loss function to obtain the skeleton detection model.
7. The method for generating a virtual character model according to claim 2, characterized in that: The content generation model is obtained in the following way: Collecting virtual appearance parameters of the virtual character and real appearance parameters of the real character; Training a low-rank adaptation model based on the virtual appearance parameters and the real appearance parameters to obtain virtual low-rank matrix parameters corresponding to the virtual character and real low-rank matrix parameters corresponding to the real character; The stable diffusion model is fine-tuned based on the virtual low-rank matrix parameters and the real low-rank matrix parameters to obtain the content generation large model.
8. The method for generating a virtual character model according to claim 7, characterized in that: The stable diffusion model is fine-tuned based on the virtual low-rank matrix parameters and the real low-rank matrix parameters to obtain the content generation model, including: The original model parameters in the stable diffusion model are fine-tuned based on the virtual low-rank matrix parameters and the real low-rank matrix parameters to obtain the content generation large model; wherein the original model parameters include at least one of the sampling iteration step number, sampling mode parameter, prompt word relevance parameter, image seed parameter, image size parameter, model number parameter, model weight parameter, redrawing amplitude parameter, termination layer number, high-definition resolution restoration parameter and magnification; The prompt word correlation parameter is used to characterize the correlation between the virtual character and the real character, the model weight parameter is used to characterize the target appearance parameter of the two-dimensional original painting, and the redrawing amplitude parameter is used to characterize the amplitude by which the virtual character needs to be redrawn.
9. The method for generating a virtual character model according to claim 1, characterized in that: Generating a two-dimensional original picture of the virtual character based on the target image generation parameter includes: Based on the control model under the model control node, the content under the control model node generates a large model to generate a two-dimensional original painting according to the text keywords, edge parameters and / or bone parameters and / or model parameters and text keywords of the virtual character.
10. The method for generating a virtual character model according to claim 1, characterized in that: Constructing an original three-dimensional model corresponding to the virtual character according to the two-dimensional original painting, including: Determining a basic character model of the virtual character, and locating positions of sub-parts included in the basic character model according to the two-dimensional original drawing to obtain a model positioning result; The positions of the sub-parts in the model positioning result are adjusted to obtain the original three-dimensional model.
11. The method for generating a virtual character model according to claim 1, characterized in that: Generating a target model map according to the skin pore texture map and a basic model map corresponding to the two-dimensional original painting includes: A basic model map corresponding to the two-dimensional original painting is obtained, and the skin pore texture map is optimized according to the original color map, the original normal map, the original roughness map and the original regional feature map of the basic model map to obtain the target model map.
12. The method for generating a virtual character model according to any one of claims 1 to 11, characterized in that: The two-dimensional original picture includes at least one of a two-dimensional head original picture, a two-dimensional hand original picture, and a two-dimensional foot original picture; the target three-dimensional model includes at least one of a three-dimensional head model, a three-dimensional hand model, and a three-dimensional foot model; Wherein, the method for generating the virtual character model further comprises: A complete virtual character model is generated based on the three-dimensional head model, the three-dimensional hand model and the three-dimensional foot model.
13. A device for generating a virtual character model, characterized in that: include: A two-dimensional original picture generation module, used to determine target image generation parameters required to generate a two-dimensional original picture of a virtual character, and generate the two-dimensional original picture of the virtual character based on the target image generation parameters; A model texture extraction module, used to construct an original three-dimensional model corresponding to the virtual character according to the two-dimensional original painting, and extract a model wiring grid and a model texture in the original three-dimensional model; A texture map adding module, used for adding a skin pore texture map to the original three-dimensional model according to the model wiring grid and the model map; The target three-dimensional model generation module is used to generate a target model map according to the skin pore texture map and the basic model map corresponding to the two-dimensional original painting, and render the original three-dimensional model based on the target model map to obtain the target three-dimensional model of the virtual character.
14. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for generating a virtual character model according to any one of claims 1 to 12 is implemented.
15. An electronic device, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; Wherein, the processor is configured to execute the method for generating a virtual character model according to any one of claims 1 to 12 by executing the executable instructions.
Citation Information
Cited By
Interface interaction method and device, equipment and storage medium
CN121029035A