Model rendering method, apparatus, and electronic device

By combining local normal maps and mask maps, target normal maps and color maps are generated, solving the problem of high model rendering costs and achieving the effects of reducing rendering costs and texture differences.

CN116310039BActive Publication Date: 2026-06-16NETEASE (HANGZHOU) NETWORK CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NETEASE (HANGZHOU) NETWORK CO LTD
Filing Date
2023-02-10
Publication Date
2026-06-16

AI Technical Summary

Technical Problem

The high cost of model rendering in existing technologies is mainly due to the unresolved issue of high costs caused by mixing multiple texture materials.

Method used

By acquiring the local normal map and the original mask map of the target model, the color channels of the local normal map are enhanced and mixed to obtain the target normal map. This target normal map is then adjusted with the original mask map to generate the target color map. Finally, the model is rendered using the target normal map and the color map.

🎯Benefits of technology

The number of textures was reduced, lowering the model rendering cost and reducing texture differences. Furthermore, the high cost caused by multiple textures was avoided by adjusting the colors in the color texture.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116310039B_ABST
    Figure CN116310039B_ABST
Patent Text Reader

Abstract

The application discloses a model rendering method and device and an electronic device. The method comprises the following steps: acquiring a local normal map and an original mask map in a target model, wherein the local normal map is used for representing a normal map corresponding to a preset area of the original normal map; enhancing at least one color channel in the local normal map to obtain a channel enhancement result; mixing the channel enhancement result and the original normal map to obtain a target normal map; mixing the original mask map and at least one preset layer to obtain a target color map, wherein the at least one preset layer is used for adjusting the color in the original mask map; and rendering and displaying the target model through the target normal map and the target color map. The application solves the technical problem of high cost of model rendering in the related art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of model rendering, and more specifically, to a model rendering method, apparatus, and electronic device. Background Technology

[0002] Currently, in the model making process, one model corresponding to one texture can improve the quality of the model, but the cost is very high. The most commonly used method is to mix multiple texture materials. This method can make the texture effect very good, but it requires the use of multiple sets of specific textures to mix, which leads to high model rendering costs.

[0003] There is currently no effective solution to the above problems. Summary of the Invention

[0004] At least some embodiments of the present invention provide a model rendering method, apparatus, and electronic device to at least solve the technical problem of high cost of model rendering in the related art.

[0005] According to one embodiment of the present invention, a model rendering method is provided, comprising: acquiring a local normal map and an original mask map of an original normal map in a target model, wherein the local normal map is used to represent the normal map corresponding to a preset region of the original normal map; enhancing at least one color channel in the local normal map to obtain a channel enhancement result; mixing the channel enhancement result and the original normal map to obtain a target normal map; mixing the original mask map with at least one preset layer to obtain a target color map, wherein the at least one preset layer is used to adjust the color in the original mask map; and rendering and displaying the target model using the target normal map and the target color map.

[0006] According to one embodiment of the present invention, a model rendering apparatus is provided, comprising: an acquisition module for acquiring a local normal map and an original mask map of an original normal map in a target model; an enhancement module for enhancing at least one color channel in the local normal map to obtain a channel enhancement result; a first mixing module for mixing the channel enhancement result and the original normal map to obtain a target normal map; a second mixing module for mixing the original mask map with at least one preset layer to obtain a target color map, wherein the at least one preset layer is used to adjust the color in the original mask map; and a rendering module for rendering and displaying the target model using the target normal map and the target color map.

[0007] According to one embodiment of the present invention, a non-volatile storage medium is provided storing a computer program, wherein the computer program is configured to execute the model rendering method of any of the above embodiments when run by a processor.

[0008] According to one embodiment of the present invention, an electronic device is provided, including a memory and a processor, characterized in that the memory stores a computer program, and the processor is configured to run the computer program to perform the model rendering method in any of the above embodiments.

[0009] In at least some embodiments of the present invention, firstly, a local normal map and an original mask map of the original normal map in the target model are obtained, wherein the local normal map is used to represent the normal map corresponding to a preset region of the original normal map; at least one color channel in the local normal map is enhanced to obtain a channel enhancement result; the channel enhancement result and the original normal map are mixed to obtain a target normal map; the original mask map is mixed with at least one preset layer to obtain a target color map, wherein at least one preset layer is used to adjust the color in the original mask map; the target model is rendered and displayed using the target normal map and the target color map to obtain the target model, thereby reducing the number of textures and rendering the target model with fewer textures, thus reducing the cost of model rendering. It is easy to notice that the original normal map can be blended with its own local normal map, so that the target normal map can better match the texture in the target model, which can reduce the texture difference in the model. Furthermore, by adjusting the preset layer, the color displayed in the target color map can be adjusted, avoiding the high blending cost caused by using multiple maps. This can at least solve the technical problem of high model rendering cost in related technologies. Attached Figure Description

[0010] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:

[0011] Figure 1 This is a hardware structure block diagram of a mobile terminal for a model rendering method according to an embodiment of the present invention.

[0012] Figure 2 This is a flowchart of a model rendering method according to one embodiment of the present invention;

[0013] Figure 3 This is a schematic diagram of an original normal map according to an embodiment of this application;

[0014] Figure 4 This is a texture diagram of a model according to an embodiment of this application;

[0015] Figure 5 This is a texture diagram of another model according to an embodiment of this application;

[0016] Figure 6A structural block diagram of a model rendering apparatus according to one embodiment of the present invention;

[0017] Figure 7 This is a schematic diagram of an electronic device according to an embodiment of the present invention. Detailed Implementation

