Texture mapping processing method and device, storage medium and electronic device

By generating preset maps and mixing texture maps based on their pixel values, the problem of low texture map drawing efficiency in game asset production is solved, and more efficient game asset production is achieved.

CN119888047AActive Publication Date: 2025-04-25NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202311396746.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-25
Publication Date
2025-04-25
Estimated Expiration
2043-10-25

AI Technical Summary

Technical Problem

During the production of game assets, the drawing efficiency of texture maps is low, and no effective solution has been proposed in the existing technology.

Method used

By acquiring multiple texture maps, at least one corresponding first preset map is generated, wherein the pixel values ​​of at least one channel are used to mix the multiple texture maps, and the texture map is mixed based on the pixel values ​​of this preset map to obtain a mixed texture map.

Benefits of technology

This has enabled art designers to mix multiple texture maps through the pixel values ​​of the channel when drawing a small number of texture maps, expand the generation of more mixed texture maps, reduce the difficulty of drawing texture maps, shorten the drawing cycle, and improve the efficiency of game asset production.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119888047A_ABST
    Figure CN119888047A_ABST
Patent Text Reader

Abstract

The invention discloses a texture mapping processing method and device, a storage medium and an electronic device. The method comprises the following steps: acquiring a plurality of texture maps; at least one first preset map corresponding to the multiple texture maps is generated, and the pixel value of at least one channel in the first preset map is used for mixing the multiple texture maps; and based on the pixel value of at least one channel in the first preset map, mixing the plurality of texture maps to obtain a mixed texture map. The technical problem that the drawing efficiency of the texture map in the game asset making process is low is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of virtual asset production, and in particular, to a texture mapping processing method, device, storage medium and electronic device. Background Art

[0002] At present, the asset production of most games relies on art designers to use texture drawing software to draw various types of texture maps. However, a game often has hundreds of assets or tens of thousands of assets, and it is inevitable that there is a problem of low texture map drawing efficiency.

[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0004] At least some embodiments of the present disclosure provide a method and device for processing a texture map, as well as a storage medium and an electronic device, so as to at least solve the technical problem of low efficiency in rendering texture maps in the process of making game assets.

[0005] According to one embodiment of the present disclosure, a method for processing a texture map is provided, including: obtaining a plurality of texture maps; generating at least one first preset map corresponding to the plurality of texture maps, wherein the pixel value of at least one channel in the first preset map is used to mix the plurality of texture maps; and mixing the plurality of texture maps based on the pixel value of at least one channel in the first preset map to obtain a mixed texture map.

[0006] According to one embodiment of the present disclosure, a texture map processing device is also provided, including: an acquisition module for acquiring multiple texture maps; a generation module for generating at least one first preset map corresponding to the multiple texture maps, wherein the pixel value of at least one channel in the first preset map is used to mix the multiple texture maps; a mixing module for mixing the multiple texture maps based on the pixel value of at least one channel in the first preset map to obtain a mixed texture map.

[0007] According to one embodiment of the present disclosure, a computer-readable storage medium is further provided, in which a computer program is stored, wherein the computer program is configured to execute any of the above-mentioned texture mapping processing methods when running.

[0008] According to one embodiment of the present disclosure, an electronic device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute any of the above-mentioned texture mapping processing methods.

[0009] In at least some embodiments of the present disclosure, multiple texture maps are obtained; at least one first preset map corresponding to the multiple texture maps is generated, wherein the pixel values ​​of at least one channel in the first preset map are used to mix the multiple texture maps; based on the pixel values ​​of at least one channel in the first preset map, the multiple texture maps are mixed to obtain a mixed texture map. It is easy to notice that a mixed texture map can be obtained by generating at least one first preset map corresponding to the multiple texture maps, and mixing the multiple texture maps based on the pixel values ​​of at least one channel in the first preset map, so that when art designers draw a small number of texture maps, they can mix the multiple texture maps by the pixel values ​​of the channels, and expand and generate more mixed texture maps, thereby achieving the technical effect of reducing the difficulty of drawing texture maps, shortening the drawing cycle of texture maps, and thereby improving the efficiency of game asset production, thereby solving the technical problem of low texture map drawing efficiency in the game asset production process. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] The drawings described herein are used to provide a further understanding of the present disclosure and constitute a part of the present application. The illustrative embodiments of the present disclosure and their descriptions are used to explain the present disclosure and do not constitute an improper limitation on the present disclosure. In the drawings:

[0011] Figure 1 It is a hardware structure block diagram of a mobile terminal of a texture mapping processing method according to an embodiment of the present disclosure;

[0012] Figure 2 is a flowchart of a method for processing a texture map according to one embodiment of the present disclosure;

[0013] Figure 3 is a schematic diagram of mixing two texture maps according to one embodiment of the present disclosure;

[0014] Figure 4 is a schematic diagram of mixing three texture maps according to one embodiment of the present disclosure;

[0015] Figure 5 is a schematic diagram of adjusting parameters of a mixed texture map according to one embodiment of the present disclosure;

[0016] Figure 6 is a schematic diagram of rendering a preset model to obtain a rendering result according to one embodiment of the present disclosure;

[0017] Figure 7 is a schematic diagram of adding turning wear changes according to one embodiment of the present disclosure;

[0018] Figure 8 is a schematic diagram of adding wear effects and coverings according to one embodiment of the present disclosure;

[0019] Fig. 9 is a schematic diagram of a texture map processing device according to one embodiment of the present disclosure;

[0020] Fig.10 is a schematic diagram of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0021] In order to enable those skilled in the art to better understand the scheme of the present disclosure, the technical scheme in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in the field without creative work should fall within the scope of protection of the present disclosure.

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

[0023] First, some nouns or terms that appear in the description of the embodiments of the present application are subject to the following explanations:

[0024] Normal: is a vector that describes the direction of a surface at a specific location. In 3D rendering, normal information is very important because they determine how a surface reflects light.

[0025] Normal information: Usually used to render surface details, such as textures, bump maps, roughness, and metalness. This information can be achieved through normal maps, which are a special type of texture used to simulate geometric details of surfaces in 3D rendering.

[0026] Normal map: contains a set of normal vectors that describe the direction of the surface at each point on the surface. By using normal maps, you can simulate the geometric details of the surface without increasing the geometric complexity, thereby obtaining a more realistic rendering effect. In 3D modeling software, you can achieve high-quality rendering effects by storing the normal information of a high-resolution model in a normal map and then applying the normal map to a low-resolution model.

[0027] Texture Resolution: refers to the size of the unit area occupied by each pixel in the texture map. It is usually expressed in the form of pixels per unit or pixels per inch to measure the clarity and detail of the texture. In games, texture maps play a very important role. They can make the game scenes more realistic and vivid. However, the accuracy of texture maps has a great impact on game performance and the quality of game scenes. Generally, the higher the accuracy of texture maps, the more memory they occupy, and the greater impact on game performance. Therefore, in the process of game production, it is necessary to reasonably select the accuracy of texture maps according to the needs of the game and the performance of the device. Generally speaking, on lower-end devices, lower texture map accuracy should be selected to improve game performance. On higher-end devices, higher texture map accuracy can be selected to obtain higher image quality and finer details.

[0028] RGB channels: refers to the three color channels in the color model, namely red (R: Red), green (G: Green) and blue (B: Blue). In computer graphics and digital image processing, RGB channels are one of the basic ways to represent colors. The way RGB channels represent colors is to decompose colors into three different color channels, each of which contains a color component, namely red, green and blue components. By adjusting the brightness and saturation of the color components in each channel, a variety of different colors can be created. In image processing, RGB channels can be used to adjust the color, contrast, brightness, etc. of an image. For example, the overall hue of an image can be warmed by increasing the brightness in the red channel, or the image can be made cooler by reducing the brightness in the blue channel.

