Ground surface texture map generation method and device, electronic equipment and storage medium

By generating target surface texture maps and mixed maps with different surface texture characteristics, the problem of repetition of surface maps in traditional virtual scenes is solved, and the art effect and overall sense of fusion are improved.

CN119810296APending Publication Date: 2025-04-11NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411854193.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-16
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

The surface map of traditional virtual scenes can easily lead to high repetition of surface details in scenes with larger areas, destroying the overall sense of fusion, and poor art effects.

Method used

By obtaining multiple basic surface texture maps with different surface texture characteristics, a target surface texture map is generated, and a mixed map is generated based on the target surface texture map. The mixed map contains normal information, roughness information, and ambient light occlusion information.

Benefits of technology

It reduces the sense of repetition of the surface texture and improves the artistic effect, making the overall sense of integration between the surface and the scene of the virtual scene stronger and more natural.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119810296A_ABST
    Figure CN119810296A_ABST
Patent Text Reader

Abstract

The invention provides a surface texture map generation method and device, electronic equipment and a storage medium, and relates to the technical field of image processing. The method comprises the following steps: acquiring a plurality of basic earth surface texture maps, wherein the plurality of basic earth surface texture maps have different earth surface texture features; generating a target earth surface texture map according to the plurality of basic earth surface texture maps; according to the target earth surface texture map, a mixed map is generated, and the mixed map has at least one of normal information, roughness information and ambient light shielding information; and storing the target earth surface texture map and the mixed map so as to render a preset earth surface model in the virtual scene through the target earth surface texture map and the mixed map. The method can reduce the repeatability of the surface texture and improve the artistic effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to a method, device, electronic device and storage medium for generating a surface texture map. Background Art

[0002] In virtual scenes, it is usually necessary to present a variety of terrain effects, such as sand, grass, snow, etc.

[0003] The surface of traditional virtual scenes is usually rendered using one or more four-dimensional continuous surface maps. In scenes with large areas, this can easily lead to highly repeated surface details, destroying the overall sense of integration and resulting in poor artistic effects. Summary of the invention

[0004] The purpose of this application is to provide a method, device, electronic device and storage medium for generating surface texture maps in order to reduce the repetitiveness of surface textures and improve the artistic effect in view of the above-mentioned deficiencies in the prior art.

[0005] To achieve the above purpose, the technical solution adopted in the embodiment of the present application is as follows:

[0006] In a first aspect, an embodiment of the present application provides a method for generating a surface texture map, the method comprising:

[0007] Acquire a plurality of basic surface texture maps, wherein the plurality of basic surface texture maps have different surface texture features;

[0008] Generating a target surface texture map according to the plurality of basic surface texture maps;

[0009] Generate a mixed map according to the target surface texture map, wherein the mixed map has at least one of normal information, roughness information and ambient occlusion information;

[0010] The target surface texture map and the mixed map are stored to render a preset surface model in a virtual scene through the target surface texture map and the mixed map.

[0011] In a second aspect, an embodiment of the present application further provides a device for generating a surface texture map, the device comprising:

[0012] An acquisition module, used to acquire a plurality of basic surface texture maps, wherein the plurality of basic surface texture maps have different surface texture features;

[0013] A generating module, used for generating a target surface texture map according to the plurality of base surface texture maps;

[0014] The generating module is further used to generate a mixed map according to the target surface texture map, wherein the mixed map has at least one of roughness information, normal information and ambient occlusion information;

[0015] A storage module is used to store the target surface texture map and the mixed map, so as to render a preset surface model in a virtual scene through the target surface texture map and the mixed map.

[0016] In a third aspect, an embodiment of the present application further provides an electronic device, comprising: a processor, a storage medium and a bus, wherein the storage medium stores program instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the program instructions to perform the steps of the surface texture map generation method as described in any one of the first aspects.

[0017] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method for generating a surface texture map as described in any one of the first aspects are executed.

[0018] The beneficial effects of this application are:

[0019] The surface texture map generation method, device, electronic device and storage medium provided in the present application generate a target surface texture map by providing multiple basic surface texture maps with different surface texture features, and generate a mixed map based on the target surface texture map. The texture features stored in the target surface texture map and the rendering parameters stored in the mixed map have detail changes, so that the flatness of the surface effect obtained by rendering a preset surface model in a virtual scene based on the target surface texture map and the mixed map is reduced, the randomness is increased, and the overall fusion effect of the surface and the virtual scene is increased, making the virtual scene more natural. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0021] Figure 1 Schematic diagram of the process of generating a surface texture map provided in the embodiment of the present application Figure 1 ;

[0022] Figure 2A schematic diagram of a target surface texture map provided in an embodiment of the present application;

[0023] Figure 3 Schematic diagram of the process of generating a surface texture map provided in the embodiment of the present application Figure 2 ;

