Map production method, device, equipment and computer readable medium

By optimizing the texture production process, including adding ambient occlusion light, bump information, texture effects and light and shadow effects, hand-painted style textures are generated, which solves the problem of low efficiency in stylized texture production, improves production efficiency and reduces the difference in object effects.

CN114288671BActive Publication Date: 2025-09-12BEIJING PERFECT WORLD SOFTWARE TECH DEV CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111657720.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-30
Publication Date
2025-09-12
Estimated Expiration
2041-12-30

AI Technical Summary

Technical Problem

The production efficiency of stylized textures in existing technologies is low, which affects the progress of game development.

Method used

By determining the inherent color information of the target object, adding ambient occlusion light and bump information, increasing texture effects and color block effects, and adding light and shadow effects after reaching the detail feature threshold, the base color map and roughness map are finally synthesized and input into the preset color block model to generate a hand-painted style map.

Benefits of technology

The production process of hand-painted style textures has been optimized to improve production efficiency and reduce the effect differences of objects in the same environment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114288671B_ABST
    Figure CN114288671B_ABST
Patent Text Reader

Abstract

The present application relates to a texture production method, apparatus, device, and computer-readable medium. The method includes: determining a target object for which a texture is to be produced, and baking a first texture of the target object, the first texture being used to record the inherent color information of the target object; adding ambient occlusion light and bump information to the first texture to obtain a second texture; adding texture effects and color block effects to the second texture to obtain a third texture; when the detail feature of the third texture reaches a first target threshold, adding light and shadow effects to the third texture to obtain a fourth texture; synthesizing the first, second, third, and fourth textures to obtain a base color texture and a roughness texture of the target object, deriving the base color texture and the roughness texture, and inputting the base color texture and the roughness texture into a preset color block model to obtain a hand-painted style texture of the target object output by the preset color block model. The present application improves the efficiency of producing hand-painted style textures.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of three-dimensional computer graphics technology, and in particular to a texture production method, device, equipment and computer-readable medium. Background Art

[0002] Stylized textures are frequently used in games, advertisements, film and television productions, and short videos, such as hand-drawn and anime-style photos. A consistent style is crucial in game development. For example, a cyberpunk-themed game should feature cyberpunk-style textures for its models, scenes, and lighting effects. An 2D-themed game should also feature 2D-themed textures for each in-game texture.

[0003] Currently, in related technologies, the unified production of texture styles can be achieved through the generator that comes with the game engine. However, the generator cannot make all objects in the entire texture have exactly the same effect. For the differences in effects between objects, additional differences need to be eliminated, resulting in low efficiency in the production of stylized textures, which may even seriously affect the progress of game development.

[0004] Currently, no effective solution has been proposed to the problem of low efficiency in producing stylized maps. Summary of the Invention

[0005] The present application provides a texture production method, apparatus, device, and computer-readable medium to solve the technical problem of low production efficiency of stylized textures.

[0006] According to one aspect of an embodiment of the present application, the present application provides a method for making a map, comprising:

[0007] Determine a target object for which a texture is to be created, and bake out a first texture of the target object, wherein the first texture is used to record inherent color information of the target object;

[0008] Add ambient occlusion light and bump information to the first map to get the second map;

[0009] Adding a texture effect and a color block effect to the second map to add texture details and color details on the basis of the second map to obtain a third map;

[0010] When the detail feature of the third map reaches the first target threshold, adding light and shadow effects to the third map to obtain a fourth map;

[0011] Based on the first map, the second map, the third map and the fourth map are synthesized to obtain a base color map and a roughness map of the target object, the base color map and the roughness map are exported and the base color map and the roughness map are input into a preset color block model to obtain a hand-painted style map of the target object output by the preset color block model.

[0012] Optionally, ambient occlusion light and bump information are added to the first map to obtain a second map comprising:

[0013] Add ambient occlusion light to the first map to get the first intermediate map;

[0014] Adding a bump texture to the first intermediate map to obtain a second intermediate map;

[0015] The second intermediate map is roughness-filtered using the inverse information of the ambient occlusion light to obtain the third intermediate map.

[0016] The third intermediate map is subjected to roughness screening or superposition using the inverse information of the concave-convex texture to obtain the second map.

[0017] Optionally, ambient occlusion light is added to the first map to obtain a first intermediate map, including:

[0018] Bake out the ambient occlusion map of the target object;

