CN114288671A - Method, device and equipment for making map and computer readable medium - Google Patents
Method, device and equipment for making map and computer readable medium Download PDFInfo
- Publication number
- CN114288671A CN114288671A CN202111657720.1A CN202111657720A CN114288671A CN 114288671 A CN114288671 A CN 114288671A CN 202111657720 A CN202111657720 A CN 202111657720A CN 114288671 A CN114288671 A CN 114288671A
- Authority
- CN
- China
- Prior art keywords
- map
- color
- mapping
- roughness
- target object
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 44
- 230000000694 effects Effects 0.000 claims abstract description 57
- 230000000903 blocking effect Effects 0.000 claims abstract description 54
- 238000004519 manufacturing process Methods 0.000 claims abstract description 47
- 230000002194 synthesizing effect Effects 0.000 claims abstract description 9
- 238000013507 mapping Methods 0.000 claims description 93
- 238000012216 screening Methods 0.000 claims description 22
- 238000004891 communication Methods 0.000 claims description 18
- 238000009877 rendering Methods 0.000 claims description 9
- 239000003086 colorant Substances 0.000 claims description 8
- 238000004590 computer program Methods 0.000 claims description 8
- 238000005286 illumination Methods 0.000 claims description 8
- 230000007613 environmental effect Effects 0.000 claims description 7
- 230000000873 masking effect Effects 0.000 claims description 5
- 238000012545 processing Methods 0.000 description 6
- 238000010586 diagram Methods 0.000 description 5
- 230000008569 process Effects 0.000 description 5
- 239000007787 solid Substances 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 4
- 230000009471 action Effects 0.000 description 3
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 238000004364 calculation method Methods 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 230000008030 elimination Effects 0.000 description 2
- 238000003379 elimination reaction Methods 0.000 description 2
- 239000000463 material Substances 0.000 description 2
- 238000013459 approach Methods 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 238000004422 calculation algorithm Methods 0.000 description 1
- 150000001875 compounds Chemical class 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 230000001795 light effect Effects 0.000 description 1
- 239000002184 metal Substances 0.000 description 1
- 239000000203 mixture Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000007935 neutral effect Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 239000004575 stone Substances 0.000 description 1
- 239000000126 substance Substances 0.000 description 1
- 239000002023 wood Substances 0.000 description 1
Images
Landscapes
- Image Generation (AREA)
- Processing Or Creating Images (AREA)
Abstract
The application relates to a method, a device, equipment and a computer readable medium for making a map. The method comprises the following steps: determining a target object to be subjected to chartlet making, and baking a first chartlet of the target object, wherein the first chartlet is used for recording the inherent color information of the target object; adding environment shielding light and concave-convex information on the first map to obtain a second map; adding a texture effect and a color blocking effect on the second map to obtain a third map; under the condition that the detail feature degree of the third map reaches a first target threshold value, adding a light and shadow effect on the third map to obtain a fourth map; and synthesizing based on 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, deriving the base color map and the roughness map, inputting the base color map and the roughness map into a preset color blocking model, and obtaining the hand-drawn wind map of the target object output by the preset color blocking model. The method and the device improve the manufacturing efficiency of the hand-painted wind map.
Description
Technical Field
The present application relates to the field of three-dimensional computer graphics technologies, and in particular, to a method, an apparatus, a device, and a computer readable medium for producing a map.
Background
Stylized charting is frequently used in games, advertisements, movie works, and short videos, such as hand-drawn photographs, cartoon photographs, and the like. In the game production, the unification of the game style is also important, for example, in the game of the Gaboruck style, models, scenes, light effects and the like in the game are correspondingly produced into a map of the Gaboruck style, and in the game of the quadratic element type, each map in the game is produced into the quadratic element style.
At present, in the related art, uniform production of a chartlet style can be realized through a generator of a game engine, however, the generator cannot enable all objects in the whole chartlet to have the same effect completely, and for effect differences among the objects, additional difference elimination is required, so that production efficiency of a stylized chartlet is low, and game development progress is seriously affected even.
Aiming at the problem of low manufacturing efficiency of the stylized chartlet, no effective solution is provided at present.
Disclosure of Invention
The application provides a method, a device and equipment for making a chartlet and a computer readable medium, which are used for solving the technical problem of low making efficiency of a stylized chartlet.
According to an aspect of an embodiment of the present application, there is provided a method for making a map, including:
determining a target object to be subjected to chartlet making, and baking a first chartlet of the target object, wherein the first chartlet is used for recording inherent color information of the target object;
adding environment shielding light and concave-convex information on the first map to obtain a second map;
adding a texture effect and a color blocking effect on the second map so as to add texture details and color details on the basis of the second map to obtain a third map;
under the condition that the detail feature degree of the third map reaches a first target threshold value, adding a light and shadow effect on the third map to obtain a fourth map;
and synthesizing based on 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, deriving the base color map and the roughness map, inputting the base color map and the roughness map into a preset color blocking model, and obtaining the hand-drawn wind map of the target object output by the preset color blocking model.
Optionally, adding the ambient light shielding light and the concave-convex information to the first map, and obtaining the second map includes:
adding environmental shielding light on the basis of the first map to obtain a first intermediate map;
adding concave-convex textures on the basis of the first middle map to obtain a second middle map;
carrying out roughness screening on the second intermediate mapping by using the reversed phase information of the environment shielding light to obtain a third intermediate mapping;
and carrying out roughness screening or superposition on the third middle chartlet by utilizing the inverse information of the concave-convex texture to obtain a second chartlet.
Optionally, adding an environmental shield to the first map to obtain a first intermediate map includes:
baking out an ambient light shielding map of the target object;
placing the ambient light shielding map in a primary color channel of the first newly-built map layer, and mixing the colors of corresponding pixels of the ambient light shielding map and the first map in the primary color channel of the first newly-built map layer, wherein the color of the pixel on the first map is used as a primary color, the color of the pixel on the ambient light shielding map is used as a mixed color, the primary color and the mixed color are mixed to obtain a result color, and the primary color channel is a rendering channel in the map making tool;
and storing the result color obtained by mixing each pixel in the first newly-built layer to obtain a first intermediate map.
Optionally, adding a concave-convex texture to the first intermediate map to obtain a second intermediate map includes:
baking out a curvature map of the target object;
and placing the curvature mapping on a base color channel of the second newly-built layer to perform base color superposition with the first middle mapping to obtain a second middle mapping.
Optionally, the roughness screening is performed on the second intermediate map by using inverse information of the environmental shielding light, and obtaining a third intermediate map includes:
inverting the ambient light shielding map to obtain a first inverted map;
and placing the first reverse mapping on a roughness channel of the third newly-built layer to perform roughness screening on the second middle mapping to obtain a third middle mapping.
Optionally, the roughness screening or superimposing is performed on the third intermediate map by using the inverse information of the concave-convex texture, and obtaining the second map includes:
under the condition that the roughness of the target object is in a first range, inverting the curvature mapping to obtain a second inverted mapping, and placing the second inverted mapping on a roughness channel of a fourth newly-built mapping layer to perform roughness screening on a third middle mapping to obtain a second mapping; or,
and under the condition that the roughness of the target object is in a second range, inverting the curvature mapping to obtain a second inverted mapping, and placing the second inverted mapping on a roughness channel of a fourth newly-built mapping layer to overlap the roughness of a third middle mapping to obtain a second mapping.
Optionally, adding a texture effect and a color blocking effect on the second map to add texture details and color details on the basis of the second map, and obtaining a third map includes:
creating a first filling layer of the second map, and determining the basic color and the roughness of the first filling layer so as to add textures on the surface of the second map;
adding a first mask to the first filling image layer to add a color blocking effect to the texture through the first mask to obtain a third pasting image;
and under the condition that the detail feature degree of the surface detail added for the second map by the third map does not reach a first target threshold value, continuously creating a new first filling map layer, adding texture and color blocking effects to the new first filling map layer, and continuously adding the surface detail for the second map by taking the new first filling map layer as another third map until the detail feature degree of the surface detail added for the second map reaches the first target threshold value, and storing all the third maps.
Optionally, when the detail feature degree of the third map reaches the first target threshold, adding a light and shadow effect to the third map, and obtaining a fourth map includes:
creating a second filling layer of the third map, and determining the basic color and the roughness of the second filling layer;
and adding a second mask and illumination for the second filling layer to add a light and shadow effect to obtain a fourth map.
According to another aspect of the embodiments of the present application, there is provided a map making apparatus, including:
the first production module is used for determining a target object of a map to be produced and baking a first map of the target object, wherein the first map is used for recording the inherent color information of the target object;
the second manufacturing module is used for adding environment shielding light and concave-convex information on the first map to obtain a second map;
the third production module is used for adding a texture effect and a color blocking effect on the second map so as to add texture details and color details on the basis of the second map to obtain a third map;
the fourth manufacturing module is used for adding a light and shadow effect to the third map to obtain a fourth map under the condition that the detail feature degree of the third map reaches the first target threshold;
and the fifth manufacturing module is used for 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, deriving the base color map and the roughness map, inputting the base color map and the roughness map into the preset color blocking model, and obtaining the hand-drawn wind map of the target object output by the preset color blocking model.
According to another aspect of the embodiments of the present application, there is provided an electronic device, including a memory, a processor, a communication interface, and a communication bus, where the memory stores a computer program executable on the processor, and the memory and the processor communicate with each other through the communication bus and the communication interface, and the processor implements the steps of the method when executing the computer program.
According to another aspect of embodiments of the present application, there is also provided a computer readable medium having non-volatile program code executable by a processor, the program code causing the processor to perform the above-mentioned method.
Compared with the related art, the technical scheme provided by the embodiment of the application has the following advantages:
the method comprises the steps of determining a target object to be subjected to chartlet making, and baking a first chartlet of the target object, wherein the first chartlet is used for recording inherent color information of the target object; adding environment shielding light and concave-convex information on the first map to obtain a second map; adding a texture effect and a color blocking effect on the second map so as to add texture details and color details on the basis of the second map to obtain a third map; under the condition that the detail feature degree of the third map reaches a first target threshold value, adding a light and shadow effect on the third map to obtain a fourth map; and synthesizing based on 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, deriving the base color map and the roughness map, inputting the base color map and the roughness map into a preset color blocking model, and obtaining the hand-drawn wind map of the target object output by the preset color blocking model. According to the method and the device, the manufacturing process of the map is optimized, particularly the manufacturing process of the hand-painted wind map is optimized, the manufacturing efficiency of the hand-painted wind map is improved, the colored blocking effect is further enhanced through the preset colored blocking model, and the effect difference of objects in the same environment is reduced.
Drawings
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 application.
In order to more clearly illustrate the technical solutions in the embodiments or related technologies of the present application, the drawings needed to be used in the description of the embodiments or related technologies will be briefly described below, and it is obvious for those skilled in the art to obtain other drawings without any creative effort.
FIG. 1 is a diagram illustrating an alternative mapping method hardware environment according to an embodiment of the present application;
FIG. 2 is a schematic flow chart illustrating an alternative charting method according to an embodiment of the present disclosure;
FIG. 3 is a schematic diagram illustrating a comparison of an alternative detail enrichment map according to an embodiment of the present application;
FIG. 4 is a diagram illustrating results of an alternative hand-drawn wind map according to an embodiment of the present application;
FIG. 5 is a block diagram of an alternative charting apparatus according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of an alternative electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In the following description, suffixes such as "module", "component", or "unit" used to denote elements are used only for the convenience of description of the present application, and have no specific meaning in themselves. Thus, "module" and "component" may be used in a mixture.
In the related art, uniform production of the chartlet style can be realized through a generator of a game engine, however, the generator cannot enable all objects in the whole chartlet to have the same effect completely, and for effect difference among the objects, extra difference elimination is needed, so that production efficiency of the stylized chartlet is low, and even game development progress is seriously influenced.
To solve the problems mentioned in the background, according to an aspect of the embodiments of the present application, an embodiment of a method for making a chartlet is provided.
Alternatively, in the embodiment of the present application, the above-described map making method may be applied to a hardware environment formed by the terminal 101 and the server 103 as shown in fig. 1. As shown in fig. 1, a server 103 is connected to a terminal 101 through a network, which may be used to provide services (such as charting, etc.) for the terminal or a client installed on the terminal, and a database 105 may be provided on the server or separately from the server, and may be used to provide data storage services for the server 103, and the 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 a PC, a cell phone, a tablet computer, and the like.
In the embodiment of the present application, a method for making a map may be executed by the server 103, or may be executed by both the server 103 and the terminal 101, as shown in fig. 2, the method may include the following steps:
step S202, determining a target object to be subjected to chartlet making, and baking a first chartlet of the target object, wherein the first chartlet is used for recording the inherent color information of the target object;
step S204, adding environment shielding light and concave-convex information to the first map to obtain a second map;
step S206, adding texture effect and color blocking effect on the second map to add texture detail and color detail on the basis of the second map to obtain a third map;
step S208, adding a light and shadow effect to the third map to obtain a fourth map under the condition that the detail feature degree of the third map reaches a first target threshold;
and step S210, synthesizing based on 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, deriving the base color map and the roughness map, inputting the base color map and the roughness map into a preset color blocking model, and obtaining the hand-drawn wind map of the target object output by the preset color blocking model.
Through the steps S202 to S210, the production process of the map is optimized, particularly the production process of the hand-drawn wind map is optimized, the production efficiency of the hand-drawn wind map is improved, the color blocking effect is further enhanced through the preset color blocking model, and the effect difference of objects in the same environment is reduced.
In step S202, the target object is an object displayed in the game, such as a character, a building, a flower, a mountain stream, or the like. Baking means that the illumination and darkness information of the object is stored in the texture, illumination calculation is not performed when the object is drawn in real time, and the illumination texture generated in advance is used for representing various effects. The baking technology saves illumination calculation, and can improve the drawing speed. The first map is used to record the inherent color information of the target object, that is, the first map may be the inherent color map of the target object. The solid color mapping is the sum of color effects of objects appearing under the record of white sunlight, and the solid color mapping is baked according to the following steps:
step 1, adopting a uniform white light source to irradiate the target object, and capturing an image of the target object through a virtual camera;
and 2, removing the shadow in the image to obtain the solid color mapping.
In step S204, adding the ambient light blocking light and the concave-convex information to the first map to obtain a second map specifically includes the following steps:
step 1, adding environmental shielding light on the basis of the first map to obtain a first middle map, specifically: baking out an ambient light shielding map of the target object; placing the ambient light shielding map in a primary color channel of the first newly-built map layer, and mixing the colors of corresponding pixels of the ambient light shielding map and the first map in the primary color channel of the first newly-built map layer, wherein the color of the pixel on the first map is used as a primary color, the color of the pixel on the ambient light shielding map is used as a mixed color, the primary color and the mixed color are mixed to obtain a result color, and the primary color channel is a rendering channel in the map making tool; and storing the result color obtained by mixing each pixel in the first newly-built layer to obtain a first intermediate map.
In this embodiment of the application, a Map may be manufactured based on a Map manufacturing tool such as a Substance Painter, where a base color channel is a rendering channel in the Map manufacturing tool, and an Ambient light mask is added on the basis of a first Map to obtain a first middle Map, that is, a first reconstruction Map layer is created, and an Occlusion Map (Occlusion Map) and an Ambient light mask Map (Ambient light mask Map) baked by a target object are placed in a base color channel (base color) of the first reconstruction Map layer, and the Ambient light mask Map and the first Map (fixed color Map) are mixed in the base color channel of the first reconstruction Map layer, for example, a positive plate is folded to obtain the first middle Map. The ambient light mask map is used to draw the effect of blocking ambient diffuse reflected light when an object intersects or approaches the object, mainly by improving shadows to achieve better image details. After the model is made, the ambient light shielding chartlet is not directly pasted on the material ball, but solid colors are drawn, and if the ambient light shielding chartlet is placed on the solid color material in a positive film bottom-on-bottom mode, the light and shade of an object can be more real. The positive film overlay is a mixed mode in computer graphic image software such as Adobe Photoshop, exists in a dimming mode group of a color mixed mode, a channel mixed mode and an image layer mixed mode, and is a dimming mode with higher use frequency for users. The positive pile-up is to compound the primary colors with the mixed colors, the result color is always darker color, any color is compounded with black to produce black, any color is compounded with white to keep unchanged, and when drawing with colors other than black or white, the continuous stroke drawn by the drawing tool produces gradually darker color. In this step, the placing of the ambient light masking map on the primary color channel of the first newly created layer actually uses the ambient light masking map as the fixed color of the first newly created layer, and then the fixed color of the first map and the fixed color of the first newly created layer are subjected to positive film bottoming to obtain the first intermediate map.
In the embodiment of the present application, the Curvature Map (Curvature Map) is a texture of the convexity/concavity of the storage grid, and can be used to cover places where more wear occurs on the surface or where scattering of the sub-surface may occur (convex), where more dirt may accumulate (concave), to check the continuity of the surface, and the like. The curvature map allows extraction and storage of relief information. Black values represent concave areas, white values represent convex areas, and grey values represent neutral/flat areas. And the step of obtaining the second intermediate mapping is that a second newly-built layer is created, the curvature mapping of the target object is placed on a primary color channel of the second newly-built layer, the rendering mode of the primary color channel is selected as superposition, and the curvature mapping and the first intermediate mapping are subjected to primary color superposition in the primary color channel of the second newly-built layer to obtain a second intermediate mapping.
Step 3, roughness screening is carried out on the second middle map by utilizing the reversed phase information of the environment shielding light to obtain a third middle map, specifically: inverting the ambient light shielding map to obtain a first inverted map; and placing the first reverse mapping on a roughness channel of the third newly-built layer to perform roughness screening on the second middle mapping to obtain a third middle mapping.
In the embodiment of the application, the roughness channel is a rendering channel of a layer in a mapping tool. And the step of obtaining the third intermediate mapping is to create a third newly-built layer, perform inverse processing on the original shielding mapping and the original ambient light shielding mapping to obtain a first inverse mapping, place the first inverse mapping on a roughness channel of the third newly-built layer, select and screen a rendering mode, and perform roughness screening on the first inverse mapping and the second intermediate mapping in the roughness channel of the third newly-built layer to obtain a third intermediate mapping.
Step 4, utilizing the inverse information of the concave-convex texture to carry out roughness screening or superposition on the third middle map to obtain a second map, specifically: under the condition that the roughness of the target object is in a first range, inverting the curvature mapping to obtain a second inverted mapping, and placing the second inverted mapping on a roughness channel of a fourth newly-built mapping layer to perform roughness screening on a third middle mapping to obtain a second mapping; or, under the condition that the roughness of the target object is in the second range, inverting the curvature map to obtain a second inverted map, and placing the second inverted map on a roughness channel of a fourth newly-built map layer to perform roughness superposition with the third middle map to obtain a second map.
In the embodiment of the application, the step of obtaining the second map is to create a fourth newly created layer, perform inverse processing on the original curvature map to obtain a second inverse map, place the second inverse map on a roughness channel of the fourth newly created layer, select and screen or superimpose a rendering mode, and screen or superimpose the second inverse map and the third middle map in the roughness channel of the fourth newly created layer to obtain the second map. Specifically, the selection is screening or superposition, and may be selected according to the effect, specifically: if the roughness of the object (target object) as a whole is off-white, it can be selected from screens such as stone, wood; if the roughness of the whole object is dark and gray black, superposition, such as metal, can be used, and the judgment is mainly carried out according to the roughness of the object in the actual scene. The specific division of the first range and the second range can be set according to actual conditions.
In step S206, adding a texture effect and a color blocking effect on the second map to add texture details and color details on the basis of the second map, and obtaining a third map includes:
step 1, creating a first filling layer of a second mapping, and determining the basic color and the roughness of the first filling layer to add textures on the surface of the second mapping;
and 3, under the condition that the detail feature degree of the surface detail added for the second map by the third map does not reach a first target threshold value, continuously creating a new first filling map layer, adding texture and color blocking effects to the new first filling map layer, and taking the new first filling map layer as another third map layer to continuously add the surface detail for the second map, and storing all the third maps until the detail feature degree of the surface detail added for the second map reaches the first target threshold value.
In the embodiment of the application, details on the surface of the second map can be processed to have the effect of colored block hand-drawing by adding the mask, and a filling map layer of the second map needs to be newly built by adding the mask. After the mask is added, the parameters of the first mask can be adjusted by an edge Blur filter (blu Slope). And a filter directional Blur (Blur Direction) can be added on the basis of the first mask, parameters of the first mask are adjusted according to a Blur effect, a sharpening filter (sharp) is added finally, the contrast is enhanced, the picture is clearer, and the first filling map 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 feature of the surface detail may be represented using, for example, resolution, number of display elements, etc. And under the condition that the detail feature degree of the surface detail added by the third map for the second map does not reach the first target threshold, repeatedly creating a new filling map layer, and adding texture and color blocking effects to the new filling map layer so as to further take the new filling map layer as a new third map to continue enriching the surface detail of the second map, and finally saving all the third maps when the detail feature degree of the surface detail added by all the third maps for the second map reaches the first target threshold. The first target threshold may be set according to actual conditions. The effect of comparing the details before and after adding the mask is shown in fig. 3.
In step S208, when the detail feature degree of the third map reaches the first target threshold, adding a light and shadow effect to the third map to obtain a fourth map includes:
step 1, creating a second filling layer of a third mapping, and determining the basic color and the roughness of the second filling layer;
and 2, adding a second mask and illumination for the second filling layer to add a light and shadow effect to obtain a fourth map.
In the embodiment of the application, a light and shadow effect can be added to the surface of the third map by adding a mask, and the addition of the mask requires a new filling layer of the third map. After the mask is added to the second filling layer, the second filling layer is saved as a fourth map, so that the fourth map can be used for adding a light and shadow effect to the third map.
In the embodiment of the application, the transparent numerical values of all the maps can be changed by percentage according to the effect.
In the embodiment of the application, the texture effect and the color blocking effect can be added and the light and shadow effect can be added simultaneously, for example, the second map is copied to obtain a copy of the second map, the texture effect and the color blocking effect are added to one second map, the light and shadow effect is added to the copy of the second map, the light and shadow effect can be added to the second map firstly, and then the texture effect and the color blocking effect are added.
In step S210, in order to perfect the blocking effect of the fourth map, optimize the production effect of the map production tool, and reduce the difference of the hand-drawn wind display effect, the first map, the second map, the third map, and the fourth map may be synthesized based on the above-mentioned first map, second map, third map, and 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 blocking model to obtain the hand-drawn wind map of the target object output by the preset blocking model. The preset color blocking model can be a color blocking module in Photoshop software. The hand-drawn wind map output by the final preset color blocking model may be as shown in fig. 4, where two items on the left side of fig. 4 are the hand-drawn wind map effects of the model displayed separately, and the right side is the hand-drawn wind map display effect of the model in the actual game scene.
Specifically, the base color map and the roughness map of the target object are obtained by synthesizing the first map, the second map, the third map and the fourth map, and seven maps in total are synthesized together to obtain the base color map and the roughness map of the target object. In addition, if there are a plurality of third tiles, all the third tiles need to be synthesized together.
The method for making the chartlet can be used as a plug-in, and after the plug-in is added and operated in chartlet making software, the hand-drawing style chartlet can be automatically generated according to the requirements of a user.
According to the method and the device, the manufacturing process of the map is optimized, particularly the manufacturing process of the hand-drawn wind map is optimized, the manufacturing efficiency of the hand-drawn wind map is improved, and the effect difference of objects in the same environment is reduced.
According to another aspect of the embodiments of the present application, as shown in fig. 5, there is provided a map making apparatus including:
a first creating module 501, configured to determine a target object to be created with a map, and bake a first map of the target object, where the first map is used to record inherent color information of the target object;
a second creating module 503, configured to add the environmental shielding light and the concave-convex information to the first map to obtain a second map;
a third production module 505, configured to add a texture effect and a color blocking effect on the second map, so as to add texture details and color details on the basis of the second map, to obtain a third map;
a fourth making module 507, configured to add a light and shadow effect to the third map to obtain a fourth map when the detail feature degree of the third map reaches the first target threshold;
a fifth creating module 509, configured to synthesize 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, derive the base color map and the roughness map, and input the base color map and the roughness map into the preset color blocking model to obtain a hand-drawn wind map of the target object output by the preset color blocking model.
It should be noted that the first fabrication module 501 in this embodiment may be configured to execute the step S202 in this embodiment, the second fabrication module 503 in this embodiment may be configured to execute the step S204 in this embodiment, the third fabrication module 505 in this embodiment may be configured to execute the step S206 in this embodiment, the fourth fabrication module 507 in this embodiment may be configured to execute the step S208 in this embodiment, and the fifth fabrication module 509 in this embodiment may be configured to execute the step S210 in this embodiment.
It should be noted here that the modules described above are the same as the examples and application scenarios implemented by the corresponding steps, but are not limited to the disclosure of the above embodiments. It should be noted that the modules described above as a part of the apparatus may operate in a hardware environment as shown in fig. 1, and may be implemented by software or hardware.
Optionally, the second manufacturing module is specifically configured to:
adding environmental shielding light on the basis of the first map to obtain a first intermediate map;
adding concave-convex textures on the basis of the first middle map to obtain a second middle map;
carrying out roughness screening on the second intermediate mapping by using the reversed phase information of the environment shielding light to obtain a third intermediate mapping;
and carrying out roughness screening or superposition on the third middle chartlet by utilizing the inverse information of the concave-convex texture to obtain a second chartlet.
Optionally, the second production module is further configured to:
baking out an ambient light shielding map of the target object;
placing the ambient light shielding map in a primary color channel of the first newly-built map layer, and mixing the colors of corresponding pixels of the ambient light shielding map and the first map in the primary color channel of the first newly-built map layer, wherein the color of the pixel on the first map is used as a primary color, the color of the pixel on the ambient light shielding map is used as a mixed color, the primary color and the mixed color are mixed to obtain a result color, and the primary color channel is a rendering channel in the map making tool;
and storing the result color obtained by mixing each pixel in the first newly-built layer to obtain a first intermediate map.
Optionally, the second production module is further configured to:
baking out a curvature map of the target object;
and placing the curvature map on a color channel of a second newly-built map layer to perform primary color superposition with the first middle map to obtain a second middle map.
Optionally, the second production module is further configured to:
inverting the ambient light shielding map to obtain a first inverted map;
and placing the first reverse mapping on a roughness channel of the third newly-built layer to perform roughness screening on the second middle mapping to obtain a third middle mapping.
Optionally, the second production module is further configured to:
under the condition that the roughness of the target object is in a first range, inverting the curvature mapping to obtain a second inverted mapping, and placing the second inverted mapping on a roughness channel of a fourth newly-built mapping layer to perform roughness screening on a third middle mapping to obtain a second mapping; or,
and under the condition that the roughness of the target object is in a second range, inverting the curvature mapping to obtain a second inverted mapping, and placing the second inverted mapping on a roughness channel of a fourth newly-built mapping layer to overlap the roughness of a third middle mapping to obtain a second mapping.
Optionally, the third manufacturing module is specifically configured to:
creating a first filling layer of the second map, and determining the basic color and the roughness of the first filling layer so as to add textures on the surface of the second map;
adding a first mask to the first filling image layer to add a color blocking effect to the texture through the first mask to obtain a third pasting image;
and under the condition that the detail feature degree of the surface detail added for the second map by the third map does not reach a first target threshold value, continuously creating a new first filling map layer, adding texture and color blocking effects to the new first filling map layer, and continuously adding the surface detail for the second map by taking the new first filling map layer as another third map until the detail feature degree of the surface detail added for the second map reaches the first target threshold value, and storing all the third maps.
Optionally, the fourth manufacturing module is specifically configured to:
creating a second filling layer of the third map, and determining the basic color and the roughness of the second filling layer;
and adding a second mask and illumination for the second filling layer to add a light and shadow effect to obtain a fourth map.
According to the method and the device, the manufacturing process of the map is optimized, particularly the manufacturing process of the hand-drawn wind map is optimized, the manufacturing efficiency of the hand-drawn wind map is improved, and the effect difference of objects in the same environment is reduced.
According to another aspect of the embodiments of the present application, there is provided an electronic device, as shown in fig. 6, including a memory 601, a processor 603, a communication interface 605 and a communication bus 607, where a computer program operable on the processor 603 is stored in the memory 601, the memory 601 and the processor 603 communicate with each other through the communication interface 605 and the communication bus 607, and the steps of the method are implemented when the processor 603 executes the computer program.
The memory and the processor in the electronic equipment are communicated with the communication interface through a communication bus. The communication bus may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc.
The Memory may include a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the Integrated Circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
There is also provided, in accordance with yet another aspect of an embodiment of the present application, a computer program product or computer program comprising computer instructions stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the computer device to perform the steps of any of the embodiments described above.
Optionally, in an embodiment of the present application, a computer readable medium is configured to store program code for the processor to perform the following steps:
determining a target object to be subjected to chartlet making, and baking a first chartlet of the target object, wherein the first chartlet is used for recording inherent color information of the target object;
adding environment shielding light and concave-convex information on the first map to obtain a second map;
adding a texture effect and a color blocking effect on the second map so as to add texture details and color details on the basis of the second map to obtain a third map;
under the condition that the detail feature degree of the third map reaches a first target threshold value, adding a light and shadow effect on the third map to obtain a fourth map;
and synthesizing based on 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, deriving the base color map and the roughness map, inputting the base color map and the roughness map into a preset color blocking model, and obtaining the hand-drawn wind map of the target object output by the preset color blocking model.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment is not described herein again.
When the embodiments of the present application are specifically implemented, reference may be made to the above embodiments, and corresponding technical effects are achieved.
It is to be understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or any combination thereof. For a hardware implementation, the Processing units may be implemented within 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, micro-controllers, microprocessors, other electronic units configured to perform the functions described herein, or a combination thereof.
For a software implementation, the techniques described herein may be implemented by means of units performing the functions described herein. The software codes may be stored in a memory and executed by a processor. The memory may be implemented within the processor or external to the processor.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical division, and in actual implementation, there may be other divisions, for example, multiple modules or components may be combined or integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application may be essentially implemented or make a contribution to the prior art, or may be implemented in the form of a software product stored in a storage medium and including several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk. It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The above description is merely exemplary of the present application and is presented to enable those skilled in the art to understand and practice the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims (11)
1. A method for making a map is characterized by comprising the following steps:
determining a target object to be subjected to chartlet making, and baking a first chartlet of the target object, wherein the first chartlet is used for recording inherent color information of the target object;
adding environment shielding light and concave-convex information on the first map to obtain a second map;
adding a texture effect and a color blocking effect on the second map so as to add texture details and color details on the basis of the second map to obtain a third map;
adding a light and shadow effect to the third map to obtain a fourth map under the condition that the detail feature degree of the third map reaches a first target threshold;
synthesizing based on 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, deriving the base color map and the roughness map, inputting the base color map and the roughness map into a preset color blocking model, and obtaining a hand-drawn wind map of the target object output by the preset color blocking model.
2. The method of claim 1, wherein the adding of the ambient occlusion light and the bump information to the first map to obtain a second map comprises:
adding environmental shielding light on the basis of the first map to obtain a first intermediate map;
adding concave-convex textures on the basis of the first middle map to obtain a second middle map;
carrying out roughness screening on the second intermediate mapping by using the reverse information of the environment shielding light to obtain a third intermediate mapping;
and carrying out roughness screening or superposition on the third middle map by using the inverse information of the concave-convex texture to obtain the second map.
3. The method of claim 2, wherein adding ambient shielding light on the basis of the first map to obtain a first intermediate map comprises:
baking out an ambient light shielding map of the target object;
placing the ambient light masking map in a primary color channel of a first newly-built map layer, and mixing colors of corresponding pixels of the ambient light masking map and the first map in the primary color channel of the first newly-built map layer, wherein the color of the pixel on the first map is used as a primary color, the color of the pixel on the ambient light masking map is used as a mixed color, the primary color and the mixed color are mixed to obtain a result color, and the primary color channel is a rendering channel in a map making tool;
and storing the result color obtained by mixing each pixel in the first newly-built layer to obtain the first middle map.
4. The method of claim 3, wherein adding a bump texture to the first intermediate map to obtain a second intermediate map comprises:
baking out a curvature map of the target object;
and placing the curvature mapping on a base color channel of a second newly-built layer to perform base color superposition with the first middle mapping to obtain a second middle mapping.
5. The method of claim 4, wherein said coarseness-screening the second intermediate map using inverse information of the ambient occlusion light to obtain a third intermediate map comprises:
inverting the ambient light shielding map to obtain a first inverted map;
and placing the first reverse mapping on a roughness channel of a third newly-built layer to perform roughness screening on the second middle mapping to obtain a third middle mapping.
6. The method according to claim 5, wherein the coarseness screening or superimposing the third intermediate map using the inverse information of the texture of the relief, and obtaining the second map comprises:
under the condition that the roughness of the target object is in a first range, inverting the curvature mapping to obtain a second inverted mapping, and placing the second inverted mapping on a roughness channel of a fourth newly-built mapping layer to perform roughness screening on the third middle mapping to obtain the second mapping; or,
and under the condition that the roughness of the target object is in a second range, inverting the curvature mapping to obtain a second inverted mapping, and placing the second inverted mapping on a roughness channel of the fourth newly-built mapping layer to perform roughness superposition with the third middle mapping to obtain the second mapping.
7. The method according to any one of claims 1 to 6, wherein the adding a texture effect and a color blocking effect on the second map to add texture details and color details on the basis of the second map to obtain a third map comprises:
creating a first filling layer of the second map, and determining the basic color and the roughness of the first filling layer so as to add texture on the surface of the second map;
adding a first mask to the first filling layer to add a color blocking effect to the texture through the first mask to obtain a third pasting picture;
and under the condition that the detail feature degree of the surface detail added for the second map by the third map does not reach the first target threshold value, continuing to create a new first filling map layer, adding texture and color blocking effect to the new first filling map layer, and taking the new first filling map layer as another third map to continue to add the surface detail for the second map until the detail feature degree of the surface detail added for the second map reaches the first target threshold value, and saving all the third maps.
8. The method according to claim 7, wherein the adding a light and shadow effect to the third map when the detail feature degree of the third map reaches a first target threshold, and obtaining a fourth map comprises:
creating a second filling layer of the third map, and determining the basic color and the roughness of the second filling layer;
and adding a second mask and illumination for the second filling layer to add a light and shadow effect to obtain the fourth map.
9. A chartlet making apparatus, comprising:
the first production module is used for determining a target object to be subjected to mapping production and baking a first mapping of the target object, wherein the first mapping is used for recording inherent color information of the target object;
the second manufacturing module is used for adding environment shielding light and concave-convex information on the first map to obtain a second map;
a third production module, configured to add a texture effect and a color blocking 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 manufacturing module, configured to add a light and shadow effect to the third map to obtain a fourth map when the detail feature degree of the third map reaches a first target threshold;
and the fifth manufacturing module is used for 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, deriving the base color map and the roughness map, inputting the base color map and the roughness map into a preset color blocking model, and obtaining the hand-drawn wind map of the target object output by the preset color blocking model.
10. An electronic device comprising a memory, a processor, a communication interface and a communication bus, wherein the memory stores a computer program operable on the processor, and the memory and the processor communicate via the communication bus and the communication interface, wherein the processor implements the steps of the method according to any of the claims 1 to 8 when executing the computer program.
11. A computer-readable medium having non-volatile program code executable by a processor, wherein the program code causes the processor to perform the method of any of claims 1 to 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111657720.1A CN114288671A (en) | 2021-12-30 | 2021-12-30 | Method, device and equipment for making map and computer readable medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111657720.1A CN114288671A (en) | 2021-12-30 | 2021-12-30 | Method, device and equipment for making map and computer readable medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114288671A true CN114288671A (en) | 2022-04-08 |
Family
ID=80973401
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111657720.1A Pending CN114288671A (en) | 2021-12-30 | 2021-12-30 | Method, device and equipment for making map and computer readable medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114288671A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114693885A (en) * | 2022-04-11 | 2022-07-01 | 北京字跳网络技术有限公司 | Three-dimensional virtual object generation method, apparatus, device, medium, and program product |
-
2021
- 2021-12-30 CN CN202111657720.1A patent/CN114288671A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114693885A (en) * | 2022-04-11 | 2022-07-01 | 北京字跳网络技术有限公司 | Three-dimensional virtual object generation method, apparatus, device, medium, and program product |
WO2023197911A1 (en) * | 2022-04-11 | 2023-10-19 | 北京字跳网络技术有限公司 | Three-dimensional virtual object generation method and apparatus, and device, medium and program product |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112316420B (en) | Model rendering method, device, equipment and storage medium | |
Galdran | Image dehazing by artificial multiple-exposure image fusion | |
CN108537861B (en) | Map generation method, device, equipment and storage medium | |
CN109377546B (en) | Virtual reality model rendering method and device | |
CN107749077B (en) | Card ventilation grid shadow rendering method, device, equipment and medium | |
CN107680042B (en) | Rendering method, device, engine and storage medium combining texture and convolution network | |
CN111508052A (en) | Rendering method and device of three-dimensional grid body | |
CN113240783B (en) | Stylized rendering method and device, readable storage medium and electronic equipment | |
CN110866967B (en) | Water ripple rendering method, device, equipment and storage medium | |
CN111402373A (en) | Image processing method and device, electronic equipment and storage medium | |
CN112652046A (en) | Game picture generation method, device, equipment and storage medium | |
US20100141658A1 (en) | Two-dimensional shadows showing three-dimensional depth | |
CN114288671A (en) | Method, device and equipment for making map and computer readable medium | |
CN111311720B (en) | Texture image processing method and device | |
CN111951369B (en) | Detail texture processing method and device | |
CN109859258B (en) | Interface processing method and device and electronic equipment | |
JP7387029B2 (en) | Single-image 3D photography technology using soft layering and depth-aware inpainting | |
CN112465941B (en) | Volume cloud processing method and device, electronic equipment and storage medium | |
CN115761100A (en) | Scene rendering method and device, electronic equipment and storage medium | |
CN114937103A (en) | Model rendering method and device for dynamic effect, electronic equipment and storage medium | |
CN115131480A (en) | Method and device for manufacturing special effect of horse race lamp and electronic equipment | |
CN114549733A (en) | Image processing method, device, equipment and medium | |
CN112907720B (en) | Sea ice data visualization method and device for realistic rendering | |
Hanusch | Texture mapping and true orthophoto generation of 3D objects | |
Zhang et al. | Image Relighting with Object Removal from Single Image. |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |