Ink special effect rendering method and device, storage medium and electronic equipment

By adding target materials to a solid layer and generating a diffusion material layer, and combining it with an edge enhancement layer to synthesize an ink wash diffusion effect, the problem of low production efficiency of ink wash effects is solved, and a simplified production process and high reusability of ink wash effects generation are achieved.

CN116051706BActive Publication Date: 2026-11-27NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211701205.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-28
Publication Date
2026-11-27
Estimated Expiration
2042-12-28

AI Technical Summary

Technical Problem

Current technologies for creating ink-wash special effects are inefficient, difficult, and require complex fluid calculations.

Method used

By adding target material to the first solid layer, a smudged material layer is generated, and a watercolor smudged effect image is synthesized based on the smudged material layer and the edge enhancement layer, avoiding the complex fluid calculation process.

Benefits of technology

It improves the efficiency of ink painting effect production, reduces production costs, and achieves ink painting effects for different materials by replacing target materials, making it easy for new users to learn.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116051706B_ABST
    Figure CN116051706B_ABST
Patent Text Reader

Abstract

The disclosure provides a watercolor special effect rendering method, a watercolor special effect rendering device, a storage medium and an electronic device, and relates to the technical field of image processing. The watercolor special effect rendering method comprises the following steps: adding a target material on a first solid layer to obtain a material layer; mapping a noise wave texture onto the material layer to obtain a gradation material layer; generating a gradation edge strengthening layer based on the gradation material layer; and synthesizing a watercolor gradation effect picture corresponding to the target material based on the gradation edge strengthening layer and the gradation material layer. The disclosure can not only realize a watercolor special effect, but also has high production efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of image processing technology, and in particular to a method, apparatus, computer-readable storage medium, and electronic device for rendering ink-wash special effects. Background Technology

[0002] Special effects rendering can enrich the presentation of images. Among the many rendering effects, ink wash effects can express the characteristics of objects that are both realistic and abstract, thus inspiring rich imagination.

[0003] In related technologies, the creation of ink-wash effects typically utilizes fluid dynamics and particle systems from high-end fluid dynamics software, such as Cinema 4D and Houdini. However, using these advanced fluid dynamics software programs for ink-wash effects requires complex fluid calculations, making the process difficult and resulting in low production efficiency.

[0004] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention

[0005] This disclosure provides a method, apparatus, computer-readable storage medium, and electronic device for rendering ink-wash special effects, thereby overcoming, to some extent, the problem of low efficiency in producing ink-wash special effects in related technologies.

[0006] Other features and advantages of this disclosure will become apparent from the following detailed description, or may be learned in part from practice of this disclosure.

[0007] According to a first aspect of this disclosure, a method for rendering ink wash effects is provided. The method includes: adding a target material to a first solid layer to obtain a material layer; mapping a noise texture onto the material layer to obtain a shading material layer; generating a shading edge enhancement layer based on the shading material layer; and synthesizing an ink wash effect image corresponding to the target material based on the shading edge enhancement layer and the shading material layer.

[0008] According to a second aspect of this disclosure, a watercolor effect rendering apparatus is provided. The apparatus includes: a material layer compositing module for adding target material to a first solid layer to obtain a material layer; a shading material layer compositing module for mapping noise texture onto the material layer to obtain a shading material layer; a shading edge enhancement layer compositing module for generating a shading edge enhancement layer based on the shading material layer; and a watercolor shading effect image compositing module for compositing a watercolor shading effect image corresponding to the target material based on the shading edge enhancement layer and the shading material layer.

[0009] According to a third aspect of this disclosure, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements any of the above-described ink wash effect rendering methods.

[0010] According to a fourth aspect of this disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute any of the above-described ink wash effect rendering methods by executing the executable instructions.

[0011] The technical solution disclosed herein has the following beneficial effects:

[0012] In the above-mentioned ink wash effect rendering process, the target material is added to the first solid layer to obtain the material layer; the noise texture is mapped onto the material layer to obtain the blurring material layer; based on the blurring material layer, a blurring edge enhancement layer is generated; based on the blurring edge enhancement layer and the blurring material layer, the ink wash effect corresponding to the target material is synthesized, further enhancing the ink wash effect. First, mapping the noise texture onto the material layer to obtain the blurring material layer initially achieves the ink wash effect; then, based on the blurring material layer, a blurring edge enhancement layer is generated, and based on the blurring edge enhancement layer and the blurring material layer, the ink wash effect corresponding to the target material is synthesized, further enhancing the ink wash effect. On the one hand, achieving the ink wash effect through layer processing avoids complex fluid calculation processes, reduces production costs, and can improve the efficiency of ink wash effect production to a certain extent. On the other hand, by replacing the target material, ink wash effects can be achieved for different materials, resulting in a high reusability rate and a relatively low learning cost for new users.

[0013] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0014] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure. It is obvious that the drawings described below are merely some embodiments of this disclosure, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.

[0015] Figure 1 This diagram illustrates a flowchart of a method for rendering ink wash special effects in this exemplary embodiment.

[0016] Figure 2A This illustration shows an example of a material layer in this exemplary embodiment;

[0017] Figure 2BAn example diagram of a noise texture in this exemplary embodiment is shown;

[0018] Figure 2C This illustration shows an example of a gradient material layer in this exemplary embodiment;

[0019] Figure 2D This illustration shows an example of a white background gradient copy layer in this exemplary embodiment;

[0020] Figure 2E This illustration shows an example diagram of adjusting the color channel corresponding to the smudged edge layer in this exemplary embodiment.

[0021] Figure 2F An example diagram of a gradient edge enhancement layer in this exemplary embodiment is shown;