[0019] Place the ambient occlusion map in the base color channel of the first newly created layer, and blend the colors of the corresponding pixels of the ambient occlusion map and the first map in the base color channel of the first newly created layer. The color of the pixel on the first map is used as the base color, and the color of the pixel on the ambient occlusion map is used as the blend color. The base color and the blend color are blended to obtain the resulting color. The base color channel is the rendering channel in the texture creation tool.

[0020] Save the resulting color of each pixel mixed in the first newly created layer to obtain the first intermediate map.

[0021] Optionally, adding a bump texture to the first intermediate map to obtain a second intermediate map includes:

[0022] Bake out the curvature map of the target object;

[0023] Place the curvature map on the base color channel of the second new layer and overlay it with the first intermediate map to obtain the second intermediate map.

[0024] Optionally, roughness screening is performed on the second intermediate map using inverse information of ambient occlusion light to obtain a third intermediate map comprising:

[0025] Invert the ambient occlusion map to obtain a first inverted map;

[0026] Place the first inverted map on the roughness channel of the third newly created layer and perform roughness filtering on the second intermediate map to obtain the third intermediate map.

[0027] Optionally, the third intermediate map is subjected to roughness screening or superposition using the inverse information of the concave-convex texture to obtain the second map, including:

[0028] When the roughness of the target object is within the first range, the curvature map is inverted to obtain a second inverted map, and the second inverted map is placed on the roughness channel of the fourth newly created layer to perform roughness screening on the third intermediate map to obtain a second map; or

[0029] When the roughness of the target object is in the second range, the curvature map is inverted to obtain a second inverted map, and the second inverted map is placed on the roughness channel of the fourth newly created layer and superimposed with the third intermediate map to obtain the second map.

[0030] Optionally, a texture effect and a color block effect are added to the second map to add texture details and color details on the basis of the second map, and the third map is obtained, including:

[0031] Create a first fill layer for the second map and determine the base color and roughness of the first fill layer to add texture to the surface of the second map;

[0032] Add a first mask to the first fill layer to add a block effect to the texture through the first mask to obtain the third map;

[0033] When the detail characteristic degree of the surface details added to the second map by the third map does not reach the first target threshold, continue to create a new first fill layer, add texture and color block effect to the new first fill layer, and use the new first fill layer as another third map to continue adding surface details to the second map, until the detail characteristic degree of the surface details added to the second map reaches the first target threshold, and then save all the third maps.

[0034] Optionally, when the detail feature of the third map reaches a first target threshold, adding a light and shadow effect to the third map to obtain a fourth map includes:

[0035] Create a second fill layer for the third map and determine the base color and roughness of the second fill layer;

[0036] Add a second mask and light to the second fill layer to add light and shadow effects to get the fourth map.

[0037] According to another aspect of the embodiments of the present application, the present application provides a sticker making device, comprising:

[0038] A first production module is used to determine a target object for which a texture is to be produced, and bake out a first texture of the target object, wherein the first texture is used to record inherent color information of the target object;

[0039] The second production module is used to add ambient occlusion light and bump information to the first texture to obtain a second texture;

[0040] A third production module is used to add a texture effect and a color block effect to the second map, so as to add texture details and color details on the basis of the second map to obtain a third map;

[0041] a fourth production module, configured to add light and shadow effects to the third texture when the detail feature of the third texture reaches a first target threshold, thereby obtaining a fourth texture;

[0042] The fifth production module is used to synthesize the first map, the second map, the third map and the fourth map to obtain the base color map and the roughness map of the target object, export the base color map and the roughness map and input the base color map and the roughness map into the preset color block model to obtain the hand-painted style map of the target object output by the preset color block model.

[0043] According to another aspect of an embodiment of the present application, the present application provides an electronic device, including a memory, a processor, a communication interface and a communication bus, wherein the memory stores a computer program that can be run on the processor, the memory and the processor communicate through the communication bus and the communication interface, and the steps of the above method are implemented when the processor executes the computer program.

[0044] According to another aspect of an embodiment of the present application, the present application further provides a computer-readable medium having a non-volatile program code executable by a processor, where the program code enables the processor to execute the above method.

[0045] The above technical solution provided by the embodiment of the present application has the following advantages compared with the related art:

[0046] The technical solution of this application is to determine the target object for which a texture is to be produced and bake out a first texture of the target object, wherein the first texture is used to record the inherent color information of the target object; add ambient occlusion light and bump information to the first texture to obtain a second texture; add texture effects and color block effects to the second texture to add texture details and color details to the second texture to obtain a third texture; when the detail feature of the third texture reaches a first target threshold, add light and shadow effects to the third texture to obtain a fourth texture; synthesize the first, second, third, and fourth textures to obtain a base color texture and a roughness texture of the target object; derive the base color texture and the roughness texture and input the base color texture and the roughness texture into a preset color block model to obtain a hand-painted texture of the target object output by the preset color block model. This application improves the efficiency of hand-painted texture production by optimizing the texture production process, especially the production process of hand-painted textures, and further enhances the color block effect by using the preset color block model, reducing the effect differences of objects in the same environment. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0048] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following briefly introduces the drawings required for use in the embodiments or related technical descriptions. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0049] Figure 1 A schematic diagram of the hardware environment of an optional texture creation method provided according to an embodiment of the present application;

[0050] Figure 2 A schematic flow chart of an optional method for making a map according to an embodiment of the present application;

[0051] Figure 3 A comparative schematic diagram of an optional detail-rich map provided according to an embodiment of the present application;

[0052] Figure 4 This is a schematic diagram of an optional hand-drawn wind map result provided according to an embodiment of the present application;

[0053] Figure 5 A block diagram of an optional sticker making device provided according to an embodiment of the present application;

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

[0055] To make the purpose, technical solutions, and advantages of the embodiments of this application more clear, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0056] In the subsequent description, the suffixes such as "module", "component" or "unit" used to represent elements are only used to facilitate the description of this application and have no specific meaning. Therefore, "module" and "component" can be used interchangeably.

[0057] In related technologies, unified texture style production can be achieved through the generator that comes with the game engine. However, the generator cannot make all objects in the entire texture have exactly the same effect. For the differences in effects between objects, additional differences need to be eliminated, resulting in low efficiency in the production of stylized textures, which may even seriously affect the progress of game development.

[0058] In order to solve the problems mentioned in the background technology, according to one aspect of the embodiments of the present application, an embodiment of a texture production method is provided.

[0059] Optionally, in the embodiment of the present application, the above-mentioned mapping method can be applied to Figure 1 In the hardware environment composed of the terminal 101 and the server 103 shown in FIG. Figure 1 As shown, the server 103 is connected to the terminal 101 via a network, and can be used to provide services (such as texture baking, texture production, etc.) for the terminal or the client installed on the terminal. A database 105 can be set on the server or independently of the server to provide data storage services for the server 103. The above-mentioned network includes but is not limited to: wide area network, metropolitan area network or local area network, and the terminal 101 includes but is not limited to PC, mobile phone, tablet computer, etc.

[0060] A sticker making method in the embodiment of the present application can be executed by the server 103, or can be executed by the server 103 and the terminal 101 together, such as Figure 2 As shown, the method may include the following steps:

[0061] Step S202: determining a target object for which a texture is to be created, and baking a first texture of the target object, wherein the first texture is used to record inherent color information of the target object;

[0062] Step S204, adding ambient occlusion light and concave-convex information to the first map to obtain a second map;

[0063] Step S206, adding a texture effect and a color block effect to the second map, so as to add texture details and color details to the second map, thereby obtaining a third map;

[0064] Step S208, when the detail feature of the third map reaches the first target threshold, adding light and shadow effects to the third map to obtain a fourth map;

[0065] Step S210, synthesizing the first map, the second map, the third map, and the fourth map to obtain a base color map and a roughness map of the target object, exporting the base color map and the roughness map and inputting the base color map and the roughness map into a preset block model, and obtaining a hand-painted style map of the target object output by the preset block model.

[0066] This application optimizes the texture production process, especially the hand-painted texture production process, through steps S202 to S210, thereby improving the production efficiency of hand-painted textures, and further enhances the color block effect by using a preset color block model, thereby reducing the effect differences of objects in the same environment.

[0067] In step S202, the target object is an object displayed in the game, such as a person, a building, flowers, a mountain, a stream, etc. Baking refers to saving the light and dark information of the object's lighting to the texture. During real-time rendering, lighting calculations are no longer performed, but pre-generated lighting textures are used to represent various effects. Baking technology eliminates the need for lighting calculations and can increase rendering speed. The above-mentioned first map is used to record the inherent color information of the target object, that is, the first map can be the inherent color map of the target object. The inherent color map records the sum of the color effects presented by the object under white sunlight. To bake the inherent color map, the following steps can be followed:

[0068] Step 1: illuminate the target object with a uniform white light source and capture an image of the target object with a virtual camera;

[0069] Step 2: remove the shadows in the image to obtain the intrinsic color map.

