Model rendering method and device, computer program product and electronic equipment

By converting the initial pattern picture into a pattern grayscale picture and generating a three-dimensional model, the problem of high complexity in relief assets is solved, and the effect of rapid rendering and cost reduction is achieved.

CN119206025APending Publication Date: 2024-12-27NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411266799.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-10
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

In the prior art, the production of relief assets is complicated, cumbersome, long cycle, high cost and difficult to adjust.

Method used

By obtaining the initial pattern picture, converting it into a pattern grayscale picture, a three-dimensional model with a pattern structure is generated, and a target model with a material effect is rendered based on the target material.

Benefits of technology

Simplifies the generation speed of 3D models, reduces rendering complexity and cost, and facilitates the adjustment of rendering results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119206025A_ABST
    Figure CN119206025A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of model rendering, and relates to a model rendering method and device, a computer program product and electronic equipment. The method comprises the following steps: acquiring an initial pattern picture, and converting the initial pattern picture into a pattern gray scale picture; wherein the initial pattern picture has a complex pattern structure; generating a three-dimensional model with a pattern structure based on the pattern gray scale picture; and determining a target material represented by the initial pattern picture, and rendering a target model with a material effect corresponding to the target material based on the target material and the three-dimensional model. According to the method and the device, after the pattern gray scale picture is obtained, the three-dimensional model with the pattern structure can be quickly generated, and subsequent rendering of the target model with the complex pattern structure is efficiently realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of model rendering, and in particular to a model rendering method and a model rendering device, a computer-readable storage medium, and an electronic device. Background Art

[0002] In games, sometimes some relief-type game assets are needed.

[0003] The common method of generating relief in games is to perform high-poly carving in the painting model, then topologically refine its low-poly model and unfold the texture in the rendering software, and use the baking software to bake the required normal map, and finally create the material effect in the texture mapping software. This makes the production of relief assets complicated and tedious, with a long production cycle, high cost, and difficult to adjust.

[0004] In view of this, there is an urgent need in the art to develop a new model rendering method and device.

[0005] 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

[0006] The purpose of the present disclosure is to provide a model rendering method, a model rendering device, a computer-readable storage medium and an electronic device, thereby at least to a certain extent overcoming the problems of complex and cumbersome production of relief assets, long production cycle, high cost and difficulty in adjustment caused by related technologies.

[0007] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present disclosure.

[0008] According to a first aspect of an embodiment of the present invention, a model rendering method is provided, the method comprising: obtaining an initial pattern image, and converting the initial pattern image into a pattern grayscale image; wherein the initial pattern image has a complex pattern structure; based on the pattern grayscale image, generating a three-dimensional model having the pattern structure; determining a target material represented by the initial pattern image, and based on the target material and the three-dimensional model, rendering a target model having a material effect corresponding to the target material.

[0009] According to a second aspect of an embodiment of the present invention, a model rendering device is provided, the device comprising: a conversion module, configured to obtain an initial pattern image, and convert the initial pattern image into a pattern grayscale image; wherein the initial pattern image has a complex pattern structure; a generation module, configured to generate a three-dimensional model having the pattern structure based on the pattern grayscale image; and a rendering module, configured to determine a target material represented by the initial pattern image, and based on the target material and the three-dimensional model, render a target model having a material effect corresponding to the target material.

[0010] According to a third aspect of an embodiment of the present invention, there is provided an electronic device, comprising: a processor and a memory; wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the model rendering method of any of the above exemplary embodiments is implemented.

[0011] According to a fourth aspect of an embodiment of the present invention, there is provided a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the model rendering method in any of the above exemplary embodiments is implemented.

[0012] It can be seen from the above technical solutions that the model rendering method, model rendering device, computer storage medium and electronic device in the exemplary embodiments of the present invention have at least the following advantages and positive effects:

[0013] In the method and device provided by the exemplary embodiments of the present disclosure, an initial pattern image is obtained, the initial pattern image is converted into a pattern grayscale image, a three-dimensional model with a pattern structure is generated based on the pattern grayscale image, a target material represented by the initial pattern image is determined, and based on the target material and the three-dimensional model, a target model with a material effect corresponding to the target material is rendered. On the one hand, the generation method based on the pattern grayscale image speeds up the speed of generating the three-dimensional model with a pattern structure; on the other hand, after having the initial pattern image, a target model with material effects and a complex pattern structure can be rendered, which reduces the complexity of the rendering process, shortens the rendering cycle and the rendering cost; on another hand, if a new target model needs to be rendered later, it is only necessary to change the initial pattern image, which is convenient for adjusting the rendering result.

[0014] 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

[0015] 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.

[0016] Figure 1 The schematic diagram of the process of the model rendering method in the embodiment of the present disclosure is shown;

[0017] Figure 2 The initial pattern picture in the embodiment of the present disclosure is schematically shown;

[0018] Figure 3 The pattern grayscale picture in the embodiment of the present disclosure is schematically shown;

[0019] Figure 4 A schematic diagram of software for adjusting the clarity of an initial pattern image in an embodiment of the present disclosure is schematically shown;

[0020] Figure 5 Schematically shows a target pattern image with a clear pattern structure in an embodiment of the present disclosure;

[0021] Figure 6 A three-dimensional model in an embodiment of the present disclosure is schematically shown;

[0022] Figure 7 A schematic diagram of generating a three-dimensional model with a pattern structure using Zbrush software (a digital sculpture and painting software) in an embodiment of the present disclosure is schematically shown;

[0023] Figure 8 Another three-dimensional model in an embodiment of the present disclosure is schematically shown;

[0024] Fig. 9 The target model having a surface with a metallic effect and a pattern structure in the embodiment of the present disclosure is schematically shown;

[0025] Fig.10 A device for a model rendering method in an embodiment of the present disclosure is schematically shown;

[0026] Fig.11 An electronic device for a model rendering method in an embodiment of the present disclosure is schematically shown;

[0027] Fig.12 A computer program product for a model rendering method in an embodiment of the present disclosure is schematically illustrated. DETAILED DESCRIPTION

[0028] 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.

[0029] The terms "a", "an", "the" and "said" are used in this specification to indicate the presence of one or more elements / components / etc.; the terms "including" and "having" are used to express an open-ended inclusion and mean that additional elements / components / etc. may exist in addition to the listed elements / components / etc.; the terms "first" and "second" etc. are used only as labels and are not intended to limit the quantity of their objects.

[0030] 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 drawings represent the same or similar parts, and their repeated descriptions 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.

[0031] In view of the problems existing in the related art, the present disclosure proposes a model rendering method. Figure 1 The schematic diagram of the flow chart of the model rendering method in the embodiment of the present disclosure is shown as follows: Figure 1 As shown, the model rendering method includes at least the following steps:

[0032] Step S110. Obtain an initial pattern image, and convert the initial pattern image into a pattern grayscale image; wherein the initial pattern image has a complex pattern structure.

[0033] Step S120: Generate a three-dimensional model with a pattern structure based on the pattern grayscale image.

[0034] Step S130: Determine the target material represented by the initial pattern image, and render a target model having a material effect corresponding to the target material based on the target material and the three-dimensional model.

[0035] In the method and device provided by the exemplary embodiments of the present disclosure, an initial pattern image is obtained, the initial pattern image is converted into a pattern grayscale image, a three-dimensional model with a pattern structure is generated based on the pattern grayscale image, a target material represented by the initial pattern image is determined, and based on the target material and the three-dimensional model, a target model with a material effect corresponding to the target material is rendered. On the one hand, the generation method based on the pattern grayscale image speeds up the speed of generating the three-dimensional model with a pattern structure; on the other hand, after having the initial pattern image, a target model with material effects and a complex pattern structure can be rendered, which reduces the complexity of the rendering process, shortens the rendering cycle and the rendering cost; on another hand, if a new target model needs to be rendered later, it is only necessary to change the initial pattern image, which is convenient for adjusting the rendering result.