[0018] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0019] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0020] According to one embodiment of the present invention, an embodiment of a model rendering method is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0021] This method embodiment can be executed on a mobile terminal, computer terminal, or similar computing device. Taking running on a mobile terminal as an example, the mobile terminal can be a smartphone (such as an Android phone, iOS phone, etc.), tablet computer, PDA, mobile Internet Device (MID), PAD, game console, and other terminal devices. Figure 1 This is a hardware structure block diagram of a mobile terminal for a model rendering method according to an embodiment of the present invention. Figure 1 As shown, a mobile terminal may include one or more ( Figure 1Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a central processing unit (CPU), graphics processing unit (GPU), digital signal processing (DSP) chip, microprocessor (MCU), programmable logic device (FPGA), neural network processor (NPU), tensor processor (TPU), artificial intelligence (AI) type processor, etc.) and a memory 104 for storing data are also shown. Optionally, the mobile terminal may further include a transmission device 106 for communication functions, an input / output device 108, and a display device 110. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the mobile terminal described above. For example, the mobile terminal may also include components that are more... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.

[0022] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the model rendering method in this embodiment of the invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thereby implementing the aforementioned model rendering method. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0023] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the mobile terminal's communication provider. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module used for wireless communication with the Internet.

[0024] The inputs in input / output device 108 can come from multiple human interface devices (HIDs). Examples include keyboards and mice, gamepads, and other dedicated game controllers (such as steering wheels, fishing rods, dance mats, and remote controls). Some HIDs, in addition to providing input functions, can also provide output functions, such as force feedback and vibration from gamepads, and audio output from controllers.

[0025] Display device 110 may be, for example, a head-up display (HUD), a touchscreen liquid crystal display (LCD), and a touch display (also referred to as a "touchscreen" or "touch display"). The LCD allows a user to interact with the user interface of the mobile terminal. In some embodiments, the mobile terminal has a graphical user interface (GUI), which allows the user to interact with the GUI by touching and / or gesturing on a touch-sensitive surface. Optional human-computer interaction functions include: creating web pages, drawing, word processing, creating electronic documents, playing games, video conferencing, instant messaging, sending and receiving emails, a call interface, playing digital video, playing digital music, and / or web browsing, etc. Executable instructions for performing the above human-computer interaction functions are configured / stored in one or more processor-executable computer program products or readable storage media.

[0026] In one embodiment of this disclosure, the model rendering method can run on a local terminal device or a server. When the model rendering method runs on a server, the method can be implemented and executed based on a cloud interaction system, wherein the cloud interaction system includes a server and a client device.

[0027] In an optional implementation, taking a game as an example, the local terminal device stores the game program and is used to display the game screen. The local terminal device is used to interact with the player through a graphical user interface (GUI), i.e., conventionally by downloading, installing, and running the game program via an electronic device. The local terminal device can provide the GUI to the player in various ways, such as rendering it on the terminal's display screen or providing it to the player via holographic projection. For example, the local terminal device can include a display screen for displaying the GUI, which includes game screens, and a processor for running the game, generating the GUI, and controlling the display of the GUI on the display screen.

[0028] In one possible implementation, this embodiment of the invention provides a model rendering method that provides a graphical user interface through a terminal device, wherein the terminal device may be the aforementioned local terminal device or a client device in the aforementioned cloud interaction system. Figure 2This is a flowchart of a model rendering method according to one embodiment of the present invention. A graphical user interface is provided through a terminal device. The content displayed by the graphical user interface includes a touch area, such as... Figure 2 As shown, the method includes the following steps:

[0029] Step S202: Obtain the local normal map and the original mask map of the original normal map in the target model.

[0030] Among them, the local normal map is used to represent the normal map corresponding to the preset area of ​​the original normal map.

[0031] The target model mentioned above can be a model whose textures are adjusted in a game.

[0032] The original normal map mentioned above can be the overall normal map of the target model. The normal map can be a bump map, which can be a special texture that can add surface details to the model to capture light, just like it is represented by real geometry.

[0033] The aforementioned preset area can be a slightly flat area in the original normal map, but it is not limited to this. The user can determine the required preset area according to their needs, thereby extracting a local normal map from the preset area of ​​the original normal map. By obtaining the local normal map of the original normal map, the local normal map can be processed to adjust the bump texture of the entire original normal map.

[0034] The original mask image mentioned above can be a layer used to mask the target model. The target model can be colored by adjusting the colors in the original mask image.

[0035] Figure 3 This is a schematic diagram of an original normal map according to an embodiment of this application, wherein, Figure 3 The stone in the image can be the target model, and the image on the left can be the original normal map corresponding to that target model.

[0036] Currently, the conventional method for selecting local normal information involves directly adjusting the tiling times within the engine. This is difficult to precisely select the desired area, and moving the selection position causes the entire area to move simultaneously, resulting in limited freedom of choice and difficulty in selecting the desired location. This application addresses this by adjusting the parameter values ​​of function nodes to precisely select within the original normal region, thereby determining the desired location.

[0037] Step S204: Enhance at least one color channel in the local normal map to obtain the channel enhancement result.

[0038] In one optional embodiment, at least one color channel in the local normal map can be enhanced. Since the normal map is related to the R and G channels, the R and G channels in the local normal map can be enhanced to obtain an enhanced local normal map. The local normal map can be tiled to match the original normal map. Figure 1 The size of the channel is determined to obtain the channel enhancement result.

[0039] Step S206: The channel enhancement result and the original normal map are blended to obtain the target normal map.

[0040] In one optional embodiment, the enhanced local normal map and the original normal map in the channel enhancement result can be overlaid and blended to enhance the details of the original normal map through the channel enhancement result, thereby obtaining the target normal map. Optionally, the enhanced local normal map and the original normal map in the channel enhancement result can be overlaid and blended through Unreal Engine nodes (Blendangle Corrected Normals) to obtain the final target normal map.