[0070] In step S204, adding ambient occlusion light and bump information to the first map to obtain a second map specifically includes the following steps:

[0071] Step 1: Add ambient occlusion light to the first map to obtain a first intermediate map. Specifically: bake out the ambient occlusion map of the target object; put the ambient occlusion map in the base color channel of the first newly created layer, and mix the colors of the corresponding pixels of the ambient occlusion map and the first map in the base color channel of the first newly created layer, wherein the color of the pixel on the first map is used as the base color, and the color of the pixel on the ambient occlusion map is used as the mixed color. The base color and the mixed color are mixed to obtain the result color, and the base color channel is the rendering channel in the map making tool; save the result color obtained by mixing each pixel in the first newly created layer to obtain the first intermediate map.

[0072] In an embodiment of the present application, a texture can be made based on a texture creation tool such as Substance Painter. The base color channel is a rendering channel in the texture creation tool. Ambient occlusion light is added to the first texture to obtain a first intermediate texture. A first new layer is created, and the occlusion map and ambient occlusion map baked using the target object are placed in the base color channel of the first new layer. The ambient occlusion map and the first texture (intrinsic color map) are mixed in the base color channel of the first new layer, such as by multiplying, to obtain a first intermediate texture. The ambient occlusion map is used to draw the effect of blocking the surrounding diffuse light when objects intersect or are close to each other. It mainly achieves better image details by improving shadows. After the model is made, the ambient occlusion map is not directly attached to the material ball, but the intrinsic color is drawn. For example, if it is placed on the intrinsic color material in the form of multiplying on the ambient occlusion map, the light and dark of the object will be more realistic. Multiply is a blending mode in computer graphics software such as Adobe Photoshop. It exists in the darkening mode group that includes color blending modes, channel blending modes, and layer blending modes, and is a frequently used darkening mode. Multiply multiplies the base color with the blended color. The resulting color is always a darker color. Any color multiplied with black produces black, while any color multiplied with white remains unchanged. When painting with colors other than black or white, continuous strokes drawn with painting tools produce gradually darkening colors. In this step, placing the ambient occlusion map on the base color channel of the first newly created layer actually uses the ambient occlusion map as the intrinsic color of the first newly created layer. The intrinsic color of the first map is then multiplied with the intrinsic color of the first newly created layer to produce the first intermediate map.

[0073] Step 2: Add a bump texture to the first intermediate map to obtain a second intermediate map. Specifically: bake out the curvature map of the target object; place the curvature map on the base color channel of the second new layer and overlay it with the first intermediate map to obtain the second intermediate map.

[0074] In an embodiment of the present application, a curvature map is a texture that stores the convexity / concavity of a mesh, which can be used to cover areas where the surface will be more worn or where subsurface scattering may occur (convex surfaces), where more dirt may accumulate (concave surfaces), to check the continuity of the surface, etc. The curvature map allows the extraction and storage of convex and concave information. Black values ​​represent concave areas, white values ​​represent convex areas, and gray values ​​represent neutral / flat areas. The step of obtaining the second intermediate map is to create a second new layer, and place the curvature map of the target object on the base color channel of the second new layer. The rendering mode of the base color channel is selected as overlay, and the curvature map and the above-mentioned first intermediate map are superimposed on the base color channel of the second new layer to obtain the second intermediate map.

[0075] Step 3: Use the inverted information of the ambient occlusion light to perform roughness filtering on the second intermediate map to obtain the third intermediate map. Specifically: invert the ambient occlusion map to obtain the first inverted map; place the first inverted map on the roughness channel of the third newly created layer to perform roughness filtering on the second intermediate map to obtain the third intermediate map.

[0076] In this embodiment of the present application, the roughness channel is the rendering channel of a layer in the texture creation tool. The step of obtaining the third intermediate map is to create a third new layer, invert the original occlusion map and ambient occlusion map to obtain a first inverted map, then place the first inverted map on the roughness channel of the third new layer, select Filter as the rendering mode, and perform a roughness filter on the first inverted map and the second intermediate map in the roughness channel of the third new layer to obtain the third intermediate map.

[0077] Step 4, use the inverted information of the bump texture to perform roughness screening or superposition on the third intermediate map to obtain a second map. Specifically: when the roughness of the target object is within the first range, invert the curvature map to obtain a second inverted map, and place the second inverted map on the roughness channel of the fourth newly created layer to perform roughness screening on the third intermediate map to obtain the second map; or, when the roughness of the target object is within the second range, invert the curvature map to obtain a second inverted map, and place the second inverted map on the roughness channel of the fourth newly created layer to perform roughness superposition with the third intermediate map to obtain the second map.