[0022] Figure 2G An example diagram of a shading layer in this exemplary embodiment is shown;

[0023] Figure 3 This exemplary embodiment illustrates a flowchart of adjusting the shading texture of a shading layer to obtain a watercolor shading effect image corresponding to the target material.

[0024] Figure 4A An example diagram of a detailed texture in this exemplary embodiment is shown;

[0025] Figure 4B An example diagram of a first detail texture layer in this exemplary embodiment is shown;

[0026] Figure 4C An example diagram of a second detail texture layer in this exemplary embodiment is shown;

[0027] Figure 4D An example diagram of a first detail shading layer in this exemplary embodiment is shown;

[0028] Figure 4E An example diagram of a second detail shading layer in this exemplary embodiment is shown;

[0029] Figure 4F This illustration shows an example of an ink wash effect in this exemplary embodiment.

[0030] Figure 5 This illustration shows a flowchart of an implementation process for rendering ink-wash style effects based on detail texture maps in this exemplary embodiment.

[0031] Figure 6 This illustration shows another example of ink wash effect in this exemplary embodiment;

[0032] Figure 7This diagram illustrates a structural block diagram of an ink painting special effects rendering device according to this exemplary embodiment;

[0033] Figure 8 This exemplary embodiment shows an electronic device for implementing the above-described ink painting effect rendering method. Detailed Implementation

[0034] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided to make this disclosure more comprehensive and complete, and to fully convey the concept of the example embodiments to those skilled in the art. The described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a full understanding of embodiments of this disclosure. However, those skilled in the art will recognize that the technical solutions of this disclosure can be practiced with one or more of the specific details omitted, or other methods, components, apparatus, steps, etc., can be employed. In other instances, well-known technical solutions are not shown or described in detail to avoid obscuring various aspects of this disclosure.

[0035] Furthermore, the accompanying drawings are merely illustrative of this disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted. Some block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.

[0036] In this article, "first," "second," etc., are labels for specific objects, rather than limiting the number or order of objects.

[0037] In related technologies, when using high-end fluid software to create ink painting effects, it is necessary to first emit particles, then add simulated fluid effects through nodes, and then continuously modify the simulated particle particles to achieve the ink painting effect. The process is complex and difficult, resulting in low production efficiency for ink painting effects.

[0038] In view of one or more of the above-mentioned problems, the exemplary embodiments of this disclosure provide a method for rendering ink painting special effects, which can be applied to application scenarios such as ink painting image production and ink painting animation production.

[0039] like Figure 1 The diagram shows a flowchart of a method for rendering ink wash effects, which may include the following steps S110 to S140:

[0040] Step S110: Add the target material to the first solid layer to obtain the material layer;

[0041] Step S120: Map the noise texture onto the material layer to obtain the smudged material layer;

[0042] Step S130: Based on the shading material layer, generate a shading edge enhancement layer;

[0043] Step S140: Based on the edge enhancement layer and the ink wash material layer, synthesize the ink wash effect image corresponding to the target material.

[0044] In the aforementioned ink wash effect rendering process, firstly, noise textures are mapped onto the material layer to obtain a blurred material layer, initially achieving the ink wash effect. Next, a blurred edge enhancement layer is generated based on the blurred material layer. Then, based on the blurred edge enhancement layer and the blurred material layer, the ink wash effect corresponding to the target material is synthesized, further enhancing the ink wash effect. On one hand, achieving the ink wash effect through layer processing avoids complex fluid calculation processes, reducing production costs and improving the efficiency of ink wash effect production to some extent. On the other hand, by replacing the target material, ink wash effects can be achieved for different materials, resulting in high reusability and a relatively low learning curve for new users.

[0045] It should be noted that the solid layer in this disclosure is a carrier, and its initial state is a solid color block. Layers can be stacked one on top of the other to form the entire image. Text, patterns, and other material elements can be added to the layers.

[0046] The following sections respectively address... Figure 1 Each step in the process will be explained in detail.

[0047] Step S110: Add the target material to the first solid layer to obtain the material layer.

[0048] The first solid layer refers to the solid layer used to hold the source material. The target source material refers to the element selected by the user to be processed using the ink-wash technique; this can be text, images, or other source material elements. The source material layer refers to the layer obtained by combining the first solid layer and the target source material.

[0049] For example, the target material drawn by the user can be added to the first solid layer based on the user's drawing operation on the first solid layer to obtain the material layer.

[0050] For example, the target material can also be added to the first solid layer by importing the pre-made target material onto the first solid layer to create a composite material layer.

[0051] Taking the target material as the text "ABC" as an example, such as Figure 2A As shown, an example image of a material layer is provided.

[0052] After obtaining the material layer, you can continue to execute step S120.

[0053] Step S120: Map the noise texture onto the material layer to obtain the smudged material layer.

[0054] Noise textures refer to patterns with a random distribution of black, white, and gray tones. For example... Figure 2B As shown, an example image of a noise texture is provided. It should be noted that the noise texture here can be a pre-made noise texture or a noise texture randomly generated after performing step S110.

[0055] A "blend texture layer" refers to a layer that has undergone noise texture mapping, giving the target material a blush-like texture. For example, if the target material is the text "ABC", then... Figure 2C As shown, an example image of a gradient material layer is provided.

[0056] In one alternative implementation, the above-mentioned mapping of noise texture onto the material layer to obtain a blurred material layer can be achieved through the following steps: creating a noise texture map on the second solid layer, and mapping the noise texture map corresponding to the noise texture onto the material layer to obtain a blurred material layer.