[0024] Figure 4 A schematic diagram of an internal surface texture map provided in an embodiment of the present application;

[0025] Figure 5 A schematic diagram for comparing the internal surface texture maps provided in the embodiments of the present application;

[0026] Figure 6 Schematic diagram of the process of generating a surface texture map provided in the embodiment of the present application Figure 3 ;

[0027] Figure 7 A schematic diagram of the probability distribution of the internal surface texture map provided in the embodiment of the present application;

[0028] Figure 8 A schematic diagram of an edge surface texture map of a preset orientation provided in an embodiment of the present application;

[0029] Fig. 9 A schematic diagram of an edge surface texture map provided in an embodiment of the present application;

[0030] Fig.10 A schematic diagram of the A channel of the target surface texture map provided in the embodiment of the present application;

[0031] Fig.11 A comparative schematic diagram of a hybrid map provided in an embodiment of the present application;

[0032] Fig.12 A schematic diagram of the structure of a device for generating a surface texture map provided in an embodiment of the present application;

[0033] Fig.13 A schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

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

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

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

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

[0038] When the surface maps and sampling methods produced by the existing surface texture technology are applied to the preset surface model of the virtual scene, the texture of each plot tends to be consistent and lacks detail changes. Since the surface of the virtual scene has no detail changes, the overall integration of the virtual scene surface and the virtual scene is poor, making it more difficult for scene designers to control the effect of the scene.

[0039] Based on this, the present application intends to provide a method, device, electronic device and storage medium for generating a surface texture map, by providing multiple basic surface texture maps with different surface texture features to generate a target surface texture map, and generating a mixed map based on the target surface texture map. The texture features stored in the target surface texture map and the rendering parameters stored in the mixed map have detail changes, so that the surface effect obtained by rendering a preset surface model in a virtual scene based on the target surface texture map and the mixed map has a reduced sense of flatness, increased randomness, and an increased overall sense of fusion between the surface and the virtual scene, making the virtual scene more natural.

[0040] The following describes possible implementations of the surface texture map generation method, device, electronic device, and storage medium provided in the present application in combination with embodiments.

[0041] Figure 1 Schematic diagram of the process of generating a surface texture map provided in the embodiment of the present application Figure 1 ,like Figure 1 As shown, the method may include:

[0042] S101. Acquire multiple basic surface texture maps, where the multiple basic surface texture maps have different surface texture features.

[0043] In this embodiment, the multiple basic surface texture maps are pre-made for preset terrain and contain different surface texture features respectively. The multiple basic surface texture maps are used to render the surface texture of the preset surface model of the virtual scene.

[0044] In some embodiments, the plurality of basic surface texture maps may be surface texture maps produced for grass terrain, sand terrain, snow terrain, etc.

[0045] S102: Generate a target surface texture map according to a plurality of basic surface texture maps.

[0046] In this embodiment, multiple basic surface texture maps are spliced ​​to form a target surface texture map, and the target surface texture map is used as the texture map for rendering a preset surface model of the virtual scene. During the rendering process, the surface texture map can be randomly sampled from the target surface texture map and rendered on the preset surface model, so that the surface texture rendered by the preset surface model has more random surface texture features.

[0047] In some embodiments, the target surface texture map is a base color map, the RGB channels of the target surface texture map store basic color texture information, and the Alpha (transparency) channel of the target surface texture map stores transparency information.

[0048] S103: Generate a mixed map according to the target surface texture map, where the mixed map has at least one of normal information, roughness information, and ambient occlusion information.

[0049] In this embodiment, the normal information represents the normal direction of each point of the concave and convex surface of the surface texture in the target surface texture map; the roughness information represents the roughness of the surface texture in the target surface texture map. The roughness is a factor that causes the visual irregularity of the surface due to light diffusion. The reflection direction is determined by the roughness of the surface texture. The rougher the surface, the more scattered and darker the highlights. The smoother the surface, the more concentrated the highlights are. The roughness information can reflect the light reflection situation. The ambient occlusion (AO) information refers to the information on the surface texture being occluded by ambient light. The ambient occlusion information is obtained by extracting the light information of the target surface texture map.

[0050] For terrains such as grass and snow that do not require high rendering accuracy, we can extract the highlight, dark area and other information from the target surface texture map, convert the highlight, dark area and other information into roughness information, ambient occlusion information and height information, and then calculate the normal information through the height information.

[0051] In some embodiments, mapping tools such as SD software and PS software may be used to convert the target surface texture map to obtain normal information, roughness information, and ambient occlusion information.

[0052] It should be noted that when the rendering accuracy of the preset surface model of the virtual scene is required to be high, it is necessary to sample the target surface texture map and bake the preset surface model through the modeling tool to obtain the normal information, roughness information and ambient occlusion information from the baking result.

[0053] S104: storing the target surface texture map and the mixed map, so as to render a preset surface model in the virtual scene by using the target surface texture map and the mixed map.

[0054] In this embodiment, the target surface texture map and the mixed map are stored. When rendering the preset surface model in the virtual scene, the preset surface model is divided into different surface areas. For each surface area, the basic surface texture map is randomly sampled from the target surface texture map to obtain the color texture information in the basic surface texture map. According to the position of the basic surface texture map in the target surface texture map, the normal information, roughness information and ambient occlusion information are obtained from the corresponding position of the mixed map. Each surface area is rendered according to the color texture information, normal information, roughness information and ambient occlusion information.

[0055] Since the color texture information of the basic surface texture map sampled in each surface area varies, the corresponding normal information, roughness information and ambient occlusion information also vary, making the surface texture of the rendered preset surface model have a strong randomness.

[0056] The surface texture map generation method provided in the above embodiment generates a target surface texture map by providing multiple basic surface texture maps with different surface texture features, and generates a mixed map based on the target surface texture map. The texture features stored in the target surface texture map and the rendering parameters stored in the mixed map have detail changes, so that the flatness of the surface effect obtained by rendering the preset surface model in the virtual scene based on the target surface texture map and the mixed map is reduced, the randomness is increased, and the overall fusion effect of the surface and the virtual scene is increased, making the virtual scene more natural.

[0057] In a possible implementation, the process of obtaining multiple basic surface texture maps in S101 may include:

[0058] A plurality of internal surface texture maps and a plurality of edge surface texture maps are obtained, wherein the plurality of internal surface texture maps have different surface texture features, and the plurality of edge surface texture maps have at least different edge features.

[0059] In this embodiment, the surface area that needs to be rendered in the preset surface model is composed of an internal surface area and an edge surface area. Therefore, the pre-made basic surface texture map includes an internal surface texture map and an edge surface texture map. The internal surface texture map is used to render the internal surface area, and the edge surface texture map is used to render the edge surface area.

[0060] Among them, since the internal surface area cannot be distinguished by edges located in different directions like the edge surface area, it is necessary to enhance the randomness and variability through texture. For this reason, this embodiment generates different surface texture features for multiple internal surface texture maps when making internal surface texture maps, and multiple edge surface texture maps are distinguished by edge features located in different directions, such as edge features in the upper left corner, edge features in the upper right corner, edge features in the lower left corner, edge features in the lower right corner, edge features in the upper edge, edge features in the lower edge, edge features in the left edge, edge features in the right edge, etc.

[0061] When rendering the preset surface model, for the internal surface area, random sampling is performed from multiple internal surface texture maps, and for the edge surface area, the corresponding accessed edge surface texture map is selected from multiple edge surface texture maps for rendering according to the orientation of the edge surface area.

[0062] In some embodiments, the number of the plurality of internal surface texture maps and the number of the plurality of edge surface texture maps are the same, and the target surface texture map is generated according to the plurality of internal surface texture maps and the plurality of edge surface texture maps. Figure 2 A schematic diagram of a target surface texture map provided in an embodiment of the present application, such as Figure 2 As shown, the 4*4, i.e., 16 surface texture maps on the left are 16 edge surface texture maps, and the 4*4, i.e., 16 surface texture maps on the right are 16 internal surface texture maps. It can be seen that the 16 edge surface texture maps have different edge features, and the 16 internal surface texture maps have different texture features.

[0063] The surface texture map generation method provided in the above embodiment divides the basic surface texture map into multiple internal surface texture maps and multiple edge surface texture maps. The multiple internal surface texture maps have different surface texture features, and the multiple edge surface texture maps have different edge features. When rendering the preset surface model, not only can the texture features be random, but also terrains with different edge shapes can be rendered, providing richness of the picture of the virtual scene.

[0064] In one possible implementation, Figure 3 Schematic diagram of the process of generating a surface texture map provided in the embodiment of the present application Figure 2 ,like Figure 3 As shown, the process of obtaining multiple internal surface texture maps may include:

[0065] S201, obtaining a single four-sided continuous map.

[0066] S202, duplicating a single four-square continuous map multiple times and adding texture features respectively to obtain multiple internal surface texture maps.

[0067] In this embodiment, a pre-made four-square continuous map is obtained, and the texture of the map edge of the four-square continuous map is repeatedly continuous in four directions: upper edge, lower edge, left edge and right edge, so that when two four-square continuous maps are rendered to adjacent positions on a preset surface model, the texture between the two four-square continuous maps is continuous and the transition is smooth, and there will be no obvious traces of texture breakage.

[0068] A single four-square continuous map is copied multiple times, and different texture features are added to each copied four-square continuous map. The basic single continuous map and the four-square continuous map with added texture features are used as the internal surface texture map.

[0069] For example, Figure 4 A schematic diagram of an internal surface texture map provided in an embodiment of the present application, such as Figure 4 As shown, first make a 256*256 square continuous map, then copy it into 16 4*4 parts, combine them to get a 1024*1024 map, and add texture features to the other square continuous maps except the first square continuous map, so that each square continuous map has different detail textures.

[0070] In a possible implementation, the process of performing multiple copies of a single four-square continuous map and adding texture features to each of the copies to obtain multiple internal surface texture maps in S202 may include:

[0071] The second texture feature and the first texture feature are added to the currently copied four-square continuous map to obtain the internal surface texture map corresponding to the currently copied four-square continuous map, wherein the second texture feature is the feature newly added this time, and the first texture feature is the feature newly added by the previously copied four-square continuous map.

[0072] In this embodiment, for each copied four-square continuous map, the first texture feature is added to the previous copied four-square continuous map to obtain the internal surface texture map corresponding to the previous copied four-square continuous map, the first texture map and the second texture map are added to the current copied four-square continuous map to obtain the internal surface texture map corresponding to the current copied four-square continuous map, and the first texture feature, the second texture feature and the third texture feature are added to the next copied four-square texture map to obtain the internal surface texture map of the next copied four-square continuous map, so that the texture features added to each copied four-square continuous map are more than those added to the previous copied four-square continuous map.

[0073] In some embodiments, Figure 4 As shown, based on the four-square continuous map in the first row and the first column, different texture features are added to the four-square continuous maps in the second row, the third row and the fourth row of the first column respectively, the four-square continuous map in the second column adds texture features based on the texture features of the four-square continuous map in the first column of its corresponding row, the four-square continuous map in the third column adds texture features based on the texture features of the four-square continuous map in the second column of its corresponding row, and the four-square continuous map in the fourth column adds texture features based on the texture features of the four-square continuous map in the third column of its corresponding row, so that the texture features in the four-square continuous maps in the first column are the least, the texture features in the four-square continuous maps in the fourth column are the most, and the texture features in the first row of the four-square continuous maps in the first column are the least.

[0074] For example, Figure 5 A schematic diagram of the comparison of the internal surface texture map provided in the embodiment of the present application, such as Figure 5 As shown, the texture feature areas of the existing 16 internal surface texture maps are consistent, and the texture features of the 16 internal surface texture maps of this embodiment gradually increase from the upper left corner to the lower right corner.

[0075] The surface texture map generation method provided in the above embodiment, in the process of making the internal surface texture map, based on a four-square continuous map, respectively adds texture features to the copied four-square continuous map to obtain the internal surface texture map, so that different internal surface texture maps have different texture features. When rendering the internal area of ​​the preset surface model, the textures rendered by adjacent internal surface texture maps are continuous and transition smoothly, and different internal surface texture maps provide different surface textures for the preset surface model, so that the flatness of the surface effect is reduced and the randomness is increased. And this method reduces the threshold for artists to draw surface textures.

[0076] In one possible implementation, Figure 6 Schematic diagram of the process of generating a surface texture map provided in the embodiment of the present application Figure 3 ,like Figure 6 As shown, the method may also include:

[0077] S301, setting the random sampling probability for each internal surface texture map.

[0078] S302: storing random sampling probabilities corresponding to a plurality of internal surface texture maps, where the random sampling probabilities are used to indicate the probability of each internal surface texture map being selected for rendering when rendering a preset surface model in a virtual scene.

[0079] Using internal surface texture maps with different texture characteristics to render the preset surface model can reduce the flatness of the surface of the preset surface model. However, if each internal surface texture map in the target surface texture map is sampled in turn, when the area of ​​the preset surface model is large, the rendered surface texture will still be repeated periodically.

[0080] To this end, this embodiment sets different random sampling probabilities for multiple internal surface texture maps and stores the random sampling probabilities. When rendering the preset surface model of the virtual scene, the internal surface texture map is sampled according to the random sampling probability of each internal surface texture map, thereby further reducing the repeatability of the surface texture of the rendered preset surface model and improving the randomness of the surface texture.

[0081] In a possible implementation, the process of setting the random sampling probability for each internal surface texture map in S301 may include:

[0082] The random sampling probability of each internal surface texture map is determined according to the number of texture features added in each internal surface texture map, wherein the more the number of texture features added is, the smaller the random sampling probability is.

[0083] In this embodiment, when the texture features added to multiple four-square continuous maps are increased at different rates, in order to reduce the probability of internal surface texture maps with more texture features being sampled and reduce the sense of repetitiveness of surface texture after rendering of a preset surface model, it is necessary to determine, based on the number of texture features contained in each internal surface texture map, that the more texture features a map has, the smaller the random sampling probability, and the fewer texture features a map has, the larger the random sampling probability.

[0084] For example, Figure 7 A schematic diagram of the probability distribution of the internal surface texture map provided in the embodiment of the present application, such as Figure 7 As shown, the random sampling probability of the internal surface texture map in the first row and the first column is the largest, and the random sampling probability of the internal surface texture maps in the remaining columns is less than the random sampling probability of the internal surface texture maps in the previous column, and the random sampling probability of multiple internal surface texture maps is 1.