[0041] Step S208: Blend the original mask image with at least one preset layer to obtain the target color map.

[0042] Among them, at least one preset layer is used to adjust the colors in the original mask image;

[0043] At least one of the aforementioned preset layers allows users to easily adjust the colors.

[0044] In one alternative embodiment, the original mask image can be blended with at least one preset layer to obtain a target color map, so that the colors in the original mask image can be changed by adjusting the parameters in at least one preset layer, thereby controlling the overall color change of the model.

[0045] Step S210: Render and display the target model using the target normal map and the target color map.

[0046] In one optional embodiment, the texture in the target model can be rendered using a target normal map, and the color in the target model can be rendered using a target color map. Additional parameters can be added to process the target color map to adjust the texture roughness in the target model, thereby obtaining the target model. Since the target normal map in this application is obtained by blending its own local normal maps, it ensures that the texture rendered onto the target model matches the original texture in the target model, thus reducing texture differences. Furthermore, when adjusting the model's color, it is not necessary to create an additional texture for adjustment; only the parameters in at least one preset layer need to be adjusted to change the color displayed in the target color map, thus facilitating the rendering of the target model.

[0047] Through the above steps, firstly, the local normal map and the original mask map of the original normal map in the target model are obtained. The local normal map is used to represent the normal map corresponding to a preset area of ​​the original normal map. At least one color channel in the local normal map is enhanced to obtain the channel enhancement result. The channel enhancement result and the original normal map are mixed to obtain the target normal map. The original mask map is mixed with at least one preset layer to obtain the target color map. The at least one preset layer is used to adjust the color in the original mask map. The target model is rendered and displayed using the target normal map and the target color map, which reduces the number of textures and renders the target model with fewer textures, thereby reducing the cost of model rendering. It is easy to notice that the original normal map can be blended with its own local normal map, so that the target normal map can better match the texture in the target model, which can reduce the texture difference in the model. Furthermore, by adjusting the preset layer, the color displayed in the target color map can be adjusted, avoiding the high blending cost caused by using multiple maps. This can at least solve the technical problem of high model rendering cost in related technologies.

[0048] In the above embodiments of this application, enhancing at least one color channel in a local normal map to obtain a channel enhancement result includes: converting the local normal map into a two-dimensional vector; splitting the two-dimensional vector to obtain a first target channel and a second target channel; obtaining a first normal map based on the first target channel, the second target channel, and a first translation parameter; and enhancing the first normal map using normal intensity values ​​to obtain a channel enhancement result.

[0049] In one alternative embodiment, the two-dimensional vector can be split using a first preset node to obtain a first target channel and a second target channel.

[0050] The first preset node mentioned above can be a component mask node. This component mask node allows the selection of a specific subset of channels (R, G, B, and / or A) from the input to be passed to the output.

[0051] The first initial channel mentioned above can be the R channel (Red), and the second initial channel mentioned above can be the G channel (Green).

[0052] The above-mentioned normal intensity value can be a normal intensity value preset by the user.

[0053] In one optional embodiment, the local normal map can first be converted into a two-dimensional planar vector to facilitate corresponding processing of the local normal map. The two-dimensional vector can be split separately using a mask node to obtain a first target channel and a second target channel. Subsequently, the local normal map can be modified by adjusting the first target channel, the second target channel, and the first translation parameter to obtain a modified first normal map. The first normal map can then be enhanced by the normal intensity value to enhance the detail texture in the normal map, thereby obtaining a channel enhancement result.

[0054] In the above embodiments of this application, enhancing the first normal map using normal intensity values ​​to obtain channel enhancement results includes: tiling the first normal map using preset texture coordinates to obtain a two-dimensional texture map; enhancing the first color channel and the second color channel in the two-dimensional texture map based on the normal intensity values ​​to obtain a first enhancement result and a second enhancement result; and adding the first enhancement result and the second enhancement result to obtain a channel enhancement result.

[0055] In one optional embodiment, the first enhancement result and the second enhancement result can be added together using a second preset node to obtain the channel enhancement result.

[0056] The first normal map mentioned above can be a TextureObject, where Texture is used to provide a default texture as input to the texture function within the function. This TextureObject does not actually sample the texture, so it needs to be used in conjunction with a TextureSample node.

[0057] The aforementioned preset texture coordinates can be UV texture coordinates output in the form of dual-channel vector values, i.e., texture coordinates. This allows materials to use different UV channels, specify tiling, and perform UV operations on the mesh in other ways. The coordinate index of the preset texture coordinates can be 1, but is not limited to this; it can also be limited to other values.

[0058] The aforementioned normal intensity value can be a constant that the user can adjust. Optionally, the intensity of the overlay normal can be controlled by outputting the R and G channels as inputs to the Multiply node and multiplying them with the constant. The Multiply node can receive two inputs, multiply them, and then output the result. When color values ​​are passed as input, the result is similar to the result of the Multiply blending mode in image processing software (Photoshop).

[0059] The second preset node mentioned above can be an add node.

[0060] In one optional embodiment, the first normal map can be tiled according to preset texture coordinates so that the first normal map can fill the original normal map, thereby obtaining a tiled two-dimensional texture map. The first color channel and the second color channel in the two-dimensional texture map can be enhanced according to the normal intensity value to obtain a first enhancement result and a second enhancement result. The first enhancement result and the second enhancement result can be added together using the add node to obtain the channel enhancement result of the first normal map.

[0061] In the above embodiments of this application, the first normal map is obtained based on the first target channel, the second target channel, and the first translation parameter, including: combining the first target channel and the second target channel to obtain the first scaling parameter; combining the first translation constant and the second translation constant to obtain the first translation parameter; and adding the first scaling parameter and the first translation parameter to obtain the first normal map.

