Model rendering method and device, equipment and storage medium

By lighting rendering and watercolor texture rendering on the rendered object model and mixing the two, the problem that the existing technology cannot simulate the material effect of watercolor brushstrokes is solved, and high-quality watercolor smudge rendering effect is achieved.

CN119516082APending Publication Date: 2025-02-25NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411951025.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-26
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

The existing technology cannot simulate the material effect of watercolor brushstrokes, and cannot render watercolor textures, which limits the stylized quality of model rendering.

Method used

By illuminating the rendered object model, the basic light and shadow transition information is obtained; the model is textured rendered with preset watercolor maps to obtain watercolor texture noise information; the basic light and shadow transition information and watercolor texture noise information are mixed to obtain watercolor bleaching transition information; finally rendering based on the watercolor bleaching transition information is generated to generate a target object model containing watercolor bleaching effects.

Benefits of technology

The material effect simulation of watercolor brushstrokes is realized, the stylized quality of model rendering is improved, and the light and shadow transition effect can be generated with watercolor smudge effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119516082A_ABST
    Figure CN119516082A_ABST
Patent Text Reader

Abstract

The invention provides a model rendering method and device, equipment and a storage medium, and relates to the technical field of computers. The method comprises the steps of performing illumination rendering on a to-be-rendered object model to obtain basic light and shadow transition information of the to-be-rendered object model; performing texture rendering on the to-be-rendered object model by adopting a preset watercolor chartlet to obtain watercolor texture noise information of the to-be-rendered object model; mixing the basic shadow transition information and the watercolor texture noise information to obtain watercolor shading transition information of the to-be-rendered object model; and obtaining a target object model corresponding to the to-be-rendered object model according to the watercolor shading transition information. According to the method, the to-be-rendered object model can be rendered through the watercolor shading transition information, the obtained target object model contains a watercolor shading light and shadow transition effect, and the quality of stylized rendering is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a model rendering method, device, equipment and storage medium. Background Art

[0002] Light and shadow transition illumination models have always been a hot topic in model rendering. Conventional cartoon rendering usually remaps the Lambert lighting results numerically when transitioning between light and dark, thus forming a binary light and shadow effect with obvious color block transitions.

[0003] This technology is suitable for traditional cartoon rendering, but it cannot render watercolor textures and cannot simulate the material effects of watercolor brushstrokes. Summary of the invention

[0004] In view of the deficiencies in the above-mentioned prior art, the present application provides a model rendering method, device, equipment and storage medium to solve the problems existing in the prior art.

[0005] The technical solution adopted in the embodiment of the present application is as follows:

[0006] In a first aspect, an embodiment of the present application provides a model rendering method, comprising:

[0007] Performing lighting rendering on the object model to be rendered to obtain basic light and shadow transition information of the object model to be rendered;

[0008] Using a preset watercolor map, texture rendering is performed on the object model to be rendered, so as to obtain watercolor texture noise information of the object model to be rendered;

[0009] Mixing the basic light and shadow transition information with the watercolor texture noise information to obtain watercolor shading transition information of the object model to be rendered;

[0010] According to the watercolor blending transition information, a target object model corresponding to the object model to be rendered is obtained.

[0011] In one embodiment, the step of using a preset watercolor map to perform texture rendering on the object model to be rendered to obtain watercolor texture noise information of the object model to be rendered includes:

[0012] Using the preset watercolor map, texture mapping is performed on the model of the object to be rendered to obtain texture information of each position point on the surface of the model of the object to be rendered;

[0013] Linear interpolation is performed on the texture information of each position point to obtain the watercolor texture noise information of each position point.

[0014] In one embodiment, the using of the preset watercolor map to perform texture mapping on the model of the object to be rendered to obtain texture information of each position point on the surface of the model of the object to be rendered includes:

[0015] Using the preset watercolor map, texture mapping is performed on the object model to be rendered on three mutually perpendicular planes in a preset three-dimensional space to obtain texture information of each position point on the three planes;

[0016] The linear interpolation of the texture information of each position point to obtain the watercolor texture noise information of each position point includes:

[0017] Performing linear interpolation on the texture information of each position point on the three planes to obtain texture noise information of each position point on the three planes;

[0018] The texture noise information of each position point on the three planes is mixed to obtain the watercolor texture noise information of each position point.