[0029] In a possible implementation, in view of the fact that texture mapping in the field of asset production is usually carried out by relying on art designers to use texture drawing software to draw various types of textures, the inventors, after practice and careful research, still found that there is a technical problem of low texture mapping drawing efficiency. Based on this, a method for processing texture mapping is proposed, and the technical concept adopted is to obtain multiple texture maps; generate at least one first preset map corresponding to the multiple texture maps, wherein the pixel values ​​of at least one channel in the first preset map are used to mix the multiple texture maps; based on the pixel values ​​of at least one channel in the first preset map, the multiple texture maps are mixed to obtain a mixed texture map, so that art designers can mix multiple texture maps by the pixel values ​​of the channels when drawing a small number of texture maps, and expand and generate more mixed texture maps, thereby solving the technical problem of low texture mapping drawing efficiency in the process of game asset production, and further achieving the technical effect of improving the efficiency of game asset production.

[0030] The texture map processing method in one embodiment of the present disclosure can be run on a local terminal device or a server. When the texture map processing method is run 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.

[0031] In an optional implementation, various cloud applications can be run under the cloud interaction system, such as cloud games. Taking cloud games as an example, cloud games refer to a game mode based on cloud computing. In the operation mode of cloud games, the running body of the game program and the main body of the game screen presentation are separated. The storage and operation of the texture map processing method are completed on the cloud game server. The role of the client device is used for data reception, transmission and presentation of the game screen. For example, the client device can be a display device with data transmission function close to the user side, such as a mobile terminal, a TV, a computer, a handheld computer, etc.; but the cloud game server in the cloud is used for information processing. When playing the game, the player operates the client device to send an operation instruction to the cloud game server. The cloud game server runs the game according to the operation instruction, encodes and compresses the game screen and other data, and returns it to the client device through the network. Finally, the client device decodes and outputs the game screen.

[0032] In an optional implementation, taking a game as an example, the local terminal device stores the game program and is used to present the game screen. The local terminal device is used to interact with the player through a graphical user interface, that is, the game program is downloaded and installed and run by the conventional electronic device. The local terminal device can provide the graphical user interface to the player in a variety of ways, for example, it can be rendered and displayed on the display screen of the terminal, or provided to the player through holographic projection.

[0033] For example, the local terminal device can be a mobile terminal, a computer terminal or a similar computing device, which may include a display screen and a processor, wherein the display screen is used to present a graphical user interface, the graphical user interface includes a game screen, and the processor is used to run the game, generate the graphical user interface and control the display of the graphical user interface on the display screen.

[0034] Taking running on a mobile terminal as an example, the mobile terminal may be a smart phone, a tablet computer, a PDA, a mobile Internet device, a PAD (Portable Android Device), a game console, or other terminal devices. Figure 1 FIG. 1 is a hardware structure block diagram of a mobile terminal of a texture mapping processing method according to an embodiment of the present disclosure. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 and a memory 104 for storing data. Optionally, the mobile terminal may further include a transmission device 106, an input and output device 108 and a display device 110.

[0035] Those skilled in the art will understand that Figure 1 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.

[0036] According to one embodiment of the present disclosure, an embodiment of a method for processing a texture map is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0037] In a possible implementation, the embodiment of the present disclosure provides a method for processing texture mapping. Figure 2 is a flowchart of a method for processing a texture map according to one embodiment of the present disclosure, such as Figure 2 As shown, the method comprises the following steps:

[0038] S202, obtaining multiple texture maps.

[0039] Specifically, the above-mentioned texture map can be used to represent a map pre-drawn by an artist to simulate the details and materials of the model surface.

[0040] Generally, the above-mentioned texture maps are determined based on the model to be rendered. For example, when the model to be rendered is a wall, the multiple texture maps may include multiple layers of stacked bricks representing the base image, and cement representing the surface of the bricks.

[0041] S204, generating at least one first preset map corresponding to the multiple texture maps, wherein the pixel value of at least one channel in the first preset map is used to mix the multiple texture maps.

[0042] Specifically, the above-mentioned first preset map can be used to represent an image composed of black and white information. An image usually contains four channels, namely R (red) channel, G (green) channel, B (blue) channel and A (transparency channel). Therefore, the pixel value of each channel in the first preset map can range from 0 to 1.

[0043] Generally, the grayscale value interval can be expressed as [0, 255]. In the present application, the interval value of [0, 255] can be converted to [0, 1], that is, the pixel value is expressed by [0, 1].

[0044] In an optional embodiment, the number of first preset maps can be determined based on multiple texture maps. When there are two texture maps, the number of corresponding first preset maps is one, and the two texture maps correspond to any one channel in the first preset map; when there are three texture maps, the number of corresponding first preset maps is one, and the three texture maps correspond to any three channels in the first preset map; when there are four texture maps and the first preset map contains four channels, the number of corresponding first preset maps can be one, and the four texture maps correspond to the four channels in the first preset map one-to-one; when there are four texture maps and the first preset map contains three channels, the number of corresponding first preset maps can also be two, that is, two of the four texture maps correspond to any two channels in the first preset map one-to-one, and the other two texture maps of the four texture maps correspond to any two channels in the second preset map one-to-one. In addition, when the plurality of texture maps includes at least five texture maps, the at least five texture maps need to be grouped, and the texture maps need to be mixed respectively for the grouped texture maps.

[0045] S206: Based on the pixel value of at least one channel in the first preset map, multiple texture maps are mixed to obtain a mixed texture map.

[0046] Specifically, the above-mentioned mixed texture map can be used to represent a map obtained by mixing multiple texture maps at a mixing ratio determined based on pixel values.

[0047] In an optional embodiment, in the process of mixing multiple texture maps, it is necessary to predetermine the pixel value of at least one channel in a first preset map. By proportionally converting the pixel value, the mixing ratio of each texture map can be determined, and then the multiple texture maps are mixed according to the mixing ratio to obtain a mixed texture map.

[0048] Exemplarily, taking two texture maps as an example, if the pixel value of a channel in the first preset map is predetermined to be 0.7, the mixing ratio is determined to be 70%:30%, and then based on the mixing ratio of 70%:30%, multiple texture maps are mixed to obtain a mixed texture map.

[0049] In another optional embodiment, in order to avoid errors in mixed texture maps caused by determining the mixing ratio directly based on the pixel values ​​of at least one channel, multiple texture maps can be divided into base maps and non-base maps, wherein the base map can be a pre-set texture map. In the process of determining the mixing ratio of each texture map, it is necessary to determine the mixing ratio of the non-base map based on the pixel value, further determine the mixing ratio of the base map, and mix the non-base map and the base map in the multiple texture maps according to the mixing ratio of the non-base map and the mixing ratio of the base map to obtain a mixed texture map.

[0050] In summary, by acquiring multiple texture maps; generating at least one first preset map corresponding to the multiple texture maps, wherein the pixel values ​​of at least one channel in the first preset map are used to mix the multiple texture maps; based on the pixel values ​​of at least one channel in the first preset map, the multiple texture maps are mixed to obtain a mixed texture map. It is easy to notice that by generating at least one first preset map corresponding to the multiple texture maps, and mixing the multiple texture maps based on the pixel values ​​of at least one channel in the first preset map, a mixed texture map can be obtained, which enables art designers to mix multiple texture maps by the pixel values ​​of the channel when drawing a small number of texture maps, and expand and generate more mixed texture maps, thereby achieving the technical effect of reducing the difficulty of drawing texture maps, shortening the drawing cycle of texture maps, and thereby improving the efficiency of game asset production, thereby solving the technical problem of low texture map drawing efficiency in the process of game asset production.

[0051] Optionally, in the case where the multiple texture maps include two texture maps, the multiple texture maps are mixed based on the pixel values ​​of at least one channel in the first preset map to obtain a mixed texture map, including: obtaining the pixel value of a preset channel in the first preset map; determining a first mixing ratio of the two texture maps based on the pixel value of the preset channel; and mixing the two texture maps based on the first mixing ratio to obtain a mixed texture map.

[0052] Specifically, the above-mentioned preset channel can be used to represent any one of the four channels in the first preset map, or a channel pre-specified by an artist.