[0078] In the embodiment of the present application, the step of obtaining the second map is to create a fourth new layer, and invert the original curvature map to obtain a second inverted map, and then place the second inverted map on the roughness channel of the fourth new layer, select filtering or overlay in the rendering mode, and filter or overlay the second inverted map and the third intermediate map in the roughness channel of the fourth new layer to obtain the second map. Whether to filter or overlay can be selected according to the effect, specifically: if the overall roughness of the object (target object) is grayish white, filtering can be used, such as stone and wood; if the overall roughness of the object is dark gray and black, overlay can be used, such as metal, mainly based on the roughness of the object in the actual scene. The specific division of the above-mentioned first range and second range can be set according to actual conditions.

[0079] In step S206, a texture effect and a color block effect are added to the second map to add texture details and color details on the basis of the second map, and the third map is obtained, including:

[0080] Step 1: Create a first fill layer for the second map and determine the base color and roughness of the first fill layer to add texture to the surface of the second map.

[0081] Step 2, adding a first mask to the first fill layer to add a color block effect to the texture through the first mask to obtain a third map;

[0082] Step 3, when the detail characteristic degree of the surface details added to the second map by the third map does not reach the first target threshold, continue to create a new first fill layer, add texture and color block effect to the new first fill layer, and use the new first fill layer as another third map to continue adding surface details to the second map, until the detail characteristic degree of the surface details added to the second map reaches the first target threshold, and then save all the third maps.

[0083] In this embodiment of the present application, a mask can be added to enhance the surface details of the second map to create a blocky, hand-painted effect. Adding a mask requires creating a new fill layer for the second map. After adding the mask, the parameters of the first mask can be adjusted using the Blur Slope filter. A directional blur filter can also be added to the first mask, adjusting the parameters of the first mask based on the blur effect. Finally, a Sharpen filter can be added to enhance contrast and sharpen the image. Finally, the first fill layer is saved as a third map. The third map obtained through the above steps can be used to add surface details to the second map. The detail characteristic of the surface details can be expressed using factors such as resolution and the number of display elements. If the detail characteristic of the surface details added to the second map by the third map does not reach a first target threshold, new fill layers can be repeatedly created and texture and blocky effects can be added to the new fill layers. This new fill layer can then be used as a new third map to further enrich the surface details of the second map. Ultimately, when the detail characteristic of the surface details added to the second map by all third maps reaches the first target threshold, all third maps are saved. The first target threshold can be set according to the actual situation. Figure 3 shown.

[0084] In step S208, when the detail feature of the third map reaches the first target threshold, light and shadow effects are added to the third map to obtain a fourth map including:

[0085] Step 1: Create a second fill layer for the third map and determine the base color and roughness of the second fill layer.

[0086] Step 2: Add a second mask and lighting to the second fill layer to add light and shadow effects to obtain the fourth map.

[0087] In this embodiment of the present application, light and shadow effects can be added to the surface of the third texture by adding a mask. Adding a mask requires creating a new fill layer for the third texture. After adding a mask to the second fill layer, the second fill layer is saved as a fourth texture, so that the fourth texture can be used to add light and shadow effects to the third texture.

[0088] In the embodiment of the present application, the transparency values ​​of all maps can be changed in percentage according to the effect.

[0089] In an embodiment of the present application, adding texture effects and color block effects and adding light and shadow effects can be performed simultaneously, such as copying the second map to obtain a copy of the second map, adding texture effects and color block effects on a second map, and adding light and shadow effects on the copy of the second map. It is also possible to first add light and shadow effects to the second map, and then add texture effects and color block effects.

[0090] In step S210, in order to improve the color block effect of the fourth map, optimize the production effect of the map production tool, and reduce the difference in the hand-painted style display effect, the first map, the second map, the third map and the fourth map can be synthesized based on the above-mentioned first map, the second map, the third map and the fourth map to obtain the base color map and the roughness map of the target object, and the base color map and the roughness map are input into the preset color block model to obtain the hand-painted style map of the target object output by the preset color block model. The preset color block model can be the color block module in the Photoshop software. The hand-painted style map output by the final preset color block model can be as follows Figure 4 As shown, Figure 4 The two pictures on the left show the hand-drawn wind texture effects of the model alone, and the one on the right shows the hand-drawn wind texture display effect of the model in the actual game scene.