[0019] In one embodiment, performing linear interpolation on the texture information of each position point on the three planes to obtain the texture noise information of each position point on the three planes includes:

[0020] Performing linear interpolation on the texture information of each position point on the first plane and the second plane along the first coordinate direction to obtain texture noise information of each position point on the first plane and texture noise information on the second plane;

[0021] Linearly interpolate the texture information of each position point on the third plane along the second coordinate direction to obtain texture noise information of each position point on the third plane, wherein the first coordinate direction and the second coordinate direction are two coordinate directions of the first plane respectively.

[0022] In one embodiment, the mixing of the basic light and shadow transition information and the watercolor texture noise information to obtain the watercolor shading transition information of the object model to be rendered includes:

[0023] Using a preset smooth transition function to process the basic light and shadow transition information, and obtain target light and shadow transition information of the object model to be rendered;

[0024] The target light and shadow transition information and the watercolor texture noise information are mixed to obtain the watercolor shading transition information of the object model to be rendered.

[0025] In one embodiment, the method further comprises:

[0026] The target object model corresponding to the object model to be rendered is obtained according to the preset color transition information and the watercolor blending transition information.

[0027] In one embodiment, performing illumination rendering on the object model to be rendered to obtain basic light and shadow transition information of the object model to be rendered includes:

[0028] A preset light and shadow transition illumination model is adopted to perform diffuse reflection illumination rendering on the object model to be rendered, so as to obtain the basic light and shadow transition information of the object model to be rendered.

[0029] In one embodiment, the light-shadow transition illumination model is a semi-Lambert illumination model.

[0030] In a second aspect, an embodiment of the present application provides a model rendering device, including:

[0031] A lighting rendering module, used for performing lighting rendering on the object model to be rendered, and obtaining basic light and shadow transition information of the object model to be rendered;

[0032] A texture rendering module, used to use a preset watercolor map to perform texture rendering on the object model to be rendered, so as to obtain watercolor texture noise information of the object model to be rendered;

[0033] A mixing module, used for mixing the basic light and shadow transition information with the watercolor texture noise information to obtain the watercolor smudge transition information of the object model to be rendered;

[0034] The acquisition module is used to obtain the target object model corresponding to the object model to be rendered according to the watercolor blending transition information.

[0035] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor, a storage medium and a bus, wherein the storage medium stores program instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium through the bus, and the processor executes the program instructions to implement the model rendering method described in the above embodiment.

[0036] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which program instructions are stored, and when the program instructions are executed by a processor, the model rendering method described in the above embodiment is implemented.

[0037] The beneficial effects of the present application are: the present application provides a model rendering method, including performing light rendering on a model of an object to be rendered to obtain basic light and shadow transition information of the model of the object to be rendered; using a preset watercolor map to perform texture rendering on the model of the object to be rendered to obtain watercolor texture noise information of the model of the object to be rendered; mixing the basic light and shadow transition information and the watercolor texture noise information to obtain watercolor blending transition information of the model of the object to be rendered; and obtaining a target object model corresponding to the model of the object to be rendered based on the watercolor blending transition information.

[0038] Among them, the basic light and shadow transition information and the watercolor texture noise information are mixed to obtain the watercolor blending transition information of the object model to be rendered, and then the object model to be rendered is rendered using the watercolor blending transition information. The final target object model contains the light and shadow transition effect of watercolor blending, which improves the quality of stylized rendering. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0040] Figure 1 This is a schematic diagram of the existing rendering effect;

[0041] Figure 2 One of the flowcharts of the model rendering method provided in the embodiment of the present application;

[0042] Figure 3 A schematic diagram of basic light and shadow transition information provided in an embodiment of the present application;

[0043] Figure 4 A schematic diagram of watercolor texture noise information provided in an embodiment of the present application;

[0044] Figure 5 A schematic diagram of a target object model provided in an embodiment of the present application;

[0045] Figure 6 The second flowchart of the model rendering method provided in the embodiment of the present application;

[0046] Figure 7 The third flowchart of the model rendering method provided in the embodiment of the present application;

[0047] Figure 8 A fourth flowchart of the model rendering method provided in an embodiment of the present application;

[0048] Fig. 9 One of the schematic diagrams of texture noise information provided in an embodiment of the present application;

[0049] Fig.10 A second schematic diagram of texture noise information provided in an embodiment of the present application;

[0050] Fig.11 A fifth flowchart of the model rendering method provided in an embodiment of the present application;

[0051] Fig.12 A schematic diagram of target light and shadow transition information provided in an embodiment of the present application;

[0052] Fig.13 A schematic diagram of watercolor blending transition information provided in an embodiment of the present application;

[0053] Fig.14 A schematic diagram of the structure of a model rendering device provided in an embodiment of the present application;

[0054] Fig.15 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0055] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments.

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

[0057] In addition, the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

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

[0059] Conventional cartoon rendering usually uses numerical remapping of Lambert lighting results when transitioning between light and dark, thus forming a binary light and shadow effect with obvious color block transitions, for example Figure 1 As shown, a rendering effect with clear light and shadow transition and distinct color blocks is obtained. However, this method obviously cannot achieve the rendering effect of watercolor brushstrokes.

[0060] Therefore, an embodiment of the present application provides a model rendering method, which is used to solve the above-mentioned problem. The method can be generated by any electronic device with computing and processing capabilities. The electronic device can be, for example, a terminal-oriented computer device or a back-end server.

[0061] The model rendering method provided in this application is specifically described below through multiple examples in conjunction with the accompanying drawings.

[0062] Figure 2 One of the flow diagrams of the model rendering method provided in the embodiment of the present application is as follows: Figure 2 As shown, the method includes:

[0063] S101 , performing illumination rendering on a to-be-rendered object model to obtain basic light and shadow transition information of the to-be-rendered object model.

[0064] First, the object model to be rendered is subjected to illumination rendering to obtain basic light and shadow transition information of the object model to be rendered. The object model to be rendered can be a sphere (or a 3D animation character model described below, the sphere is only used as an example and does not mean that the object model to be rendered can only be a sphere). The basic light and shadow transition information obtained is as follows: Figure 3 As shown, Figure 3 0 represents the dark side, and 1 represents the bright side, that is, 0, 0.25, 0.5, 0.75, 1 represent a uniform transition from the dark side to the bright side. Figure 3 It presents a light and shadow transition effect of alternating light and dark.

[0065] Specifically, a preset light and shadow transition illumination model can be used to calculate the illumination information to be rendered of the object model to be rendered, and then based on the calculated illumination information to be rendered, diffuse reflection illumination rendering is performed on the object model to be rendered to obtain basic light and shadow transition information of the object model to be rendered, wherein the light and shadow transition illumination model is a semi-Lambert illumination model, and the semi-Lambert illumination model uses a semi-Lambert algorithm to calculate the illumination information to be rendered. The semi-Lambert algorithm is as shown in formula (1):

[0066] dot(N,L)*0.5+0.5(1)

[0067] Among them, dot is a mathematical dot product operation, N is the surface normal information of the object model to be rendered, and L is the lighting direction information.

[0068] S102: Use a preset watercolor map to perform texture rendering on the object model to be rendered, and obtain watercolor texture noise information of the object model to be rendered.

[0069] In this embodiment, a preset watercolor map can be used to perform texture rendering on the object model to be rendered, and watercolor texture noise information of the object model to be rendered can be obtained. The obtained watercolor texture noise information is as follows: Figure 4 As shown, Figure 4 It presents a watercolor blending effect.

[0070] S103 , mixing the basic light and shadow transition information and the watercolor texture noise information to obtain the watercolor shading transition information of the object model to be rendered.

[0071] Then the basic light and shadow transition information and the watercolor texture noise information are mixed to obtain the watercolor blending transition information of the object model to be rendered. The watercolor blending transition information includes both the light and shadow transition effect of alternating light and dark and the watercolor blending effect.

[0072] S104: Obtain a target object model corresponding to the object model to be rendered according to the watercolor blending transition information.

[0073] Finally, according to the watercolor shading transition information, the object model to be rendered is rendered, wherein the object model to be rendered may be, for example, a three-dimensional animation character, such as Figure 5 As shown, the target object model corresponding to the object model to be rendered is obtained, that is, the final rendering effect of the three-dimensional animation character includes both the light and shadow transition effect of alternating light and dark and the watercolor blending effect.