[0057] The mapped noise texture can be the noise texture corresponding to the noise texture map. By generating the noise texture map, the corresponding noise texture can be obtained. Specifically, the noise texture map can be created on the second solid layer. For example, a fractal noise plugin can be used to create a noise texture map on the second solid layer. The fractal noise plugin is a noise generation plugin that allows adjustment of parameters such as contrast, brightness, and complexity to control the effect and intensity of the noise texture, thereby producing noise textures with different patterns. The second solid layer refers to the solid layer used to carry the noise texture pattern.

[0058] In the above steps, the noise texture corresponding to the noise texture map is mapped onto the material layer to synthesize the blurred material layer. The blurred effect of the material layer can be changed by simply replacing the noise texture map or adjusting the noise texture parameters. The operation is simple and highly controllable.

[0059] In one alternative implementation, the above-mentioned mapping of noise texture onto the material layer to obtain a blurred material layer can also be achieved through the following steps: determining the blurred range corresponding to the material layer based on a preset blur radius; mapping the noise texture onto the blurred range corresponding to the material layer to obtain a blurred material layer.

[0060] When mapping, camera lens blur can be used on the source layer to map the vignetting effect of the noise map. The preset blur radius can be used to define the size of the camera lens blur range. The larger the preset blur radius, the larger the vignetting range corresponding to the source layer; the smaller the preset blur radius, the smaller the vignetting range corresponding to the source layer.

[0061] In the above steps, the blur range corresponding to the material layer is controlled based on the preset blur radius, which further improves the controllability of the blur.

[0062] After obtaining the gradient material layer, you can continue with step S130.

[0063] Step S130: Based on the shading material layer, generate a shading edge enhancement layer.

[0064] A gradient edge enhancement layer refers to a layer composed of the gradient edges of the material being gradiented.

[0065] In one optional implementation, step S130 generates a gradient edge enhancement layer based on the gradient material layer. This can be achieved through the following steps: copying the gradient material layer to obtain a gradient copy layer; and generating a gradient edge enhancement layer based on the gradient copy layer.

[0066] The blending duplicate layer is obtained by copying the blending material layer. By finding the blending edges of the blending duplicate layer, a blending edge enhancement layer can be obtained.

[0067] In the above steps, the blending material layer is copied to facilitate further processing of the blending edges of the target material, thereby highlighting the blending edges.

[0068] In one optional implementation, the above-mentioned generation of a gradient edge enhancement layer based on a gradient copy layer can be achieved through the following steps: adding a white layer below the gradient copy layer to obtain a gradient copy layer with a white background; adding a third solid layer on the white background gradient copy layer using a multiplication mode and performing gradient edge search to obtain a gradient edge layer; adjusting the color channels corresponding to the gradient edge layer so that the background of the gradient edge layer is black and the gradient texture in the gradient edge layer is white; removing the black background from the gradient edge layer and adjusting the gradient texture in the gradient edge layer to black to obtain a gradient edge enhancement layer.

[0069] Adding a white layer below the duplicated blending layer creates a duplicated blending layer with a white background, facilitating color contrast and enhancing the blending edges. For example, if the target material is the text "ABC", then... Figure 2D As shown, a gradient duplicate layer with a white background is provided.

[0070] The third solid layer is a solid color layer. By overlaying a solid color layer onto a duplicate layer with a white background gradient, commands applied to this third solid layer will also apply to all layers below it.

[0071] Multiplication mode is a commonly used layer blending mode that merges the pixel colors of two layers. Using multiplication mode here also avoids color masking and blurring of the duplicated layer from the third solid layer.

[0072] After adding a third solid layer to the white background blending copy layer, you can use the blending edge search command to find the blending edge that outlines the blending effect, and then obtain the blending edge layer.

[0073] After obtaining the ombre edge layer, you can adjust its corresponding color channels to make the background of the ombre edge layer black and the ombre texture within it white. If the target material is black, you can directly invert the corresponding color channels of the ombre edge layer when adjusting them. For example, if the target material is the text "ABC",... Figure 2E As shown, an example image is provided after adjusting the color channel corresponding to the smudged edge layer.

[0074] After adjusting the color channels of the ombre edge layer, the background of the ombre edge layer was changed to black, and the ombre texture within the ombre edge layer was changed to white. Next, the black background of the ombre edge layer can be removed, and the ombre texture within the ombre edge layer can be adjusted to black, thus obtaining an enhanced ombre edge layer. Specifically, a black background removal plugin (such as UnMult) can be used to remove the black background of the ombre edge layer. UnMult can be used to remove the black background of an image, cleanly extracting the main subject.

[0075] Taking the target material as the text "ABC" as an example, such as Figure 2F As shown, an example image of a gradient edge enhancement layer is provided, in which the black background of the gradient edge layer is removed and the white texture of the gradient edge layer is adjusted to black.

[0076] In the above steps, a series of operations, such as finding the smudged edges and changing the smudged edge colors, are used to further enhance the smudged edges, which can enhance the ink-wash texture of the target material to a certain extent.

[0077] After obtaining the enhanced edge blending layer, you can continue with step S140.

[0078] Step S140: Based on the edge enhancement layer and the ink wash material layer, synthesize the ink wash effect image corresponding to the target material.

[0079] The ink wash effect image corresponding to the target material refers to the final ink wash effect image synthesized for the target material.

[0080] Specifically, the resulting blending layer, obtained by multiplying the edge enhancement layer with the blending material layer, can be used as the ink wash rendering effect for the target material. The blending layer is the result of overlaying the edge enhancement layer and the blending material layer; using multiplication mode avoids occlusion between the layers. Taking the target material as the text "ABC" as an example... Figure 2G As shown, an example image of a gradient layer is provided.

[0081] In an optional implementation, in step S140, a watercolor watercolor effect image corresponding to the target material is synthesized based on the watercolor edge enhancement layer and the watercolor material layer. Specifically, this can be achieved through the following steps: the watercolor edge enhancement layer is superimposed on the watercolor material layer in a multiplication mode to obtain a watercolor layer; the watercolor texture in the watercolor layer is adjusted to obtain the watercolor watercolor effect image corresponding to the target material.

[0082] In the above steps, the blending texture in the blending layer is further adjusted to refine the blending texture and thus improve the presentation effect of the ink wash texture.

[0083] You can use detailed textures to further adjust the shading texture in the shading layer.

[0084] In one optional implementation, the above-described adjustment of the diffusion texture of the diffusion layer yields an ink wash diffusion effect image corresponding to the target material, such as... Figure 3 As shown, this can be achieved through the following steps:

[0085] Step S310: Obtain a detail texture map, which is black and white;

[0086] Step S320: Based on the pattern texture corresponding to the detail texture map, generate a first detail texture layer and a second detail texture layer to be processed, wherein the black and white channels of the first detail texture layer and the second detail texture layer to be processed are opposite;

[0087] Step S330: Remove the white parts in the first detail texture layer and the second detail texture layer respectively to obtain the first detail texture layer and the second detail texture layer.

[0088] Step S340: Based on the first detail texture layer, the second detail texture layer, and the shading layer, synthesize the ink wash shading effect image corresponding to the target material.

[0089] This detail texture map can be a black and white detail texture map. For example, such as... Figure 4A The provided texture map is a detailed texture image.

[0090] It should be noted that if the acquired detail texture image is a color image, it can be pre-converted to black and white by adding a black and white tone. Different detail texture images can produce different shading texture adjustment results. The specific detail texture image used here can be selected by the user according to actual needs.

[0091] In one optional implementation, step S320 generates a first detail texture layer and a second detail texture layer to be processed based on the pattern texture corresponding to the detail texture map. Specifically, this can be achieved through the following steps: synthesizing the first detail texture layer to be processed based on the pattern texture corresponding to the detail texture map; copying the first detail texture layer to be processed to obtain a detail texture copy layer; and swapping the black and white channels of the detail texture copy layer to obtain the second detail texture layer to be processed.

[0092] Based on the pattern texture corresponding to the detail texture map, a first detail texture layer to be processed is synthesized. Specifically, the pattern texture layer corresponding to the detail texture map can be directly used as the first detail texture layer to be processed.

[0093] Since the black and white channels of the first and second detail texture layers to be processed are opposite, after obtaining the first detail texture layer, the second detail texture layer to be processed can be obtained by copying and swapping the black and white channels. The process is simple and easy to implement.

[0094] In the above steps, the color channels of the first and second detail texture layers to be processed are reversed in order to better extract the detail texture features.

[0095] In one alternative implementation, the synthesis of the first detail texture layer based on the pattern texture corresponding to the detail texture map can be achieved through the following steps: adding curves to the pattern texture corresponding to the detail texture map to synthesize a high-contrast detail texture layer; adding a distortion effect to the high-contrast detail texture layer to obtain the first detail texture layer to be processed.

[0096] In the above steps, adding curves to the pattern texture corresponding to the detail texture map can enhance the feature expression of the detail texture; adding a distortion effect can enhance the fluidity of the detail texture, so as to further improve the presentation effect of the synthesized ink wash effect map.

[0097] In an optional implementation, in step S330, the white parts in the first detail texture layer to be processed and the white parts in the second detail texture layer to be processed are removed respectively to obtain the first detail texture layer and the second detail texture layer. Specifically, this can be achieved through the following steps: removing the white parts in the first detail texture layer to be processed and turning the gray parts into black to obtain the first detail texture layer; removing the white parts in the second detail texture layer to be processed to obtain the second detail texture layer.

[0098] Specifically, the white portion of the first detail texture layer to be processed can be removed first. If gray remains in the removed detail texture layer, it can be adjusted to black. For example, a color range keying tool can be used to remove the white portion of the first detail texture layer; the gray portion can be changed to black based on hue, such as... Figure 4B An example image of a first detail texture layer is provided.

[0099] Specifically, the white portions of the second detail texture layer to be processed can be removed, leaving the black and gray areas. For example, a linear color keying tool can be used to remove the white portions of the second detail texture layer, such as... Figure 4C An example image of a second detail texture layer is provided.

[0100] It should be noted that color range keying tools are keying tools that generate transparency by specifying a color range in any color mode, such as RGB, Lab, or YUV. Linear color keying tools are keying tools that establish transparency by specifying RGB, hue, or saturation information of a color. Among these, RGB, Lab, and YUV are three commonly used color modes.

[0101] In the above steps, the white parts of the first and second detail texture maps to be processed are removed in order to extract the detail texture features from the detail texture maps.

[0102] In one alternative implementation, before removing the white portions in the first and second detail texture layers respectively, curves can be added to the first and second detail texture layers to improve their black-and-white contrast and further enhance the detail texture features.

[0103] In one optional implementation, step S340 involves compositing an ink wash effect image corresponding to the target material based on the first detail texture layer, the second detail texture layer, and the shading layer. This can be achieved through the following steps: applying an alpha mask to the first detail texture layer onto the shading layer, and then multiplying it with the shading layer to obtain the first detail shading layer; applying an alpha mask to the second detail texture layer onto the shading layer, and then multiplying it with the shading layer to obtain the second detail shading layer; and then superimposing the first detail shading layer, the second detail shading layer, and the shading layer to synthesize the ink wash effect image corresponding to the target material.

[0104] The alpha mask performs masking based on the brightness of the layer's alpha channel.