[0036] The following is a detailed description of each step of the model rendering method.

[0037] In step S110, an initial pattern image is obtained, and the initial pattern image is converted into a pattern grayscale image; wherein the initial pattern image has a complex pattern structure.

[0038] In an exemplary embodiment of the present disclosure, the initial pattern image refers to an image with a complex pattern structure, and the complex pattern structure meets the requirements for certain assets in the game. For example, Figure 2 The initial pattern picture in the embodiment of the present disclosure is schematically shown, wherein, Figure 2 As shown, the pattern structure in the initial pattern image is relatively complex, consisting of many different shapes in different combinations.

[0039] It is worth noting that the initial pattern image can be a picture designed by an artist or a picture downloaded from a resource pool. The initial pattern image can be a relief image with a complex pattern structure, a painting with a complex pattern structure, or a gun with a complex pattern structure. This exemplary embodiment does not make any special limitations on this.

[0040] After obtaining the initial pattern image, in order to generate a 3D model later, the initial pattern image needs to be converted into a pattern grayscale image. The initial pattern image has corresponding colors, and the converted pattern grayscale image only has gray and white. For example, using a grayscale image conversion tool (such as RreamMaker software), you can Figure 2 Convert to get Figure 3 Grayscale image of the pattern shown.

[0041] In an optional embodiment, the initial pattern image is a blurred image; before converting the initial pattern image into a pattern grayscale image, the method also includes: determining a model size requirement, and adjusting the size of the initial pattern image according to the model size requirement; and adjusting the clarity of the adjusted initial pattern image to obtain a target pattern image with a clear pattern structure.

[0042] The initial pattern image may be a blurred image.

[0043] Based on this, in order to clearly display the complex pattern structure, the clarity of the initial pattern image needs to be adjusted. Before adjusting the clarity, the model size of the initial pattern image is adjusted according to the model size requirements, so that the adjusted initial pattern image can be smoothly imported into the corresponding software (such as RreamMaker software).

[0044] After the adjusted initial pattern image is imported into the corresponding software, the software is used to improve its clarity to obtain a target pattern image that can clearly display the complex pattern structure.

[0045] For example, Figure 4 The following is a schematic diagram of software for adjusting the clarity of the initial pattern image in an embodiment of the present disclosure, as shown in FIG. Figure 4 As shown, the size of the initial pattern image can be adjusted by sliding the control 410, and the clarity of the initial pattern image after the size adjustment can be adjusted by sliding the control 420, so as to finally obtain the following Figure 5 The target pattern image with a clear pattern structure is shown in FIG. Then, the target pattern image is converted into Figure 3 Grayscale image of the pattern shown.

[0046] In step S120, a three-dimensional model having a pattern structure is generated based on the pattern grayscale image.

[0047] In the exemplary embodiments of the present disclosure, the grayscale image is also called a height map. The darker the color in the pattern grayscale image, the lighter the color in the three-dimensional model, and the whiter the pattern grayscale image, the thicker the color in the three-dimensional model. A three-dimensional model (i.e., a three-dimensional model) with a pattern structure can be generated by different depths and thicknesses.

[0048] For example, Figure 6 Based on Figure 5 The generated 3D model is obviously Figure 6 The model shown not only has a three-dimensional structure but also has Figure 5 The pattern structure shown.

[0049] In an optional embodiment, a three-dimensional model with a pattern structure is generated based on a pattern grayscale image, including: filtering out grayscale gradients in the pattern grayscale image to obtain a standard pattern grayscale image; wherein the standard pattern grayscale image records grayscale information at different pixels; and generating a three-dimensional model with a pattern structure based on the grayscale information at different pixels.