[0074] In summary, the embodiment of the present application provides a model rendering method, which mixes basic light and shadow transition information and watercolor texture noise information to obtain watercolor blending transition information of the object model to be rendered, and then renders the object model to be rendered using the watercolor blending transition information. The target object model finally obtained includes a light and shadow transition effect of watercolor blending, which improves the quality of stylized rendering.

[0075] Figure 6 The second flow chart of the model rendering method provided in the embodiment of the present application is as follows: Figure 6 As shown, the use of a preset watercolor map to perform texture rendering on the object model to be rendered in S102 to obtain watercolor texture noise information of the object model to be rendered may include:

[0076] S201 , using a preset watercolor map to perform texture mapping on a model of an object to be rendered, to obtain texture information of each position point on the surface of the model of the object to be rendered.

[0077] By using a preset watercolor map and performing texture mapping according to the spatial coordinates of the object model to be rendered, the texture information of each position point on the surface of the object model to be rendered can be obtained.

[0078] S202 , performing linear interpolation on the texture information of each position point to obtain the watercolor texture noise information of each position point.

[0079] After obtaining the texture information of each position point on the surface of the object model to be rendered, the texture information of each position point is linearly interpolated to obtain the watercolor texture noise information of each position point.

[0080] Specifically, Figure 7 The third flow chart of the model rendering method provided in the embodiment of the present application is as follows: Figure 7 As shown, the use of a preset watercolor map to perform texture mapping on the object model to be rendered in S201 to obtain texture information of each position point on the surface of the object model to be rendered may include:

[0081] S301, using a preset watercolor map, respectively performing texture mapping on the object model to be rendered on three mutually perpendicular planes in a preset three-dimensional space to obtain texture information of each position point on the three planes.

[0082] First, obtain the three-dimensional normal coordinates of the preset three-dimensional space where the object model to be rendered is located, represented by the first coordinate direction x, the second coordinate direction y, and the third coordinate direction z, and then three planes can be obtained, namely the first plane (xy plane) formed by the x direction and the y direction, the second plane (yz plane) formed by the y direction and the z direction, and the third plane (xz plane) formed by the x direction and the z direction, and these three planes are perpendicular to each other.

[0083] Using the preset watercolor map, according to the 3D normal coordinates of the object model to be rendered, texture mapping is performed on the three perpendicular planes in the preset 3D space in turn for the object model to be rendered. That is, texture mapping is performed on the xy plane, xz plane and yz plane respectively, and the texture information of each position point in the xy plane, xz plane and yz plane can be obtained, which are represented by worldnoise_xy, worldnoise_xz and worldnoise_yz respectively.

[0084] Then S202 performs linear interpolation on the texture information of each position point to obtain the watercolor texture noise information of each position point, including:

[0085] S302 , performing linear interpolation on texture information of each position point in three planes to obtain texture noise information of each position point in three planes.

[0086] Specifically, Figure 8 A fourth flow chart of the model rendering method provided in the embodiment of the present application is as follows: Figure 8 As shown, step S302 may include:

[0087] S401 . Perform linear interpolation on texture information of each position point on a first plane and a second plane along a first coordinate direction to obtain texture noise information of each position point on the first plane and texture noise information of each position point on the second plane.

[0088] Along the first coordinate direction (x direction), linear interpolation is performed on the texture information of each position point on the first plane (xy plane) and the second plane (yz plane). That is, linear interpolation is performed on the texture information worldnoise_xy of each position point on the first plane and the texture information worldnoise_yz on the second plane. The texture noise information of each position point on the first plane and the texture noise information on the second plane can be obtained, which is represented by mix_a, as shown in Fig. 9 shown.

[0089] Among them, the value of 1 represents the texture noise information mapped on the first plane (xy plane), and the value of 0 represents the texture noise information mapped on the second plane (yz plane).

[0090] S402 . Perform linear interpolation on texture information of each position point on the third plane along the second coordinate direction to obtain texture noise information of each position point on the third plane.

[0091] Then, after obtaining mix_a, linear interpolation is performed on the texture information (worldnoise_xz) of each position point on the third plane along the second coordinate direction (y direction), and mix mix_a with worldnoise_xz to obtain the texture noise information of each position point on the third plane, such as Fig.10 As shown, the value of 1 represents the texture noise information mapped by the third plane (xy plane), and the value of 0 represents the texture noise information mapped by mix_a.

