Method, device and electronic equipment for generating mixed material map

CN116524090BActive Publication Date: 2026-10-16NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310206928.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-28
Publication Date
2026-10-16
Estimated Expiration
2043-02-28

AI Technical Summary

Technical Problem

[0003]在相关技术中,通常会针对每个模型单独制作材质贴图,包括基础色贴图、法线贴图、环境光遮挡贴图等;材质贴图的制作工作量较大,系统在运行过程中,大量的材质贴图会占用较多的内存,导致系统性能下降

Benefits of technology

[0010] The aforementioned method, apparatus, and electronic device for generating hybrid material textures involve: acquiring a base texture corresponding to the target model and storing it in a base layer; wherein the base texture is used to control the display of the target model's model representation; acquiring a material texture corresponding to the target material and storing it in a reusable layer; wherein the material texture is used to control the display of the target material's material representation; the reusable layer includes at least one layer, and the material representation of the stored material textures differs in different reusable layers; acquiring parameter adjustment instructions, determining the target layer corresponding to the parameter adjustment instructions, and generating layer control parameters for the target layer based on the parameter adjustment instructions; wherein the layer control parameters are used to control the display method of the textures stored in the target layer on the target model; the target layer is a base layer or a reusable layer; generating a hybrid material texture of the target model based on the base texture, material texture, and layer control parameters; and the hybrid material texture corresponding to the target material.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116524090B_ABST
    Figure CN116524090B_ABST
Patent Text Reader

Abstract

The application provides a mixed material map generation method and device and electronic equipment; wherein the method comprises: obtaining a basic map corresponding to a target model, and storing the basic map in a basic layer; obtaining a material map corresponding to a target material, and storing the material map in a reusable layer; obtaining a parameter adjustment instruction, determining a target layer corresponding to the parameter adjustment instruction, and generating layer control parameters of the target layer based on the parameter adjustment instruction; wherein the layer control parameters are used to control the display mode of the map stored in the target layer on the target model; the target layer is the basic layer or the reusable layer; and a mixed material map of the target model is generated based on the basic map, the material map and the layer control parameters; the mixed material map corresponds to the target material. This method can flexibly adjust the material performance, so that the visual performance between different models of the same type has great differentiation, and the performance effect of the model in the virtual scene is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of model rendering technology, and in particular to a method, apparatus and electronic device for generating hybrid material maps. Background Technology

[0002] In a virtual scene, models such as rocks, houses, walls, and rusted metal may appear multiple times. These models of the same type have a consistent style, but different models have different specific manifestations. For example, different rock models have different textures, and different rusted metals have different rusted areas.

[0003] In related technologies, material maps are typically created individually for each model, including base color maps, normal maps, and ambient occlusion maps. Creating material maps is a significant undertaking, and during system operation, a large number of material maps consume considerable memory, leading to performance degradation. Another approach involves creating separate maps for different models, such as base color maps and normal maps, while using a generic map that can be used for models with a consistent style. This generic map, such as a detail map, may also incorporate weight parameters to adjust the generic map's appearance on different models. However, this method lacks the flexibility to adjust the final material appearance across different models, easily leading to visual similarities between different models of the same type, resulting in a strong sense of repetition in the virtual scene's model representation. Summary of the Invention

[0004] In view of this, the purpose of the present invention is to provide a method, apparatus and electronic device for generating hybrid material textures, so as to flexibly adjust the material performance, so that the visual performance of different models of the same type has greater differences, and improve the performance of models in virtual scenes.

[0005] In a first aspect, embodiments of the present invention provide a method for generating a hybrid material texture map. The method includes: obtaining a base texture map corresponding to a target model and storing the base texture map in a base layer; wherein the base texture map is used to: control the display of the model representation content of the target model; obtaining a material texture map corresponding to a target material and storing the material texture map in a reusable layer; wherein the material texture map is used to: control the display of the material representation content of the target material; the reusable layer includes at least one, and the material representation content of the material texture maps stored in different reusable layers is different; obtaining a parameter adjustment instruction, determining the target layer corresponding to the parameter adjustment instruction, and generating layer control parameters for the target layer based on the parameter adjustment instruction; wherein the layer control parameters are used to: control the display mode of the texture map stored in the target layer on the target model; the target layer is a base layer or a reusable layer; generating a hybrid material texture map of the target model based on the base texture map, the material texture map, and the layer control parameters; the hybrid material texture map corresponds to the target material.

[0006] Secondly, embodiments of the present invention provide a hybrid material texture generation apparatus, comprising: a base layer storage module, used to acquire a base texture corresponding to a target model and store the base texture in a base layer; wherein the base texture is used to control the display of the model representation content of the target model; a reusable layer storage module, used to acquire a material texture corresponding to a target material and store the material texture in a reusable layer; wherein the material texture is used to control the display of the material representation content of the target material; the reusable layer includes at least one, and the material representation content of the material textures stored in different reusable layers is different; a parameter adjustment module, used to acquire parameter adjustment instructions, determine the target layer corresponding to the parameter adjustment instructions, and generate layer control parameters of the target layer based on the parameter adjustment instructions; wherein the layer control parameters are used to control the display mode of the textures stored in the target layer on the target model; the target layer is a base layer or a reusable layer; and a texture generation module, used to generate a hybrid material texture of the target model based on the base texture, the material texture, and the layer control parameters; the hybrid material texture corresponds to the target material.

[0007] Thirdly, embodiments of the present invention provide an electronic device, including a processor and a memory, wherein the memory stores machine-executable instructions that can be executed by the processor, and the processor executes the machine-executable instructions to implement the above-described method for generating hybrid material textures.

[0008] Fourthly, embodiments of the present invention provide a machine-readable storage medium storing machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions cause the processor to implement the above-described method for generating hybrid material textures.

[0009] The embodiments of the present invention bring the following beneficial effects:

[0010] The aforementioned method, apparatus, and electronic device for generating hybrid material textures involve: acquiring a base texture corresponding to the target model and storing it in a base layer; wherein the base texture is used to control the display of the target model's model representation; acquiring a material texture corresponding to the target material and storing it in a reusable layer; wherein the material texture is used to control the display of the target material's material representation; the reusable layer includes at least one layer, and the material representation of the stored material textures differs in different reusable layers; acquiring parameter adjustment instructions, determining the target layer corresponding to the parameter adjustment instructions, and generating layer control parameters for the target layer based on the parameter adjustment instructions; wherein the layer control parameters are used to control the display method of the textures stored in the target layer on the target model; the target layer is a base layer or a reusable layer; generating a hybrid material texture of the target model based on the base texture, material texture, and layer control parameters; and the hybrid material texture corresponding to the target material.

[0011] In this method, each texture is set in a different layer, and layer control parameters can be set to control the display of textures in each layer. This method can flexibly adjust the material performance through layers, so that the visual performance between different models of the same type can be significantly differentiated, thereby improving the performance of models in virtual scenes.

[0012] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention are realized and obtained in accordance with the structures particularly pointed out in the description, claims and drawings.

[0013] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0014] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0015] Figure 1 A flowchart illustrating a method for generating a hybrid material texture according to an embodiment of the present invention;

[0016] Figure 2 This is a schematic diagram illustrating the shadow transition between a rusted surface and a painted surface, provided as an embodiment of the present invention.

[0017] Figure 3 A schematic diagram of a device for generating hybrid material textures according to an embodiment of the present invention;

[0018] Figure 4 This is a schematic diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation

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

[0020] First, the technical terms involved in this embodiment are provided, along with their definitions.

[0021] 1. Texture

[0022] Texture mapping is a technical step in the production of 3D film, animation, and games. It involves creating a texture map using 2D software such as Photoshop (PS) and then overlaying it onto a 3D model created using 3D software such as Maya or 3ds Max. This process is called texture mapping.

[0023] 2. Material

[0024] During the rendering process, the material is a combination of various visible properties of the model's surface, such as color, texture, smoothness, transparency, reflectivity, refractive index, and luminosity.

[0025] 3. Masking

[0026] Masking can cover up images in graphics linked to a mask layer. Users can combine multiple layers under a single mask layer to create a variety of effects.

[0027] 4. Brush

[0028] A brush is an image editing tool that consists of preset patterns that can be used directly as a paintbrush.

[0029] 5. Game Engine

[0030] A game engine refers to the core components of a pre-written, editable computer game system or an interactive real-time graphics application.

[0031] 6. Normal

[0032] A normal line is a straight line that is always perpendicular to a plane.

[0033] 7. Vertex color

[0034] Vertex color is the color specified on the vertices of the model.

[0035] 8. Layers

[0036] Layers are like sheets of film containing elements such as text or graphics. They are stacked together in sequence to form the final effect of the page.