[0091] Specifically, the base color map and roughness map of the target object are obtained by synthesizing the first map, the second map, the third map and the fourth map. Figure 1 Combine them to get the base color map and roughness map of the target object. In addition, if there are multiple third maps, all third maps need to be combined. Figure 1 Synthesis.

[0092] The above-mentioned texture production method provided in this application can exist as a plug-in. After adding and running the plug-in in the texture production software, hand-painted style textures can be automatically generated according to user needs.

[0093] This application improves the efficiency of hand-painted style texture production and reduces the effect differences of objects in the same environment by optimizing the texture production process, especially optimizing the texture production process of hand-painted style textures.

[0094] According to another aspect of the embodiment of the present application, Figure 5 As shown, a map making device is provided, comprising:

[0095] The first production module 501 is used to determine the target object for which a texture is to be produced, and bake out a first texture of the target object, wherein the first texture is used to record the intrinsic color information of the target object;

[0096] The second production module 503 is used to add ambient occlusion light and concave-convex information to the first texture to obtain a second texture;

[0097] The third production module 505 is used to add a texture effect and a color block effect to the second map, so as to add texture details and color details to the second map to obtain a third map;

[0098] A fourth production module 507 is configured to add light and shadow effects to the third texture to obtain a fourth texture when the detail feature of the third texture reaches a first target threshold;

[0099] The fifth production module 509 is used to synthesize the first map, the second map, the third map and the fourth map to obtain the base color map and the roughness map of the target object, export the base color map and the roughness map and input the base color map and the roughness map into a preset color block model to obtain a hand-painted style map of the target object output by the preset color block model.

[0100] It should be noted that the first production module 501 in this embodiment can be used to execute step S202 in the embodiment of the present application, the second production module 503 in this embodiment can be used to execute step S204 in the embodiment of the present application, the third production module 505 in this embodiment can be used to execute step S206 in the embodiment of the present application, the fourth production module 507 in this embodiment can be used to execute step S208 in the embodiment of the present application, and the fifth production module 509 in this embodiment can be used to execute step S210 in the embodiment of the present application.

[0101] It should be noted that the examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the contents disclosed in the above embodiments. Figure 1 In the hardware environment shown, it can be implemented by software or by hardware.

[0102] Optionally, the second production module is specifically configured to:

[0103] Add ambient occlusion light to the first map to get the first intermediate map;

[0104] Adding a bump texture to the first intermediate map to obtain a second intermediate map;

[0105] The second intermediate map is roughness-filtered using the inverse information of the ambient occlusion light to obtain the third intermediate map.

[0106] The third intermediate map is subjected to roughness screening or superposition using the inverse information of the concave-convex texture to obtain the second map.

[0107] Optionally, the second production module is further used to:

[0108] Bake out the ambient occlusion map of the target object;

[0109] Place the ambient occlusion map in the base color channel of the first newly created layer, and blend the colors of the corresponding pixels of the ambient occlusion map and the first map in the base color channel of the first newly created layer. The color of the pixel on the first map is used as the base color, and the color of the pixel on the ambient occlusion map is used as the blend color. The base color and the blend color are blended to obtain the resulting color. The base color channel is the rendering channel in the texture creation tool.

[0110] Save the resulting color of each pixel mixed in the first newly created layer to obtain the first intermediate map.

[0111] Optionally, the second production module is further used to:

[0112] Bake out the curvature map of the target object;

[0113] Place the curvature map on the color channel of the second newly created layer and overlay it with the first intermediate map to obtain the second intermediate map.

[0114] Optionally, the second production module is further used to:

[0115] Invert the ambient occlusion map to obtain a first inverted map;

[0116] Place the first inverted map on the roughness channel of the third newly created layer and perform roughness filtering on the second intermediate map to obtain the third intermediate map.

[0117] Optionally, the second production module is further used to:

[0118] When the roughness of the target object is within the first range, the curvature map is inverted to obtain a second inverted map, and the second inverted map is placed on the roughness channel of the fourth newly created layer to perform roughness screening on the third intermediate map to obtain a second map; or

[0119] When the roughness of the target object is in the second range, the curvature map is inverted to obtain a second inverted map, and the second inverted map is placed on the roughness channel of the fourth newly created layer and superimposed with the third intermediate map to obtain the second map.

[0120] Optionally, the third production module is specifically configured to:

[0121] Create a first fill layer for the second map and determine the base color and roughness of the first fill layer to add texture to the surface of the second map;

[0122] Add a first mask to the first fill layer to add a block effect to the texture through the first mask to obtain the third map;