[0092] It should also be noted that, in the present embodiment, the first coordinate direction (x direction) and the second coordinate direction (y direction) are respectively two coordinate directions of the first plane (xy plane).

[0093] S303 , mixing the texture noise information of each position point in three planes to obtain the watercolor texture noise information of each position point.

[0094] Finally, after obtaining the texture noise information of each position point in the three planes, the texture noise information of each position point in the three planes is mixed to obtain the watercolor texture noise information of each position point, such as Figure 4 shown.

[0095] Fig.11 A fifth flow chart of the model rendering method provided in the embodiment of the present application is as follows: Fig.11 As shown, the step of mixing the basic light and shadow transition information and the watercolor texture noise information to obtain the watercolor shading transition information of the object model to be rendered in step S103 may also include:

[0096] S501 , using a preset smooth transition function to process basic light and shadow transition information to obtain target light and shadow transition information of the object model to be rendered.

[0097] The preset smooth transition function may be, for example, a SmoothStep algorithm. Figure 3 By processing the basic light and shadow transition information shown in FIG. 1 , the target light and shadow transition information of the object model to be rendered can be obtained, such as Fig.12 shown.

[0098] Among them, a preset smooth transition function is used to process the basic light and shadow transition information, for example, it may include: Figure 3 The result is remapped to make the light and shadow transition effect more distinct. Figure 3 and Fig.12 , 0 represents the dark side, 1 represents the bright side, and the SmoothStep algorithm is used to Figure 3 The result of remapping is Fig.12 There are more numerical ranges marked with 0 and 1, making the transition between the bright and dark sides more distinct.

[0099] S502 : Mix the target light and shadow transition information and the watercolor texture noise information to obtain the watercolor shading transition information of the object model to be rendered.

[0100] Will Fig.12 The target light and shadow transition information shown and Figure 4 Mix the watercolor texture noise information shown in the figure to get Fig.13 The watercolor shading transition information of the object model to be rendered is shown as Fig.13 As shown, in the watercolor blending transition information obtained in this way, the transition between the bright side and the dark side is clearer, and the watercolor blending effect is included, which further improves the rendering quality of the stylized rendering project.

[0101] In one embodiment, the target object model corresponding to the object model to be rendered may also be obtained according to preset color transition information and watercolor blending transition information.

[0102] The preset color transition information may be a color attribute bar composed of multiple colors, for example, a color attribute bar composed of yellow and orange. By making a one-to-one correspondence between the preset color transition information and the grayscale value of the light and shadow transition effect in the watercolor blending transition information, the watercolor blending transition information may be filled with color so that the target object model finally obtained has color. The preset color transition information may be adjusted according to actual needs and is not limited here.

[0103] The following is a corresponding explanation of the device, equipment and storage medium for executing the model rendering method provided by any of the above embodiments of the present application. Its specific implementation process and the technical effects produced are the same as those of the corresponding method embodiments mentioned above. For the sake of brief description, for the parts not mentioned in the following embodiments, please refer to the corresponding content in the method embodiments.

[0104] Fig.14 A schematic diagram of the structure of a model rendering device provided in an embodiment of the present application is shown in FIG. Fig.14 As shown, the present application provides a model rendering device, comprising:

[0105] The lighting rendering module 10 is used to perform lighting rendering on the object model to be rendered, and obtain basic light and shadow transition information of the object model to be rendered.

[0106] The texture rendering module 20 is used to use a preset watercolor map to perform texture rendering on the object model to be rendered, and obtain watercolor texture noise information of the object model to be rendered.

[0107] The mixing module 30 is used to mix the basic light and shadow transition information and the watercolor texture noise information to obtain the watercolor shading transition information of the object model to be rendered.

[0108] The acquisition module 40 is used to obtain the target object model corresponding to the object model to be rendered according to the watercolor blending transition information.

[0109] Optionally, the texture rendering module 20 is used to use a preset watercolor map to perform texture mapping on the object model to be rendered to obtain texture information of each position point on the surface of the object model to be rendered; and to perform linear interpolation on the texture information of each position point to obtain watercolor texture noise information of each position point.