[0053] In an optional embodiment, when multiple texture maps include two texture maps, a first preset map corresponding to the two texture maps can be generated, and then based on the pixel value of a preset channel in the first preset map, a first mixing ratio of the two texture maps is determined, and the two texture maps are mixed based on the first mixing ratio to obtain a mixed texture map. Exemplarily, when the pixel value of the preset channel is 0.8, by proportionally converting 0.8, it can be obtained that the mixing ratio of one of the two texture maps is 80%, and the mixing ratio of the other texture map is 20%. Therefore, the above-mentioned first mixing ratio is 80%:20%.

[0054] In another optional embodiment, in the process of determining the first mixing ratio of the two texture maps based on the pixel value of the preset channel, it is necessary to perform a proportional conversion on the pixel value to obtain the converted first mixing ratio. Exemplarily, when the pixel value of the preset channel is 0.8, by performing a proportional conversion on 0.8, the mixing ratio of the non-base map in the first preset map can be obtained to be 85%, and the mixing ratio of the base map in the remaining first preset map is 15%, and the above-mentioned first mixing ratio can be obtained to be 85%:15%, and then the two texture maps are mixed based on the first mixing ratio to obtain a mixed texture map.

[0055] In summary, by determining a first mixing ratio based on the pixel values ​​of a preset channel in a first preset map and mixing the two texture maps when multiple texture maps include two texture maps, the purpose of mixing the two texture maps based on the first mixing ratio is achieved.

[0056] Optionally, based on the pixel values ​​of a preset channel, a first mixing ratio of the two texture maps is determined, including: based on the pixel values ​​of the preset channel, determining the mixing ratio of the first texture map among the two texture maps; in response to the mixing ratio of the first texture map being less than a first preset ratio, obtaining the difference between the first preset ratio and the mixing ratio of the first texture map, and obtaining the mixing ratio of the second texture map among the two texture maps; or in response to the mixing ratio of the first texture map being greater than or equal to the first preset ratio, determining the mixing ratio of the second texture map to be the second preset ratio; and obtaining the first mixing ratio based on the mixing ratio of the first texture map and the mixing ratio of the second texture map.

[0057] Specifically, the first texture map mentioned above can be used to represent a texture map representing a non-base image.

[0058] The second texture map mentioned above can be used to represent the texture map representing the base image.

[0059] The first preset ratio mentioned above can be used to represent a preset ratio for judging the mixing ratio. Generally, the first preset ratio is represented as 100%.

[0060] The second preset ratio mentioned above can be used to represent the mixing ratio of the second texture map that is preset when the mixing ratio of the first texture map is greater than or equal to the first preset ratio. Generally, the second preset ratio is represented as 0.

[0061] In an optional embodiment, in the process of determining the first mixing ratio of two texture maps based on the pixel values ​​of a preset channel, it is necessary to determine the mixing ratio of the first texture map through the pre-set pixel values ​​in the preset channel, and at the same time judge whether the mixing ratio of the first texture map is less than the first preset ratio of 100%. When the mixing ratio of the first texture map is less than the first preset ratio of 100%, it means that there is still a mixing ratio of the second texture map. The mixing ratio of the second texture map is obtained by obtaining the difference between the first preset ratio of 100% and the mixing ratio of the first texture map, and the above-mentioned first mixing ratio is obtained based on the mixing ratio of the first texture map and the mixing ratio of the second texture map. The first mixing ratio in this case is determined as the mixing ratio of the first texture map: the mixing ratio of the second texture map.

[0062] In another optional embodiment, when the mixing ratio of the first texture map is not less than the first preset ratio of 100%, it means that there is no mixing ratio of the second texture map, that is, there is no need to mix the second texture map. Therefore, the mixing ratio of the second texture map can be determined to be the second preset ratio of 0, and then based on the mixing ratio of the first texture map and the mixing ratio of the second texture map, the above-mentioned first mixing ratio is obtained. The first mixing ratio in this case is determined to be the mixing ratio of the first texture map, that is, the final mixed texture map is the first texture map.

[0063] Figure 3 is a schematic diagram of mixing two texture maps according to one embodiment of the present disclosure, such as Figure 3 As shown, the upper layer is a multi-layer stacked brick, corresponding to the second texture map, that is, the base map, and the lower layer is the cement covering the surface of the bricks, corresponding to the first texture map, that is, the non-base map. The corresponding first preset map is generated by the first texture map and the second texture map, and the pixel value of the preset channel in the first preset map is used to determine whether the base map is displayed in black (that is, the pixel value is 0) and the non-base map is displayed in white (that is, the pixel value is 1), and then the two texture maps are mixed based on the first mixing ratio to obtain a mixed texture map.

[0064] Optionally, when the plurality of texture maps include three texture maps or four texture maps, the plurality of texture maps are mixed based on the pixel values ​​of at least one channel in the first preset map to obtain the mixed texture map, including: obtaining the pixel values ​​of the plurality of channels in the first preset map, wherein the plurality of channels are mixed with the plurality of texture maps; Figure 1 One-to-one correspondence; based on the pixel values ​​of the multiple channels, determining a second mixing ratio of the multiple texture maps; based on the second mixing ratio, mixing the multiple texture maps to obtain a mixed texture map.

[0065] Specifically, the number of the above-mentioned multiple channels is consistent with the number of multiple texture maps, that is, when the multiple texture maps include three texture maps, the corresponding first preset map includes three channels; when the multiple texture maps include four texture maps, the corresponding first preset map includes four channels, and so on.

[0066] In an optional embodiment, when the multiple texture maps include three texture maps or four texture maps, a corresponding first preset map is generated using the three texture maps or the four texture maps, and pixel values ​​of multiple channels in the first preset map can be obtained at the same time, and then a second mixing ratio of the multiple texture maps is determined based on the pixel values ​​of the multiple channels, and the above-mentioned mixed texture map can be obtained by mixing the multiple texture maps.

[0067] In another optional embodiment, in the process of obtaining the pixel values ​​of multiple channels in the first preset map, the corresponding channel pixel values ​​can be determined based on the number of multiple texture maps. Specifically, in the case where the multiple texture maps include three texture maps, the three texture maps correspond to three channels, and the pixel values ​​belonging to the non-base map channels in the three channels can be determined, and the second mixing ratio of the three texture maps can be determined based on the pixel values; in the case where the multiple texture maps include four texture maps, the four texture maps correspond to four channels. Similarly, the pixel values ​​belonging to the non-base map channels in the four channels can be determined, and the second mixing ratio of the four texture maps can be determined based on the pixel values. After determining the second mixing ratio corresponding to different numbers of texture maps, it is necessary to mix the three texture maps or the four texture maps based on the second mixing ratio to obtain a mixed texture map. Among them, in the process of mixing multiple texture maps based on the second mixing ratio, the multiple texture maps can be mixed by the non-base map mixing ratio and the base map mixing ratio in the second mixing ratio, that is, the corresponding non-base map in the multiple texture maps is adjusted by the non-base map mixing ratio, and the corresponding base map in the multiple texture maps is adjusted by the base map mixing ratio, and then the adjusted texture maps are superimposed to obtain the above-mentioned mixed texture map.

[0068] Optionally, based on the pixel values ​​of multiple channels, a second mixing ratio of multiple texture maps is determined, including: based on the pixel value of a first channel among the multiple channels, determining the mixing ratio of the texture map corresponding to the first channel, wherein the first channel satisfies a preset condition; obtaining the sum of the mixing ratios of the texture maps corresponding to the first channel to obtain a total mixing ratio; in response to the total mixing ratio being less than a first preset ratio, obtaining the difference between the first preset ratio and the total mixing ratio to obtain the mixing ratio of the texture map corresponding to the second channel, wherein the second channel is a channel among the multiple channels other than the first channel; or in response to the total mixing ratio being greater than or equal to the first preset ratio, determining the mixing ratio of the texture map corresponding to the second channel to be a second preset ratio; obtaining a second mixing ratio based on the mixing ratio of the texture map corresponding to the first channel and the mixing ratio of the texture map corresponding to the second channel.

[0069] Specifically, the above-mentioned preset conditions can be used to represent the pre-set conditions that satisfy the non-base map channel.