[0062] In one optional embodiment, a first integration node can be used to combine a first target channel and a second target channel to obtain a first scaling parameter; a second integration node can be used to combine a first translation constant and a second translation constant to obtain a first translation parameter; and a third preset node can be used to add the first scaling parameter and the first translation parameter to obtain a first normal map.

[0063] The first and second merge nodes mentioned above can be append vector nodes placed in different positions. Append vectors can combine channels to create vectors with more channels than the original vector. For example, two constant values ​​can be appended to create a dual-channel Constant2Vector value. This helps to reorder channels within a single texture or combine multiple grayscale textures into a single RGB color texture.

[0064] The third preset node mentioned above can be an add node.

[0065] In one optional embodiment, a first integration node can be used to combine the first target channel and the second target channel to obtain a first scaling parameter, which can be used to scale the size of the normal map. A second integration node can be used to combine the first translation constant and the second translation constant to obtain a first translation parameter, which can be used to adjust the position of the normal map. A third preset node can be used to add the first scaling parameter and the first translation parameter, that is, by processing the first target channel and the second target channel in the local normal map using the first scaling parameter and the first translation parameter, the first normal map can be obtained. It should be noted that the first initial channel and the second initial channel can be scaled using parameter values ​​to obtain the first target channel and the second target channel, thereby controlling the scaling of the first normal map along the x-axis and y-axis. The first normal map can be translated along the x-axis and y-axis by adjusting the aforementioned first translation constant and second translation constant.

[0066] In the above embodiments of this application, the channel enhancement result and the original normal map are mixed to obtain the target normal map, including: adding the channel enhancement result and the third color channel of the two-dimensional texture map to obtain the second normal map; and superimposing the original normal map and the second normal map to obtain the target normal map.

[0067] In one optional embodiment, the channel enhancement result and the third color channel of the two-dimensional texture map are added together using a second preset node to obtain a second normal map; the original normal map and the second normal map are superimposed using a preset function node to obtain a target normal map.

[0068] The third color channel mentioned above can be the B channel (Blue channel).

[0069] The aforementioned preset function nodes can be built into Unreal Engine, which can overlay and blend two three-channel normal maps without damaging their details and corresponding lighting information.

[0070] In an optional embodiment, the channel enhancement result obtained after enhancing the first and second color channels can be added to the third color channel to obtain a second normal map containing the complete channels. The original normal map and the second normal map can be superimposed using a preset function node to obtain the adjusted target normal map. Since it is the target normal map obtained by superimposing the second normal map obtained by processing the original normal map with the original normal map, the difference between the obtained target normal map and the texture on the original model is smaller, and its texture fit is stronger.

[0071] Figure 4This is a schematic diagram of a texture of a model according to an embodiment of this application, such as... Figure 4 As shown, it can be the display effect of the first normal map on the model. Figure 5 This is a texture diagram of another model according to an embodiment of this application, such as... Figure 5 As shown, it can be seen as the display effect of the second normal map on the model.

[0072] In the above embodiments of this application, splitting a two-dimensional vector to obtain a first target channel and a second target channel includes: splitting the two-dimensional vector to obtain a first initial channel and a second initial channel; scaling the first initial channel and the second initial channel to obtain a first target channel and a second target channel.

[0073] In one optional embodiment, the two-dimensional vector is split using a first preset node to obtain a first initial channel and a second initial channel; the first initial channel and the second initial channel are scaled and adjusted using a scaling constant node to obtain a first target channel and a second target channel.

[0074] The first preset node mentioned above can be a Texture object node, where Textureobject is used to provide a default texture for the texture function input within the function. This node does not actually sample the texture, so it must be used in conjunction with the "Texture Sample" node.

[0075] The aforementioned scaling constant node can be two. By inputting parameters into the scaling constant node, the first initial channel and the second initial channel can be scaled to obtain the first target channel and the second target channel.

[0076] The specific method for blending a local normal map with the original normal map is as follows: Use the Texture object node to output the original normal map to the TeX input interface of two Texture Sample nodes. One is its own normal map, i.e., the original normal map itself. The other is a Texture Coordinate node, which is input into the created function node. The created function node is mainly used to determine the local normal map corresponding to the original normal map. The local normal map can be output to the UVs input interface of another Texture Sample node. Then, the R channel and G channel are output to the Multiply node and multiplied with the normal intensity value to control the intensity of the R channel and G channel normals. Then, the Append node is used to integrate the three RGB channels and output to the Unreal Engine's built-in function node to blend with the original normal map to obtain the target normal map. The target normal map can be output to the final material Normal interface.

[0077] It should be noted that the local normal maps of a model can be processed separately using 3D software. The local normal maps on the model's UVs (U represents the distribution on the horizontal axis, and V represents the distribution on the vertical axis) can be cut into small pieces, enlarged to fill the entire first quadrant, and the level of detail of the superimposed local normal maps can be controlled.

[0078] In the above embodiments of this application, mixing the original mask image with at least one preset layer to obtain a target color texture includes: obtaining a first color channel of the original mask image; performing a product operation on the first color channel and a first constant parameter to obtain a first color parameter; obtaining a second color parameter based on the difference between a first preset value and the first color parameter; scaling and adjusting the second color parameter based on a preset threshold to obtain a mask parameter; and mixing the mask parameter with at least one preset layer to obtain the target color texture.