[0037] 9. Rendering

[0038] Rendering refers to the process of generating images from models using software.

[0039] 10. Memory

[0040] Memory is a very important storage device in the structure of a computer; it is used to store programs and data.

[0041] 11. Noise diagram

[0042] A noise map is a graphical representation of the noise level distribution within a region over a certain period of time.

[0043] 12. Concealment

[0044] The term "occlusion" here specifically refers to ambient light occlusion, used to describe the effect of objects blocking diffuse light from their surroundings when they intersect or are close to each other.

[0045] 13. Shaders

[0046] Shaders are used to implement image rendering and are used as an alternative to editable programs with a fixed rendering pipeline.

[0047] 14. High-poly model

[0048] High-poly models refer to models with a high number of faces and many details.

[0049] 15. Low-poly

[0050] Low-poly refers to models with low polygon count and few details.

[0051] With the development of internet and computer graphics technology, the demand for creating virtual scenes in film, television, and games is becoming increasingly widespread. Furthermore, with the continuous development of next-generation game engine technology, the visual quality of games is improving, and people's demands for game graphics are also rising. Therefore, in the game industry, to meet players' high demands for game quality, there is often a need to create a large number of model objects with a consistent style but different characteristics, such as rocks, houses, walls, and rust. Currently, in the game industry, the traditional production process for these large assets requires a large amount of texture resources to achieve the desired effect; at the same time, the production cycle is very long, leading to situations where assets cannot be delivered to downstream stages in a timely manner during project development. Relying entirely on manual production of the same batch of assets results in inconsistent final product art due to the uncontrollable nature of manual production capabilities.

[0052] The traditional production process involves creating a model for each unique object, followed by the creation of high-resolution base color maps, normal maps, and ambient occlusion maps (AO maps) for each model. Since each object's resources are unique, engineers need to spend a significant amount of time creating them, resulting in long development cycles. Furthermore, resource reuse is inefficient. For the game industry, this significantly increases the amount of resources loaded, leading to increased memory consumption and decreased performance.

[0053] Therefore, methods that balance improving efficiency and artistic quality have been proposed, such as the material blending method. This method applies a unique layer such as a base material and normals to a unique object, while also blending in common additional layers such as detail layers and dirt layers. However, simple material blending cannot achieve good artistic effects and can easily result in many different objects being very similar, with monotonous and repetitive materials, leading to a strong sense of repetition in the scene.

[0054] To address the above issues, related technologies have proposed improved methods, such as assigning different weight values ​​to the corresponding vertex materials based on the model's features, and then applying these weight values ​​to the noise map of the mask and several corresponding material models to achieve variations on different objects. Model features could include vertex coordinates, normal directions, etc. However, this approach lacks the ability to precisely control the parameters of individual material layers, and it doesn't provide engineers with easily understandable adjustment parameters. Engineers cannot adjust the parameter effects of each additional layer according to specific objects and their application in the scene, resulting in a significant deterioration in the model's artistic quality.

[0055] To address the aforementioned issues, this invention provides a method, apparatus, and electronic device for generating hybrid material textures. This technology can be applied to generate textures with various effects, such as by generating hybrid material textures.

[0056] To facilitate understanding of this embodiment, a method for generating a hybrid material texture disclosed in this embodiment of the invention will first be described in detail, such as... Figure 1 As shown, the method includes the following steps:

[0057] Step S102: Obtain the base texture corresponding to the target model and store the base texture in the base layer; wherein, the base texture is used to control the display of the model's appearance.

[0058] The target model can be an unrendered base model with a specific shape. The base texture is a customized texture for the target model, corresponding to it. Base textures can include, for example, normal maps, occlusion maps, wear maps, color maps, lighting maps, and smoothness maps. Different base textures control different aspects of the model's appearance; for example, a color map controls the target model's color, and a smoothness map controls its smoothness. Furthermore, a single base texture can store multiple texture data through different channels; for example, normal map, occlusion map, and wear map data can be stored in different channels of the same base texture.

[0059] In practice, one or more layers of the target model can be generated in the texture creation engine, one of which can be used as the base layer, and the base texture can be saved in the base layer.

[0060] Step S104: Obtain the material map corresponding to the target material and store the material map in a reusable layer; wherein, the material map is used to: control the display of the material representation of the target material; the reusable layer includes at least one, and the material representation of the material map stored in different reusable layers is different;

[0061] Different target materials have different material maps. For example, the material map for rock can include gravel color maps, moss maps, dirt maps, and various normal maps and occlusion maps. Different material maps control different aspects of the material's appearance. For instance, a gravel color map controls the visual appearance of gravel on a rock material, while a moss map controls the visual appearance of moss on a colored material.

[0062] In practice, various texture maps can be created for rock materials and saved to a reusable texture asset library. These texture maps can be reused in the generation of mixed texture maps for multiple models. For the target model, the required texture map can be selected from the reusable texture asset library and saved in a reusable layer.

[0063] When the target material has a complex appearance, multiple material maps may be required. To achieve flexible control over each material map, these maps can be stored in multiple reusable maps. In practice, engineers can add or remove reusable layers, setting the number of reusable layers according to actual needs. Each reusable layer stores one or more material maps, and the material representation content stored in different reusable layers is different. Thus, the representation of different material maps can be controlled through different reusable layers. For example, reusable layer A stores a gravel map, while reusable layer B stores a dirt mask map and a dirt base color map, etc.

[0064] Step S106: Obtain parameter adjustment instructions, determine the target layer corresponding to the parameter adjustment instructions, and generate layer control parameters for the target layer based on the parameter adjustment instructions; wherein, the layer control parameters are used to: control the display method of the textures stored in the target layer on the target model; the target layer is a base layer or a reusable layer;

[0065] The aforementioned parameter adjustment commands are typically issued by the engineers creating the textures. In the texture creation engine, a parameter adjustment interface can be set for each layer; this interface can specifically be a parameter adjustment control. The parameter adjustment commands can be generated and issued through this interface. These commands can carry the layer identifier of the target layer, which is used to identify the target layer. Alternatively, a pre-defined correspondence between the parameter adjustment interface and the layers can be established, allowing the target layer to be determined by the parameter adjustment interface receiving the command.

[0066] The target layer mentioned above can be a base layer or a reusable layer. That is, engineers can adjust the parameters of the base layer or the parameters of each reusable layer. The parameter adjustment instructions can include the type of parameter to be adjusted and its corresponding value, which is then saved to the layer control parameters of the target layer. These parameter types can include texture size parameters, offset parameters, weight parameters, threshold parameters, intensity parameters, etc. Different parameter values ​​can change how the corresponding texture is displayed on the target model. For example, increasing the intensity parameter value can increase the prominence of the corresponding texture on the target model; changing the offset parameter value can change the distribution position of the texture on the target model, etc.

[0067] In addition, the texture data of the target layer can be adjusted in real time based on this parameter value to generate the visual effect after texture adjustment, so that engineers can flexibly adjust the parameters to obtain the desired visual effect.

[0068] Step S108: Based on the base texture, material texture, and layer control parameters, generate a blended material texture for the target model; the blended material texture corresponds to the target material.

[0069] For the target model, the base texture is a custom texture for that model and typically cannot be applied to other models. Therefore, the aforementioned blended material texture includes the base texture data. Material textures, on the other hand, can be reused for other models. Therefore, the blended material texture can either save only the texture identifier or the material texture itself. Additionally, the blended material texture can also save layer information, indicating which layer the base texture and each material texture belong to. This layer information indicates the correspondence between textures and layers. Since the target layer has layer control parameters, these parameters can be used to control the display method of textures in the corresponding layer. In summary, the blended material texture of the target model is obtained. The material content expressed by this blended material texture is the target material, such as rock material or metallic rust material.

[0070] The above method for generating hybrid material maps involves: obtaining a base map corresponding to the target model and storing it in a base layer; wherein the base map is used to control the display of the target model's appearance; obtaining a material map corresponding to the target material and storing it in a reusable layer; wherein the material map is used to control the display of the target material's appearance; the reusable layer includes at least one layer, and the material appearance of the stored material maps differs in different reusable layers; obtaining parameter adjustment instructions, determining the target layer corresponding to the parameter adjustment instructions, and generating layer control parameters for the target layer based on the parameter adjustment instructions; wherein the layer control parameters are used to control the display method of the maps stored in the target layer on the target model; the target layer is either a base layer or a reusable layer; and generating a hybrid material map of the target model based on the base map, material map, and layer control parameters; the hybrid material map corresponds to the target material.

[0071] In this method, each texture is set in a different layer, and layer control parameters can be set to control the display of textures in each layer. This method can flexibly adjust the material performance through layers, so that the visual performance between different models of the same type can be significantly differentiated, thereby improving the performance of models in virtual scenes.