[0105] Specifically, an alpha mask is applied to the first texture detail layer and then to the shading layer. This means the shading layer is masked based on the brightness of the alpha channel of the first texture detail layer. After applying the alpha mask to the first texture detail layer and then to the shading layer, a multiplication mode can be used to overlay the mask onto the shading layer, thus obtaining the first detail shading layer. For example... Figure 4D As shown, taking the target material as the text "ABC" as an example, an example image of a first detail shading layer is provided.

[0106] Specifically, an alpha mask is applied to the second texture detail layer and then applied to the shading layer. This means the shading layer is masked based on the brightness of the alpha channel of the second texture detail layer. After applying the alpha mask to the shading layer, it can be overlaid using a multiplication mode to create the second detail shading layer. For example... Figure 4E As shown, taking the target material as the text "ABC" as an example, an example image of a second detail shading layer is provided.

[0107] After generating the first and second detail shading layers, these layers can be overlaid to create a composite ink wash effect image corresponding to the target material. For example... Figure 4F As shown, taking the target material as the text "ABC" as an example, an example image of an ink wash effect is provided.

[0108] In the above steps, by overlaying the two generated detail blending layers and the synthesized blending layer, the texture details of the blending layer can be adjusted, further improving the detail effect of the ink wash texture.

[0109] Figure 5 The flowchart illustrates an implementation process for rendering ink-wash style effects based on detail texture maps, which may include the following steps:

[0110] Step S501: Add the target material to the first solid layer to obtain the material layer;

[0111] Step S502: Based on the preset blur radius, determine the shading range corresponding to the material layer, and map the noise texture to the shading range corresponding to the material layer to obtain the shading material layer;

[0112] Step S503: Duplicate the blending material layer to obtain a blending copy layer; add a white layer below the blending copy layer to obtain a blending copy layer with a white background;

[0113] Step S504: Add a third solid layer on the white background blending copy layer using the multiplication mode, and perform blending edge search to obtain a blending edge layer; adjust the color channels corresponding to the blending edge layer so that the background of the blending edge layer is black and the blending texture in the blending edge layer is white.

[0114] Step S505: Remove the black background from the smudged edge layer and adjust the smudged texture in the smudged edge layer to black to obtain the smudged edge enhancement layer.

[0115] Step S506: Overlay the edge enhancement layer of the shading with the shading material layer using the multiplication mode to obtain the shading layer;

[0116] Step S507: Obtain a black and white detail texture map; add curves to the pattern texture corresponding to the detail texture map to synthesize a high-contrast detail texture layer; add a distortion effect to the high-contrast detail texture layer to obtain the first detail texture layer to be processed.

[0117] Step S508: Copy the first detail texture layer to be processed to obtain a detail texture copy layer; swap the black and white channels of the detail texture copy layer to obtain a second detail texture layer to be processed.

[0118] Step S509: Remove the white portion and turn the gray portion into black in the first detail texture layer to be processed to obtain the first detail texture layer; remove the white portion in the second detail texture layer to be processed to obtain the second detail texture layer;

[0119] Step S510: After applying an Alpha mask to the first texture detail layer and then overlaying it with the shading layer in multiplication mode, a first detail shading layer is obtained; after applying an Alpha mask to the second texture detail layer and then overlaying it with the shading layer in multiplication mode, a second detail shading layer is obtained.

[0120] Step S511: Overlay the first detail blending layer, the second detail blending layer, and the blending layer to synthesize the ink wash effect image corresponding to the target material.

[0121] It should be noted that, Figure 5 In the steps shown, the target material, noise texture, and detail texture map can all be changed to meet different user needs. The operation is simple and easy to implement, requiring no tedious debugging. For example, if the target material "ABC" text is replaced with "BOX", the following can be obtained: Figure 6 The image shown is an example of an ink wash effect.

[0122] Figure 7 An ink-wash effect rendering apparatus 700 according to an exemplary embodiment of this disclosure is shown. For example... Figure 7 As shown, the ink wash effect rendering device 700 may include:

[0123] The material layer compositing module 710 is used to add target materials onto the first solid layer to obtain a material layer;

[0124] The blending module 720 is used to map noise textures onto material layers to obtain blended material layers.

[0125] The edge enhancement layer compositing module 730 is used to generate an edge enhancement layer based on the edge enhancement material layer;

[0126] The Ink Wash Effect Composite Module 740 is used to composite an ink wash effect image corresponding to the target material based on the wash edge enhancement layer and the wash material layer.

[0127] In one alternative implementation, the blending material layer compositing module 720 can be configured to: create a noise texture map on the second solid layer, and map the noise texture map corresponding to the noise texture map onto the material layer to obtain the blending material layer.

[0128] In one alternative implementation, the blending material layer compositing module 720 can also be configured to: determine the blending range corresponding to the material layer based on a preset blur radius; and map the noise texture to the blending range corresponding to the material layer to obtain the blended material layer.

[0129] In one optional implementation, the blending edge enhancement layer compositing module 730 may include: a blending material copying module, used to copy the blending material layer to obtain a blending copy layer; and a blending edge enhancement layer compositing submodule, used to generate a blending edge enhancement layer based on the blending copy layer.

[0130] In one optional implementation, the blending edge enhancement layer compositing submodule can be configured to: add a white layer below the blending copy layer to obtain a white background blending copy layer; add a third solid layer on the white background blending copy layer using a multiplication mode, and perform blending edge search to obtain a blending edge layer; adjust the color channels corresponding to the blending edge layer so that the background of the blending edge layer is black and the blending texture in the blending edge layer is white; remove the black background in the blending edge layer and adjust the blending texture in the blending edge layer to black to obtain a blending edge enhancement layer.