[0079] In one optional embodiment, the first color channel of the original mask image can be obtained; the first color channel and the first constant parameter can be multiplied using a fourth preset node to obtain a first color parameter; the second color parameter can be obtained based on the difference between the first preset value and the first color parameter; the second color parameter can be adjusted based on a preset threshold to obtain a mask parameter; and the mask parameter and at least one preset layer can be blended using a first interpolation node to obtain a target color map.

[0080] The first color channel mentioned above can be the R channel of the original mask image.

[0081] The fourth preset node mentioned above can be a Multiply node.

[0082] The first preset value mentioned above is 1.

[0083] The first interpolation node mentioned above can be a Lerp node.

[0084] In one optional embodiment, the R channel of the original mask image can be obtained, and the first color channel and the first constant parameter can be multiplied using Multiply so that the first color channel can be adjusted by the first constant parameter to obtain the first color parameter. The first color parameter can be obtained by using the One Minus node, where One Minus is used to represent the result of subtracting the input from 1. That is, the second color parameter can be obtained based on the difference between the first preset value and the first color parameter.

[0085] The aforementioned preset threshold can be a threshold used to control the color range, where the preset threshold can be 0-1.

[0086] At least one of the aforementioned preset layers may be a layer for adjusting the base color, and may also include a layer for adjusting the ambient occlusion map (AO layer).

[0087] In one optional embodiment, the second color parameter can be adjusted by setting a preset threshold to avoid excessive color changes, thereby obtaining a masking parameter. The masking parameter and at least one preset layer can be blended using a first interpolation node to obtain a target color map. The preset threshold can be determined by a constraint expression (Clamp node), where the Clamp expression accepts one or more values ​​and constrains them to a specified range defined by a minimum and a maximum value. If the minimum value is 0.0 and the maximum value is 0.5, it means that the resulting value will never be less than 0.0 and will never be greater than 0.5.

[0088] In one alternative embodiment, the information of the created local normal selection function can be output to the UVs input port of another separate Texture Sample node, and then the blending result output by the first interpolation node can be blended with the target normal map to control the blending effect of the detail colors in the normal map.

[0089] It's important to note that blending is used to enhance the detail of color maps. Curvature maps, similar to normal maps, convert spatial curvature into RGB information. When used for texture rendering, curvature maps are based on UV coordinates and are in a 0-1 floating-point format, appearing as grayscale. This records the surface curvature information of the model; for example, flat areas have low curvature and appear black, while curved areas (such as chamfers) have high curvature and appear white. This allows other software to recognize and read the textures.

[0090] The Linear Interpolate node takes a third input value as the mask parameter and then interpolates between the two input values. You can think of two textures transitioning based on a mask, similar to layer masks in Photoshop. The strength of the mask alpha determines the weight of the contributions of the two input values. If the alpha is 0.0, the first input value is used. If the alpha is 1.0, the second input value is used. If the alpha is between 0.0 and 1.0, the output is the interpolation between the two inputs. Note that blending is done channel-wise. So, if the alpha is an RGB color, the red channel of the alpha defines the interpolation between the red channels of A and B, independent of the green channel of the alpha, which defines the interpolation between the green channels of A and B.

[0091] In the above embodiments of this application, rendering and displaying a target model using a target normal map and a target color map includes: mixing a roughness parameter with a target color map to obtain a target roughness map; and rendering and displaying the target model based on the target normal map, the target color map, and the target roughness map.

[0092] In one optional embodiment, the roughness parameter is blended with the target color map using a second interpolation node to obtain a target roughness map; the target model is then rendered based on the target normal map, the target color map, and the target roughness map to obtain the target model.

[0093] The second interpolation node mentioned above can be a Linear Interpolate (Lerp node for short).

[0094] The roughness parameters mentioned above are used to adjust the roughness in the model.

[0095] In an alternative embodiment, the roughness level of each layer can be precisely controlled by using a second interpolation node to determine the roughness level from 0 to 1 (a constant is exposed for adjustment) and output to the AB input interface of Lerp. The Alpha input interface is used to input the target color map that has been processed by the previous step of inherent color mixing.

[0096] In an optional embodiment, the roughness parameters can be mixed with the target color map using a second interpolation node to obtain a target roughness map. The normals, colors, and roughness of the target model can then be rendered based on the target normal map, the target color map, and the target roughness map to obtain the target model.

[0097] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of the present invention.

[0098] This embodiment also provides a model rendering apparatus for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the terms "unit" and "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0099] Figure 6According to a structural block diagram of a model rendering apparatus of one embodiment of the present invention, a graphical user interface is provided through a terminal device. The content displayed by the graphical user interface includes a touch area, such as... Figure 6 As shown, the device 600 includes: an acquisition module 602, an enhancement module 604, a first mixing module 606, and a second mixing module 608.

[0100] The system includes: an acquisition module for acquiring local normal maps and original mask maps of the original normal map in the target model; an enhancement module for enhancing at least one color channel in the local normal map to obtain a channel enhancement result; a first blending module for blending the channel enhancement result and the original normal map to obtain a target normal map; a second blending module for blending the original mask map with at least one preset layer to obtain a target color map, wherein at least one preset layer is used to adjust the colors in the original mask map; and a rendering module for rendering and displaying the target model using the target normal map and the target color map.

[0101] The acquisition module is used to convert the local normal map into a two-dimensional vector; split the two-dimensional vector to obtain a first target channel and a second target channel; obtain a first normal map based on the first target channel, the second target channel and the first translation parameter; and enhance the first normal map using the normal intensity value to obtain the channel enhancement result.

[0102] The acquisition module is further used to tile the first normal map using preset texture coordinates to obtain a two-dimensional texture map; to enhance the first color channel and the second color channel in the two-dimensional texture map based on the normal intensity value to obtain a first enhancement result and a second enhancement result; and to add the first enhancement result and the second enhancement result to obtain a channel enhancement result.