[0085] The surface texture map generation method provided in the above embodiment determines the random sampling probability of each internal surface texture map according to the number of texture features added in each internal surface texture map. The sampling probability of internal surface texture maps with more texture features is smaller, thereby reducing the probability of internal surface texture maps with more texture features being sampled, thereby reducing the sense of repetitiveness of the surface texture after rendering the preset surface model.

[0086] In a possible implementation, the process of obtaining multiple edge surface texture maps may include:

[0087] Acquire edge surface texture maps of multiple preset orientations; respectively combine the edge surface texture maps of multiple preset orientations to obtain edge surface texture maps of multiple combined orientations, wherein the multiple edge surface texture maps include: edge surface texture maps of multiple preset orientations and edge surface texture maps of multiple combined orientations.

[0088] In this embodiment, in order to reduce the workload and difficulty of producing edge surface texture maps, multiple pre-produced edge surface texture maps with preset orientations can be obtained. The preset orientations can be, for example, upper left, upper right, lower left, and lower right. Edge surface texture maps with multiple preset orientations can be combined into a complete graphic.

[0089] In some embodiments, a ground surface texture map with blank areas on all sides may be divided into edge ground surface texture maps with a plurality of preset orientations.

[0090] For example, Figure 8 A schematic diagram of a preset orientation edge surface texture map provided in an embodiment of the present application, such as Figure 8As shown, the circular surface texture map is divided to obtain the upper left edge surface texture map. Figure 1 , the upper right edge surface texture sticker Figure 2 , the lower left edge surface texture Figure 4 and the lower right edge surface texture patch Figure 8 .

[0091] The edge surface texture maps of multiple preset orientations are combined in pairs, in groups of three, or in all to obtain edge surface texture maps of multiple combined orientations.

[0092] For example, Fig. 9 A schematic diagram of an edge surface texture map provided in an embodiment of the present application, such as Fig. 9 As shown, the upper left edge of the surface texture Figure 1 and the upper right edge ground texture Figure 2 Combine to get the edge surface texture patch Figure 3 , upper edge surface texture Figure 1 and the lower left edge surface texture Figure 4 Combine to get the edge surface texture patch Figure 5 Similarly, the combination formulas of other edge surface texture maps are: 2+4=6, 1+2+4=7, 1+8=9, 2+8=10, 1+2+8=11, 4+8=12, 1+4+8=13, 2+4+8=14, 1+2+4+8=15. Surface texture map 0 has no edge and can be an internal surface texture map.

[0093] Furthermore, the method may also include:

[0094] Texture features are added to a plurality of edge surface texture maps respectively, and the plurality of edge surface texture maps have different edge features and different surface texture features.

[0095] In this embodiment, for edge surface texture maps with different edge features, texture features can be further added to multiple edge surface texture maps, such as Figure 2 As shown, in addition to having different edge features, the texture features of multiple edge surface texture maps are also different.

[0096] For example, Fig.10 A channel schematic diagram of the target surface texture map provided in the embodiment of the present application, such as Fig.10 As shown, the target surface texture map has four channels of R / G / B / A, wherein the RGB channel stores the color information of the target surface texture map, and the A channel, i.e., the Alpha channel, stores the transparency information, i.e., the information of the edge surface texture map.

[0097] The surface texture map generation method provided in the above embodiment is based on combining edge surface texture maps of multiple preset orientations to obtain edge surface texture maps of multiple combined orientations, which can simplify the way of making edge surface texture maps and improve efficiency; and further add detail features to different edge surface texture maps, which can further improve the randomness of the surface texture of the preset surface model.

[0098] In a possible implementation, the process of generating a mixed map according to the target surface texture map in S102 may include:

[0099] At least one of the following maps is generated according to the target surface texture map: a normal map, a roughness map, and an ambient occlusion map; at least one map generated based on the target surface texture map is stored in multiple channels of a preset blank map, so as to generate a mixed map based on the maps stored in the multiple channels.

[0100] In this embodiment, the target surface texture map is converted into a normal map, a roughness map, and an ambient occlusion map respectively through mapping tools such as SD and PS, and the attribute information of part or all of the normal map, roughness map, and ambient occlusion map is stored in different channels of a preset blank map to generate a mixed map.

[0101] For example, the normal information of the normal map can be stored in the RG channel of the preset blank map, the roughness information of the roughness map can be stored in the B channel of the preset blank map, and the ambient occlusion information of the ambient occlusion map can be stored in the A channel of the preset blank map. When rendering the preset surface model, the normal information, roughness information and ambient occlusion information can be directly obtained from different channels of the mixed map at one time, thereby improving rendering efficiency.