[0050] The pattern grayscale image generated by the grayscale image conversion tool may have grayscale gradients. Since the initial pattern image does not have a gradient effect corresponding to the grayscale gradient, the grayscale gradient needs to be filtered out from the pattern grayscale image to obtain a standard pattern grayscale image without grayscale gradients.

[0051] Different pixels of the standard pattern restoration image record different grayscale information, and different grayscale information represents different degrees of gray, some are lighter and some are darker.

[0052] Gray information of different grayscale levels is related to different thicknesses in the three-dimensional model. Therefore, based on the grayscale information at different pixels, a three-dimensional model (ie, a three-dimensional model) with a pattern structure can be generated.

[0053] For example, Figure 3 The texture grayscale image has a grayscale gradient from the upper left to the lower right, so it is necessary to filter out the grayscale gradient to obtain a standard pattern grayscale image, and then generate a pattern structure based on the standard pattern grayscale image. Figure 6 The three-dimensional model shown.

[0054] In an optional embodiment, a three-dimensional model with a pattern structure is generated based on grayscale information at different pixels, which speeds up the generation of the three-dimensional model and helps to subsequently increase the speed of rendering the target model.

[0055] In an optional embodiment, a three-dimensional model with a pattern structure is generated based on grayscale information at different pixels, including: determining a mapping relationship between grayscale information at different pixels and a concave-convex structure of the model, and generating a three-dimensional model with a pattern structure based on the mapping relationship.

[0056] The concave-convex structure of the model refers to the thickness of different positions of the model. Some positions are convex, while others are shallow and flat. The mapping relationship refers to the correspondence between the grayscale information and the concave-convex structure of the model. Specifically, the lighter the gray level represented by the grayscale information, the more convex the concave-convex structure of the model, and the darker the gray level represented by the grayscale information, the shallower the concave-convex structure of the model.

[0057] Based on such a mapping relationship, a stereoscopic model (ie, a three-dimensional model) having a pattern structure can be generated according to the grayscale information of the pattern grayscale image at different pixels.

[0058] For example, Figure 7 The schematic diagram of using Zbrush software (a digital sculpture and painting software) to generate a three-dimensional model with a pattern structure in an embodiment of the present disclosure is shown schematically. Figure 7 As shown, the pattern grayscale image is imported into the Zbrush software. At this time, the pattern grayscale image 710 is touched, the pattern grayscale image is used as a brush mask, and a click is made in the interface 720. At this time, the Zbrush software will generate the following based on the mapping relationship: Figure 6 The three-dimensional model with pattern structure shown.

[0059] In an optional embodiment, based on the mapping relationship, a three-dimensional model with a pattern structure can be quickly generated, thereby improving the efficiency of generating the three-dimensional model.

[0060] In an optional embodiment, after generating the three-dimensional model with the pattern structure, the method further includes: topologically converting the three-dimensional model into a low-poly model.

[0061] The currently generated three-dimensional model with a pattern structure is a high-poly model (i.e., a high-precision model). Since the high-poly model has high resolution and a large number of model details, if the high-poly model is directly used as a game asset, the energy consumption of the game will increase.

[0062] Based on this, the 3D model needs to be topologically converted into a low-poly model (i.e., a low-precision model). For example, the 3D model can be imported into 3Dmax software (a 3D rendering and production software) to topologically convert the 3D model into a low-poly model.

[0063] In an optional embodiment, the three-dimensional model is topologically transformed into a low-poly model, thereby effectively reducing the consumption of game resources by the target model subsequently rendered.

[0064] In an optional embodiment, after generating the three-dimensional model with the pattern structure, the method further includes: deleting a model portion of the three-dimensional model that meets the deletion requirement.