[0103] The acquisition module is also used to combine the first target channel and the second target channel to obtain the first scaling parameter; combine the first translation constant and the second translation constant to obtain the first translation parameter; and add the first scaling parameter and the first translation parameter to obtain the first normal map.

[0104] The acquisition module is also used to add the channel enhancement result and the third color channel of the two-dimensional texture map to obtain the second normal map; and to superimpose the original normal map and the second normal map to obtain the target normal map.

[0105] The acquisition module is also used to split the two-dimensional vector to obtain a first initial channel and a second initial channel; and to scale and adjust the first initial channel and the second initial channel to obtain a first target channel and a second target channel.

[0106] The second mixing module is used to obtain the first color channel of the original mask image; multiply the first color channel and the first constant parameter to obtain the first color parameter; obtain the second color parameter based on the difference between the first preset value and the first color parameter; adjust the second color parameter based on the preset threshold to obtain the mask parameter; and mix the mask parameter with at least one preset layer to obtain the target color map.

[0107] The rendering module is used to mix the roughness parameters with the target color map to obtain the target roughness map; and to render and display the target model based on the target normal map, the target color map, and the target roughness map.

[0108] It should be noted that the above-mentioned units and modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but not limited to these: all the above-mentioned units and modules are located in the same processor; or, the above-mentioned units and modules are located in different processors in any combination.

[0109] Embodiments of the present invention also provide a non-volatile storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above method embodiments when running.

[0110] Optionally, in this embodiment, the aforementioned non-volatile storage medium may include, but is not limited to, various media capable of storing computer programs, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0111] Optionally, in this embodiment, the non-volatile storage medium may be located in any computer terminal in a group of computer terminals in a computer network, or in any mobile terminal in a group of mobile terminals.

[0112] Optionally, in this embodiment, the aforementioned non-volatile storage medium may be configured to store a computer program for performing the following steps: acquiring a local normal map and an original mask map of the original normal map in the target model, wherein the local normal map is used to represent the normal map corresponding to a preset region of the original normal map; enhancing at least one color channel in the local normal map to obtain a channel enhancement result; mixing the channel enhancement result and the original normal map to obtain a target normal map; mixing the original mask map with at least one preset layer to obtain a target color map, wherein the at least one preset layer is used to adjust the color in the original mask map; and rendering and displaying the target model using the target normal map and the target color map.

[0113] Optionally, the aforementioned non-volatile storage medium is further configured to store program code for performing the following steps: converting a local normal map into a two-dimensional vector; splitting the two-dimensional vector to obtain a first target channel and a second target channel; obtaining a first normal map based on the first target channel, the second target channel, and a first translation parameter; and enhancing the first normal map using normal intensity values ​​to obtain a channel enhancement result.

[0114] Optionally, the aforementioned non-volatile storage medium is further configured to store program code for performing the following steps: tiling the first normal map using preset texture coordinates to obtain a two-dimensional texture map; enhancing the first color channel and the second color channel in the two-dimensional texture map based on the normal intensity value to obtain a first enhancement result and a second enhancement result; and adding the first enhancement result and the second enhancement result to obtain a channel enhancement result.

[0115] Optionally, the aforementioned non-volatile storage medium is further configured to store program code for performing the following steps: combining the first target channel and the second target channel to obtain a first scaling parameter; combining the first translation constant and the second translation constant to obtain a first translation parameter; and adding the first scaling parameter and the first translation parameter to obtain a first normal map.

[0116] Optionally, the aforementioned non-volatile storage medium is further configured to store program code for performing the following steps: adding the channel enhancement result and the third color channel of the two-dimensional texture map to obtain a second normal map; and superimposing the original normal map and the second normal map to obtain a target normal map.

[0117] Optionally, the non-volatile storage medium is further configured to store program code for performing the following steps: splitting the two-dimensional vector to obtain a first initial channel and a second initial channel; adjusting the first initial channel and the second initial channel to obtain a first target channel and a second target channel.

[0118] Optionally, the aforementioned non-volatile storage medium is further configured to store program code for performing the following steps: obtaining a first color channel of the original mask image; multiplying the first color channel and a first constant parameter to obtain a first color parameter; obtaining a second color parameter based on the difference between a first preset value and the first color parameter; adjusting the second color parameter based on a preset threshold to obtain a mask parameter; and blending the mask parameter with at least one preset layer to obtain a target color map.

[0119] Optionally, the aforementioned non-volatile storage medium is also configured to store program code for performing the following steps: mixing roughness parameters with a target color map to obtain a target roughness map; rendering and displaying the target model based on the target normal map, the target color map, and the target roughness map.

[0120] In the non-volatile storage medium of this embodiment, firstly, a local normal map and an original mask map of the original normal map in the target model are obtained, wherein the local normal map is used to represent the normal map corresponding to a preset region of the original normal map; at least one color channel in the local normal map is enhanced to obtain a channel enhancement result; the channel enhancement result and the original normal map are mixed to obtain a target normal map; the original mask map is mixed with at least one preset layer to obtain a target color map, wherein at least one preset layer is used to adjust the color in the original mask map; the target model is rendered and displayed using the target normal map and the target color map to obtain the target model, thereby reducing the number of textures and rendering the target model with fewer textures, thus reducing the cost of model rendering. It is easy to notice that the original normal map can be blended with its own local normal map, so that the target normal map can better match the texture in the target model, which can reduce the texture difference in the model. Furthermore, by adjusting the preset layer, the color displayed in the target color map can be adjusted, avoiding the high blending cost caused by using multiple maps. This can at least solve the technical problem of high model rendering cost in related technologies.