[0072] In one specific implementation, the aforementioned base layer and each reusable layer are each equipped with a corresponding parameter adjustment interface. The target parameter adjustment interface that receives the parameter adjustment command is determined, and the layer corresponding to the target parameter adjustment interface is designated as the target layer. For example, this parameter adjustment interface can specifically be a parameter adjustment window. A parameter adjustment window can be generated for each layer, and this window includes one or more parameter adjustment controls. Each parameter adjustment control can adjust a parameter. Engineers can adjust the parameter value through these controls, and the aforementioned parameter adjustment command is generated during the operation of the control. In actual implementation, the layer corresponding to the parameter adjustment control that is operated is the target layer.

[0073] The above layer control parameters can be generated in multiple ways, as described below.

[0074] In one approach, the parameter adjustment instruction includes: a first adjustment instruction for the target layer; obtaining a first parameter type for the target layer and a parameter value corresponding to the first parameter type from the first adjustment instruction; wherein the first parameter type includes: a layer scaling parameter or a layer offset parameter; the first parameter type is used to: control the size or offset position of the texture stored in the target layer with the target layer as the adjustment object; and generate layer control parameters for the target layer based on the first parameter type and the parameter value corresponding to the first parameter type.

[0075] In this method, adjustments are made on a layer-by-layer basis. This can be understood as the first adjustment command adjusting all textures within a layer as a whole. Taking layer scaling parameters as an example, these can be specific scaling factors, such as 70% or 150%, thereby controlling the scaling of all textures in the target layer, resulting in a change in the size of the textures in that target layer. The type of the first parameter and its corresponding value in the first adjustment command can be stored in the layer control parameters of the target layer.

[0076] Furthermore, for reusable layers, multiple reusable layers may be set for the target texture. Since the content of the textures in different reusable layers is different, it is necessary to set the layer weights for the reusable layers. The reusable layer with a higher layer weight will have a more obvious effect on the target model. Specifically, the target layer is a reusable layer, and the first parameter type also includes layer weight. Layer weight is used to control the performance weight of the textures stored in the target layer, with the target layer as the adjustment object. In actual implementation, the layer weight, as well as the aforementioned layer scaling parameters and layer offset parameters, can be preset with an adjustment threshold. Engineers can adjust the parameter values ​​within this threshold to ensure that the final texture effect has a high degree of reasonableness.

[0077] In another approach, the parameter adjustment instructions include: a second adjustment instruction for a specified texture in the target layer; obtaining a second parameter type for the specified texture and the parameter value corresponding to the second parameter type from the second adjustment instruction; wherein the second parameter type is associated with the texture type of the specified texture; the second parameter type is used to: control the intensity, weight, or threshold range of the specified texture as the adjustment object; and generate layer control parameters for the target layer based on the second parameter type and the parameter value corresponding to the second parameter type.

[0078] When a target layer contains multiple textures, engineers can adjust some of them individually, further increasing the flexibility of texture effect adjustments. In practice, some parameter adjustment controls in the parameter adjustment interface can be associated with specific textures within the layer. By manipulating these controls, the corresponding texture can be adjusted. For example, if the specified texture in the target layer is a normal map, the second parameter type mentioned above can be the normal intensity parameter. Similarly, if the specified texture is an occlusion map, the second parameter type can be occlusion intensity, etc. Of course, the second parameter type can also be the texture weight of the specified texture or a threshold range for the texture data.

[0079] The second parameter type and corresponding parameter value in the second adjustment command mentioned above can be stored in the layer control parameters of the target layer.

[0080] In another approach, the parameter adjustment instructions include: a third adjustment instruction for a specified channel of a specified texture in the target layer; obtaining a third parameter type for the specified channel and the parameter value corresponding to the third parameter type from the third adjustment instruction; wherein the third parameter type is associated with the channel data stored in the specified channel; the third parameter type is used to: control the intensity, weight, or threshold range of the specified channel as the adjustment object; and generate layer control parameters for the target layer based on the third parameter type and the parameter value corresponding to the third parameter type.

[0081] A texture typically contains four channels: RGBA. Different channels can store different texture data; for example, the R channel stores normal map data, the B channel stores occlusion map data, and the G channel stores wear map data. In this case, the third adjustment command mentioned above can adjust the data in a specific channel, thereby further improving the flexibility of texture rendering adjustments. The types of third parameters and their corresponding values ​​in the third adjustment command can be stored in the layer control parameters of the target layer.

[0082] Besides adjusting texture data at the layer, texture, or texture channel level, you can also adjust the texture data locally for a single texture or texture channel, since it includes data from multiple pixel positions. In this case, you need to use the brush tool. Alternatively, you can use a mask texture.

[0083] In one approach, the first channel value of the vertex color in the target model is obtained. This first channel value is then associated with the layer control parameters of the first layer to control the intensity of the first layer or a preset texture within it. The first layer is either a base layer or a reusable layer. Vertex colors typically include four channels: RGBA. When a channel is available, it can be used to store some texture control parameters. For example, the intensity parameter of a texture in the first layer can be set to be obtained from a specified channel of the vertex color in the target model. When rendering the target model, the control parameters of that texture can be obtained from the vertex color, thus controlling the texture rendering process.

[0084] The process involves: obtaining the attribute parameters of the vertex color brush tool; controlling the movement of the vertex color brush tool on the target model to determine its first movement path; and obtaining the first channel values ​​of the model vertices along the first movement path based on the attribute parameters. The attribute parameters of the vertex color brush tool can include brush thickness, hardness, target channels, and channel values ​​set along the path the brush travels. Engineers can control the movement of the vertex color brush tool on the target model and obtain the first channel values ​​of the target channels for the model vertices traversed by the brush tool. The target channel is one or more of the RGBA channels in the vertex.

[0085] Furthermore, a brush layer can be set within the reusable layer, storing a brush mask map. This brush mask map can be a noise map generated according to a preset algorithm, thereby increasing the randomness of texture data adjustment. Specifically, the second channel value of the vertex color in the target model is obtained; based on the second channel value and the mask map, brush intensity parameters are generated; the texture to be processed is determined, and the texture brush tool is controlled to move on the texture to be processed, determining the second movement path of the texture brush tool; based on the brush intensity parameters, the texture data on the second movement path is obtained. This texture to be processed can be an intensity map in a specific layer. When engineers set the texture data in this texture to be processed using the brush, the second channel value and the mask map jointly determine the final texture data. The second channel value is relatively fixed data set by preset, and the mask map is a noise map. Therefore, when generating texture data through the brush, the noise map increases the randomness of the texture data, making the final texture display more random and varied.

[0086] In one example, the brush intensity parameters mentioned above can be calculated using the following formula, and the calculation process can be completed in the shader. The formulas for calculating brush weight, vertex color (color.rgb), and brush mask are as follows:

[0087] brushWeight

[0088] =saturate(color.rgb-brushMask*InvertWhiteTo(color.rgb))

[0089] Here, `brushMask` is equivalent to the aforementioned brush mask texture; `saturate()` is a constraint function. Taking `saturate(x)` as an example, if the value of `x` is less than 0, `saturate(x)` returns 0; if the value of `x` is greater than 1, `saturate(x)` returns 1; if `x` is between 0 and 1, `saturate(x)` directly returns the value of `x`. `color.rgb` is the channel value of the vertex color's RGB channel, equivalent to the aforementioned second channel value. This `color.rgb` can be the channel value of one or more RGB channels. `InvertWhiteTo()` is the function for inverting white to black.

[0090] The relationship between rustBrushWeight, rustMaskWeight, dirtBrushWeight, and brush weight is as follows:

[0091] rustBrushWeight=brushWeight.x

[0092] rustMaskWeight=brushWeight.y

[0093] dirtBrushWeight=brushWeight.z

[0094] As can be seen from the formula above, vertex color.rgb represents the RGB three channels of the vertex color of the target model. The data stored in the three channels are the rust brush intensity, rust mask intensity, and dirt brush intensity, respectively. After adjusting the parameter brushMask, the brush weight can be calculated and used to adjust the values ​​of these three intensities.

[0095] Since the brush mask map is a noise map, which can be created by artists, the brushMask parameter at each model fragment is a different parameter in the range [0,1], resulting in different intensity values. The brush mask map is controllable by artists, allowing for richer variations in the intensity of rust brushes, rust masking, and dirt brushes, thus enriching the representation of rusted surfaces. Therefore, the mapping relationship between vertex colors and various intensities is related to the brushMask value. A randomly generated noise map can be used as the brush mask map to introduce a degree of randomness to the intensity values. However, specific types of noise maps are generally used to ensure that the final rendered rust effect conforms to the appearance of rust in everyday life.