[0110] Optionally, the texture rendering module 20 is used to use a preset watercolor map to perform texture mapping on the object model to be rendered on three mutually perpendicular planes in a preset three-dimensional space to obtain texture information of each position point on the three planes; perform linear interpolation on the texture information of each position point on the three planes to obtain texture noise information of each position point on the three planes; and mix the texture noise information of each position point on the three planes to obtain watercolor texture noise information of each position point.

[0111] Optionally, the texture rendering module 20 is used to perform linear interpolation on the texture information of each position point in the first plane and the second plane along the first coordinate direction to obtain the texture noise information of each position point in the first plane and the texture noise information of each position point in the second plane; and to perform linear interpolation on the texture information of each position point in the third plane along the second coordinate direction to obtain the texture noise information of each position point in the third plane, wherein the first coordinate direction and the second coordinate direction are respectively two coordinate directions of the first plane.

[0112] Optionally, the mixing module 30 is used to use a preset smooth transition function to process the basic light and shadow transition information to obtain target light and shadow transition information of the object model to be rendered; and mix the target light and shadow transition information with the watercolor texture noise information to obtain the watercolor smudge transition information of the object model to be rendered.

[0113] Optionally, the acquisition module 40 is used to obtain a target object model corresponding to the object model to be rendered according to preset color transition information and watercolor blending transition information.

[0114] Optionally, the lighting rendering module 10 is used to adopt a preset light and shadow transition lighting model to perform diffuse reflection lighting rendering on the object model to be rendered, so as to obtain basic light and shadow transition information of the object model to be rendered; the light and shadow transition lighting model is a semi-Lambert lighting model.

[0115] The above-mentioned device is used to execute the method provided by the aforementioned embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.

[0116] The above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASICs), or one or more microprocessors, or one or more field programmable gate arrays (FPGAs). For another example, when a module is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).

[0117] Fig.15 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application, such as Fig.15 As shown, the present application provides an electronic device, including a processor 100, a storage medium 200 and a bus 300, and the processor and the storage medium communicate through the bus.

[0118] The storage medium stores program instructions executable by the processor. When the electronic device is running, the processor executes the program instructions. The implementation method includes:

[0119] Perform lighting rendering on the object model to be rendered to obtain basic light and shadow transition information of the object model to be rendered;

[0120] Using a preset watercolor map, texture rendering is performed on the object model to be rendered, so as to obtain watercolor texture noise information of the object model to be rendered;

[0121] The basic light and shadow transition information and the watercolor texture noise information are mixed to obtain the watercolor smudge transition information of the object model to be rendered;

[0122] According to the watercolor blending transition information, a target object model corresponding to the object model to be rendered is obtained.

[0123] Optionally, a preset watercolor map is used to perform texture rendering on the object model to be rendered, and watercolor texture noise information of the object model to be rendered is obtained, including:

[0124] Using a preset watercolor map, texture mapping is performed on the object model to be rendered to obtain texture information of each position point on the surface of the object model to be rendered;

[0125] Linear interpolation is performed on the texture information of each position point to obtain the watercolor texture noise information of each position point.

[0126] Optionally, a preset watercolor map is used to perform texture mapping on the object model to be rendered, so as to obtain texture information of each position point on the surface of the object model to be rendered, including:

[0127] Using a preset watercolor map, texture mapping is performed on the object model to be rendered on three mutually perpendicular planes in a preset three-dimensional space to obtain texture information of each position point on the three planes;

[0128] Linear interpolation is performed on the texture information of each position point to obtain the watercolor texture noise information of each position point, including:

[0129] Linearly interpolate the texture information of each position point in three planes to obtain the texture noise information of each position point in three planes;

[0130] The texture noise information of each position point in three planes is mixed to obtain the watercolor texture noise information of each position point.

[0131] Optionally, linear interpolation is performed on the texture information of each position point in three planes to obtain texture noise information of each position point in three planes, including:

[0132] Along the first coordinate direction, linearly interpolate the texture information of each position point on the first plane and the second plane to obtain the texture noise information of each position point on the first plane and the texture noise information on the second plane;

[0133] Linearly interpolate the texture information of each position point on the third plane along the second coordinate direction to obtain texture noise information of each position point on the third plane, wherein the first coordinate direction and the second coordinate direction are two coordinate directions of the first plane respectively.

[0134] Optionally, the basic light and shadow transition information and the watercolor texture noise information are mixed to obtain the watercolor shading transition information of the object model to be rendered, including:

[0135] Using a preset smooth transition function, the basic light and shadow transition information is processed to obtain the target light and shadow transition information of the object model to be rendered;

[0136] The target light and shadow transition information and the watercolor texture noise information are mixed to obtain the watercolor shading transition information of the object model to be rendered.

[0137] Optionally, the method further comprises:

[0138] According to the preset color transition information and the watercolor blending transition information, a target object model corresponding to the object model to be rendered is obtained.

[0139] Optionally, performing illumination rendering on the object model to be rendered to obtain basic light and shadow transition information of the object model to be rendered includes:

[0140] Using the preset light and shadow transition illumination model, diffuse reflection illumination rendering is performed on the object model to be rendered to obtain basic light and shadow transition information of the object model to be rendered.

[0141] Optionally, the light-shadow transition illumination model is a semi-Lambert illumination model.

[0142] In one embodiment, the present application further provides a readable storage medium, on which program instructions are stored. When the program instructions are executed by a processor, the method implemented includes:

[0143] Perform lighting rendering on the object model to be rendered to obtain basic light and shadow transition information of the object model to be rendered;

[0144] Using a preset watercolor map, texture rendering is performed on the object model to be rendered, so as to obtain watercolor texture noise information of the object model to be rendered;

[0145] The basic light and shadow transition information and the watercolor texture noise information are mixed to obtain the watercolor smudge transition information of the object model to be rendered;

[0146] According to the watercolor blending transition information, a target object model corresponding to the object model to be rendered is obtained.

[0147] Optionally, a preset watercolor map is used to perform texture rendering on the object model to be rendered, and watercolor texture noise information of the object model to be rendered is obtained, including:

[0148] Using a preset watercolor map, texture mapping is performed on the object model to be rendered to obtain texture information of each position point on the surface of the object model to be rendered;

[0149] Linear interpolation is performed on the texture information of each position point to obtain the watercolor texture noise information of each position point.

[0150] Optionally, a preset watercolor map is used to perform texture mapping on the object model to be rendered, so as to obtain texture information of each position point on the surface of the object model to be rendered, including:

[0151] Using a preset watercolor map, texture mapping is performed on the object model to be rendered on three mutually perpendicular planes in a preset three-dimensional space to obtain texture information of each position point on the three planes;

[0152] Linear interpolation is performed on the texture information of each position point to obtain the watercolor texture noise information of each position point, including:

[0153] Linearly interpolate the texture information of each position point in three planes to obtain the texture noise information of each position point in three planes;

[0154] The texture noise information of each position point in three planes is mixed to obtain the watercolor texture noise information of each position point.

[0155] Optionally, linear interpolation is performed on the texture information of each position point in three planes to obtain texture noise information of each position point in three planes, including:

[0156] Along the first coordinate direction, linearly interpolate the texture information of each position point on the first plane and the second plane to obtain the texture noise information of each position point on the first plane and the texture noise information on the second plane;

[0157] Linearly interpolate the texture information of each position point on the third plane along the second coordinate direction to obtain texture noise information of each position point on the third plane, wherein the first coordinate direction and the second coordinate direction are two coordinate directions of the first plane respectively.

[0158] Optionally, the basic light and shadow transition information and the watercolor texture noise information are mixed to obtain the watercolor shading transition information of the object model to be rendered, including:

[0159] Using a preset smooth transition function, the basic light and shadow transition information is processed to obtain the target light and shadow transition information of the object model to be rendered;

[0160] The target light and shadow transition information and the watercolor texture noise information are mixed to obtain the watercolor shading transition information of the object model to be rendered.

[0161] Optionally, the method further comprises:

[0162] According to the preset color transition information and the watercolor blending transition information, a target object model corresponding to the object model to be rendered is obtained.

[0163] Optionally, performing illumination rendering on the object model to be rendered to obtain basic light and shadow transition information of the object model to be rendered includes:

[0164] Using the preset light and shadow transition illumination model, diffuse reflection illumination rendering is performed on the object model to be rendered to obtain basic light and shadow transition information of the object model to be rendered.

[0165] Optionally, the light-shadow transition illumination model is a semi-Lambert illumination model.

[0166] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0167] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0168] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0169] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (English: processor) to perform some steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (English: Read-Only Memory, abbreviated: ROM), random access memory (English: Random Access Memory, abbreviated: RAM), disk or optical disk and other media that can store program codes.