[0121] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of the present invention can be embodied in the form of a software product, which can be stored in a computer-readable storage medium (such as a CD-ROM, USB flash drive, portable hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, terminal device, or network device, etc.) to execute the method according to the embodiments of the present invention.

[0122] In exemplary embodiments of this application, a computer-readable storage medium stores a program product capable of implementing the methods described above in this embodiment. In some possible implementations, various aspects of the embodiments of the present invention can also be implemented as a program product including program code, which, when the program product is run on a terminal device, causes the terminal device to perform the steps of the various exemplary embodiments of the present invention described in the "Exemplary Methods" section above.

[0123] According to embodiments of the present invention, a program product for implementing the above-described method may employ a portable compact disc read-only memory (CD-ROM) and include program code, and may run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto. In the embodiments of the present invention, the computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.

[0124] The aforementioned program product may take the form of any combination of one or more computer-readable media. Such computer-readable storage media may be, for example, but not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof. More specific examples (not exhaustive) of computer-readable storage media include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0125] It should be noted that the program code contained on the computer-readable storage medium can be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.

[0126] Embodiments of the present invention also provide an electronic device including a memory and a processor, the memory storing a computer program and the processor being configured to run the computer program to perform the steps in any of the above method embodiments.

[0127] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.

[0128] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program: acquiring a local normal map and an original mask map of the original normal map in the target model, wherein the local normal map is used to represent the normal map corresponding to a preset region of the original normal map; enhancing at least one color channel in the local normal map to obtain a channel enhancement result; mixing the channel enhancement result and the original normal map to obtain a target normal map; mixing the original mask map with at least one preset layer to obtain a target color map, wherein the at least one preset layer is used to adjust the color in the original mask map; and rendering and displaying the target model using the target normal map and the target color map.

[0129] Optionally, the processor described above can also be configured to perform the following steps via a computer program: converting the local normal map into a two-dimensional vector; splitting the two-dimensional vector to obtain a first target channel and a second target channel; obtaining a first normal map based on the first target channel, the second target channel, and a first translation parameter; and enhancing the first normal map using normal intensity values ​​to obtain a channel enhancement result.

[0130] Optionally, the processor may also be configured to perform the following steps via a computer program: tiling the first normal map using preset texture coordinates to obtain a two-dimensional texture map; enhancing the first color channel and the second color channel in the two-dimensional texture map based on the normal intensity value to obtain a first enhancement result and a second enhancement result; and adding the first enhancement result and the second enhancement result to obtain a channel enhancement result.

[0131] Optionally, the processor may also be configured to perform the following steps via a computer program: combining the first target channel and the second target channel to obtain a first scaling parameter; combining the first translation constant and the second translation constant to obtain a first translation parameter; and adding the first scaling parameter and the first translation parameter to obtain a first normal map.

[0132] Optionally, the processor described above can also be configured to perform the following steps via a computer program: adding the channel enhancement result and the third color channel of the two-dimensional texture map to obtain a second normal map; and superimposing the original normal map and the second normal map to obtain a target normal map.

[0133] Optionally, the processor described above can also be configured to perform the following steps via a computer program: splitting the two-dimensional vector to obtain a first initial channel and a second initial channel; adjusting the first initial channel and the second initial channel to obtain a first target channel and a second target channel.

[0134] Optionally, the processor may also be configured to perform the following steps via a computer program: obtaining the first color channel of the original mask image; multiplying the first color channel and the first constant parameter using a fourth preset node to obtain the first color parameter; obtaining the second color parameter based on the difference between the first preset value and the first color parameter; adjusting the second color parameter based on a preset threshold to obtain the mask parameter; and blending the mask parameter with at least one preset layer to obtain the target color map.

[0135] Optionally, the processor described above can also be configured to perform the following steps via a computer program: mixing roughness parameters with a target color map to obtain a target roughness map; and rendering and displaying the target model based on the target normal map, the target color map, and the target roughness map.

[0136] In the electronic device of this embodiment, a local normal map and an original mask map of the original normal map in the target model are first acquired, wherein the local normal map is used to represent the normal map corresponding to a preset area of ​​the original normal map; at least one color channel in the local normal map is enhanced to obtain a channel enhancement result; the channel enhancement result and the original normal map are mixed to obtain a target normal map; the original mask map is mixed with at least one preset layer to obtain a target color map, wherein at least one preset layer is used to adjust the color in the original mask map; the target model is rendered and displayed using the target normal map and the target color map to obtain the target model, thereby reducing the number of textures and rendering the target model with fewer textures, thus reducing the cost of model rendering. It is easy to notice that the original normal map can be blended with its own local normal map, so that the target normal map can better match the texture in the target model, which can reduce the texture difference in the model. Furthermore, by adjusting the preset layer, the color displayed in the target color map can be adjusted, avoiding the high blending cost caused by using multiple maps. This can at least solve the technical problem of high model rendering cost in related technologies.

[0137] Figure 7 This is a schematic diagram of an electronic device according to an embodiment of the present invention. Figure 7 As shown, the electronic device 700 is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of the present invention.

[0138] like Figure 7 As shown, the electronic device 700 is presented in the form of a general-purpose computing device. The components of the electronic device 700 may include, but are not limited to: at least one processor 710, at least one memory 720, a bus 730 connecting different system components (including memory 720 and processor 710), and a display 740.

[0139] The memory 720 stores program code that can be executed by the processor 710, causing the processor 710 to perform the steps described in the method section of the embodiments of this application according to various exemplary implementations of the present invention.

[0140] The memory 720 may include a readable medium in the form of volatile memory cells, such as random access memory (RAM) 7201 and / or cache memory 7202, and may further include read-only memory (ROM) 7203, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory.