[0070] The above-mentioned mixing ratio can be used to represent the mixing ratio of the corresponding texture map when the first channel is a non-base map channel, wherein the above-mentioned first channel includes at least one channel.

[0071] The above-mentioned total mixing ratio can be used to represent the sum of the mixing ratios of the texture maps corresponding to the multiple first channels that satisfy the non-base map channel.

[0072] The second channel mentioned above can be used to represent the channels among the multiple channels that satisfy the base map channel, that is, the channels among the multiple channels except the first channel.

[0073] In an optional embodiment, in the process of determining the second mixing ratio of multiple texture maps based on pixel values ​​of multiple channels, it is necessary to obtain the pixel value of a first channel among the multiple channels, wherein the first channel satisfies the non-base map channel, and then based on the pixel value of the first channel, determine the mixing ratio of the texture map corresponding to the first channel, and then obtain the sum of the mixing ratios of the texture maps corresponding to the first channel to obtain a total mixing ratio, wherein the total mixing ratio is characterized as the sum of the mixing ratios of the texture maps corresponding to the non-base map channels in the multiple channels, and then determine whether the total mixing ratio is less than the first preset ratio of 100%, and determine the mixing ratio of the texture map corresponding to the second channel through different judgment results.

[0074] When the total mixing ratio is less than the first preset ratio of 100%, it means that there is still a mixing ratio of the texture map that satisfies the base map channel. Therefore, the difference between the first preset ratio of 100% and the total mixing ratio can be obtained to obtain the mixing ratio of the texture map corresponding to the second channel, that is, the mixing ratio of the texture map that satisfies the base map channel; when the total mixing ratio is greater than or equal to the first preset ratio of 100%, it means that there is no mixing ratio of the texture map that satisfies the base map channel, that is, there is no need to mix the texture map corresponding to the second channel. Therefore, the mixing ratio of the texture map corresponding to the second channel is determined to be the second preset ratio of 0, and then after determining the mixing ratio of the texture map corresponding to the second channel under different judgment results, the second mixing ratio is obtained based on the mixing ratio of the texture map corresponding to the first channel and the mixing ratio of the texture map corresponding to the second channel.

[0075] Optionally, the method includes: obtaining priorities of multiple channels; determining a first channel and a second channel based on the priorities of the multiple channels, wherein the priority of the first channel is higher than the priority of the second channel, and the priority of the second channel is the minimum priority among the priorities of the multiple channels.

[0076] Specifically, the above priorities can be used to indicate the priorities of a plurality of preset channels.

[0077] Exemplarily, in the case where the multiple channels are three channels, the above priorities may be R>G>B, that is, the priority of the R channel is greater than the priority of the G channel which is greater than the priority of the B channel. It should be noted that the above is only an exemplary description and the priority is not specifically limited here.

[0078] In an optional embodiment, in the process of determining the first channel and the second channel among the multiple channels, the first channel and the second channel may be determined according to the preset priorities of the multiple channels. Specifically, when the multiple channels are the R channel, the G channel, and the B channel, the R channel and the G channel may be determined as the first channel and the B channel may be determined as the second channel according to the above priorities.

[0079] It should be noted that, when the pixel values ​​of the R channel, G channel and B channel all show white (that is, the pixel value is 1), the texture of the R channel can be displayed preferentially through the above-mentioned priority, that is, the mixing ratio of the texture map corresponding to the R channel is 100%, and the mixing ratio of the texture maps corresponding to other channels is 0; when the pixel values ​​of the R channel, G channel and B channel all show black (that is, the pixel value is 0), the above-mentioned priority can be used to determine that the mixing ratio of the texture maps corresponding to the R channel and G channel is 0, and the mixing ratio of the texture map corresponding to the B channel is 100%, that is, the texture of the B channel is displayed preferentially.

[0080] Figure 4 FIG. 1 is a schematic diagram of mixing three texture maps according to one embodiment of the present disclosure. Figure 4 As shown, the upper layer is the texture corresponding to the white control of the R channel, the middle layer is the texture corresponding to the white control of the G channel, and the lower layer is the texture corresponding to the white control of the B channel. The corresponding first preset map is generated by the upper texture map, the middle texture map and the lower texture map, and the second mixing ratio is obtained based on the mixing ratio of the texture map corresponding to the first channel in the first preset map and the mixing ratio of the texture map corresponding to the second channel. Then, the three texture maps are mixed based on the second mixing ratio to obtain a mixed texture map.

[0081] Optionally, when the plurality of texture maps include at least five texture maps, the plurality of texture maps are mixed based on the pixel value of at least one channel in the first preset map to obtain a mixed texture map, comprising: grouping the at least five texture maps to obtain at least one texture set, wherein the at least one texture set is combined with at least one first preset texture map. Figure 1 One-to-one correspondence; based on the pixel value of at least one channel in the first preset map, the texture maps in the map set are mixed to obtain at least one mixed map; at least one mixed map is mixed to obtain a mixed texture map.

[0082] Specifically, the above-mentioned map set can be used to represent a set obtained by grouping at least five texture maps, wherein each map set can be a set containing four texture maps, a set containing one texture map, a set containing three texture maps, a set containing two texture maps, and so on.

[0083] The above-mentioned mixed map can be used to represent a map obtained by mixing texture maps in a map set based on the pixel value of at least one channel in the map set.

[0084] In an optional embodiment, when the plurality of texture maps include at least five texture maps, the at least five texture maps need to be grouped to obtain texture maps corresponding to at least one first preset texture map. Figure 1 At least one corresponding map set is obtained, and then based on the pixel value of at least one channel in the first preset map, the texture maps in the corresponding map set are mixed to obtain a mixed map corresponding to the map set, and then at least one mixed map is mixed to obtain the above-mentioned mixed texture map.

[0085] Exemplarily, when the plurality of texture maps include five texture maps, the five texture maps may be custom grouped to obtain a map set including two texture maps and a map set including three texture maps. Specifically, for the map set including two texture maps, the pixel values ​​of a preset channel in a first preset map may be obtained, and a first mixing ratio of the two texture maps may be determined based on the pixel values, and then the two texture maps may be mixed based on the first mixing ratio to obtain a first mixed map corresponding to the map set including the two texture maps; for the map set including three texture maps, the pixel values ​​of multiple channels in the first preset map may be obtained, and then a second mixing ratio of the three texture maps may be determined based on the pixel values, and then the three texture maps may be mixed based on the second mixing ratio to obtain a second mixed map corresponding to the map set including the three texture maps, and after obtaining the first mixed map and the second mixed map, the first mixed map and the second mixed map may be mixed to obtain a mixed texture map.

[0086] Optionally, generating at least one first preset map corresponding to the multiple texture maps includes at least one of the following: drawing the at least one first preset map; and determining the at least one first preset map based on normal maps corresponding to the multiple texture maps.

[0087] In an optional embodiment, in the process of generating at least one first preset map corresponding to a plurality of texture maps, an artist may pre-draw the at least one first preset map.

[0088] In another optional embodiment, in the process of generating at least one first preset map corresponding to multiple texture maps, normal maps corresponding to the multiple texture maps can be obtained, that is, the normal map of the preset model is determined, and at least one first preset map is calculated based on the normal map.

[0089] In a third optional embodiment, in the process of generating at least one first preset map corresponding to multiple texture maps, an artist can pre-draw a first preset map and calculate other first preset maps based on normal maps corresponding to the multiple texture maps.

[0090] It should be noted that at least one first preset map can be drawn by drawing software such as Photoshop (image processing software), C4D (Cinema 4D, modeling, animation and rendering software), SP (Substance Painter, material drawing software), Zb (ZBrush, digital sculpture, modeling and painting software), etc. At least one first preset map can be calculated according to normal maps corresponding to multiple texture maps by calculation software such as DS (Adobe Substance 3DDesigner, three-dimensional material and texture editing software), ND (Quixel SUITE, a software suite for creating and rendering high-quality 3D materials and environments).