[0096] It should be noted that this embodiment divides the textures into layers. This is because the blended material uses more layers, breaking down the details. Each detail layer's texture can be considered to only be responsible for the details related to that layer. Therefore, while ensuring a similar final visual effect, the resolution of a single texture can be significantly reduced. Although the number of textures increases, the reduced resolution results in substantial savings in storage space, thus saving overall storage consumption.

[0097] To illustrate, the traditional material creation process typically involves three high-resolution texture maps: a base texture map (4096 resolution, reference size: 10.7M, the same below), a normal map (4096, 16.0M), and an AO map (1024, 0.7M). The hybrid material creation method uses: a texture map (1024, 1.0M), structural normals (1024, 1.0M), a blending mask (1024, 1.3M), detail normals (512, 341K), detail texture A (512, 170K), and detail texture B (512, 256K). The total size of the traditional material texture map is 27.4M, while the total size of the hybrid material texture map is 4.0M. Therefore, the hybrid material texture generated in this embodiment has a smaller data size, saving data storage space and reducing system performance consumption.

[0098] To further understand this embodiment, the following embodiment provides a method for generating a rock blended material texture. In the Unity engine platform, multiple layers can be set for the rock material. The target material includes the rock material; the target model is the rock model; reusable layers include several of the following: macro detail layer, micro detail layer, gravel layer, dirt layer, moss layer, and moss detail layer. Each reusable layer can have its own parameter adjustment controls. For example, the macro detail layer can include macro normal maps, occlusion maps, etc., and has adjustment controls for parameters such as layer scaling, layer offset, smoothness multiplier, normal intensity, occlusion intensity, wear intensity, base color wear weight, and smoothness wear weight.

[0099] The base layer needs to have a separate base albedo smoothness map and normal occlusion wear map created for the characteristics of the rock model. All layers other than the base layer are reusable layers. The texture resources of the material map can be stored only once and referenced by different rock material instances.

[0100] In addition, each layer offers numerous clearly defined and reasonably sized parameters for engineers to adjust, such as texture layer scaling and offset parameters, normal intensity adjustment multipliers, smoothness adjustment multipliers, occlusion intensity adjustment multipliers, layer weight coefficients, etc. The layer weight coefficient is a normalized coefficient within the range [0,1]. Setting it to 0 means the layer is completely off; setting it to 1 means the current layer, along with the texture and the multipliers of the current adjustments, is completely superimposed on the original layer. Generally, values ​​between 0 and 1 are used for linear interpolation via a lerp operation. Adjusting the layer weight coefficient is generally global for that layer, affecting the weights of all related adjustment multipliers for all textures within that layer.

[0101] All of these parameters can be adjusted in real time within the Unity editor, providing real-time rendering feedback. Layers and their corresponding parameter adjustment interfaces can be implemented by writing corresponding shaders in Unity Shaders and by adding new graphical interfaces to the editor using C#.

[0102] Furthermore, this invention can further reduce texture consumption by using vertex colors. In this real-time implementation, vertex colors are stored in the model's FBX file, and the R and G channels of the vertex colors represent the intensity of the gravel and dirt layers, respectively. Using the vertex color brush tool, engineers can easily apply the corresponding vertex colors to the required areas of the model, controlling the range and intensity of the gravel and dirt in that area. For example, the vertex colors of the target model store the intensity parameters of the gravel and / or dirt layers; these intensity parameters are obtained through the vertex color brush tool.

[0103] The target model's model file, such as an FBX format model file, stores vertex-related information, such as vertex coordinates, normals, and UVs. It also stores vertex color information, which consists of four RGBA channels. If the vertex colors are not used during rendering, their storage space can be used to store additional information. In this example, the unused R and G channels of the vertex colors are used to store the intensity of the sand and dirt layers, respectively, saving the storage space required for a mask image. Theoretically, a mask image could also be used to adjust local areas of the model for sand and dirt, but this would consume additional storage space. Therefore, storing the intensity of the sand and dirt layers in the vertex colors is primarily to save space. Other adjustment parameters, such as normal intensity, layer scaling, and occlusion intensity, are adjusted holistically for the layer and cannot be adjusted individually for local areas of the layer.

[0104] In this embodiment, the layers of the mixed materials can be divided into sufficiently fine layers, and each layer can have multiple adjustment multipliers with different meanings. Combined with the local detail information provided by vertex colors or mask maps, it is sufficient to support the combination of complex and diverse materials that meet the requirements.

[0105] The following embodiments also provide a method for generating a rust-mixed material map, wherein the target material includes a rust material; and the reusable layers include a variety of the following: detail layer, dirt layer, rust layer, rust mask layer, and brush layer.

[0106] Each reusable layer can have its own parameter adjustment controls. For example, in a detail layer, you can include normal maps and adjust parameters such as layer scaling, layer offset, normal intensity, and layer weight.

[0107] In addition to adding a regular rust layer to represent rust, to better express the layering relationship between the rusted surface and the paint surface, when an object's surface is rusted, the paint surface is usually on top of the rusted surface, with a layer between the rusted surface and the paint surface and a clear shadow transition in between. The shadow transition is as follows: Figure 2 Examples in; in Figure 2 In the image, the painted surface is a light-colored area, and the rusted surface is a dark-colored area; the two arrows indicate areas of shadow transition. Because there's a transition between the rusted and painted surfaces to control the rust and non-rusted areas, a rust mask layer was added. This rust mask uses a modified normal map and a mask image. Specifically, the rust mask layer uses textures of modified rust normals and a mask image. The modified rust normals are overlaid with correction values ​​on the original rust normals to create a shadow effect between the rusted and painted surfaces. The sampled values ​​on the mask image represent the strength of the rust mask. The modified rust normals are stored in the RGB channels of the texture, and the mask image is stored in the A channel of the texture.

[0108] On the other hand, vertex colors are also used in rust blending materials. The vertex colors of the target model store the initial brush intensity parameters of the preset layer. The preset layer includes: rust brush intensity parameters, rust mask intensity parameters, or dirt brush intensity parameters. The brush layer stores a brush mask map. The brush layer is used to generate brush intensity control parameters for the rust layer based on the brush mask map and the initial brush intensity parameters.

[0109] The initial intensity parameters in the vertex color can be added by engineers using the brush tool on the model's FBX file. Meanwhile, the brush mask in the brush layer is a noise map that controls and changes the mapping relationship between the vertex color and the final rust brush intensity, rust mask intensity, and dirt brush intensity, making the rust surface representation richer. The brush layer can also adjust the brush hardness, such as the hardness of the rust brush, rust mask, and dirt brush, thereby controlling the hardness transition of the brushes in each corresponding layer. Specifically, the brush hardness determines the degree of blurring at the brush edges; a harder brush results in sharper edges, while a softer brush results in more blurred edges with a semi-transparent effect, allowing the painted parts to blend better with the underlying texture.

[0110] After obtaining each layer and its layer control parameters using the above method, the base texture, the layer control parameters of the base layer, the texture identifiers of the material textures in the reusable layers, and the corresponding layer control parameters of the reusable layers are saved to obtain the blended material texture of the target model. In actual implementation, the material textures in the reusable layers can be stored in the reusable texture asset library. These material textures can be used by the blended material textures of multiple models. Therefore, for the target model, only the texture identifiers of the material textures can be saved in the blended material texture. Based on these texture identifiers, the material texture can be uniquely identified. During the rendering of the target model, the material texture is retrieved from the reusable texture asset library based on the texture identifier, thereby completing the rendering.

[0111] During the rendering of the target model, the base map and the layer control parameters of the base layer are obtained from the blended material map. Based on the layer control parameters of the base layer, the base map is rendered on the target model. The texture identifier of the material map in the reusable layer is obtained from the blended material map. Based on the texture identifier, the material map is obtained from the preset reusable texture asset library. Based on the layer control parameters corresponding to the reusable layer, the obtained material map is rendered on the target model to obtain the rendered target model.

[0112] As an example, the following embodiments provide the process of model creation, texture blending, and model rendering.

[0113] Step 1: Create reusable assets with mixed materials and save them in the reusable texture asset library.

[0114] Examples include detail layer mapping, detail normals, dirt masking, base albedo and smoothness for rock materials, and rust layers, rust masks and normals, brush masks, etc., for rust materials.

[0115] Step 2: Create a specific object model.