[0065] Among them, the generated three-dimensional model with pattern structure is as follows Figure 6 As shown, in Figure 6 In the model, the peripheral part without pattern structure is not needed (this is because the peripheral part has no pattern structure). In this case, the peripheral part without pattern structure is the part of the model that needs to be deleted. In Zbrush software, the cutting command can be used to delete the part of the model that meets the deletion requirements, and the following is obtained: Figure 8In addition, the model part that meets the deletion requirement may also be any currently unnecessary part of the three-dimensional model, and any currently unnecessary part may be a part with a pattern structure or a part without a pattern structure, which is not specifically limited in this exemplary embodiment.

[0066] In an optional embodiment, deleting a model portion in the three-dimensional model that meets the deletion requirement helps to obtain a three-dimensional model that meets the model requirement, thereby improving the accuracy of a target model subsequently rendered.

[0067] In step S130, the target material represented by the initial pattern image is determined, and based on the target material and the three-dimensional model, a target model having a material effect corresponding to the target material is rendered.

[0068] In the exemplary embodiment of the present disclosure, the target material describes the properties of the surface texture, color, reflection and transparency of the initial pattern image. After the target material is obtained, the three-dimensional model is rendered based on the target material to obtain a three-dimensional model (i.e., the target model) having a target material effect corresponding to the target material and a complex pattern structure.

[0069] In an optional embodiment, based on the target material and the three-dimensional model, a target model with material effects corresponding to the target material is rendered, including: generating a material ball corresponding to the target material; using the material ball to render a low-poly model, and rendering a target model with material effects corresponding to the target material.

[0070] The material ball refers to a tool used to simulate the target material. After the material ball is generated, the corresponding target material effect can be directly rendered in the low-poly model using the material ball to obtain a three-dimensional model (i.e., the target model) with the target material effect corresponding to the target material and a complex pattern structure.

[0071] For example, Figure 5 The initial pattern image shown has a metal material. Based on this, a material ball representing the metal material is generated, and the low-poly model is rendered using the material ball to obtain a target model with a metal surface effect and a pattern structure, such as Fig. 9 shown.

[0072] In an optional embodiment, the generated material ball can be used to not only improve the efficiency of rendering the target material, but also enhance the material effect of the target model.

[0073] In the method and device provided by the exemplary embodiments of the present disclosure, an initial pattern image is obtained, the initial pattern image is converted into a pattern grayscale image, a three-dimensional model with a pattern structure is generated based on the pattern grayscale image, a target material represented by the initial pattern image is determined, and based on the target material and the three-dimensional model, a target model with a material effect corresponding to the target material is rendered. On the one hand, the generation method based on the pattern grayscale image speeds up the speed of generating the three-dimensional model with a pattern structure; on the other hand, after having the initial pattern image, a target model with material effects and a complex pattern structure can be rendered, which reduces the complexity of the rendering process, shortens the rendering cycle and the rendering cost; on another hand, if a new target model needs to be rendered later, it is only necessary to change the initial pattern image, which is convenient for adjusting the rendering result.

[0074] In addition, in an exemplary embodiment of the present disclosure, a model rendering device is also provided. Fig.10 A schematic diagram of the structure of the model rendering device is shown in FIG. Fig.10 As shown, the model rendering device 1000 may include: a conversion module 1010, a generation module 1020 and a rendering module 1030. Among them:

[0075] The conversion module 1010 is configured to obtain an initial pattern image and convert the initial pattern image into a pattern grayscale image; wherein the initial pattern image has a complex pattern structure; the generation module 1020 is configured to generate a three-dimensional model with a pattern structure based on the pattern grayscale image; the rendering module 1030 is configured to determine the target material represented by the initial pattern image, and based on the target material and the three-dimensional model, render a target model with a material effect corresponding to the target material.

[0076] In an exemplary embodiment of the present disclosure, based on the aforementioned scheme, a generation module 1020 includes: a filtering module, configured to filter out the grayscale gradient in the pattern grayscale image to obtain a standard pattern grayscale image; wherein the standard pattern grayscale image records the grayscale information at different pixels; and a model generation module, configured to generate a three-dimensional model with a pattern structure based on the grayscale information at different pixels.