[0091] Optionally, the method further includes: obtaining a mixing control parameter; adjusting the mixed texture map based on the mixing control parameter to obtain a target texture map; rendering a preset model based on the target texture map and normal maps corresponding to the multiple texture maps to obtain a rendering result.

[0092] Specifically, the above-mentioned mixing control parameters can be used to represent the parameters for adjusting the mixed texture map, including at least control parameters such as Alpha_Contrast (transparency contrast), Alpha_Intensity (transparency intensity), Layer02_Contrast_Edge (edge ​​contrast of the second layer texture map) and Layer02_UV (texture coordinates of the second layer texture map).

[0093] The above-mentioned target texture map can be used to represent a map obtained by adjusting the parameters of the mixed texture map.

[0094] The above-mentioned preset model can be used to represent a preset model to be rendered, and the preset model is not specifically limited here.

[0095] In an optional embodiment, after obtaining the mixed texture map, it is necessary to make further detailed adjustments to the mixed texture map, that is, the mixed texture map can be adjusted by mixing control parameters to obtain an adjusted target texture map. After obtaining the target texture map, it is necessary to render it onto the model to be rendered. Therefore, the preset model can be rendered based on the target texture map and the normal maps corresponding to multiple texture maps to obtain a rendering result.

[0096] In another optional embodiment, in the process of rendering a preset model based on a target texture map and normal maps corresponding to multiple texture maps, after the preset model and multiple texture maps are loaded, it is necessary to calculate the tangent space of the preset model, and then perform coordinate transformation on the multiple texture maps, and convert the texture coordinates into the tangent space. Then, during the rendering process, it is necessary to collect normal information corresponding to the multiple texture maps, and then convert the collected normal information. Finally, the final color of each pixel in the target texture map is calculated using the converted normal and other lighting parameters to complete the rendering process of the preset model.

[0097] Figure 5 FIG. 1 is a schematic diagram of adjusting parameters of a mixed texture map according to one embodiment of the present disclosure. Figure 5 As shown, open the material interface; paste the preset texture: paste the first layer of four-square continuous texture, paste the second layer of four-square continuous texture, where the second layer of four-square continuous texture includes three texture maps and a preset map, which is Figure 5 The K map in the figure; and then adjust the mixed texture map through the mixed control parameter to obtain the target texture map, and then through the target texture map and the normal map (such as Figure 5 Render the preset model as shown in Base_Layer in the figure to obtain the following Figure 6 The rendering result is shown.

[0098] Optionally, the method also includes: obtaining a preset color map; generating a second preset map corresponding to the preset color map; mixing the preset color map and the mixed texture map based on the pixel values ​​in the second preset map to obtain a target effect map; rendering the preset model based on the target effect map and the normal maps corresponding to the multiple texture maps to obtain a rendering result.

[0099] Specifically, the above-mentioned preset color map can be used to represent a preset color map for adding wear effect to the mixed texture map. Generally, it can be white or black, etc. The preset color map is not specifically limited here.

[0100] The above-mentioned second preset map can be used to represent an image composed of black and white information. An image usually contains four channels. Since only two maps need to be adjusted for mixing, only the pixel value of one channel is needed. The pixel value range of each channel in the second preset map can be 0-1.

[0101] The above-mentioned target effect map can be used to represent a map obtained by proportionally mixing a preset color map and a mixed texture map.

[0102] In an optional embodiment, in the process of adding a wear effect to a mixed texture map, it is necessary to obtain a preset color map corresponding to the wear effect, and at the same time, generate a second preset map corresponding to the preset color map, and based on the pixel value of a preset channel in the second preset map, obtain the mixing ratio of the preset color map and the mixed texture map, and mix the preset color map and the mixed texture map based on the mixing ratio to obtain the above-mentioned target effect map.

[0103] In another optional embodiment, after obtaining the target effect map, it is necessary to render the target effect map onto a preset model. The specific rendering process has been described in detail in the above content and will not be repeated here.

[0104] Figure 8 FIG. 1 is a schematic diagram of adding wear effects and coverings according to one embodiment of the present disclosure. Figure 8 As shown, in the process of adding the turning wear change, you need to put in the first layer of texture, the second layer of texture and the third layer of texture first, and then by setting the wear effect to black with a pixel value of 255, you can pre-draw or calculate the second preset map for adjusting the wear effect through the normal map, such as Figure 8 The CEO image in the figure, the specific mapping effect is as follows Figure 7 Then, based on the pixel value of the preset channel in the second preset map, the mixing ratio of the preset color map and the mixed texture map is obtained, and the preset color map and the mixed texture map are mixed based on the mixing ratio to obtain the above-mentioned target effect map. Figure 7 As shown, after the preset model is rendered through the target effect map and the normal map, the model display effect is obtained, and at the same time, the local effect can be displayed.

[0105] Optionally, the method also includes: obtaining preset slope parameters; determining a target area on a preset model based on the preset slope parameters; rendering the preset model based on a mixed texture map and a normal map corresponding to multiple texture maps, and rendering the target area based on a preset cover map to obtain a rendering result.

[0106] Specifically, the above-mentioned preset slope parameter can be used to represent the slope in a preset preset model. The preset slope parameter is not specifically limited here and is adjusted through the preset model.

[0107] The above-mentioned target area can be used to represent the area in the preset model that needs to be rendered. For example, it can be an area covered with moss or an area covered with sand. The target area is not specifically limited here.

[0108] The above-mentioned preset covering map can be used to represent the covering map spread on the target area, which can be a moss effect, sand effect, etc.

[0109] In an optional embodiment, when it is necessary to render the mixed texture map, that is, to cover the target area in the preset model with moss or sand, etc., it is necessary to obtain the preset slope parameter, determine the target area on the preset model based on the preset slope parameter, and then render the preset model based on the mixed texture map and the normal map corresponding to the multiple texture maps, and render the target area based on the preset covering map to obtain the rendering result. For example, Figure 8 As shown, the Slope parameter in the Slope Layer in the interface can be adjusted to achieve effects such as covering the target area of ​​the preset model with moss or sand.

[0110] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present disclosure, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present disclosure.

[0111] In this embodiment, a texture map processing device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0112] Fig. 9 is a schematic diagram of a texture map processing device according to one embodiment of the present disclosure, wherein a graphical user interface is provided through a terminal device, and the content displayed by the graphical user interface includes a touch area, such as Fig. 9 As shown, the device comprises:

[0113] An acquisition module 902 is used to acquire multiple texture maps;

[0114] A generating module 904, configured to generate at least one first preset map corresponding to the plurality of texture maps, wherein the pixel value of at least one channel in the first preset map is used to mix the plurality of texture maps;

[0115] The mixing module 906 is used to mix the multiple texture maps based on the pixel value of at least one channel in the first preset map to obtain a mixed texture map.

[0116] Optionally, the mixing module includes: a first pixel value acquisition module, used to obtain the pixel value of a preset channel in a first preset map; a mixing ratio determination module, used to determine a first mixing ratio of two texture maps based on the pixel value of the preset channel; and a texture mixing module, used to mix the two texture maps based on the first mixing ratio to obtain a mixed texture map.

[0117] Optionally, the mixing ratio determination module includes: a first mixing ratio determination module, used to determine the mixing ratio of the first texture map between the two texture maps based on the pixel value of a preset channel; a second mixing ratio determination module, used to obtain the difference between the first preset ratio and the mixing ratio of the first texture map in response to the mixing ratio of the first texture map being less than the first preset ratio, and obtain the mixing ratio of the second texture map between the two texture maps; the second preset ratio determination module, used to determine that the mixing ratio of the second texture map is the second preset ratio in response to the mixing ratio of the first texture map being greater than or equal to the first preset ratio; a first mixing ratio obtaining module, used to obtain a first mixing ratio based on the mixing ratio of the first texture map and the mixing ratio of the second texture map.

[0118] Optionally, the mixing module includes: a second pixel value acquisition module, used to obtain pixel values ​​of multiple channels in the first preset map, wherein the multiple channels are combined with the multiple texture maps; Figure 1 One to one; a second mixing ratio determining module, used to determine the second mixing ratio of multiple texture maps based on the pixel values ​​of multiple channels; a mixed texture map obtaining module, used to mix the multiple texture maps based on the second mixing ratio to obtain a mixed texture map.