[0116] For example, first build or iterate the model of the rock object according to actual needs, ensuring it meets the requirements for subsequent use of hybrid materials. High-poly model creation needs to capture the overall large undulations, structures, and outlines, especially the chamfers and transitions, which need to be subjectively enlarged based on the original model. This is because normal baking compresses the accuracy to approximately 64 pixels / meter, resulting in significant overall accuracy compression. Therefore, it's necessary to ensure that transition structures are large enough to have sufficient pixels to support them even after compression. Low-poly model creation requires consistent UV accuracy, with UV seams hidden in occluded or inconspicuous locations. Modify and iterate on existing low-poly models, paying attention to thickening overly fine structures and distorting overly straight structures; for objects with a large number of textures, check if merging textures can reduce the number of IDs.

[0117] Step 3: Create a base map for the target model. This base map needs to be created separately for the target model, such as a base albedo and smoothness map, and a base normal occlusion and wear map. Apply the created color and normal maps, which can be continuous or full-width maps.

[0118] Step 4: In the game engine, reuse the blended material map, turn the corresponding layers on and off or add new layers as needed, and adjust the layer parameters in real time by vertex color, scaling and offset of each layer, custom product coefficients of each layer and layer weights. After adjusting, save the parameter settings, and the blended material of the object is completed.

[0119] By repeating steps 2-4 above, you can quickly complete the creation of a large number of massive assets.

[0120] This embodiment proposes a method for creating hybrid materials. This method breaks down the material creation process of large assets into more detailed and specific layers as needed. Even after the texture is placed in the layer channel, it still retains the three RGB channels. The data of each texture is stored separately because each texture has its own unique identifier. For example, in Unity, each asset has its own GUID number. The material sphere organizes these layers according to a certain structure, and the GUID numbers of these textures can be referenced at the locations where textures are needed.

[0121] Production efficiency is significantly improved by reusing most of the texture resources of specific layers. Engineers adjust the custom parameters of each layer to ensure the desired artistic effect. This allows for the rapid completion of large-scale, massive asset production needs. Because mixed materials involve numerous textures and adjustment parameters, the process can be somewhat chaotic. This embodiment introduces the concept of layers primarily to logically categorize the composition of materials. Textures are assigned to corresponding layers based on their function, making the material subdivision logic clear and uncluttered.

[0122] As a comparative example, Unreal Engine and Unity are currently the most widely used commercial game engines on the market. The creation process of models and materials usually relies on other powerful software such as 3DS Max, Maya, Blender, and Substance 3D. Models, textures, and other resources are mostly created individually using specialized software and then integrated into the engine.

[0123] In related technologies, one approach is to create hybrid material textures based on Substance 3D. Taking the creation of rock material based on Substance 3D as an example, the general process of traditional material creation is introduced:

[0124] First, based on the required visual components, such as stones, leaves, and vines, create the substance and height information in sequence, then merge them one by one using the blend node. To ensure that the surface material is also displayed, convert the height to a normal map at the end. At this stage, only a medium grayscale value is used as the base color and glossiness. When the height and normal information are about 80% complete, move on to the base color creation stage. Using the previously created height map, design and create color details and the masks needed for blending.

[0125] Next comes the roughness creation stage, which typically involves integrating previously created elements. The jungle rock surface doesn't have any metal parts; these are usually added during the coloring stage. This stage involves spending a lot of time adjusting and refining materials, comparing the current Substance with the expected quality. You can try adding more elements or removing some, but ensure that each texture is at its highest quality before exporting.

[0126] Another approach in related technologies is to create a unique base material layer and base normal layer for an object, but to delegate more detailed rendering or other requirements to additional layers. These additional layers are often generic. Finally, the various layers are overlaid and blended together, and the final effect is obtained through rendering.

[0127] First, by obtaining the vertex coordinates and normal directions of the wall model, the material weight value corresponding to each vertex in the wall model is determined based on the vertex coordinates and normal directions. Several material maps are then mixed according to these material weight values ​​to obtain a target material map. The wall model is then rendered based on the target material map to generate a wall model with mixed materials. Since the material weight value corresponding to each vertex in the wall model is related to its corresponding vertex coordinates, the blending effect of vertices at different locations in the wall model is different. This reduces the number of mixed materials used in traditional house wall methods, lowers the performance cost of generating mixed materials, and achieves the desired artistic effect. Furthermore, the material weight value corresponding to each vertex in the wall model is also related to the normal direction of the vertex. Therefore, the material blending effect of the wall differs for different orientations, thus overcoming the shortcomings of the continuity and repetitiveness of a single material in the wall model in the game scene.

[0128] From the technical solutions mentioned above, the traditional material creation process has the following main drawbacks for producing a large number of repetitive objects in large-scale scenes: Traditional material creation requires creating high-precision base color maps, normal maps, and AO maps for each specific model, and the production details rely on external specialized software. For objects requiring mass production, the average cost per model is high, the project production cycle is long, and the overall production efficiency is low. Each object's texture resources are unique and cannot be reused, resulting in a large number of materials in the game. This significantly increases resource loading consumption during game runtime, especially for large-scale AAA games, where efficient resource reuse management is crucial due to the performance limitations of current console and mobile CPUs, GPUs, and memory. Creating materials separately for each object, with engineers creating differences between different objects using the same material, can lead to inconsistent styles between different objects, affecting game quality.

[0129] Current methods for creating blended materials, which improve upon traditional production processes, also have shortcomings: because the textures of the additional layers in a blended material are identical, simple material blending can easily lead to similar final results, resulting in objects that appear monotonous. Algorithms calculate the blending coefficients of each material layer based on the model's characteristics, allowing the same blended material to exhibit different effects in different positions on different objects. However, this method doesn't allow engineers to freely adjust the weights of detail parameters in each additional layer of the blended material according to the object's position in the scene or specific needs, reducing artistic freedom and the final rendering effect of the object.

[0130] Based on the comparative embodiments of the aforementioned related technologies, specifically in this embodiment, the method for generating hybrid material textures provides engineers with a user-friendly degree of freedom and method for parameter adjustment. Each parameter of the hybrid material has a range, supports real-time feedback adjustment, and has a clear meaning, making it easy to understand and use. It maximizes resource reuse and reduces resource consumption. It utilizes vertex colors to store layer application information on the model as needed, saving additional mask texture consumption. Because the hybrid material breaks down the layers applied to the material into more detailed layers such as the underlying texture, structural normals, various detail textures, detail normals, and blending masks, each layer can use lower-resolution textures. Compared to the traditional material production process which requires creating high-precision textures, this significantly reduces texture storage consumption. In addition to the basic textures and structural normals unique to each model, the texture resources of each additional layer can be reused, further reducing storage consumption.

[0131] This embodiment can significantly improve production efficiency and reduce production costs. After creating reusable additional layers in the early stages, only the unique base textures and structural normals need to be created for different objects. The material blending process can be configured into the game engine, reducing the skill requirements for professional software; new blended materials can be created by brushing the corresponding vertex colors and adjusting the corresponding detail parameters.

[0132] This embodiment ensures both artistic quality and rendering performance. Layers can be added as needed based on the characteristics of the model. Engineers can observe and change the effects of different layers in real time by adjusting parameters such as layer scaling and offset, layer-customized product coefficients, vertex colors, brushes, and masks. This allows for efficient achievement of diverse rendering effects for target objects while maintaining stylistic consistency.

[0133] From the above-described production process of the mega-assets of this invention, the beneficial effects of this invention are as follows: Engineers can directly modify the parameters of each layer in the game engine interface, which is engineer-friendly. By adopting the method of adding multiple detail layers on demand, the required texture resolution for each layer is reduced, and relevant information is stored using vertex colors, saving memory resources. During the production process, a large number of detail texture resources can be reused, greatly accelerating the efficiency of producing large assets, shortening the project cycle, and saving labor costs. It provides a rich and rapid method for creating differentiated assets, and engineers can adjust in real time according to needs and scenes, ensuring both stylistic consistency and uniqueness, thus guaranteeing the artistic effect of the assets.

[0134] For the corresponding method embodiments described above, see [link to relevant documentation]. Figure 3 The diagram shows a structural schematic of a hybrid material texture generation device, which includes:

[0135] The basic layer storage module 30 is used to obtain the basic texture map corresponding to the target model and store the basic texture map in the basic layer; wherein, the basic texture map is used to control the display content of the target model;

[0136] The reusable layer storage module 32 is used to obtain the material map corresponding to the target material and store the material map in the reusable layer; wherein, the material map is used to control the material representation content of the target material; the reusable layer includes at least one, and the material representation content of the material map stored in different reusable layers is different;

[0137] The parameter adjustment module 34 is used to obtain parameter adjustment instructions, determine the target layer corresponding to the parameter adjustment instructions, and generate layer control parameters for the target layer based on the parameter adjustment instructions; wherein, the layer control parameters are used to: control the display method of the textures stored in the target layer on the target model; the target layer is a base layer or a reusable layer;