[0077] In an exemplary embodiment of the present disclosure, based on the aforementioned scheme, the model generation module includes: a mapping relationship determination module, which is configured to determine the mapping relationship between the grayscale information at different pixels and the concave-convex structure of the model, and generate a three-dimensional model with a pattern structure based on the mapping relationship.

[0078] In an exemplary embodiment of the present disclosure, based on the aforementioned scheme, the conversion module 1010 also includes: a size adjustment module, configured to determine the model size requirement, and adjust the size of the initial pattern image according to the model size requirement; a clarity processing module, configured to adjust the clarity of the adjusted initial pattern image to obtain a target pattern image with a clear pattern structure.

[0079] In an exemplary embodiment of the present disclosure, based on the above solution, the generation module 1020 further includes: a topology module configured to topology the three-dimensional model into a low-poly model.

[0080] In an exemplary embodiment of the present disclosure, based on the aforementioned scheme, the rendering module 1030 includes: a material ball generation module, configured to generate a material ball corresponding to the target material; and a model rendering module, configured to use the material ball to render a low-poly model, and render a target model with a material effect corresponding to the target material.

[0081] In an exemplary embodiment of the present disclosure, based on the above-mentioned solution, the generation module 1020 further includes: a deletion module configured to delete the model part that meets the deletion requirement in the three-dimensional model.

[0082] The specific details of the above-mentioned model rendering device 1000 have been described in detail in the corresponding model rendering method, so they are not repeated here.

[0083] It should be noted that although several modules or units of the model rendering device 1000 are mentioned in the above detailed description, such 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. Conversely, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.

[0084] In addition, in an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.

[0085] Refer to the following Fig.11 1100 according to this embodiment of the present invention will be described. Fig.11 The electronic device 1100 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0086] like Fig.11As shown, the electronic device 1100 is in the form of a general computing device. The components of the electronic device 1100 may include, but are not limited to: the at least one processing unit 1110, the at least one storage unit 1120, a bus 1130 connecting different system components (including the storage unit 1120 and the processing unit 1110), and a display unit 1140.

[0087] The storage unit stores program codes, which can be executed by the processing unit 1110, so that the processing unit 1110 executes the steps according to various exemplary embodiments of the present invention described in the above “Exemplary Method” section of this specification.

[0088] The storage unit 1120 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 1121 and / or a cache memory unit 1122 , and may further include a read-only memory unit (ROM) 1123 .

[0089] The storage unit 1120 may also include a program / utility 1124 having a set (at least one) of program modules 1125, such program modules 1125 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 the reality of a network environment.

[0090] Bus 1130 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.

[0091] The electronic device 1100 may also communicate with one or more external devices 1170 (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 1100, and / or communicate with any device that enables the electronic device 1100 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 1150. Furthermore, the electronic device 1100 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 1160. As shown, the network adapter 1160 communicates with other modules of the electronic device 1100 via a bus 1130. 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 1100, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0092] The processor in the electronic device can implement the following operations in the virtual background generation method by executing machine executable instructions:

[0093] An initial pattern image is obtained, and the initial pattern image is converted into a pattern grayscale image; wherein the initial pattern image has a complex pattern structure; based on the pattern grayscale image, a three-dimensional model having the pattern structure is generated; a target material represented by the initial pattern image is determined, and based on the target material and the three-dimensional model, a target model having a material effect corresponding to the target material is rendered.

[0094] The grayscale gradient in the pattern grayscale image is filtered out to obtain a standard pattern grayscale image; wherein the standard pattern grayscale image records the grayscale information at different pixels; based on the grayscale information at different pixels, a three-dimensional model with a pattern structure is generated.

[0095] The mapping relationship between the grayscale information at different pixels and the concave-convex structure of the model is determined, and based on the mapping relationship, a three-dimensional model with a pattern structure is generated.