[0102] In some embodiments, other attribute maps may be combined to generate a mixed map.

[0103] For example, Fig.11 A comparative schematic diagram of a mixed map provided in an embodiment of the present application, such as Fig.11 As shown, the various material information of the mixed map (a) generated based on the surface texture map generated containing the same surface texture features does not change, and the various material information of the mixed map (b) generated based on the target surface texture map generated containing different surface texture features also has random changes, which increases the richness of the surface texture rendered by the preset surface model and reduces the sense of repetition.

[0104] Based on the above method embodiments, the present application embodiment also provides a surface texture map generating device. Fig.12 A schematic diagram of the structure of the surface texture map generation device provided in the embodiment of the present application is shown in FIG. Fig.12As shown, the device may include:

[0105] An acquisition module 401 is used to acquire a plurality of basic surface texture maps, wherein the plurality of basic surface texture maps have different surface texture features;

[0106] A generating module 402, for generating a target surface texture map according to a plurality of base surface texture maps;

[0107] The generating module 402 is further used to generate a mixed map according to the target surface texture map, wherein the mixed map has at least one of roughness information, normal information and ambient occlusion information;

[0108] The storage module 403 is used to store the target surface texture map and the mixed map, so as to render the preset surface model in the virtual scene through the target surface texture map and the mixed map.

[0109] In a possible implementation, the acquisition module 401 is specifically used to acquire multiple internal surface texture maps and multiple edge surface texture maps, the multiple internal surface texture maps have different surface texture features, and the multiple edge surface texture maps have at least different edge features.

[0110] Optionally, the acquisition module 401 is specifically used to acquire a single four-square continuous map; the single four-square continuous map is copied multiple times and texture features are added respectively to obtain multiple internal surface texture maps.

[0111] Optionally, the acquisition module 401 is also used to add a second texture feature and a first texture feature to the currently copied four-square continuous map to obtain an internal surface texture map corresponding to the currently copied four-square continuous map, wherein the second texture feature is the feature newly added this time, and the first texture feature is the feature newly added to the previously copied four-square continuous map.

[0112] Optionally, the device may further include:

[0113] The setting module is used to set the random sampling probability for each internal surface texture map;

[0114] The storage module 403 is also used to store random sampling probabilities corresponding to multiple internal surface texture maps, and the random sampling probability is used to indicate the probability of each internal surface texture map being selected for rendering when rendering a preset surface model in the virtual scene.

[0115] Optionally, a module is set to determine the random sampling probability of each internal surface texture map according to the number of texture features added in each internal surface texture map, wherein the more the number of texture features added is, the smaller the random sampling probability is.

[0116] Optionally, the acquisition module 401 is also used to obtain edge surface texture maps of multiple preset orientations; the edge surface texture maps of multiple preset orientations are respectively combined to obtain edge surface texture maps of multiple combined orientations, and the multiple edge surface texture maps include: edge surface texture maps of multiple preset orientations and edge surface texture maps of multiple combined orientations.

[0117] Optionally, the acquisition module 401 is further configured to add texture features to a plurality of edge surface texture maps respectively, and the plurality of edge surface texture maps have different edge features and different surface texture features.

[0118] The generation module 402 is also used to generate at least one of the following maps according to the target surface texture map: a normal map, a roughness map, and an ambient occlusion map; and store at least one map generated based on the target surface texture map in multiple channels of a preset blank map, so as to generate a mixed map based on the maps stored in multiple channels.

[0119] The surface texture map generation device provided in the above embodiment generates a target surface texture map by providing multiple basic surface texture maps with different surface texture features, and generates a mixed map based on the target surface texture map. The texture features stored in the target surface texture map and the rendering parameters stored in the mixed map have detail changes, so that the flatness of the surface effect obtained by rendering the preset surface model in the virtual scene based on the target surface texture map and the mixed map is reduced, the randomness is increased, and the overall fusion effect of the surface and the virtual scene is increased, making the virtual scene more natural.

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

[0121] Fig.13 A schematic diagram of an electronic device provided in an embodiment of the present application, such as Fig.13As shown, the electronic device 500 may include: a processor 501, a storage medium 502 and a bus, wherein the storage medium 502 stores program instructions executable by the processor 501. When the electronic device 500 is running, the processor 501 communicates with the storage medium 502 via the bus, and the processor 501 executes the program instructions to execute the above method embodiment.

[0122] Specifically, the processor executes the steps of the above-mentioned surface texture map generation method, which may include:

[0123] Acquire multiple basic surface texture maps, each of which has different surface texture features; generate a target surface texture map based on the multiple basic surface texture maps; generate a mixed map based on the target surface texture map, the mixed map having at least one of normal information, roughness information, and ambient occlusion information; store the target surface texture map and the mixed map, so as to render a preset surface model in a virtual scene through the target surface texture map and the mixed map.