[0119] Optionally, the second mixing ratio determination module includes: a mixing ratio determination module, which is used to determine the mixing ratio of the texture map corresponding to the first channel based on the pixel value of the first channel among multiple channels, wherein the first channel satisfies a preset condition; a total mixing ratio obtaining module, which is used to obtain the sum of the mixing ratios of the texture maps corresponding to the first channel to obtain the total mixing ratio; a mixing ratio obtaining module, which is used to obtain the difference between the first preset ratio and the total mixing ratio in response to the total mixing ratio being less than the first preset ratio, to obtain the mixing ratio of the texture map corresponding to the second channel, wherein the second channel is a channel other than the first channel among the multiple channels; a second preset ratio determination module, which is used to determine that the mixing ratio of the texture map corresponding to the second channel is a second preset ratio in response to the total mixing ratio being greater than or equal to the first preset ratio; a second mixing ratio obtaining module, which is used to obtain a second mixing ratio based on the mixing ratio of the texture map corresponding to the first channel and the mixing ratio of the texture map corresponding to the second channel.

[0120] Optionally, the device includes: a priority acquisition module, used to acquire the priorities of multiple channels; a channel determination module, used to determine the first channel and the second channel based on the priorities of the multiple channels, wherein the priority of the first channel is higher than the priority of the second channel, and the priority of the second channel is the minimum priority among the priorities of the multiple channels.

[0121] Optionally, the mixing module includes: a texture grouping module, which is used to group at least five texture maps to obtain at least one texture set, wherein the at least one texture set is combined with at least one first preset texture. Figure 1 One correspondence; a mixed map obtaining module, which is used to mix the texture maps in the map set based on the pixel value of at least one channel in the first preset map to obtain at least one mixed map; a mixed texture map obtaining module, which is used to mix at least one mixed map to obtain a mixed texture map.

[0122] Optionally, the generating module includes: a texture drawing module for drawing at least one first preset texture; and a first preset texture determining module for determining at least one first preset texture based on normal maps corresponding to a plurality of texture maps.

[0123] Optionally, the device also includes: a mixing control parameter acquisition module, used to obtain the mixing control parameters; a target texture map acquisition module, used to adjust the mixed texture map based on the mixing control parameters to obtain the target texture map; a preset model rendering module, used to render the preset model based on the target texture map and the normal maps corresponding to the multiple texture maps to obtain a rendering result.

[0124] Optionally, the device also includes: a preset color map acquisition module, used to acquire a preset color map; a second preset map generation module, used to generate a second preset map corresponding to the preset color map; a target effect map acquisition module, used to mix the preset color map and the mixed texture map based on the pixel values ​​in the second preset map to obtain a target effect map; a rendering result acquisition module, used to render the preset model based on the target effect map and the normal maps corresponding to multiple texture maps to obtain a rendering result.

[0125] Optionally, the device also includes: a slope parameter acquisition module, used to obtain preset slope parameters; a target area determination module, used to determine the target area on the preset model based on the preset slope parameters; a rendering module, used to render the preset model based on the mixed texture map and the normal map corresponding to the multiple texture maps, and render the target area based on the preset cover map to obtain a rendering result.

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

[0127] An embodiment of the present disclosure further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.

[0128] Optionally, in this embodiment, the above-mentioned computer-readable storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.

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

[0130] Optionally, in this embodiment, the computer-readable storage medium may be configured to store a computer program for performing the following steps:

[0131] S1, obtain multiple texture maps;

[0132] S2, generating at least one first preset map corresponding to the multiple texture maps, wherein the pixel value of at least one channel in the first preset map is used to mix the multiple texture maps;

[0133] S3, based on the pixel value of at least one channel in the first preset map, mixing the multiple texture maps to obtain a mixed texture map.

[0134] Optionally, the above-mentioned computer-readable storage medium is also configured to store program code for executing the following steps: obtaining pixel values ​​of a preset channel in a first preset map; determining a first mixing ratio of two texture maps based on the pixel values ​​of the preset channel; and mixing the two texture maps based on the first mixing ratio to obtain a mixed texture map.

[0135] Optionally, the computer-readable storage medium is further configured to store program codes for executing the following steps: determining a mixing ratio of a first texture map between two texture maps based on pixel values ​​of a preset channel; in response to a mixing ratio of the first texture map being less than a first preset ratio, obtaining a difference between the first preset ratio and the mixing ratio of the first texture map to obtain a mixing ratio of the second texture map between the two texture maps; or in response to a mixing ratio of the first texture map being greater than or equal to the first preset ratio, determining that the mixing ratio of the second texture map is a second preset ratio; and obtaining a first mixing ratio based on the mixing ratio of the first texture map and the mixing ratio of the second texture map.

[0136] Optionally, the computer-readable storage medium is further configured to store a program code for executing the following steps: obtaining pixel values ​​of multiple channels in the first preset map, wherein the multiple channels are associated with the multiple texture maps; Figure 1 One-to-one correspondence; based on the pixel values ​​of the multiple channels, determining a second mixing ratio of the multiple texture maps; based on the second mixing ratio, mixing the multiple texture maps to obtain a mixed texture map.

[0137] Optionally, the computer-readable storage medium is further configured to store program codes for executing the following steps: determining a mixing ratio of a texture map corresponding to the first channel based on a pixel value of a first channel among multiple channels, wherein the first channel satisfies a preset condition; obtaining the sum of the mixing ratios of the texture maps corresponding to the first channel to obtain a total mixing ratio; in response to the total mixing ratio being less than a first preset ratio, obtaining a difference between the first preset ratio and the total mixing ratio to obtain a mixing ratio of the texture map corresponding to the second channel, wherein the second channel is a channel other than the first channel among the multiple channels; or in response to the total mixing ratio being greater than or equal to the first preset ratio, determining that the mixing ratio of the texture map corresponding to the second channel is a second preset ratio; obtaining a second mixing ratio based on the mixing ratio of the texture map corresponding to the first channel and the mixing ratio of the texture map corresponding to the second channel.

[0138] Optionally, the above-mentioned computer-readable storage medium is also configured to store program code for executing the following steps: obtaining priorities of multiple channels; determining a first channel and a second channel based on the priorities of multiple channels, wherein the priority of the first channel is higher than the priority of the second channel, and the priority of the second channel is the minimum priority among the priorities of the multiple channels.

[0139] Optionally, the computer-readable storage medium is further configured to store a program code for executing the following steps: grouping at least five texture maps to obtain at least one map set, wherein at least one map set is associated with at least one first preset map set. Figure 1 One-to-one correspondence; based on the pixel value of at least one channel in the first preset map, the texture maps in the map set are mixed to obtain at least one mixed map; at least one mixed map is mixed to obtain a mixed texture map.

[0140] Optionally, the computer-readable storage medium is further configured to store program codes for executing the following steps: drawing at least one first preset map; and determining at least one first preset map based on normal maps corresponding to a plurality of texture maps.

[0141] Optionally, the computer-readable storage medium is also configured to store program codes for executing the following steps: obtaining mixing control parameters; adjusting the mixed texture map based on the mixing control parameters to obtain a target texture map; rendering a preset model based on the target texture map and normal maps corresponding to multiple texture maps to obtain a rendering result.

[0142] Optionally, the above-mentioned computer-readable storage medium is also configured to store program code for executing the following steps: obtaining a preset color map; generating a second preset map corresponding to the preset color map; mixing the preset color map and the mixed texture map based on the pixel values ​​in the second preset map to obtain a target effect map; rendering the preset model based on the target effect map and the normal maps corresponding to multiple texture maps to obtain a rendering result.

[0143] Optionally, the computer-readable storage medium is also configured to store program codes for executing the following steps: obtaining preset slope parameters; determining a target area on a preset model based on the preset slope parameters; rendering the preset model based on a mixed texture map and a normal map corresponding to multiple texture maps, and rendering the target area based on a preset cover map to obtain a rendering result.