[0123] When the detail characteristic degree of the surface details added to the second map by the third map does not reach the first target threshold, continue to create a new first fill layer, add texture and color block effect to the new first fill layer, and use the new first fill layer as another third map to continue adding surface details to the second map, until the detail characteristic degree of the surface details added to the second map reaches the first target threshold, and then save all the third maps.

[0124] Optionally, the fourth production module is specifically configured to:

[0125] Create a second fill layer for the third map and determine the base color and roughness of the second fill layer;

[0126] Add a second mask and light to the second fill layer to add light and shadow effects to get the fourth map.

[0127] This application improves the efficiency of hand-painted style texture production and reduces the effect differences of objects in the same environment by optimizing the texture production process, especially optimizing the texture production process of hand-painted style textures.

[0128] According to another aspect of the embodiment of the present application, the present application provides an electronic device, such as Figure 6 As shown, it includes a memory 601, a processor 603, a communication interface 605 and a communication bus 607. The memory 601 stores a computer program that can be run on the processor 603. The memory 601 and the processor 603 communicate through the communication interface 605 and the communication bus 607. When the processor 603 executes the computer program, the steps of the above method are implemented.

[0129] The memory and processor in the electronic device communicate via a communication bus and a communication interface. The communication bus may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The communication bus may be divided into an address bus, a data bus, a control bus, and the like.

[0130] The memory may include random access memory (RAM) or non-volatile memory, such as at least one disk storage. Alternatively, the memory may be at least one storage device located away from the processor.

[0131] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can 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, and discrete hardware components.

[0132] According to another aspect of the embodiments of the present application, a computer program product or computer program is provided, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the steps of any of the above embodiments.

[0133] Optionally, in an embodiment of the present application, the computer-readable medium is configured to store program codes for the processor to execute the following steps:

[0134] Determine a target object for which a texture is to be created, and bake out a first texture of the target object, wherein the first texture is used to record inherent color information of the target object;

[0135] Add ambient occlusion light and bump information to the first map to get the second map;

[0136] Adding a texture effect and a color block effect to the second map to add texture details and color details on the basis of the second map to obtain a third map;

[0137] When the detail feature of the third map reaches the first target threshold, adding light and shadow effects to the third map to obtain a fourth map;

[0138] Based on the first map, the second map, the third map and the fourth map are synthesized to obtain a base color map and a roughness map of the target object, the base color map and the roughness map are exported and the base color map and the roughness map are input into a preset color block model to obtain a hand-painted style map of the target object output by the preset color block model.

[0139] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment will not be described in detail here.

[0140] When implementing the embodiments of the present application, reference may be made to the above embodiments, which have corresponding technical effects.

[0141] It is understood that the embodiments described herein may be implemented using hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit may be implemented in one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described herein, or a combination thereof.

[0142] For software implementation, the technology described herein can be implemented by a unit that performs the functions described herein. The software code can be stored in a memory and executed by a processor. The memory can be implemented in the processor or outside the processor.

[0143] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0144] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

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

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

[0147] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0148] If the functions are implemented in the form of 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 solutions of the embodiments of the present application are essentially or partly contributed to the prior art or part of the technical solutions can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard drive, a ROM, a RAM, a magnetic disk, or an optical disk. It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such a process, method, article or device. Without further constraints, an element defined by the phrase "comprises a..." does not preclude the existence of additional identical elements in the process, method, article or apparatus that includes the element.

[0149] The foregoing is merely a list of specific embodiments of the present application, intended to enable those skilled in the art to understand or implement the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application is not limited to the embodiments shown herein, but is intended to conform to the broadest scope consistent with the principles and novel features of the present application.

Claims

1. A method for making a map, characterized in that: include: Determine a target object for which a texture is to be produced, and bake a first texture of the target object, wherein the first texture is used to record inherent color information of the target object; Adding ambient occlusion light and bump information to the first map to obtain a second map; Adding a texture effect and a color block effect to the second map to add texture details and color details to the second map, thereby obtaining a third map; When the detail feature of the third map reaches a first target threshold, adding light and shadow effects to the third map to obtain a fourth map; synthesizing the first, second, third, and fourth maps to obtain a base color map and a roughness map of the target object, deriving the base color map and the roughness map, and inputting the base color map and the roughness map into a preset faceting model to obtain a hand-painted style map of the target object output by the preset faceting model; The step of adding ambient occlusion light and bump information to the first map to obtain the second map includes: adding ambient occlusion light to the first map to obtain a first intermediate map; adding a bump texture to the first intermediate map to obtain a second intermediate map; performing roughness filtering on the second intermediate map using the inverted information of the ambient occlusion light to obtain a third intermediate map; and performing roughness filtering or superimposing on the third intermediate map using the inverted information of the bump texture to obtain the second map.