[0170] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A model rendering method, characterized in that: include: Performing lighting rendering on the object model to be rendered to obtain basic light and shadow transition information of the object model to be rendered; Using a preset watercolor map, texture rendering is performed on the object model to be rendered, so as to obtain watercolor texture noise information of the object model to be rendered; Mixing the basic light and shadow transition information with the watercolor texture noise information to obtain watercolor shading transition information of the object model to be rendered; According to the watercolor blending transition information, a target object model corresponding to the object model to be rendered is obtained.

2. The method according to claim 1, characterized in that The method of using a preset watercolor map to perform texture rendering on the object model to be rendered to obtain watercolor texture noise information of the object model to be rendered includes: Using the preset watercolor map, texture mapping is performed on the model of the object to be rendered to obtain texture information of each position point on the surface of the model of the object to be rendered; Linear interpolation is performed on the texture information of each position point to obtain the watercolor texture noise information of each position point.

3. The method according to claim 2, characterized in that The step of using the preset watercolor map to perform texture mapping on the model of the object to be rendered to obtain texture information of each position point on the surface of the model of the object to be rendered includes: Using the preset watercolor map, texture mapping is performed on the object model to be rendered on three mutually perpendicular planes in a preset three-dimensional space to obtain texture information of each position point on the three planes; The linear interpolation of the texture information of each position point to obtain the watercolor texture noise information of each position point includes: Performing linear interpolation on the texture information of each position point on the three planes to obtain texture noise information of each position point on the three planes; The texture noise information of each position point on the three planes is mixed to obtain the watercolor texture noise information of each position point.

4. The method according to claim 3, characterized in that The linear interpolation of the texture information of each position point on the three planes to obtain the texture noise information of each position point on the three planes includes: Performing linear interpolation on the texture information of each position point on the first plane and the second plane along the first coordinate direction to obtain texture noise information of each position point on the first plane and texture noise information on the second plane; Linearly interpolate the texture information of each position point on the third plane along the second coordinate direction to obtain texture noise information of each position point on the third plane, wherein the first coordinate direction and the second coordinate direction are two coordinate directions of the first plane respectively.

5. The method according to claim 1, characterized in that The step of mixing the basic light and shadow transition information with the watercolor texture noise information to obtain the watercolor shading transition information of the object model to be rendered includes: Using a preset smooth transition function to process the basic light and shadow transition information, and obtain target light and shadow transition information of the object model to be rendered; The target light and shadow transition information and the watercolor texture noise information are mixed to obtain the watercolor shading transition information of the object model to be rendered.

6. The method according to claim 1, characterized in that The method further comprises: The target object model corresponding to the object model to be rendered is obtained according to the preset color transition information and the watercolor blending transition information.

7. The method according to claim 1, characterized in that The step of performing illumination rendering on the object model to be rendered to obtain basic light and shadow transition information of the object model to be rendered includes: A preset light and shadow transition illumination model is adopted to perform diffuse reflection illumination rendering on the object model to be rendered, so as to obtain the basic light and shadow transition information of the object model to be rendered.

8. The method according to claim 7, characterized in that The light-shadow transition illumination model is a semi-Lambert illumination model.

9. A model rendering device, characterized in that: include: A lighting rendering module, used for performing lighting rendering on the object model to be rendered, and obtaining basic light and shadow transition information of the object model to be rendered; A texture rendering module, used to use a preset watercolor map to perform texture rendering on the object model to be rendered, so as to obtain watercolor texture noise information of the object model to be rendered; A mixing module, used for mixing the basic light and shadow transition information with the watercolor texture noise information to obtain the watercolor smudge transition information of the object model to be rendered; The acquisition module is used to obtain the target object model corresponding to the object model to be rendered according to the watercolor blending transition information.

10. An electronic device, characterized in that: include: A processor, a storage medium and a bus, wherein the storage medium stores program instructions executable by the processor, and when the electronic device is running, the processor and the storage medium communicate via the bus, and the processor executes the program instructions to implement the model rendering method described in any one of claims 1 to 8.

11. A readable storage medium, characterized in that: The readable storage medium stores program instructions, and the program instructions are executed by a processor to implement the model rendering method according to any one of claims 1 to 8.