[0144] In the computer-readable storage medium of this embodiment, a technical solution for a texture map processing method is provided. By acquiring multiple texture maps; generating at least one first preset map corresponding to the multiple texture maps, wherein the pixel value of at least one channel in the first preset map is used to mix the multiple texture maps; based on the pixel value of at least one channel in the first preset map, the multiple texture maps are mixed to obtain a mixed texture map. It is easy to notice that by generating at least one first preset map corresponding to the multiple texture maps, and mixing the multiple texture maps based on the pixel value of at least one channel in the first preset map, a mixed texture map can be obtained, so that when drawing a small number of texture maps, art designers can mix multiple texture maps by the pixel value of the channel, and expand and generate more mixed texture maps, thereby achieving the technical effect of reducing the difficulty of drawing texture maps, shortening the drawing cycle of texture maps, and thus improving the efficiency of game asset production, thereby solving the technical problem of low texture map drawing efficiency in the game asset production process.

[0145] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a computer-readable storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation of the present disclosure.

[0146] In an exemplary embodiment of the present application, a program product capable of implementing the above method of the present embodiment is stored on a computer-readable storage medium. In some possible implementations, various aspects of the embodiments of the present disclosure may also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps described in the above "Exemplary Method" section of the present embodiment according to various exemplary implementations of the present disclosure.

[0147] According to the program product for implementing the above method in the embodiment of the present disclosure, it can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the embodiment of the present disclosure is not limited to this. In the embodiment of the present disclosure, the computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.

[0148] The program product may be in any combination of one or more computer-readable media. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination thereof. More specific examples (non-exhaustive) of computer-readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.

[0149] It should be noted that the program code contained in the computer-readable storage medium can be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the above.

[0150] An embodiment of the present disclosure further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

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

[0152] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:

[0153] S1, obtain multiple texture maps;

[0154] S2, generating at least one first preset map corresponding to the multiple texture maps, wherein the pixel value of at least one channel in the first preset map is used to mix the multiple texture maps;

[0155] S3, based on the pixel value of at least one channel in the first preset map, mixing the multiple texture maps to obtain a mixed texture map.

[0156] Optionally, the above-mentioned processor can also be configured to perform the following steps through a computer program: obtain pixel values ​​of a preset channel in a first preset map; determine a first mixing ratio of the two texture maps based on the pixel values ​​of the preset channel; and mix the two texture maps based on the first mixing ratio to obtain a mixed texture map.

[0157] Optionally, the above-mentioned processor can also be configured to perform the following steps through a computer program: based on the pixel values ​​of a preset channel, determining the mixing ratio of the first texture map in the two texture maps; in response to the mixing ratio of the first texture map being less than the first preset ratio, obtaining the difference between the first preset ratio and the mixing ratio of the first texture map, and obtaining the mixing ratio of the second texture map in the two texture maps; or in response to the mixing ratio of the first texture map being greater than or equal to the first preset ratio, determining that the mixing ratio of the second texture map is the second preset ratio; based on the mixing ratio of the first texture map and the mixing ratio of the second texture map, obtaining the first mixing ratio.

[0158] Optionally, the processor may be configured to perform the following steps through a computer program: obtaining pixel values ​​of multiple channels in the first preset map, wherein the multiple channels are associated with the multiple texture maps; Figure 1 One-to-one correspondence; based on the pixel values ​​of the multiple channels, determining a second mixing ratio of the multiple texture maps; based on the second mixing ratio, mixing the multiple texture maps to obtain a mixed texture map.

[0159] Optionally, the processor may also be configured to perform the following steps through a computer program: based on the pixel value of a first channel among multiple channels, determining the mixing ratio of the texture map corresponding to the first channel, wherein the first channel satisfies a preset condition; obtaining the sum of the mixing ratios of the texture maps corresponding to the first channel to obtain a total mixing ratio; in response to the total mixing ratio being less than a first preset ratio, obtaining the difference between the first preset ratio and the total mixing ratio to obtain the mixing ratio of the texture map corresponding to the second channel, wherein the second channel is a channel among the multiple channels other than the first channel; or in response to the total mixing ratio being greater than or equal to the first preset ratio, determining the mixing ratio of the texture map corresponding to the second channel to be a second preset ratio; obtaining a second mixing ratio based on the mixing ratio of the texture map corresponding to the first channel and the mixing ratio of the texture map corresponding to the second channel.

[0160] Optionally, the processor can also be configured to perform the following steps through a computer program: obtaining priorities of multiple channels; determining a first channel and a second channel based on the priorities of multiple channels, wherein the priority of the first channel is higher than the priority of the second channel, and the priority of the second channel is the minimum priority among the priorities of the multiple channels.

[0161] Optionally, the processor may be further configured to perform the following steps through a computer program: grouping at least five texture maps to obtain at least one map set, wherein at least one map set is associated with at least one first preset map set. Figure 1One-to-one correspondence; based on the pixel value of at least one channel in the first preset map, the texture maps in the map set are mixed to obtain at least one mixed map; at least one mixed map is mixed to obtain a mixed texture map.

[0162] Optionally, the processor may also be configured to perform the following steps through a computer program: drawing at least one first preset map; and determining at least one first preset map based on normal maps corresponding to a plurality of texture maps.

[0163] Optionally, the above-mentioned processor can also be configured to perform the following steps through a computer program: obtaining mixing control parameters; adjusting the mixed texture map based on the mixing control parameters to obtain a target texture map; rendering a preset model based on the target texture map and normal maps corresponding to multiple texture maps to obtain a rendering result.

[0164] Optionally, the above-mentioned processor can also be configured to perform the following steps through a computer program: obtain a preset color map; generate a second preset map corresponding to the preset color map; based on the pixel values ​​in the second preset map, mix the preset color map and the mixed texture map to obtain a target effect map; based on the target effect map and the normal maps corresponding to multiple texture maps, render the preset model to obtain a rendering result.

[0165] Optionally, the above-mentioned processor can also be configured to perform the following steps through a computer program: obtain preset slope parameters; determine the target area on the preset model based on the preset slope parameters; render the preset model based on the mixed texture map and the normal map corresponding to the multiple texture maps, and render the target area based on the preset cover map to obtain a rendering result.

[0166] In the electronic device of this embodiment, a technical solution for a method for processing texture maps is provided, and a technical solution for a method for processing texture maps is provided. By acquiring multiple texture maps; generating at least one first preset map corresponding to the multiple texture maps, wherein the pixel value of at least one channel in the first preset map is used to mix the multiple texture maps; based on the pixel value of at least one channel in the first preset map, the multiple texture maps are mixed to obtain a mixed texture map. It is easy to notice that by generating at least one first preset map corresponding to the multiple texture maps, and mixing the multiple texture maps based on the pixel value of at least one channel in the first preset map, a mixed texture map can be obtained, so that when drawing a small number of texture maps, art designers can mix multiple texture maps by the pixel value of the channel, and expand and generate more mixed texture maps, thereby achieving the technical effect of reducing the difficulty of drawing texture maps, shortening the drawing cycle of texture maps, and thereby improving the efficiency of game asset production, thereby solving the technical problem of low texture map drawing efficiency in the game asset production process.

[0167] Fig.10 is a schematic diagram of an electronic device according to an embodiment of the present disclosure. Fig.10 As shown, the electronic device 1000 is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0168] like Fig.10 As shown, the electronic device 1000 is in the form of a general computing device. The components of the electronic device 1000 may include but are not limited to: the at least one processor 1010, the at least one memory 1020, a bus 1030 connecting different system components (including the memory 1020 and the processor 1010), and a display 1040.

[0169] The memory 1020 stores program codes, which can be executed by the processor 1010, so that the processor 1010 executes the steps described in the method part of the embodiment of the present application according to various exemplary embodiments of the present disclosure.

[0170] The memory 1020 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 10201 and / or a cache memory unit 10202, and may further include a read-only memory unit (ROM) 10203, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory.