[0138] The texture generation module 36 is used to generate a blended material texture of the target model based on the base texture, material texture, and layer control parameters; the blended material texture corresponds to the target material.

[0139] The aforementioned hybrid material texture generation device acquires a base texture corresponding to the target model and stores the base texture in a base layer; wherein, the base texture is used to: control the display of the model representation of the target model; acquires a material texture corresponding to the target material and stores the material texture in a reusable layer; wherein, the material texture is used to: control the display of the material representation of the target material; the reusable layer includes at least one, and the material representation of the material textures stored in different reusable layers is different; acquires parameter adjustment instructions, determines the target layer corresponding to the parameter adjustment instructions, and generates layer control parameters for the target layer based on the parameter adjustment instructions; wherein, the layer control parameters are used to: control the display method of the textures stored in the target layer on the target model; the target layer is a base layer or a reusable layer; and generates a hybrid material texture of the target model based on the base texture, the material texture, and the layer control parameters; the hybrid material texture corresponds to the target material.

[0140] In this method, each texture is set in a different layer, and layer control parameters can be set to control the display of textures in each layer. This method can flexibly adjust the material performance through layers, so that the visual performance between different models of the same type can be significantly differentiated, thereby improving the performance of models in virtual scenes.

[0141] The aforementioned base layer and each reusable layer are equipped with corresponding parameter adjustment interfaces; the aforementioned parameter adjustment module is also used to: determine the target parameter adjustment interface that receives the parameter adjustment instruction, and determine the layer corresponding to the target parameter adjustment interface as the target layer.

[0142] The parameter adjustment instructions include: a first adjustment instruction for the target layer; the parameter adjustment module is further used to: obtain a first parameter type for the target layer and the parameter value corresponding to the first parameter type from the first adjustment instruction; wherein, the first parameter type includes: layer scaling parameter or layer offset parameter; the first parameter type is used to: control the size or offset position of the texture stored in the target layer with the target layer as the adjustment object; and generate layer control parameters for the target layer based on the first parameter type and the parameter value corresponding to the first parameter type.

[0143] The target layer mentioned above is a reusable layer. The first parameter type also includes layer weight. Layer weight is used to control the rendering weight of the textures stored in the target layer, with the target layer as the adjustment object.

[0144] The aforementioned parameter adjustment instructions include: a second adjustment instruction for a specified texture in the target layer; the aforementioned parameter adjustment module is further used to: obtain a second parameter type for the specified texture and the parameter value corresponding to the second parameter type from the second adjustment instruction; wherein, the second parameter type is associated with the texture type of the specified texture; the second parameter type is used to: control the intensity, weight, or threshold range of the specified texture with the specified texture as the adjustment object; and generate layer control parameters for the target layer based on the second parameter type and the parameter value corresponding to the second parameter type.

[0145] The aforementioned parameter adjustment instructions include: a third adjustment instruction for a specified channel of a specified texture in the target layer; the aforementioned parameter adjustment module is further used to: obtain a third parameter type for the specified channel and the parameter value corresponding to the third parameter type from the third adjustment instruction; wherein, the third parameter type is associated with the channel data stored in the specified channel; the third parameter type is used to: control the intensity, weight, or threshold range of the specified channel with the specified channel as the adjustment object; and generate layer control parameters for the target layer based on the third parameter type and the parameter value corresponding to the third parameter type.

[0146] The aforementioned device also includes a vertex color setting module, used to obtain the first channel value of the vertex color in the target model; and associate the first channel value with the layer control parameters of the first layer, so as to control the intensity of the first layer or the preset texture in the first layer through the first channel value; wherein, the first layer is a base layer or a reusable layer.

[0147] The vertex color setting module described above is also used to: obtain the attribute parameters of the vertex color brush tool; control the vertex color brush tool to move on the target model and determine the first movement path of the vertex color brush tool; and obtain the first channel value of the model vertex on the first movement path based on the attribute parameters.

[0148] The reusable layer mentioned above includes a brush layer, which stores a brush mask texture. The device also includes a brush setting module, used for: obtaining the second channel value of the vertex color in the target model; generating brush intensity parameters based on the second channel value and the mask texture; determining the texture to be processed, controlling the texture brush tool to move on the texture to be processed, and determining the second movement path of the texture brush tool; and obtaining texture data on the second movement path based on the brush intensity parameters.

[0149] The texture generation module described above is also used to: save the base texture, the layer control parameters of the base layer, the texture identifier of the material texture in the reusable layer, and the layer control parameters corresponding to the reusable layer, so as to obtain the blended material texture of the target model.

[0150] The aforementioned device also includes a rendering module, used for: obtaining base maps and layer control parameters of base layers from the blended material map; rendering the base map on the target model based on the layer control parameters of the base layer; obtaining texture identifiers of material maps in reusable layers from the blended material map; obtaining material maps from a preset reusable texture asset library based on the texture identifiers; and rendering the obtained material maps on the target model based on the layer control parameters corresponding to the reusable layers, thereby obtaining the rendered target model.

[0151] The target material mentioned above includes rock material; reusable layers include multiple layers such as: macro detail layer, micro detail layer, gravel layer, dirt layer, moss layer, and moss detail layer.

[0152] The vertex colors of the target model contain the intensity parameters of the gravel layer and / or dirt layer; the intensity parameters are obtained through the vertex color brush tool.

[0153] The target materials mentioned above include rust materials; reusable layers include several of the following: detail layers, dirt layers, rust layers, rust mask layers, and brush layers.

[0154] The vertex color of the target model above stores the initial brush intensity parameters of the preset layer; the preset layer includes: rust brush intensity parameters, rust mask intensity parameters or dirt brush intensity parameters; the brush layer stores the brush mask texture, and the brush layer is used to: generate the brush intensity control parameters of the rust layer based on the brush mask texture and the initial brush intensity parameters.

[0155] This embodiment also provides an electronic device, including a processor and a memory. The memory stores machine-executable instructions that can be executed by the processor. The processor executes the machine-executable instructions to implement the above-described method for generating hybrid material textures. This electronic device can be a server or a terminal device.

[0156] See Figure 4 As shown, the electronic device includes a processor 100 and a memory 101. The memory 101 stores machine-executable instructions that can be executed by the processor 100. The processor 100 executes the machine-executable instructions to implement the above-described method for generating hybrid material textures.

[0157] Furthermore, Figure 4 The electronic device shown also includes a bus 102 and a communication interface 103, with the processor 100, the communication interface 103 and the memory 101 connected via the bus 102.

[0158] The memory 101 may include high-speed random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one communication interface 103 (which can be wired or wireless), such as the Internet, wide area network, local area network, or metropolitan area network. The bus 102 may be an ISA bus, PCI bus, or EISA bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 4 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.

[0159] Processor 100 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of processor 100 or by instructions in software form. Processor 100 may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this invention. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this invention can be directly manifested as execution by a hardware decoding processor, or execution by a combination of hardware and software modules in the decoding processor. The software module can reside in a readily available storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory 101, and the processor 100 reads the information from memory 101 and, in conjunction with its hardware, completes the steps of the method described in the foregoing embodiments.

[0160] The processor in the aforementioned electronic device, by executing machine-executable instructions, can perform the following operations in the method for generating hybrid material textures:

[0161] Obtain the base texture corresponding to the target model and store it in a base layer; the base texture is used to control the display of the target model's appearance. Obtain the material texture corresponding to the target material and store it in a reusable layer; the material texture is used to control the display of the target material's appearance. A reusable layer includes at least one layer, and the material appearance of the stored material textures differs between different reusable layers. Obtain parameter adjustment instructions, determine the target layer corresponding to the parameter adjustment instructions, and generate layer control parameters for the target layer based on the parameter adjustment instructions; the layer control parameters are used to control how the textures stored in the target layer are displayed on the target model; the target layer is either a base layer or a reusable layer. Based on the base texture, material texture, and layer control parameters, generate a blended material texture for the target model; the blended material texture corresponds to the target material.

[0162] The base layer and each reusable layer have corresponding parameter adjustment interfaces; the target parameter adjustment interface that receives the parameter adjustment command is determined, and the layer corresponding to the target parameter adjustment interface is determined as the target layer.

[0163] The parameter adjustment instructions include: a first adjustment instruction for the target layer; obtaining a first parameter type for the target layer from the first adjustment instruction, and the parameter value corresponding to the first parameter type; wherein, the first parameter type includes: layer scaling parameter or layer offset parameter; the first parameter type is used to: control the size or offset position of the texture stored in the target layer with the target layer as the adjustment object; and generate the layer control parameters of the target layer based on the first parameter type and the parameter value corresponding to the first parameter type.