[0141] In some instances, memory 720 may also include a program / utility 7204 having a set (at least one) of program modules 13205, including but not limited to: an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Memory 720 may further include memory remotely located relative to processor 710, which can be connected to electronic device 700 via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0142] Bus 730 can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, peripheral bus, graphics acceleration port, processor 710, or a local bus using any of the various bus structures.

[0143] The display 740 may be, for example, a touchscreen liquid crystal display (LCD) that allows a user to interact with the user interface of the electronic device 700.

[0144] Optionally, the electronic device 700 can also communicate with one or more external devices 800 (e.g., keyboard, pointing device, Bluetooth device, etc.), one or more devices that enable a user to interact with the electronic device 700, and / or any device that enables the electronic device 700 to communicate with one or more other computing devices (e.g., router, modem, etc.). This communication can be performed via the input / output (I / O) interface 750. Furthermore, the electronic device 700 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via a network adapter 760. Figure 7 As shown, network adapter 760 communicates with other modules of electronic device 700 via bus 730. It should be understood that, although... Figure 7 As not shown, other hardware and / or software modules may be used in conjunction with electronic device 700, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0145] The aforementioned electronic device 700 may also include: a keyboard, a cursor control device (such as a mouse), an input / output interface (I / O interface), a network interface, a power supply, and / or a camera.

[0146] Those skilled in the art will understand that Figure 7 The structure shown is for illustrative purposes only and does not limit the structure of the electronic device described above. For example, the electronic device 700 may also include components that are more... Figure 7 The more or fewer components shown, or having the same Figure 1 Different configurations are shown. The memory 720 can be used to store computer programs and corresponding data, such as the computer program and corresponding data corresponding to the model rendering method in this embodiment of the invention. The processor 710 executes various functional applications and data processing by running the computer program stored in the memory 720, thereby implementing the aforementioned model rendering method.

[0147] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0148] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0149] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.

[0150] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0151] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0152] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0153] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A model rendering method, characterized in that, include: Obtain the local normal map and the original mask map of the original normal map in the target model, wherein the local normal map is used to represent the normal map corresponding to a preset region of the original normal map; Convert the local normal map into a two-dimensional vector; The two-dimensional vector is split to obtain the first target channel and the second target channel; Based on the first target channel, the second target channel, and the first translation parameter, a first normal map is obtained; The first normal map is enhanced using the normal intensity value to obtain the channel enhancement result; The channel enhancement result and the original normal map are blended to obtain the target normal map; The original mask image is blended with at least one preset layer to obtain a target color map, wherein the at least one preset layer is used to adjust the colors in the original mask image; The target model is rendered and displayed using the target normal map and the target color map.

2. The method according to claim 1, characterized in that, The first normal map is enhanced using the normal intensity value to obtain the channel enhancement result, including: The first normal map is tiled using preset texture coordinates to obtain a two-dimensional texture map; Based on the normal intensity value, the first color channel and the second color channel of the two-dimensional texture map are enhanced respectively to obtain the first enhancement result and the second enhancement result; The first enhancement result and the second enhancement result are added together to obtain the channel enhancement result.

3. The method according to claim 1, characterized in that, Based on the first target channel, the second target channel, and the first translation parameter, a first normal map is obtained, including: The first target channel and the second target channel are combined to obtain the first scaling parameter; The first translation parameter is obtained by combining the first translation constant and the second translation constant. The first scaling parameter and the first translation parameter are added together to obtain the first normal map.

4. The method according to claim 2, characterized in that, The channel enhancement result and the original normal map are blended to obtain the target normal map, including: The channel enhancement result and the third color channel of the two-dimensional texture map are added together to obtain the second normal map; The original normal map and the second normal map are superimposed to obtain the target normal map.

5. The method according to claim 1, characterized in that, The two-dimensional vector is split to obtain a first target channel and a second target channel, including: The two-dimensional vector is split to obtain a first initial channel and a second initial channel; The first initial channel and the second initial channel are scaled and adjusted to obtain the first target channel and the second target channel.

6. The method according to claim 1, characterized in that, The original mask image is blended with at least one preset layer to obtain a target color texture, including: Obtain the first color channel of the original mask image; The first color parameter is obtained by multiplying the first color channel and the first constant parameter. The second color parameter is obtained based on the difference between the first preset value and the first color parameter; The second color parameter is adjusted based on a preset threshold to obtain the masking parameter; The masking parameters and the at least one preset layer are blended to obtain the target color map.

7. The method according to claim 1, characterized in that, The target model is rendered and displayed using the target normal map and the target color map, including: The roughness parameter is mixed with the target color map to obtain the target roughness map; The target model is rendered and displayed based on the target normal map, the target color map, and the target roughness map.

8. A model rendering apparatus, characterized in that, include: The acquisition module is used to acquire the local normal map and the original mask map of the original normal map in the target model, wherein the local normal map is used to represent the normal map corresponding to a preset area of ​​the original normal map; An enhancement module is used to convert the local normal map into a two-dimensional vector; split the two-dimensional vector to obtain a first target channel and a second target channel; obtain a first normal map based on the first target channel, the second target channel, and a first translation parameter; and enhance the first normal map using normal intensity values ​​to obtain a channel enhancement result. The first mixing module is used to mix the channel enhancement result and the original normal map to obtain the target normal map; The second mixing module is used to mix the original mask image with at least one preset layer to obtain a target color map, wherein the at least one preset layer is used to adjust the colors in the original mask image; The rendering module is used to render and display the target model using the target normal map and the target color map.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein the computer program is configured to execute the model rendering method according to any one of claims 1 to 7 when run by a processor.

10. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to run the computer program to perform the model rendering method according to any one of claims 1 to 7.