[0131] In one optional implementation, the ink wash effect image compositing module 740 includes: an ink wash layer compositing module, used to overlay the ink wash edge enhancement layer with the ink wash material layer in a multiplication mode to obtain an ink wash layer; and an ink wash texture adjustment module, used to adjust the ink wash texture of the ink wash layer to obtain an ink wash effect image corresponding to the target material.

[0132] In one optional implementation, the shading texture adjustment module may include: a detail texture image acquisition module for acquiring a detail texture image, wherein the detail texture image is black and white; a detail texture layer generation module for generating a first detail texture layer and a second detail texture layer to be processed based on the pattern texture corresponding to the detail texture image, wherein the black and white channels of the first detail texture layer and the second detail texture layer are reversed; a detail texture layer generation module for removing the white parts in the first detail texture layer and the second detail texture layer respectively to obtain the first detail texture layer and the second detail texture layer; and an ink wash shading effect image compositing submodule for compositing an ink wash shading effect image corresponding to the target material based on the first detail texture layer, the second detail texture layer and the shading layer.

[0133] In one optional implementation, the detail texture layer generation module may include: a first detail texture layer synthesis module for synthesizing a first detail texture layer based on the pattern texture corresponding to the detail texture map; a detail texture copying module for copying the first detail texture layer to obtain a detail texture copying layer; and a second detail texture layer synthesis module for swapping the black and white channels of the detail texture copying layer to obtain a second detail texture layer.

[0134] In one optional implementation, the first detail texture layer synthesis module can be configured to: add curves to the pattern texture corresponding to the detail texture map to synthesize a high-contrast detail texture layer; and add a distortion effect to the high-contrast detail texture layer to obtain the first detail texture layer to be processed.

[0135] In one alternative implementation, the detail texture layer generation module can be configured to: remove the white portion and turn the gray portion into black in the first detail texture layer to be processed to obtain a first detail texture layer; and remove the white portion in the second detail texture layer to be processed to obtain a second detail texture layer.

[0136] In one optional implementation, the detail texture layer generation module may further include a contrast adjustment module before removing the white portions in the first detail texture layer and the second detail texture layer, respectively, to add curves to the first detail texture layer and the second detail texture layer to improve the black and white contrast of the first detail texture layer and the second detail texture layer.

[0137] In one optional implementation, the ink wash effect composition submodule can be configured to: apply an alpha mask to the first texture detail layer onto the wash layer, and then overlay it with the wash layer in multiplication mode to obtain a first detail wash layer; apply an alpha mask to the second texture detail layer onto the wash layer, and then overlay it with the wash layer in multiplication mode to obtain a second detail wash layer; and then overlay the first detail wash layer, the second detail wash layer, and the wash layer to composite the ink wash effect image corresponding to the target material.

[0138] The specific details of each module in the aforementioned ink-wash special effects rendering device 700 have been described in detail in the method section of the implementation method. Any undisclosed details can be found in the implementation method section of the method section, and therefore will not be repeated here.

[0139] Exemplary embodiments of this disclosure also provide a computer-readable storage medium storing a program product capable of implementing the ink-wash special effects rendering method described above. In some possible embodiments, various aspects of this disclosure may also be implemented as a program product including program code, which, when run on an electronic device, causes the electronic device to perform the steps described in the "Exemplary Methods" section of this specification according to various exemplary embodiments of this disclosure.

[0140] The program product may be a portable compact disc read-only memory (CD-ROM) and include program code, and may run on an electronic device, such as a personal computer. However, the program product disclosed herein is not limited thereto. In this document, the readable storage medium may be any tangible medium that contains or stores a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.

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

[0142] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium, capable of sending, propagating, or transmitting programs for use by or in conjunction with an instruction execution system, apparatus, or device.

[0143] The program code contained on the readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.

[0144] Program code for performing the operations of this disclosure can be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java and C++, and conventional procedural programming languages ​​such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing devices can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0145] Exemplary embodiments of this disclosure also provide an electronic device capable of implementing the above-described ink wash effect rendering method. Referring below... Figure 8 To describe an electronic device 800 according to such an exemplary embodiment of the present disclosure. Figure 8 The electronic device 800 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments disclosed herein.

[0146] like Figure 8 As shown, the electronic device 800 can be represented as a general-purpose computing device. The components of the electronic device 800 may include, but are not limited to: at least one processing unit 810, at least one storage unit 820, a bus 830 connecting different system components (including storage unit 820 and processing unit 810), and a display unit 840.

[0147] The storage unit 820 stores program code, which can be executed by the processing unit 810, causing the processing unit 810 to perform the steps described in the "Exemplary Methods" section above according to various exemplary embodiments of this disclosure.

[0148] Specifically, a program product stored on a computer-readable storage medium enables an electronic device to perform the following steps:

[0149] Add the target material to the first solid layer to obtain the material layer;

[0150] Map the noise texture onto the material layer to obtain the blurred material layer;

[0151] Generate an enhanced layer for the blurred edges based on the blurred texture layer;

[0152] Based on the edge enhancement layer and the ink wash material layer, a composite ink wash effect image corresponding to the target material is created.

[0153] In one optional implementation, the above-mentioned mapping of noise texture onto the material layer to obtain a blurred material layer includes: creating a noise texture map on the second solid layer, and mapping the noise texture corresponding to the noise texture map onto the material layer to obtain a blurred material layer.

[0154] In one optional implementation, the above-mentioned mapping of noise texture onto the material layer to obtain a blurred material layer includes: determining the blurred range corresponding to the material layer based on a preset blur radius; mapping the noise texture onto the blurred range corresponding to the material layer to obtain a blurred material layer.

[0155] In one optional implementation, generating a gradient edge enhancement layer based on a gradient material layer includes: copying the gradient material layer to obtain a gradient copy layer; and generating a gradient edge enhancement layer based on the gradient copy layer.