[0096] The model size requirement is determined, and the size of the initial pattern image is adjusted according to the model size requirement; the emotional degree of the adjusted initial pattern image is adjusted to obtain a target pattern image with a clear pattern structure.

[0097] Topology the 3D model into a low-poly model.

[0098] Generate a material ball corresponding to the target material; use the material ball to render the low-poly model, and render a target model with a material effect corresponding to the target material.

[0099] Delete the model part that meets the deletion requirements in the 3D model.

[0100] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the embodiment 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, and includes 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 embodiment of the present disclosure.

[0101] 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 embodiments, various aspects of the present invention can 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 perform the steps according to various exemplary embodiments of the present invention described in the above "Exemplary Method" section of the present specification.

[0102] refer to Fig.12 As shown, a program product 1200 for implementing the above method according to an embodiment of the present invention is described, which 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 invention 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.

[0103] 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.

[0104] 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.

[0105] 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.

[0106] Program code for performing the operations of the present invention 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).

[0107] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed 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 technical means in the art that are not disclosed in the present disclosure. The specification and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.

Claims

1. A model rendering method, characterized in that: The method comprises: Acquire an initial pattern image, and convert the initial pattern image into a pattern grayscale image; wherein the initial pattern image has a complex pattern structure; Based on the pattern grayscale image, generating a three-dimensional model having the pattern structure; A target material represented by the initial pattern image is determined, and based on the target material and the three-dimensional model, a target model having a material effect corresponding to the target material is rendered.

2. The method according to claim 1, characterized in that The step of generating a three-dimensional model having the pattern structure based on the pattern grayscale image comprises: Filtering out the grayscale gradient in the pattern grayscale picture to obtain a standard pattern grayscale picture; wherein the standard pattern grayscale picture records the grayscale information at different pixels; Based on the grayscale information at different pixels, a three-dimensional model with the pattern structure is generated.

3. According to claim 2, it is characterized in that: The step of generating a three-dimensional model having the pattern structure based on the grayscale information at different pixels comprises: A mapping relationship between grayscale information at different pixels and the concave-convex structure of the model is determined, and based on the mapping relationship, a three-dimensional model with the pattern structure is generated.

4. The method according to claim 1, characterized in that: The initial pattern image is a blurred image; Before converting the initial pattern image into a pattern grayscale image, the method further includes: Determine the model size requirement, and adjust the size of the initial pattern image according to the model size requirement; The clarity of the adjusted initial pattern image is adjusted to obtain a target pattern image with a clear pattern structure.

5. The method according to claim 1, characterized in that After generating the three-dimensional model having the pattern structure, the method further comprises: The three-dimensional model is topologically transformed into a low-poly model.

6. The method according to claim 5, characterized in that The step of rendering a target model having a material effect corresponding to the target material based on the target material and the three-dimensional model includes: Generate a material ball corresponding to the target material; The low-poly model is rendered using the material ball to render a target model having a material effect corresponding to the target material.

7. The method according to claim 1, characterized in that After generating the three-dimensional model having the pattern structure, the method further comprises: The model portion that meets the deletion requirement in the three-dimensional model is deleted.

8. A model rendering device, characterized in that: The device comprises: A conversion module is configured to obtain an initial pattern image and convert the initial pattern image into a pattern grayscale image; wherein the initial pattern image has a complex pattern structure; A generating module, configured to generate a three-dimensional model having the pattern structure based on the pattern grayscale image; The rendering module is configured to determine the target material represented by the initial pattern image, and based on the target material and the three-dimensional model, render a target model having a material effect corresponding to the target material.

9. An electronic device, characterized in that: include: processor; A memory, configured to store executable instructions of the processor; The processor is configured to perform the method of any one of claims 1 to 7 by executing the executable instructions.

10. A computer program product, comprising a computer program, characterized in that When the computer program is processed and executed, the method described in any one of claims 1 to 7 is implemented.