[0164] The target layer is a reusable layer, and the first parameter type also includes layer weight; layer weight is used to control the rendering weight of the textures stored in the target layer, with the target layer as the adjustment object.

[0165] The parameter adjustment instructions include: a second adjustment instruction for a specified texture in the target layer; obtaining a second parameter type for the specified texture and the parameter value corresponding to the second parameter type from the second adjustment instruction; wherein, the second parameter type is associated with the texture type of the specified texture; the second parameter type is used to: control the intensity, weight, or threshold range of the specified texture as the adjustment object; and generate layer control parameters for the target layer based on the second parameter type and the parameter value corresponding to the second parameter type.

[0166] The parameter adjustment instructions include: a third adjustment instruction for a specified channel of a specified texture in the target layer; obtaining a third parameter type for the specified channel and the corresponding parameter value from the third adjustment instruction; wherein, the third parameter type is associated with the channel data stored in the specified channel; the third parameter type is used to: control the intensity, weight, or threshold range of the specified channel as the adjustment object; and generate layer control parameters for the target layer based on the third parameter type and the corresponding parameter value.

[0167] Obtain the first channel value of the vertex color in the target model; associate the first channel value with the layer control parameters of the first layer to control the intensity of the first layer or the preset texture in the first layer; wherein, the first layer is a base layer or a reusable layer.

[0168] Obtain the attribute parameters of the vertex color brush tool; control the vertex color brush tool to move on the target model and determine the first movement path of the vertex color brush tool; based on the attribute parameters, obtain the first channel value of the model vertex on the first movement path.

[0169] Reusable layers include brush layers, which store brush mask textures; the second channel value of the vertex color in the target model is obtained; brush intensity parameters are generated based on the second channel value and the mask texture; the texture to be processed is determined, and the texture brush tool is controlled to move on the texture to be processed, and the second movement path of the texture brush tool is determined; based on the brush intensity parameters, the texture data on the second movement path is obtained.

[0170] Save the base texture, the layer control parameters of the base layer, the texture identifiers of the material textures in the reusable layer, and the layer control parameters corresponding to the reusable layer to obtain the blended material texture of the target model.

[0171] Obtain the base map and layer control parameters of the base layer from the blended material map. Based on the layer control parameters of the base layer, render the base map on the target model. Obtain the texture identifier of the material map in the reusable layer from the blended material map. Based on the texture identifier, obtain the material map from the preset reusable texture asset library. Based on the layer control parameters corresponding to the reusable layer, render the obtained material map on the target model to obtain the rendered target model.

[0172] The target material includes rock material; reusable layers include several of the following: macro detail layer, micro detail layer, gravel layer, dirt layer, moss layer, and moss detail layer.

[0173] The intensity parameters of the gravel layer and / or dirt layer are stored in the vertex color of the target model; the intensity parameters are obtained through the vertex color brush tool.

[0174] The target material includes rust material; reusable layers include several of the following: detail layer, dirt layer, rust layer, rust mask layer, and brush layer.

[0175] The vertex color of the target model stores the initial brush intensity parameters of the preset layer; the preset layer includes: rust brush intensity parameters, rust mask intensity parameters, or dirt brush intensity parameters; the brush layer stores the brush mask map, and the brush layer is used to: generate the brush intensity control parameters of the rust layer based on the brush mask map and the initial brush intensity parameters.

[0176] In the above method, each texture is set in a different layer, and layer control parameters can be set for each layer to control the display of textures in each layer. This method can flexibly adjust the material performance through layers, so that the visual performance between different models of the same type can have greater differences, thus improving the performance of models in virtual scenes.

[0177] This embodiment also provides a machine-readable storage medium storing machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions cause the processor to implement the above-described method for generating hybrid material textures.

[0178] The machine-executable instructions stored in the aforementioned machine-readable storage medium can be executed to perform the following operations in the above-described method for generating hybrid material maps:

[0179] Obtain the base texture corresponding to the target model and store it in a base layer; the base texture is used to control the display of the target model's appearance. Obtain the material texture corresponding to the target material and store it in a reusable layer; the material texture is used to control the display of the target material's appearance. A reusable layer includes at least one layer, and the material appearance of the stored material textures differs between different reusable layers. Obtain parameter adjustment instructions, determine the target layer corresponding to the parameter adjustment instructions, and generate layer control parameters for the target layer based on the parameter adjustment instructions; the layer control parameters are used to control how the textures stored in the target layer are displayed on the target model; the target layer is either a base layer or a reusable layer. Based on the base texture, material texture, and layer control parameters, generate a blended material texture for the target model; the blended material texture corresponds to the target material.

[0180] The base layer and each reusable layer have corresponding parameter adjustment interfaces; the target parameter adjustment interface that receives the parameter adjustment command is determined, and the layer corresponding to the target parameter adjustment interface is determined as the target layer.

[0181] The parameter adjustment instructions include: a first adjustment instruction for the target layer; obtaining a first parameter type for the target layer from the first adjustment instruction, and the parameter value corresponding to the first parameter type; wherein, the first parameter type includes: layer scaling parameter or layer offset parameter; the first parameter type is used to: control the size or offset position of the texture stored in the target layer with the target layer as the adjustment object; and generate the layer control parameters of the target layer based on the first parameter type and the parameter value corresponding to the first parameter type.

[0182] The target layer is a reusable layer, and the first parameter type also includes layer weight; layer weight is used to control the rendering weight of the textures stored in the target layer, with the target layer as the adjustment object.

[0183] The parameter adjustment instructions include: a second adjustment instruction for a specified texture in the target layer; obtaining a second parameter type for the specified texture and the parameter value corresponding to the second parameter type from the second adjustment instruction; wherein, the second parameter type is associated with the texture type of the specified texture; the second parameter type is used to: control the intensity, weight, or threshold range of the specified texture as the adjustment object; and generate layer control parameters for the target layer based on the second parameter type and the parameter value corresponding to the second parameter type.

[0184] The parameter adjustment instructions include: a third adjustment instruction for a specified channel of a specified texture in the target layer; obtaining a third parameter type for the specified channel and the corresponding parameter value from the third adjustment instruction; wherein, the third parameter type is associated with the channel data stored in the specified channel; the third parameter type is used to: control the intensity, weight, or threshold range of the specified channel as the adjustment object; and generate layer control parameters for the target layer based on the third parameter type and the corresponding parameter value.

[0185] Obtain the first channel value of the vertex color in the target model; associate the first channel value with the layer control parameters of the first layer to control the intensity of the first layer or the preset texture in the first layer; wherein, the first layer is a base layer or a reusable layer.

[0186] Obtain the attribute parameters of the vertex color brush tool; control the vertex color brush tool to move on the target model and determine the first movement path of the vertex color brush tool; based on the attribute parameters, obtain the first channel value of the model vertex on the first movement path.

[0187] Reusable layers include brush layers, which store brush mask textures; the second channel value of the vertex color in the target model is obtained; brush intensity parameters are generated based on the second channel value and the mask texture; the texture to be processed is determined, and the texture brush tool is controlled to move on the texture to be processed, and the second movement path of the texture brush tool is determined; based on the brush intensity parameters, the texture data on the second movement path is obtained.

[0188] Save the base texture, the layer control parameters of the base layer, the texture identifiers of the material textures in the reusable layer, and the layer control parameters corresponding to the reusable layer to obtain the blended material texture of the target model.

[0189] Obtain the base map and layer control parameters of the base layer from the blended material map. Based on the layer control parameters of the base layer, render the base map on the target model. Obtain the texture identifier of the material map in the reusable layer from the blended material map. Based on the texture identifier, obtain the material map from the preset reusable texture asset library. Based on the layer control parameters corresponding to the reusable layer, render the obtained material map on the target model to obtain the rendered target model.

[0190] The target material includes rock material; reusable layers include several of the following: macro detail layer, micro detail layer, gravel layer, dirt layer, moss layer, and moss detail layer.

[0191] The intensity parameters of the gravel layer and / or dirt layer are stored in the vertex color of the target model; the intensity parameters are obtained through the vertex color brush tool.

[0192] The target material includes rust material; reusable layers include several of the following: detail layer, dirt layer, rust layer, rust mask layer, and brush layer.

[0193] The vertex color of the target model stores the initial brush intensity parameters of the preset layer; the preset layer includes: rust brush intensity parameters, rust mask intensity parameters, or dirt brush intensity parameters; the brush layer stores the brush mask map, and the brush layer is used to: generate the brush intensity control parameters of the rust layer based on the brush mask map and the initial brush intensity parameters.