2. The method according to claim 1, characterized in that Adding ambient occlusion light to the first map to obtain a first intermediate map includes: Bake an ambient occlusion map of the target object; Placing the ambient occlusion map in the base color channel of a first newly created layer, and blending the ambient occlusion map with the colors of corresponding pixels of the first map in the base color channel of the first newly created layer, wherein the color of the pixel on the first map serves as the base color and the color of the pixel on the ambient occlusion map serves as the blended color, the base color and the blended color being blended to produce a resulting color, wherein the base color channel is a rendering channel in the texture creation tool; The resultant color obtained by mixing each pixel in the first newly created layer is saved to obtain the first intermediate map.

3. The method according to claim 2, characterized in that Adding a concave-convex texture on the basis of the first intermediate map to obtain a second intermediate map comprises: Bake a curvature map of the target object; The curvature map is placed on the base color channel of the second newly created layer and is overlaid with the first intermediate map to obtain the second intermediate map.

4. The method according to claim 3, characterized in that The performing roughness screening on the second intermediate map by using the inverse information of the ambient occlusion light to obtain the third intermediate map comprises: Inverting the ambient occlusion map to obtain a first inverted map; The first inverted map is placed on the roughness channel of the third newly created layer, and the second intermediate map is subjected to roughness filtering to obtain the third intermediate map.

5. The method according to claim 4, characterized in that The performing roughness screening or superposition on the third intermediate map by using the inverse information of the concave-convex texture to obtain the second map comprises: When the roughness of the target object is within the first range, the curvature map is inverted to obtain a second inverted map, and the second inverted map is placed on the roughness channel of the fourth newly created layer to perform roughness screening on the third intermediate map to obtain the second map; or When the roughness of the target object is within the second range, the curvature map is inverted to obtain the second inverted map, and the second inverted map is placed on the roughness channel of the fourth newly created layer and is superimposed with the third intermediate map to obtain the second map.

6. The method according to any one of claims 1 to 5, characterized in that: Adding a texture effect and a color block effect to the second map to add texture details and color details to the second map to obtain a third map includes: creating a first fill layer of the second map, and determining a base color and a roughness of the first fill layer to add a texture to a surface of the second map; adding a first mask to the first fill layer, so as to add a block effect to the texture through the first mask, thereby obtaining the third map; If the detail characteristic degree of the surface details added to the second map by the third map does not reach the first target threshold, continue to create a new first fill layer, add texture and color block effect to the new first fill layer, and use the new first fill layer as another third map to continue adding surface details to the second map, until the detail characteristic degree of the surface details added to the second map reaches the first target threshold, and then save all third maps.

7. The method according to claim 6, characterized in that When the detail feature degree of the third map reaches a first target threshold, adding light and shadow effects to the third map to obtain a fourth map includes: creating a second fill layer of the third map, and determining a base color and a roughness of the second fill layer; A second mask and lighting are added to the second fill layer to add light and shadow effects, thereby obtaining the fourth map.

8. A sticker making device, used to implement the sticker making method according to any one of claims 1 to 7, characterized in that: include: A first production module is used to determine a target object for which a texture is to be produced, and bake out a first texture of the target object, wherein the first texture is used to record inherent color information of the target object; A second production module is used to add ambient occlusion light and concave-convex information to the first map to obtain a second map; a third production module, configured to add a texture effect and a color block effect to the second map, so as to add texture details and color details to the second map, thereby obtaining a third map; A fourth production module is configured to add light and shadow effects to the third map to obtain a fourth map when the detail feature of the third map reaches a first target threshold; The fifth production module is used to synthesize the first map, the second map, the third map and the fourth map to obtain the base color map and the roughness map of the target object, export the base color map and the roughness map and input the base color map and the roughness map into a preset color block model to obtain the hand-painted style map of the target object output by the preset color block model.

9. An electronic device comprising a memory, a processor, a communication interface, and a communication bus, wherein the memory stores a computer program that can be run on the processor, and the memory and the processor communicate via the communication bus and the communication interface, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable medium having a non-volatile program code executable by a processor, characterized in that The program code enables the processor to execute the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Mapping generation method and device, electronic equipment and storage medium

    CN111563951A