[0156] In one optional implementation, the above-mentioned generation of a gradient edge enhancement layer based on a gradient copy layer includes: adding a white layer below the gradient copy layer to obtain a gradient copy layer with a white background; adding a third solid layer on the white background gradient copy layer using a multiplication mode and performing gradient edge search to obtain a gradient edge layer; adjusting the color channels corresponding to the gradient edge layer so that the background of the gradient edge layer is black and the gradient texture in the gradient edge layer is white; removing the black background from the gradient edge layer and adjusting the gradient texture in the gradient edge layer to black to obtain a gradient edge enhancement layer.

[0157] In one optional implementation, the above-mentioned synthesis of the ink wash effect image corresponding to the target material based on the wash edge enhancement layer and the wash material layer includes: superimposing the wash edge enhancement layer with the wash material layer in a multiplication mode to obtain a wash layer; adjusting the wash texture of the wash layer to obtain the ink wash effect image corresponding to the target material.

[0158] In one optional implementation, adjusting the shading texture of the shading layer to obtain the ink wash effect image corresponding to the target material includes: obtaining a detail texture image, which is black and white; generating a first detail texture layer and a second detail texture layer to be processed based on the pattern texture corresponding to the detail texture image, wherein the black and white channels of the first detail texture layer and the second detail texture layer to be processed are reversed; removing the white parts in the first detail texture layer and the second detail texture layer to be processed respectively to obtain the first detail texture layer and the second detail texture layer; and synthesizing the ink wash effect image corresponding to the target material based on the first detail texture layer, the second detail texture layer and the shading layer.

[0159] In one optional implementation, the above-mentioned generation of a first detail texture layer and a second detail texture layer to be processed based on the pattern texture corresponding to the detail texture map includes: synthesizing a first detail texture layer to be processed based on the pattern texture corresponding to the detail texture map; copying the first detail texture layer to be processed to obtain a detail texture copy layer; and swapping the black and white channels of the detail texture copy layer to obtain a second detail texture layer to be processed.

[0160] In one optional implementation, the above-mentioned synthesis of a first detail texture layer based on the pattern texture corresponding to the detail texture map includes: adding curves to the pattern texture corresponding to the detail texture map to synthesize a high-contrast detail texture layer; and adding a distortion effect to the high-contrast detail texture layer to obtain the first detail texture layer to be processed.

[0161] In one optional implementation, the above-mentioned process of removing the white portion from the first detail texture layer and the white portion from the second detail texture layer to obtain the first detail texture layer and the second detail texture layer includes: removing the white portion from the first detail texture layer and turning the gray portion into black to obtain the first detail texture layer; and removing the white portion from the second detail texture layer to obtain the second detail texture layer.

[0162] In an optional implementation, before removing the white portions in the first and second detail texture layers respectively, the method further includes adding curves to the first and second detail texture layers to improve the black-and-white contrast of the first and second detail texture layers.

[0163] In one optional implementation, the above-mentioned synthesis of the ink wash effect image corresponding to the target material based on the first detail texture layer, the second detail texture layer, and the shading layer includes: applying an alpha mask to the first detail texture layer onto the shading layer, and then multiplying it with the shading layer to obtain the first detail shading layer; applying an alpha mask to the second detail texture layer onto the shading layer, and then multiplying it with the shading layer to obtain the second detail shading layer; and then superimposing the first detail shading layer, the second detail shading layer, and the shading layer to synthesize the ink wash effect image corresponding to the target material.

[0164] In the aforementioned ink wash effect rendering process, firstly, noise textures are mapped onto the material layer to obtain a blurred material layer, initially achieving the ink wash effect. Next, a blurred edge enhancement layer is generated based on the blurred material layer. Then, based on the blurred edge enhancement layer and the blurred material layer, the ink wash effect corresponding to the target material is synthesized, further enhancing the ink wash effect. On one hand, achieving the ink wash effect through layer processing avoids complex fluid calculation processes, reducing production costs and improving the efficiency of ink wash effect production to some extent. On the other hand, by replacing the target material, ink wash effects can be achieved for different materials, resulting in high reusability and a relatively low learning curve for new users.

[0165] Storage unit 820 may include a readable medium in the form of a volatile storage unit, such as random access memory (RAM) 821 and / or cache memory 822, and may further include a read-only memory (ROM) 823.

[0166] The storage unit 820 may also include a program / utility 824 having a set (at least one) of program modules 825, including but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of these examples may include an implementation of a network environment.

[0167] Bus 830 can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of the various bus structures.

[0168] Electronic device 800 can also communicate with one or more external devices 900 (e.g., keyboard, pointing device, Bluetooth device, etc.), and with one or more devices that enable a user to interact with the electronic device 800, and / or with any device that enables the electronic device 800 to communicate with one or more other computing devices (e.g., router, modem, etc.). This communication can be performed through input / output (I / O) interface 850. Furthermore, electronic device 800 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 860. Figure 8 As shown, network adapter 860 communicates with other modules of electronic device 800 via bus 830. It should be understood that, although... Figure 8 As not shown in the diagram, other hardware and / or software modules may be used in conjunction with the electronic device 800, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0169] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, terminal device, or network device, etc.) to execute the method according to the exemplary embodiments of this disclosure.

[0170] Furthermore, the above figures are merely illustrative representations of the processes included in the methods according to exemplary embodiments of this disclosure, and are not intended to be limiting. It is readily understood that the processes shown in the above figures do not indicate or limit the temporal order of these processes. Additionally, it is readily understood that these processes may be executed synchronously or asynchronously, for example, in multiple modules.

[0171] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to exemplary embodiments of this disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.

[0172] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and embodiments are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the claims.

[0173] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.

Claims