[0194] In the above method, each texture is set in a different layer, and layer control parameters can be set for each layer to control the display of textures in each layer. This method can flexibly adjust the material performance through layers, so that the visual performance between different models of the same type can have greater differences, thus improving the performance of models in virtual scenes.

[0195] The computer program product of the method, apparatus and electronic device for generating hybrid material textures provided in the embodiments of the present invention includes a machine-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods described in the preceding method embodiments. For specific implementation, please refer to the method embodiments, which will not be repeated here.

[0196] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the system and apparatus described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0197] Furthermore, in the description of the embodiments of the present invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in the present invention based on the specific circumstances.

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

[0199] In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0200] Finally, it should be noted that the above embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for generating a hybrid material texture, characterized in that, The method includes: Obtain the base texture corresponding to the target model and store the base texture in the base layer; wherein, the base texture is used to control the display of the model representation content of the target model; Obtain the material texture corresponding to the target material and store the material texture in a reusable layer; wherein, the material texture is used to: control the display of the material representation content of the target material; the reusable layer includes at least one, and the material representation content of the material texture stored in different reusable layers is different; Obtain parameter adjustment instructions, determine the target layer corresponding to the parameter adjustment instructions, and generate layer control parameters for the target layer based on the parameter adjustment instructions; wherein, the layer control parameters are used to: control the display mode of textures stored in the target layer on the target model; the target layer is the base layer or the reusable layer; Based on the base texture, the material texture, and the layer control parameters, a blended material texture is generated for the target model; the blended material texture corresponds to the target material. The method further includes: obtaining the first channel value of the vertex color in the target model; associating the first channel value with the layer control parameters of the first layer, so as to control the intensity of the first layer or a preset texture in the first layer through the first channel value; wherein, the first layer is the base layer or the reusable layer; obtaining the first channel value of the vertex color in the target model includes: obtaining the attribute parameters of the vertex color brush tool; controlling the vertex color brush tool to move on the target model, determining the first movement path of the vertex color brush tool; and obtaining the first channel value of the model vertex on the first movement path based on the attribute parameters.

2. The method according to claim 1, characterized in that, The base layer and each of the reusable layers are provided with corresponding parameter adjustment interfaces; The step of determining the target layer corresponding to the parameter adjustment instruction includes: determining the target parameter adjustment interface that receives the parameter adjustment instruction, and determining the layer corresponding to the target parameter adjustment interface as the target layer.

3. The method according to claim 1, characterized in that, The parameter adjustment instructions include: a first adjustment instruction for the target layer; the step of generating layer control parameters for the target layer based on the parameter adjustment instructions includes: The first parameter type for the target layer and the parameter value corresponding to the first parameter type are obtained from the first adjustment instruction; wherein, the first parameter type includes: layer scaling parameter or layer offset parameter; the first parameter type is used to: control the size or offset position of the texture stored in the target layer with the target layer as the adjustment object; Based on the first parameter type and the parameter value corresponding to the first parameter type, the layer control parameters of the target layer are generated.

4. The method according to claim 3, characterized in that, The target layer is the reusable layer, and the first parameter type also includes layer weight; the layer weight is used to: control the performance weight of the textures stored in the target layer, with the target layer as the adjustment object.

5. The method according to claim 1, characterized in that, The parameter adjustment instructions include: a second adjustment instruction for a specified texture in the target layer; the step of generating layer control parameters for the target layer based on the parameter adjustment instructions includes: The second parameter type for the specified texture and the parameter value corresponding to the second parameter type are obtained from the second adjustment instruction; wherein, the second parameter type is associated with the texture type of the specified texture; the second parameter type is used to: control the intensity, weight or threshold range of the specified texture with the specified texture as the adjustment object; Based on the second parameter type and the parameter value corresponding to the second parameter type, the layer control parameters of the target layer are generated.

6. The method according to claim 1, characterized in that, The parameter adjustment instructions include: a third adjustment instruction for a specified channel of a specified texture in the target layer; the step of generating layer control parameters for the target layer based on the parameter adjustment instructions includes: The third parameter type for the specified channel and the parameter value corresponding to the third parameter type are obtained from the third adjustment instruction; wherein the third parameter type is associated with the channel data stored in the specified channel; the third parameter type is used to: control the strength, weight or threshold range of the specified channel with the specified channel as the adjustment object; Based on the type of the third parameter and the parameter value corresponding to the type of the third parameter, the layer control parameters of the target layer are generated.

7. The method according to claim 1, characterized in that, The reusable layer includes a brush layer, which stores a brush mask texture; the method further includes: Obtain the second channel value of the vertex color in the target model; Based on the second channel value and the mask map, brush intensity parameters are generated; Determine the texture to be processed, control the texture brush tool to move on the texture to be processed, and determine the second movement path of the texture brush tool; Based on the brush intensity parameters, obtain the texture data on the second movement path.

8. The method according to claim 1, characterized in that, The steps for generating a blended material map of the target model based on the base map, the material map, and the layer control parameters include: The base texture, the layer control parameters of the base layer, the texture identifier of the material texture in the reusable layer, and the layer control parameters corresponding to the reusable layer are saved to obtain the blended material texture of the target model.

9. The method according to claim 8, characterized in that, After saving the base texture, the layer control parameters of the base layer, the texture identifier of the material texture in the reusable layer, and the layer control parameters corresponding to the reusable layer to obtain the blended material texture of the target model, the method further includes: Obtain the base texture and the layer control parameters of the base layer from the hybrid material texture map, and render the base texture on the target model based on the layer control parameters of the base layer; The texture identifier of the material texture in the reusable layer is obtained from the hybrid material texture map. Based on the texture identifier, the material texture is obtained from the preset reusable texture asset library. Based on the layer control parameters corresponding to the reusable layer, the obtained material texture is rendered on the target model to obtain the rendered target model.

10. The method according to claim 1, characterized in that, The target material includes rock material; the reusable layers include multiple of the following: macro detail layer, micro detail layer, gravel layer, dirt layer, moss layer, and moss detail layer.

11. The method according to claim 10, characterized in that, The intensity parameters of the gravel layer and / or the dirt layer are stored in the vertex color of the target model; the intensity parameters are obtained through the vertex color brush tool.

12. The method according to claim 1, characterized in that, The target material includes a rusted material; the reusable layers include a variety of the following: detail layers, dirt layers, rust layers, rust mask layers, and brush layers.

13. The method according to claim 12, characterized in that, The vertex color of the target model stores the initial brush intensity parameters of the preset layer; the preset layer includes: rust brush intensity parameters, rust mask intensity parameters, or dirt brush intensity parameters; The brush layer stores a brush mask map, and the brush layer is used to generate brush intensity control parameters for the rust layer based on the brush mask map and the initial brush intensity parameters.

14. An apparatus for generating hybrid material maps, characterized in that, The device includes: The basic layer storage module is used to obtain the basic texture corresponding to the target model and store the basic texture in the basic layer; wherein, the basic texture is used to control the display of the model representation content of the target model; A reusable layer storage module is used to obtain the material map corresponding to the target material and store the material map in a reusable layer; wherein, the material map is used to control the display of the material representation content of the target material; the reusable layer includes at least one, and the material representation content of the material map stored in different reusable layers is different; A parameter adjustment module is used to acquire parameter adjustment instructions, determine the target layer corresponding to the parameter adjustment instructions, and generate layer control parameters for the target layer based on the parameter adjustment instructions; wherein, the layer control parameters are used to control the display mode of textures stored in the target layer on the target model; the target layer is the base layer or the reusable layer; The texture generation module is used to generate a blended material texture of the target model based on the base texture, the material texture, and the layer control parameters; the blended material texture corresponds to the target material. A vertex color setting module is used to obtain the first channel value of the vertex color in the target model; associate the first channel value with the layer control parameters of the first layer, so as to control the intensity of the first layer or the preset texture in the first layer through the first channel value; wherein, the first layer is the base layer or the reusable layer; obtaining the first channel value of the vertex color in the target model includes: obtaining the attribute parameters of the vertex color brush tool; controlling the vertex color brush tool to move on the target model, determining the first movement path of the vertex color brush tool; and obtaining the first channel value of the model vertex on the first movement path based on the attribute parameters.

15. An electronic device, characterized in that, The method includes a processor and a memory, the memory storing machine-executable instructions that can be executed by the processor, the processor executing the machine-executable instructions to implement the method for generating hybrid material maps according to any one of claims 1-13.

16. A machine-readable storage medium, characterized in that, The machine-readable storage medium stores machine-executable instructions, which, when invoked and executed by a processor, cause the processor to implement the method for generating hybrid texture maps according to any one of claims 1-13.

Citation Information

Patent Citations

  • Model generation method and device, computer equipment and storage medium

    CN114419233A