[0124] Optionally, the processor executes the above step of obtaining a plurality of basic surface texture maps, which may include:

[0125] A plurality of internal surface texture maps and a plurality of edge surface texture maps are obtained, wherein the plurality of internal surface texture maps have different surface texture features, and the plurality of edge surface texture maps have at least different edge features.

[0126] Optionally, the processor executes the above step of acquiring a plurality of internal surface texture maps, which may include:

[0127] A single four-square continuous map is obtained; the single four-square continuous map is copied multiple times and texture features are added respectively to obtain multiple internal surface texture maps.

[0128] Optionally, the processor executes the above-mentioned step of copying a single square continuous map multiple times and adding texture features respectively to obtain multiple internal surface texture maps, which may include:

[0129] The second texture feature and the first texture feature are added to the currently copied four-square continuous map to obtain the internal surface texture map corresponding to the currently copied four-square continuous map, wherein the second texture feature is the feature newly added this time, and the first texture feature is the feature newly added by the previously copied four-square continuous map.

[0130] Optionally, the processor executes the steps of the above-mentioned method for generating a ground surface texture map, and may further include:

[0131] The random sampling probability for each internal surface texture map is set; the random sampling probabilities corresponding to multiple internal surface texture maps are stored, and the random sampling probability is used to indicate the probability of each internal surface texture map being selected for rendering when rendering a preset surface model in a virtual scene.

[0132] Optionally, the processor performs the above step of setting the random sampling probability for each internal surface texture map, which may include:

[0133] The random sampling probability of each internal surface texture map is determined according to the number of texture features added in each internal surface texture map, wherein the more the number of texture features added is, the smaller the random sampling probability is.

[0134] Optionally, the processor executes the above step of obtaining a plurality of edge surface texture maps, which may include:

[0135] Acquire edge surface texture maps of multiple preset orientations; respectively combine the edge surface texture maps of multiple preset orientations to obtain edge surface texture maps of multiple combined orientations, wherein the multiple edge surface texture maps include: edge surface texture maps of multiple preset orientations and edge surface texture maps of multiple combined orientations.

[0136] Optionally, the processor executes the steps of the above-mentioned method for generating a ground surface texture map, and may further include:

[0137] Texture features are added to a plurality of edge surface texture maps respectively, and the plurality of edge surface texture maps have different edge features and different surface texture features.

[0138] Optionally, the processor performs the step of generating a mixed map according to the target surface texture map, and may further include:

[0139] At least one of the following maps is generated according to the target surface texture map: a normal map, a roughness map, and an ambient occlusion map; at least one map generated based on the target surface texture map is stored in multiple channels of a preset blank map, so as to generate a mixed map based on the maps stored in the multiple channels.

[0140] Optionally, the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the above method embodiment is executed.

[0141] Specifically, the processor executes the steps of the above-mentioned surface texture map generation method, which may include:

[0142] Acquire multiple basic surface texture maps, each of which has different surface texture features; generate a target surface texture map based on the multiple basic surface texture maps; generate a mixed map based on the target surface texture map, the mixed map having at least one of normal information, roughness information, and ambient occlusion information; store the target surface texture map and the mixed map, so as to render a preset surface model in a virtual scene through the target surface texture map and the mixed map.

[0143] Optionally, the processor executes the above step of obtaining a plurality of basic surface texture maps, which may include:

[0144] A plurality of internal surface texture maps and a plurality of edge surface texture maps are obtained, wherein the plurality of internal surface texture maps have different surface texture features, and the plurality of edge surface texture maps have at least different edge features.

[0145] Optionally, the processor executes the above step of acquiring a plurality of internal surface texture maps, which may include:

[0146] A single four-square continuous map is obtained; the single four-square continuous map is copied multiple times and texture features are added respectively to obtain multiple internal surface texture maps.

[0147] Optionally, the processor executes the above-mentioned step of copying a single square continuous map multiple times and adding texture features respectively to obtain multiple internal surface texture maps, which may include:

[0148] The second texture feature and the first texture feature are added to the currently copied four-square continuous map to obtain the internal surface texture map corresponding to the currently copied four-square continuous map, wherein the second texture feature is the feature newly added this time, and the first texture feature is the feature newly added by the previously copied four-square continuous map.

[0149] Optionally, the processor executes the steps of the above-mentioned method for generating a ground surface texture map, and may further include:

[0150] The random sampling probability for each internal surface texture map is set; the random sampling probabilities corresponding to multiple internal surface texture maps are stored, and the random sampling probability is used to indicate the probability of each internal surface texture map being selected for rendering when rendering a preset surface model in a virtual scene.

[0151] Optionally, the processor performs the above step of setting the random sampling probability for each internal surface texture map, which may include:

[0152] The random sampling probability of each internal surface texture map is determined according to the number of texture features added in each internal surface texture map, wherein the more the number of texture features added is, the smaller the random sampling probability is.

[0153] Optionally, the processor executes the above step of obtaining a plurality of edge surface texture maps, which may include:

[0154] Acquire edge surface texture maps of multiple preset orientations; respectively combine the edge surface texture maps of multiple preset orientations to obtain edge surface texture maps of multiple combined orientations, wherein the multiple edge surface texture maps include: edge surface texture maps of multiple preset orientations and edge surface texture maps of multiple combined orientations.

[0155] Optionally, the processor executes the steps of the above-mentioned method for generating a ground surface texture map, and may further include:

[0156] Texture features are added to a plurality of edge surface texture maps respectively, and the plurality of edge surface texture maps have different edge features and different surface texture features.

[0157] Optionally, the processor performs the step of generating a mixed map according to the target surface texture map, and may further include:

[0158] At least one of the following maps is generated according to the target surface texture map: a normal map, a roughness map, and an ambient occlusion map; at least one map generated based on the target surface texture map is stored in multiple channels of a preset blank map, so as to generate a mixed map based on the maps stored in the multiple channels.

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

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

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

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

[0163] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for generating a surface texture map, characterized in that: The method comprises: Acquire a plurality of basic surface texture maps, wherein the plurality of basic surface texture maps have different surface texture features; Generating a target surface texture map according to the plurality of basic surface texture maps; Generate a mixed map according to the target surface texture map, wherein the mixed map has at least one of normal information, roughness information and ambient occlusion information; The target surface texture map and the mixed map are stored to render a preset surface model in a virtual scene through the target surface texture map and the mixed map.

2. The method according to claim 1, characterized in that The obtaining of multiple basic surface texture maps includes: A plurality of internal surface texture maps and a plurality of edge surface texture maps are obtained, wherein the plurality of internal surface texture maps have different surface texture features, and the plurality of edge surface texture maps have at least different edge features.

3. The method according to claim 2, characterized in that The obtaining of multiple internal surface texture maps includes: Get a single four-square continuous map; The single square continuous map is copied multiple times and texture features are added respectively to obtain the multiple internal surface texture maps.

4. The method according to claim 3, characterized in that The method of duplicating the single square continuous map multiple times and adding texture features respectively to obtain the multiple internal surface texture maps includes: A second texture feature and a first texture feature are added to the currently copied four-square continuous map to obtain an internal surface texture map corresponding to the currently copied four-square continuous map, wherein the second texture feature is a feature newly added this time, and the first texture feature is a feature newly added to the previously copied four-square continuous map.

5. The method according to claim 4, characterized in that The method further comprises: Set the random sampling probability for each internal surface texture map; The random sampling probabilities corresponding to the plurality of internal surface texture maps are stored, wherein the random sampling probabilities are used to indicate the probability of each internal surface texture map being selected for rendering when rendering a preset surface model in the virtual scene.

6. The method according to claim 5, characterized in that The settings are for the random sampling probability of each internal surface texture map, including: The random sampling probability of each internal surface texture map is determined according to the number of texture features added in each internal surface texture map, wherein the more the number of texture features added is, the smaller the random sampling probability is.

7. The method according to claim 2, characterized in that: The obtaining of multiple edge surface texture maps includes: Obtain edge surface texture maps at multiple preset locations; The edge surface texture maps of the multiple preset orientations are respectively combined to obtain edge surface texture maps of multiple combined orientations, wherein the multiple edge surface texture maps include: the edge surface texture maps of the multiple preset orientations and the edge surface texture maps of the multiple combined orientations.

8. The method according to claim 7, characterized in that The method further comprises: Texture features are added to the plurality of edge surface texture maps respectively, and the plurality of edge surface texture maps have different edge features and different surface texture features.

9. The method according to claim 1, characterized in that: The step of generating a mixed map according to the target surface texture map comprises: Generate at least one of the following maps according to the target surface texture map: a normal map, a roughness map, and an ambient occlusion map; The at least one map generated based on the target surface texture map is stored in a plurality of channels of a preset blank map respectively, so as to generate the mixed map based on the maps stored in the plurality of channels.

10. A surface texture map generating device, characterized in that: The device comprises: An acquisition module, used to acquire a plurality of basic surface texture maps, wherein the plurality of basic surface texture maps have different surface texture features; A generating module, used for generating a target surface texture map according to the plurality of base surface texture maps; The generating module is further used to generate a mixed map according to the target surface texture map, wherein the mixed map has at least one of roughness information, normal information and ambient occlusion information; A storage module is used to store the target surface texture map and the mixed map, so as to render a preset surface model in a virtual scene through the target surface texture map and the mixed map.

11. An electronic device, characterized in that: include: A processor, a storage medium and a bus, wherein the storage medium stores program instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the program instructions to perform the steps of the surface texture map generation method as described in any one of claims 1 to 9.

12. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for generating a surface texture map according to any one of claims 1 to 9 are executed.