1. A method for rendering ink wash special effects, characterized in that, The method includes: Add the target material to the first solid layer to obtain the material layer; The noise texture is mapped onto the material layer to obtain the smudged material layer; Based on the aforementioned blending material layer, a blending edge enhancement layer is generated; The edge enhancement layer is multiplied and overlaid with the blending material layer to obtain the blending layer; Adjust the blur texture of the blur layer to obtain the ink blur effect image corresponding to the target material; The step of adjusting the shading texture of the shading layer to obtain the ink wash shading effect image corresponding to the target material includes: Obtain a detailed texture map, wherein the detailed texture map is black and white; Based on the pattern texture corresponding to the detail texture map, a first detail texture layer and a second detail texture layer to be processed are generated, wherein the black and white channels of the first detail texture layer and the second detail texture layer to be processed are opposite; Remove the white parts from the first and second detail texture layers respectively to obtain the first and second detail texture layers. Based on the first detail texture layer, the second detail texture layer, and the shading layer, a watercolor shading effect image corresponding to the target material is synthesized.

2. The method according to claim 1, characterized in that, The step of mapping the noise texture onto the material layer to obtain the smudged material layer includes: A noise texture map is created on the second solid layer, and the noise texture corresponding to the noise texture map is mapped onto the material layer to obtain the smudged material layer.

3. The method according to claim 1, characterized in that, The step of mapping the noise texture onto the material layer to obtain the smudged material layer includes: The blur radius is used to determine the blur range of the material layer. The noise texture is mapped onto the shading area corresponding to the material layer to obtain the shading material layer.

4. The method according to claim 1, characterized in that, The step of generating a gradient edge enhancement layer based on the gradient material layer includes: Duplicate the gradient material layer to obtain a duplicate gradient layer; Based on the aforementioned blending copy layer, a blending edge enhancement layer is generated.

5. The method according to claim 4, characterized in that, The step of generating a gradient edge enhancement layer based on the gradient copy layer includes: Add a white layer below the blending copy layer to obtain a white background blending copy layer; A third solid layer is added to the white background gradient copy layer using the multiplication mode, and the gradient edge is found to obtain the gradient edge layer. Adjust the color channels corresponding to the shading edge layer so that the background of the shading edge layer is black and the shading texture in the shading edge layer is white; Remove the black background from the smudged edge layer and adjust the smudged texture in the smudged edge layer to black to obtain a smudged edge enhancement layer.

6. The method according to claim 1, characterized in that, The step of generating a first detail texture layer and a second detail texture layer to be processed based on the pattern texture corresponding to the detail texture map includes: Based on the pattern texture corresponding to the detailed texture map, a first detailed texture layer to be processed is synthesized; Duplicate the first detail texture layer to be processed to obtain a duplicate detail texture layer; The black and white channels of the copied detail texture layer are swapped to obtain a second detail texture layer to be processed.

7. The method according to claim 6, characterized in that, The process of synthesizing a first detail texture layer based on the pattern texture corresponding to the detail texture map includes: Add curves to the pattern texture corresponding to the detailed texture map to synthesize a high-contrast detailed texture layer; A distortion effect is added to the high-contrast detail texture layer to obtain the first detail texture layer to be processed.

8. The method according to claim 1, characterized in that, The step of removing the white portions from the first and second detail texture layers to obtain the first and second detail texture layers includes: Remove the white portion and turn the gray portion black from the first detail texture layer to be processed to obtain the first detail texture layer; Remove the white portion from the second detail texture layer to obtain the second detail texture layer.

9. The method according to claim 1, characterized in that, Before removing the white portions of the first and second detail texture layers, the method further includes: Curves are added to the first and second detail texture layers to improve their black-and-white contrast.

10. The method according to claim 1, characterized in that, The process of synthesizing the ink wash effect image corresponding to the target material based on the first detail texture layer, the second detail texture layer, and the shading layer includes: After applying an Alpha mask to the first detail texture layer and then overlaying it with the shading layer using a multiplication mode, the first detail shading layer is obtained. After applying an Alpha mask to the shading layer, the second detail texture layer is overlaid with the shading layer using a multiplication mode to obtain the second detail shading layer. The first detail blending layer, the second detail blending layer, and the blending layer are superimposed to synthesize the ink wash effect image corresponding to the target material.

11. A watercolor special effects rendering device, characterized in that, The device includes: The material layer compositing module is used to add target materials onto the first solid layer to obtain a material layer; The blending material layer compositing module is used to map noise textures onto the material layer to obtain a blended material layer; The edge enhancement layer compositing module is used to generate an edge enhancement layer based on the edge enhancement material layer. The ink wash effect image compositing module is used to overlay the ink wash edge enhancement layer with the ink wash material layer in a multiplication mode to obtain an ink wash layer; and to adjust the ink wash texture of the ink wash layer to obtain the ink wash effect image corresponding to the target material. The step of adjusting the shading texture of the shading layer to obtain the ink wash shading effect image corresponding to the target material includes: Obtain a detailed texture map, wherein the detailed texture map is black and white; Based on the pattern texture corresponding to the detail texture map, a first detail texture layer and a second detail texture layer to be processed are generated, wherein the black and white channels of the first detail texture layer and the second detail texture layer to be processed are opposite; Remove the white parts from the first and second detail texture layers respectively to obtain the first and second detail texture layers. Based on the first detail texture layer, the second detail texture layer, and the shading layer, a watercolor shading effect image corresponding to the target material is synthesized.

12. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method according to any one of claims 1 to 10.

13. An electronic device, characterized in that, include: processor; as well as Memory for storing the executable instructions of the processor; The processor is configured to execute the method of any one of claims 1 to 10 by executing the executable instructions.