[0171] In some examples, the memory 1020 may also include a program / utility 10204 having a set (at least one) of program modules 10205, such program modules 10205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination thereof may include the implementation of a network environment. The memory 1020 may further include a memory remotely disposed relative to the processor 1010, and these remote memories may be connected to the electronic device 1000 via a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0172] The bus 1030 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a local bus of the processor 1010, or a bus using any of a variety of bus architectures.

[0173] The display 1040 may be, for example, a touch screen type liquid crystal display (LCD) that enables a user to interact with a user interface of the electronic device 1000 .

[0174] Optionally, the electronic device 1000 may also communicate with one or more external devices 1100 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), one or more devices that enable a user to interact with the electronic device 1000, and / or any device that enables the electronic device 1000 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed through an input / output (I / O) interface 1050. Furthermore, the electronic device 1000 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through a network adapter 1060. Fig.10 As shown, the network adapter 1060 communicates with other modules of the electronic device 1000 via the bus 1030. It should be understood that although Fig.10 Not shown, other hardware and / or software modules may be used in conjunction with electronic device 1000, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0175] The electronic device 1000 may further 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.

[0176] It can be understood by those skilled in the art that Fig.10The structure shown is only for illustration and does not limit the structure of the above electronic device. Fig.10 More or fewer components as shown, or with Figure 1 The memory 1020 may be used to store computer programs and corresponding data, such as the computer programs and corresponding data corresponding to the texture mapping processing method in the embodiment of the present disclosure. The processor 1010 executes various functional applications and data processing by running the computer programs stored in the memory 1020, that is, implements the above-mentioned texture mapping processing method.

[0177] The serial numbers of the above-mentioned embodiments of the present disclosure are only for description and do not represent the advantages or disadvantages of the embodiments.

[0178] In the above embodiments of the present disclosure, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0179] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, 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 units or modules, which can be electrical or other forms.

[0180] 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 units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0181] In addition, each functional unit in each embodiment of the present disclosure 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 software functional units.

[0182] If the integrated unit is implemented in the form of 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 disclosure is essentially 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, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present disclosure. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.

[0183] The above is only a preferred embodiment of the present disclosure. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present disclosure. These improvements and modifications should also be regarded as the scope of protection of the present disclosure.

Claims

1. A texture mapping processing method, characterized in that: include: Get multiple texture maps; Generating at least one first preset map corresponding to the plurality of texture maps, wherein pixel values ​​of at least one channel in the first preset map are used to mix the plurality of texture maps; Based on the pixel value of the at least one channel in the first preset map, the multiple texture maps are mixed to obtain a mixed texture map.

2. The method according to claim 1, characterized in that: In a case where the multiple texture maps include two texture maps, the multiple texture maps are mixed based on the pixel value of the at least one channel in the first preset map to obtain the mixed texture map, including: Obtaining pixel values ​​of a preset channel in the first preset map; Determining a first mixing ratio of the two texture maps based on the pixel values ​​of the preset channel; The two texture maps are mixed based on the first mixing ratio to obtain the mixed texture map.

3. The method according to claim 2, characterized in that Determining a first mixing ratio of the two texture maps based on the pixel value of the preset channel includes: Determining a mixing ratio of the first texture map in the two texture maps based on the pixel value of the preset channel; In response to the mixing ratio of the first texture map being less than a first preset ratio, obtaining a difference between the first preset ratio and the mixing ratio of the first texture map to obtain the mixing ratio of the second texture map in the two texture maps; or In response to the mixing ratio of the first texture map being greater than or equal to the first preset ratio, determining the mixing ratio of the second texture map to be a second preset ratio; The first mixing ratio is obtained based on the mixing ratio of the first texture map and the mixing ratio of the second texture map.

4. The method according to claim 1, characterized in that In a case where the multiple texture maps include three texture maps or four texture maps, the multiple texture maps are mixed based on the pixel value of the at least one channel in the first preset map to obtain the mixed texture map, including: Obtaining pixel values ​​of a plurality of channels in the first preset map, wherein the plurality of channels correspond one-to-one to the plurality of texture maps; Determining a second mixing ratio of the plurality of texture maps based on the pixel values ​​of the plurality of channels; The plurality of texture maps are mixed based on the second mixing ratio to obtain the mixed texture map.

5. The method according to claim 4, characterized in that Determining a second mixing ratio of the plurality of texture maps based on the pixel values ​​of the plurality of channels includes: Determining a mixing ratio of a texture map corresponding to a first channel among the multiple channels based on a pixel value of the first channel, wherein the first channel satisfies a preset condition; Obtaining the sum of the mixing ratios of the texture maps corresponding to the first channel to obtain a total mixing ratio; In response to the total mixing ratio being less than a first preset ratio, obtaining a difference between the first preset ratio and the total mixing ratio to obtain a mixing ratio of a texture map corresponding to a second channel, wherein the second channel is a channel among the multiple channels except the first channel; or In response to the total mixing ratio being greater than or equal to the first preset ratio, determining the mixing ratio of the texture map corresponding to the second channel to be a second preset ratio; The second mixing ratio is obtained based on the mixing ratio of the texture map corresponding to the first channel and the mixing ratio of the texture map corresponding to the second channel.

6. The method according to claim 5, characterized in that The method comprises: Obtaining priorities of the multiple channels; The first channel and the second channel are determined based on the priorities of the multiple channels, wherein the priority of the first channel is higher than the priority of the second channel, and the priority of the second channel is the minimum priority among the priorities of the multiple channels.

7. The method according to claim 1, characterized in that In a case where the plurality of texture maps include at least five texture maps, the plurality of texture maps are mixed based on the pixel value of the at least one channel in the first preset map to obtain the mixed texture map, comprising: Grouping the at least five texture maps to obtain at least one map set, wherein the at least one map set corresponds one-to-one to at least one of the first preset maps; Based on the pixel value of the at least one channel in the first preset map, the texture maps in the map set are mixed to obtain at least one mixed map; The at least one mixed map is mixed to obtain the mixed texture map.

8. The method according to claim 1, characterized in that Generating at least one of the first preset maps corresponding to the plurality of texture maps comprises at least one of the following: Drawing at least one of the first preset maps; At least one of the first preset maps is determined based on the normal maps corresponding to the multiple texture maps.

9. The method according to any one of claims 1 to 8, characterized in that The method further comprises: Get hybrid control parameters; Adjusting the mixed texture map based on the mixed control parameter to obtain a target texture map; Based on the target texture map and the normal maps corresponding to the multiple texture maps, the preset model is rendered to obtain a rendering result.

10. The method according to any one of claims 1 to 8, characterized in that The method further comprises: Get the preset color map; Generating a second preset map corresponding to the preset color map; Based on the pixel values ​​in the second preset map, the preset color map and the mixed texture map are mixed to obtain a target effect map; Based on the target effect map and the normal maps corresponding to the multiple texture maps, the preset model is rendered to obtain a rendering result.

11. The method according to any one of claims 1 to 8, characterized in that The method further comprises: Get the preset slope parameters; Based on the preset slope parameter, determining a target area on a preset model; The preset model is rendered based on the mixed texture map and the normal maps corresponding to the multiple texture maps, and the target area is rendered based on the preset covering map to obtain a rendering result.

12. A texture map processing device, characterized in that: include: The acquisition module is used to obtain multiple texture maps; A generating module, configured to generate at least one first preset map corresponding to the plurality of texture maps, wherein the pixel value of at least one channel in the first preset map is used to mix the plurality of texture maps; A mixing module is used to mix the multiple texture maps based on the pixel value of the at least one channel in the first preset map to obtain a mixed texture map.

13. 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 method according to any one of claims 1 to 11 when executed by a processor.

14. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to perform the method according to any one of claims 1 to 11.

Citation Information

Patent Citations

  • Texture mapping hybrid processing method and device, electronic equipment and storage medium

    CN113470156A

  • Terrain texture mixed rendering method and device

    CN116645481A

  • System, method, and computer program product for blending textures during rendering of a computer generated image using a single texture as a mask

    US20030201995A1

  • Image rendering method and device, apparatus, and storage medium

    WO2021047429A1