Image processing method, program product and electronic equipment

By obtaining directional maps and texture maps, combined with multi-layer blending structure and synthetic calculation technology, the problems of traditional ink blending effects taking up large storage space and lacking flexibility are solved, and efficient and realistic ink blending effects are achieved, improving the gaming experience and artistic expression.

CN120747321APending Publication Date: 2025-10-03SHANGHAI NETEASE CUICAN NETWORK TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510725121.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-30
Publication Date
2025-10-03

AI Technical Summary

Technical Problem

Traditional ink-and-wash blending effects take up a lot of storage space in game development and lack the flexibility to adjust in real time. They are difficult to deeply integrate with the game's interactive logic, affecting the gaming experience and artistic expression.

Method used

By obtaining the direction map and texture map, the direction and texture of the ink and wash blending are controlled, and a multi-layer blending structure and synthetic operation technology are used to achieve flexible and realistic display of the ink and wash blending effect.

Benefits of technology

It reduces storage space usage, improves system efficiency, achieves differentiated gradient effects based on player behavior, and enhances the immersiveness and artistic expression of the gaming experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120747321A_ABST
    Figure CN120747321A_ABST
Patent Text Reader

Abstract

The image processing method provided by the invention comprises the following steps: acquiring a directional diagram and a texture diagram; according to the directional diagram and the texture diagram, controlling the direction and the texture of ink shading; and displaying the effect of the ink blooming in the graphical user interface. In this way, the ink shading direction and texture are controlled through the directional diagram and the texture diagram, and the ink shading effect which is more flexible, more real and higher in storage efficiency is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to an image processing method, a program product, and an electronic device. Background Art

[0002] In game development, ink-and-wash effects are a crucial element in expressing traditional Chinese artistic styles, holding irreplaceable expressive value in games set in ancient China. Traditional ink-and-wash effects typically rely on pre-rendered GIF animation sequences. While this approach allows artists to meticulously design the gradient variations for each frame, it fails to meet the storage space and effect flexibility requirements of large-scale game development. While the industry's commonly used GIF image implementation is intuitive, it lacks real-time responsiveness to changes in the game environment and is difficult to dynamically fine-tune. This leads to significant resource usage issues in games requiring a large number of diverse ink-and-wash effects.

[0003] This traditional approach has several technical limitations. It not only consumes a significant amount of storage space but also lacks the flexibility to adjust in real time. Adjustments often require reproducing the entire GIF set, resulting in significant inefficiencies. Furthermore, pre-rendered animations struggle to integrate deeply with game interaction logic, making it difficult to achieve differentiated gradient effects tailored to player behavior. This compromises both the immersiveness and artistic expression of the gaming experience. Summary of the Invention

[0004] The present disclosure provides an image processing method, a program product, and an electronic device to at least partially solve the above-mentioned problems existing in the related art.

[0005] According to a first aspect of the present disclosure, an image processing method is provided, comprising: acquiring a direction map and a texture map; controlling the direction and texture of ink shading according to the direction map and the texture map; and displaying the effect of the ink shading in a graphical user interface.

[0006] According to a second aspect of the present disclosure, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by a processor, the method of the first aspect and possible implementations thereof are implemented.

[0007] According to a third aspect of the present 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 the method of the above-mentioned first aspect and its possible implementation methods by executing the executable instructions.

[0008] In at least one embodiment of the present disclosure, an image processing method includes: obtaining a direction map and a texture map; controlling the direction and texture of ink shading based on the direction map and the texture map; and displaying the ink shading effect in a graphical user interface. In this way, by controlling the direction and texture of the ink shading using the direction map and the texture map, a more flexible, realistic, and storage-efficient ink shading effect is achieved. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] Figure 1 A schematic diagram showing a system architecture in one exemplary embodiment of the present disclosure;

[0010] Figure 2 A flowchart showing an image processing method in one exemplary embodiment of the present disclosure;

[0011] Figure 3a A schematic diagram of an erase mask in one exemplary embodiment of the present disclosure is shown;

[0012] Figure 3b A schematic diagram of a parameter interface in one exemplary embodiment of the present disclosure is shown;

[0013] Figure 4 A schematic diagram showing four layers in one exemplary embodiment of the present disclosure is shown;

[0014] Figure 5 A schematic diagram showing the effect of ink-wash dyeing in one exemplary embodiment of the present disclosure;

[0015] Figure 6 A schematic structural diagram of an electronic device in one exemplary embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0016] Exemplary embodiments of the present disclosure will be described more fully hereinafter with reference to the accompanying drawings.

[0017] In order to enable those skilled in the art to better understand the solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the embodiments described are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present disclosure.

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

[0019] The accompanying drawings are schematic illustrations of the present disclosure and are not necessarily drawn to scale. Some of the block diagrams shown in the accompanying drawings may be functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software, or in hardware modules or integrated circuits, or in networks, processors or microcontrollers. The embodiments can be implemented in various forms and should not be construed as being limited to the examples set forth herein. The features, structures or characteristics described in the present disclosure may be combined in one or more embodiments in any suitable manner. In the description below, many specific details are provided to provide a full description of the embodiments of the present disclosure. However, those skilled in the art will appreciate that one or more specific details may be omitted when implementing the technical solution of the present disclosure, or that other methods, components, devices, steps, etc. may be used to replace one or more specific details.

[0020] Figure 1 The system architecture diagram of the operating environment of this exemplary embodiment is shown. The system architecture may include a terminal device 110 and a server 120. Among them, the terminal device 110 may be a mobile phone, tablet computer, personal computer, smart wearable device, game console and other devices, which have a display function and can display a graphical user interface. The graphical user interface may include an operating system interface or an application interface, etc. The terminal device 110 is installed with an application, such as a game program. The server 120 generally refers to the background system that provides the game service in this exemplary embodiment, which may be a single server or a cluster of multiple servers. Exemplarily, a game server program is deployed on the server 120 for executing game data processing on the server side. The terminal device 110 and the server 120 can be connected via a wired or wireless communication link for data transmission. The method in one of the exemplary embodiments of the present disclosure can be executed by any one or more of the terminal device 110 and the server 120.

[0021] In one embodiment, the above method can be implemented and executed based on a cloud interaction system. The cloud interaction system can be the above system architecture. Various cloud applications, such as cloud gaming, can be run within the cloud interaction system. Taking cloud gaming as an example, cloud gaming can be a gaming method based on cloud computing. In the cloud gaming operating mode, the main body of the game program and the main body of the game screen presentation are separated. The storage and operation of the in-game control and interaction methods are completed on the cloud gaming server (such as the aforementioned server 120). The cloud gaming client (such as the aforementioned terminal device 110) is responsible for receiving and sending data and presenting the game screen. For example, the cloud gaming client can be a display device with data transmission capabilities close to the user, such as a mobile terminal, television, computer, or PDA; while the cloud gaming server in the cloud performs information processing. When playing the game, the user operates the cloud gaming client to send operation instructions to the cloud gaming server. The cloud gaming server runs the game according to the operation instructions, encodes and compresses the game screen and other data, and returns it to the cloud gaming client via the network. Finally, the cloud gaming client decodes and outputs the game screen.

[0022] In one embodiment, the above method can be implemented solely by the terminal device 110. For example, without deploying the server 120, the terminal device 110 can run an application in a standalone environment to implement the game function and execute the above method.

[0023] According to one embodiment of the present disclosure, an image processing method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0024] According to an image processing method according to one embodiment of the present disclosure, the method may include: Figure 2 The following steps are shown:

[0025] Step S210, obtaining a direction map and a texture map;

[0026] Step S230, controlling the direction and texture of ink shading according to the direction map and the texture map;

[0027] Step S250: Display the ink-wash effect in a graphical user interface.

[0028] In this way, a variety of dynamic ink-wash blending effects can be achieved by using directional maps and texture maps in combination, which can not only control the directionality of the blending diffusion, but also ensure the natural form of the ink-wash texture. At the same time, compared with the traditional GIF implementation method, it reduces the storage space occupied and improves the system efficiency.

[0029] The above steps are described in detail below.

[0030] Step S210: Obtain a direction map and a texture map.

[0031] Optionally, the directional map is a grayscale map used to determine the directional characteristics of ink blending, in which different grayscale values ​​correspond to different blending directions and intensities. In a specific implementation, the directional map can be divided into two types: a single-erasure directional map and a global erasure directional map. The single-erasure directional map mainly controls the overall directionality of the ink spreading from the center to the surroundings, usually showing radial grayscale changes; while the global erasure directional map is used to enrich the blending texture, simulate the effect of ink dripping, and increase the naturalness of the blending process. The grayscale value distribution of the directional map determines the flow path of the ink blending. The areas with high grayscale values ​​have a fast blending speed, and the areas with low grayscale values ​​have a slow blending speed. Through this grayscale difference, the diffusion of ink in different areas can be accurately controlled to achieve a natural and varied blending effect.

[0032] Optionally, the texture map is an image resource used to enhance the visual effect of ink smudging, which defines the detailed expression of the smudging area. Texture maps usually contain detailed elements such as ink traces, paper texture, and ink smudging effects. When these elements are used in conjunction with the direction map, they can produce a more realistic ink rendering effect. Texture maps can be obtained through a variety of channels, including hand-drawn scanning, photographic acquisition, or digital creation. High-quality texture maps should contain rich details, such as changes in ink density, ink absorption effects of paper, and subtle traces of interaction between ink and water molecules. In actual applications, texture maps with different characteristics can be used for different levels of smudging effects. For example, heavy textures can be used for thick ink areas, and light and transparent textures can be used for light ink areas to enhance the layering and three-dimensional effect of the overall effect.

[0033] Step S230: Control the direction and texture of the ink shading according to the direction map and the texture map.

[0034] In an optional embodiment, controlling the direction and texture of ink shading includes: generating a shading mask based on the direction map; and performing a compositing operation on the shading mask and the texture map to obtain the ink shading effect. In this manner, by compositing the shading mask and the texture map, precise control of the ink shading effect can be achieved, ensuring the directionality of the ink shading while incorporating texture details, resulting in a more natural and artistic ink shading effect.

[0035] Optionally, the directional map can control the direction of ink diffusion on the picture. It defines the direction of ink diffusion through the distribution of grayscale values. For example, it can be set to diffuse from the center to the surroundings, flow from top to bottom, or move along a specific texture path. The smudge mask is a control layer generated based on the directional map. It determines in which areas the ink is displayed and in what way it diffuses. The smudge mask is essentially a grayscale image, in which the white area indicates that the ink is fully visible, the black area indicates that the ink is completely invisible, and the gray area represents the translucent state of the ink. By adjusting the grayscale distribution of the smudge mask, the edge transition, intensity change and overall shape of the ink smudge can be precisely controlled to achieve a natural diffusion from the center to the outside or an extended flow effect along a specific direction. This method of generating a smudge mask based on a directional map makes the ink smudge process more controllable and artistically expressive.

[0036] Optionally, the texture map is mainly responsible for providing the detailed texture of the ink smudge, which can contain various material characteristics, such as the fiber texture of rice paper, the particle effect of ink, the lines of water diffusion, etc. The texture map is usually a grayscale or color image with rich details, which is used to simulate the natural texture changes when real ink spreads on paper. In the process of synthesizing the smudge mask with the texture map, different mathematical operations such as multiplication, addition, and difference can be used, and each operation method will produce different visual effects. For example, using multiplication operation will make the texture details more obvious in the highlight area; using overlay or color filter mode may make the smudge effect softer or more vivid. By adjusting the parameters of the synthesis operation, you can control the degree of influence of the texture on the final smudge effect, thereby achieving different artistic styles from realism to abstraction.

[0037] Optionally, the compositing operation can adopt a variety of mathematical models, including but not limited to linear blending (LinearBlend), multiplication (Multiply), overlay (Overlay), screen (Screen), difference (Difference), etc. Each compositing operation has its own specific mathematical formula and visual effect characteristics. For example, linear blending follows the formula Result = Mask × (1-α) +

[0038] Texture × α, where α is the blending factor; the multiplication operation follows the formula Result = Mask × Texture, preserving the details of both the shading mask and the texture image; the overlay operation uses different blending strategies based on the brightness of the base color, making dark areas darker and highlights brighter. By selecting the appropriate compositing operation and adjusting the relevant parameters, you can precisely control how the shading mask and texture image are combined, thereby affecting the texture, layering, and artistic style of the final ink shading effect, making the image appear rich and heavy, or light and transparent.

[0039] Optionally, a variety of control parameters can be introduced during the generation of the smudge mask to achieve more refined and diverse control. These parameters may include smudge intensity, edge transition smoothness, directional offset, contrast adjustment, etc. The smudge intensity determines the thickness of the ink diffusion; the edge transition smoothness controls the soft and hard characteristics of the ink diffusion edge; the directional offset allows for random or regular changes in the basic direction; and the contrast adjustment affects the light and dark contrast of the smudged area. These parameters can be provided to artists through the user interface for adjustment, allowing them to flexibly control the smudge effect according to different artistic expression requirements. At the same time, these parameters can also change dynamically during the animation process to achieve dynamic effects such as ink from thick to thin, spreading from the center to the outside, etc., enhancing the time dimension expressiveness of the ink smudge and making it more consistent with the physical behavior characteristics of ink in the real world.

[0040] In an optional embodiment, generating a gradient mask based on a directional pattern includes: obtaining a single-erase directional pattern and an overall-erase directional pattern; and overlaying the single-erase directional pattern and the overall-erase directional pattern to form a gradient mask. By obtaining and overlaying two directional patterns with different functions, a gradient mask with rich texture and directionality can be formed, providing a foundation for more delicate and realistic control of ink-wash gradient effects.

[0041] Optionally, a single-erase direction map serves as a basic element for blending control, guiding the overall diffusion direction of ink blending through changes in grayscale values. For example, a single-erase direction map can be designed as a grayscale distribution that diffuses radially from the center to the surrounding areas, so as to simulate the natural effect of ink blending from the center point outward. The light and dark changes in the grayscale map are directly mapped to the direction and intensity of ink diffusion during the blending process. Brighter areas indicate less or slower ink blending, while darker areas indicate more or faster ink blending. The design of the single-erase direction map can be adjusted according to actual needs. For example, it can be designed to be from top to bottom, from left to right, or to present a specific artistic curve direction, so as to achieve different ink flow effects, making the ink blending process more in line with the artistic expression requirements of oriental painting.

[0042] Optionally, the main function of the overall erasing direction map is to add richer and more delicate texture details on the basis of a single erasing direction map. It can include grayscale representations of complex effects such as ink dripping, uneven water absorption of paper, and ink condensation. The overall erasing direction map usually contains more randomness and irregularity. These characteristics can break the overly uniform or mechanical effect that may be brought about by a single erasing direction map, making the final ink smudging look more natural and vivid. In practical applications, the overall erasing direction map can be designed to contain multiple ink dots, ink marks or water stains. These elements will form a rich and varied smudging texture after superposition. The design of the overall erasing direction map can be adjusted according to different artistic styles. For example, landscape paintings, flower and bird paintings or figure paintings have different ink smudging characteristics.

[0043] Optionally, the process of superimposing the single erasing direction map and the overall erasing direction map is actually an image synthesis operation. This superposition can be performed in a variety of ways, such as simple pixel value addition, pixel value multiplication, or more complex blending modes. In the most common implementation, a linear combination of pixel values ​​may be used, that is, a certain weight is assigned to the single erasing direction map and the overall erasing direction map, and then their weighted sum is used as the final gradient mask. This superposition operation can be expressed by the formula: gradient mask = a × single erasing direction map + b × overall erasing direction map, where a and b are weight parameters that can be adjusted as needed to control the degree of influence of the two direction maps on the final effect. By adjusting these weight parameters, the balance between the overall directionality of the final ink smudge and the local texture details can be flexibly controlled.

[0044] Optionally, the resulting shading mask is essentially a composite grayscale image, where each pixel value determines the degree of ink shading at the corresponding location. The higher the grayscale value in the shading mask, the more pronounced the ink shading in the final effect; the lower the grayscale value, the less pronounced the ink shading, or even no shading at all. This mechanism allows for precise control of ink shading according to preset directions and textures, rather than simply uniform diffusion. The shading mask can be thought of as a "path map" for the ink shading process, defining where, how, and how intensely the ink flows. By designing different shading masks, one can achieve effects ranging from simple radial shading to complex multi-directional, multi-layered shading, meeting the needs of different scenes and artistic expressions.

[0045] Optionally, the physical properties of the paper can also be taken into account when generating the smudge mask. In traditional ink painting, the paper's material, water absorption, texture, and other properties will affect the ink's smudge effect. Therefore, when designing single-erasure direction maps and overall erasure direction maps, the characteristics of different types of rice paper can be simulated. For example, rough rice paper will cause the ink to diffuse along the fiber direction, forming irregular smudge edges; while fine rice paper will make the ink diffuse more evenly. By incorporating simulations of these physical properties into the direction map, the ink smudge effect can be made closer to the real performance in traditional painting, enhancing the user's visual experience and cultural identity.

[0046] In an optional embodiment, controlling the direction and texture of ink shading includes: constructing multiple shading layers; assigning a corresponding direction map and texture map to each shading layer; and synthesizing the shading layers to achieve the ink shading effect. By constructing a multi-layer shading structure and assigning independent direction maps and texture maps to each layer, a more realistic ink shading effect can be achieved while maintaining flexible control and enhancing overall visual expression.

[0047] Optionally, the multiple blending layers constructed can be designed based on the physical properties of ink penetration and diffusion, where each blending layer is responsible for expressing different states or characteristics in the ink blending process. For example, the blending layer can be divided into a layer that expresses the thick ink area, a layer that expresses the ink diffusion transition area, a layer that expresses the light water mark area, and a layer that expresses the texture of the underlying paper. Through this layered processing method, the physical diffusion phenomenon of ink on paper in the real world can be simulated more finely, including the precipitation of ink particles, the rapid diffusion of water molecules and other characteristics. Each blending layer can independently control its morphology, diffusion speed and transparency, thereby achieving rich and varied ink blending effects. This layered structure not only enhances the realism of the visual effect, but also provides a larger creative space for artistic expression, making the expression of ink blending more diverse.

[0048] Optionally, in the process of setting the corresponding directional map and texture map for each blending layer, different characteristics of the directional map and texture map combination can be used for different blending layers. The directional map mainly controls the direction and path of the ink diffusion, and can be designed to be radial from the center to the surroundings, a linear distribution extending from one side to the other, or an irregular organic diffusion form. The texture map is responsible for giving the blending effect a rich texture of details, such as traces of ink dripping, subtle changes in the absorption of ink by paper fibers, and the natural texture formed by ink on paper. By reasonably configuring the directional map and texture map combination for each blending layer, the diffusion form and texture characteristics of the blending layer can be precisely controlled, thereby forming a visual progressive relationship and sense of hierarchy between layers, so that the final synthesized ink blending effect has both overall coordination and rich details.

[0049] Optionally, the process of synthesizing each gradient layer can use a variety of image synthesis algorithms or blending modes to obtain the best visual effect. The synthesis process can take into account the transparency, superposition order and blending method of each gradient layer. For example, you can use transparency blending based on the alpha channel to set the light water mark layer to a semi-transparent effect, while the dark ink area maintains a high opacity; you can also use blending modes such as Multiply and Overlay to enhance the contrast and layering between layers. In addition, the synthesis process can also introduce dynamic transition effects. By controlling the appearance sequence of each layer, it simulates the process of ink gradually blending from light to dark and from the periphery to the center. Through a carefully designed synthesis strategy, it can be ensured that the final ink and wash effect not only retains the characteristics of each gradient layer, but also forms a coordinated and unified overall visual effect.

[0050] Optionally, in the process of constructing multiple blending layers, an independent set of parameters can be assigned to each blending layer for finer control. These parameters may include the base color of the blending layer, color saturation, transparency range, diffusion speed, texture intensity, etc. By adjusting these parameters, various stylized ink blending effects can be achieved, such as fresh and elegant ink and light colors, traditional ink with rich colors, or abstract ink effects with a modern feel. In addition, these parameters can also be associated with the time dimension to achieve dynamically changing blending effects, such as gradually increasing the visibility of certain blending layers over time, or adjusting their diffusion range and intensity. This parametric design approach makes the ink blending effect highly configurable and flexible, which is convenient for customized adjustments for different application scenarios.

[0051] Optionally, the multi-layered blending structure can also be combined with the user interaction system to achieve a responsive ink blending effect. For example, the parameters of each blending layer can be dynamically adjusted according to information such as the user's touch position, pressure, and movement speed, so that the ink blending effect changes with the user's operation. This interactive blending effect can be applied to a variety of scenarios such as digital painting software, interactive art installations, or game interfaces. For example, in the game, when the player unfolds the scroll, the system can dynamically adjust the diffusion direction and speed of the blending layer according to the player's operation method and speed, thereby creating a slightly different ink blending effect each time, enhancing the game's sense of participation and artistic expression. This method of combining a multi-layered blending structure with interactive technology not only improves the user experience, but also provides new possibilities for digital art creation.

[0052] In an optional embodiment, the multiple blending layers include a foreground layer, a midground layer, a background layer, and a bottom layer. The foreground layer is used to represent areas of thick ink; the midground layer is used to represent areas of ink transition; the background layer is used to represent areas of water marks; and the bottom layer is used to represent the texture of the underlying paper. By dividing the blending layers into different functionalities, the layered effect created by real ink blending on rice paper can be simulated, resulting in a more realistic and natural ink blending visual effect.

[0053] Optionally, the foreground layer serves as a thick ink area layer, and its parameter configuration can be set to lower transparency and the slowest diffusion speed, mainly showing the deposition effect of heavy particles (such as carbon black) in the ink. In the actual blending process, the ink will produce a stratification effect due to differences in molecular mass, and the foreground layer simulates the heavy component part of this physical property. By adjusting the transparency parameter of the foreground layer, the intensity of the ink can be controlled; by adjusting the erasing progress parameter, the diffusion speed of the thick ink area can be controlled to exhibit a slower diffusion characteristic, which is consistent with the physical behavior of heavy particles in real ink. The texture and direction control of the foreground layer can be set to sharper edges and a smaller diffusion radius, so that the thick ink area can maintain a relatively concentrated and condensed visual effect, enhance the layering and three-dimensional sense of the ink color, and make the overall picture visually focused to attract user attention.

[0054] Optionally, the mid-ground layer serves as the ink transition area, and its parameter configuration can be set to medium transparency and medium diffusion speed, mainly showing the transition effect of ink from thick to thin. In actual ink shading, the middle area of ​​the ink often shows rich layering changes, and the mid-ground layer simulates this transition characteristic. By adjusting the image offset parameters of the mid-ground layer, it can produce a subtle dislocation effect relative to the foreground layer, enhancing the naturalness and fluidity of the ink shading; at the same time, the color parameters of the mid-ground layer can be set to give it a slightly different hue from the foreground layer, further enhancing the layering of the ink. The diffusion control of the mid-ground layer can adopt a relatively soft edge transition, so that it can naturally blend the foreground layer and the background layer, avoiding obvious dividing lines between layers, thereby achieving a natural transition of ink color and providing rich intermediate tones and gradient effects for the overall ink effect.

[0055] Optionally, the background layer can be used as a water mark area, and its parameter configuration can be set to higher transparency and faster diffusion speed, mainly showing the faint water marks formed by the rapid diffusion of water molecules in the ink. In the actual ink rendering process, water will diffuse to farther areas before the ink particles, forming translucent water marks, and the background layer simulates this characteristic. By adjusting the UV coordinate offset parameters of the background layer, it can produce a larger range of dislocation effect relative to other layers, simulating the rapid diffusion of water molecules between paper fibers; at the same time, a lower color concentration and higher transparency can be set to make the water marks appear clear and elegant. The directional map of the background layer can choose a more divergent mode to allow the water marks to diffuse to a wider area, while the texture map can choose a more delicate and irregular pattern to simulate the uneven diffusion effect of water on paper.

[0056] Optionally, the bottom layer acts as a paper texture layer, and its parameter configuration can be set to the highest transparency and fastest diffusion speed, mainly to show the material texture effect of the rice paper itself. In traditional Chinese painting, the texture of rice paper has a significant impact on the ink effect, and the bottom layer simulates this paper characteristic. The bottom layer can use specific texture maps to simulate the texture effects of different types of rice paper, such as raw rice paper, cooked rice paper, cotton paper and other visual expressions of different materials. By adjusting the color parameters of the bottom layer, you can simulate different tones of rice paper background, such as traditional beige, white or special rice paper with a slight dyeing effect; at the same time, by adjusting the image offset parameters and erase progress parameters of the bottom layer, you can control the display method and timing of the paper texture so that it can be fully displayed in the shortest time, providing basic texture support for other ink layers, and enhancing the texture and layering of the overall picture.

[0057] The optional four-layer blending structure is designed with full consideration of the physical behavior of ink on rice paper. It can not only simulate the different diffusion rates of ink molecules on paper, but also show the difference in visual effects of ink at different concentrations. Through this multi-layer design, the ink blending effect can present a natural transition from the central thick ink area to the outside, avoiding the edge harshness problem that may be caused by the traditional single-layer implementation method. At the same time, the four-layer structure also provides art designers with more adjustment space. By fine-tuning the parameters of each layer, different styles of ink effects can be achieved, such as the simulation of different painting methods such as fine brushwork, freehand brushwork, and splashed ink, which greatly enhances the flexibility and expressiveness of the system. In addition, the independent control of the parameters of each layer also makes the dynamic effect more abundant, which can create a vivid effect of ink slowly spreading from the center to the outside, enhancing the dynamic sense and artistic value of the overall picture.

[0058] Optionally, when implementing a four-layer gradient structure, consider introducing an adaptive algorithm to dynamically adjust the parameters of each layer, so that the ink gradient effect can be automatically optimized based on the base image content. For example, for landscape paintings, the expressiveness of the background and mid-ground layers can be automatically enhanced, highlighting the ductility of water marks; while for flower and bird paintings, the details of the foreground layer can be enhanced, making the brushstrokes more refined. This intelligent adaptive processing can further enhance the diversity and professionalism of ink effects, reduce the workload of manual parameter adjustment, and ensure that works of different themes can achieve the best visual performance.

[0059] In an optional embodiment, a corresponding directional map and texture map are set for each blending layer, including: setting image offset parameters for each blending layer to control the staggered effect between the layers; and setting color parameters for each blending layer to control the color and transparency of each layer. By setting the image offset and color parameters, a staggered effect and rich color and transparency variations between the blending layers can be achieved, making the ink-and-wash blending effect more realistic and natural, presenting a visual effect with distinct layers and artistic beauty.

[0060] Optionally, the image offset parameters include UV coordinate offset values ​​in four directions: up, down, left, and right. By adjusting these values, the position offset of the texture of each gradient layer on the plane can be controlled. In actual implementation, when different image offset parameters are set for the foreground layer, middle ground layer, and background layer, the textures between these layers will be subtly misaligned, thereby simulating the natural phenomenon that when ink diffuses on paper, ink of different concentrations flows in different directions and distances. For example, the offset range of the background layer (water mark area) can be set to a larger range to show the characteristics of water molecules rapidly diffusing to the surroundings; the offset of the middle ground layer (ink and water transition area) can be set to a moderate range, while the offset of the foreground layer (thick ink area) can be smaller. In this way, the physical phenomenon of different diffusion distances of different components in the ink due to differences in weight and density can be simulated, making the overall gradient effect more realistic and not dull.

[0061] Optionally, the color parameters refer to the RGBA color values ​​applied to each blending layer, where RGB controls the color hue, saturation, and brightness, while the A channel controls transparency. By setting different color parameters, you can give each blending layer different tones and transparency characteristics. For example, you can set a dark black and high opacity color parameter for the foreground layer to express the solemnity of the thick ink area; set a slightly lighter gray-black and translucent color parameter for the midground layer to express the gradient feeling of the ink transition area; set a lighter gray and highly transparent color parameter for the background layer to express the lightness of the water mark area. This precise control of color parameters allows the blending layers to present a gradient effect from dark to light, from opaque to translucent after superposition, forming a rich sense of layering with the characteristics of traditional Chinese ink painting art.

[0062] Optionally, when color parameters are used in conjunction with a texture map, the original color of the texture map is mixed with the set color parameters. This mixing process usually uses multiplication or interpolation operations and can be expressed as "final color = texture map color × color parameter" or "final color = lerp(texture map color, color parameter.rgb, color parameter.a)". In this way, even if all gradient layers use the same texture map, different visual effects can be achieved through different color parameters. This feature allows the system to save storage space. Only a limited number of texture maps need to be stored, and a rich variety of gradient effects can be achieved through parameter adjustment. At the same time, this parameterized approach also facilitates dynamic adjustment of ink effects at runtime, such as dynamically adjusting the color depth or transparency of the ink according to the changing atmosphere of the game scene, thereby enhancing the artistic expression and immersion of the game.

[0063] Optionally, the staggered effect between each blending layer can be precisely controlled by setting different image offset parameter values. This staggered effect is mainly manifested in three aspects: spatial staggering, color staggering, and texture staggering. Spatial staggering refers to the slight deviation in the planar position of each layer of texture, which is directly controlled by the image offset parameters; color staggering refers to the differences in hue, saturation, lightness and transparency between each layer, which is controlled by color parameters; texture staggering refers to the differences in details such as edge contours and ink flow traces between each layer, which is mainly achieved by assigning different directional maps and texture maps to each layer. The combined use of these three staggered effects can break the flatness and mechanical feel of the picture, increase the natural changes and artistic charm of the ink blending, and enable the viewer to visually feel the fluidity and layering of the ink naturally blending on the paper, thereby obtaining an artistic experience close to that of traditional ink painting.

[0064] Step S250: Display the ink-wash effect in a graphical user interface.

[0065] In an optional embodiment, displaying the ink-wash effect in the graphical user interface includes displaying the ink-wash effect on a scroll object in the graphical user interface. Thus, by displaying the ink-wash effect on the scroll object, the game theme can be better integrated with traditional Chinese cultural elements, enhancing the artistic value and cultural depth of the user experience.

[0066] Scroll objects, as a special interactive interface element, hold significant significance in MMORPGs set in ancient China. They serve not only as a traditional artistic expression but also as a visual focal point and a carrier of quest props. Scrolls are typically displayed in two formats: a scroll-like display and a hanging display. During the unfolding process, the speed and pattern can be dynamically controlled to coordinate with the appearance of the ink wash effect, creating the visual effect of "the scroll slowly unfolds, the ink gradually emerges." Regarding interface layout, scroll objects are typically placed centrally to ensure a natural focus for the user's gaze, complemented by appropriate ambient lighting and background sound effects to enhance the scroll's presence. Furthermore, the scroll's border design can incorporate traditional patterns and designs, creating a consistent visual language with the ink wash effect, further enhancing the atmosphere of traditional Chinese art.

[0067] Optionally, the scroll object in the graphical user interface can present multiple states according to the needs of the game scene, including fully rolled up, half-unfolded and fully unfolded. During the unfolding of the scroll, an unfolding animation that matches the rhythm of the ink and wash painting can be designed to gradually reveal the content of the picture as the scroll unfolds. The scroll object can also be configured with appropriate lighting effects, such as simulating the faint reflection of paper or the shadow cast by ambient light, to enhance the texture of the scroll. In order to improve the interactive experience, a touch area can be set on the scroll object, allowing players to control the unfolding speed of the scroll or the progress of the ink and wash painting through gestures such as touch and slide, so that players can actively participate in the process of scroll display and enhance the sense of immersion and participation. In addition, the scroll object can be designed with elastic animation effects to simulate the physical properties of a real scroll, showing appropriate elasticity and quality when unfolding and retracting.

[0068] Optionally, when displaying the ink-and-wash effect in the graphical user interface, the display method of the scroll object can be designed in a variety of ways according to different game scenes and plot requirements. For example, at important mission nodes, the scroll can be displayed in full-screen mode, accompanied by an ambient dimming effect to highlight the importance of the scroll content; while in the daily game process, the scroll content can be displayed in the form of a small floating window. The material performance of the scroll object can also be differentiated. For example, an old mission scroll can have a damaged and yellowed effect added to the edge, while a newly made scroll remains white and intact. The display of the scroll object can also be combined with the game's time system to present different lighting effects at different in-game time periods, such as warm tones at sunrise and cool tones at night, enhancing the perception of the passage of time in the game and the immersive experience.

[0069] Optionally, when implementing the ink-wash blending effect display of a scroll object in a graphical user interface, multi-layer rendering technology can be used to enhance visual expression. The scroll object itself can be divided into multiple layers, including a background paper layer, an ink content layer, a decorative border layer, and so on. To enhance the sense of three-dimensionality and texture, a normal map and a specular map can be applied to the scroll object to simulate the subtle bumps and gloss changes of the paper. When the player's perspective or the position of the light source changes, the surface of the scroll will show realistic light and shadow changes. At the same time, to enhance interactive feedback, appropriate animations can be added when the player interacts with the scroll object, such as slight fluctuations, subtle light effects, etc., to make the scroll seem to "come alive." In addition, edge effects can be set for the scroll object, such as a slight overflow effect when the ink spreads to the edge or a slight curl at the edge of the paper, to further enhance the artistic expression and realism.

[0070] Optionally, when displaying the ink-and-wash blending effect on the scroll object of the graphical user interface, you can consider performance optimization strategies to ensure smooth operation on various devices. Textures and renderings of different resolutions can be used, and the appropriate resource loading level can be automatically selected according to the device performance. For low-end devices, the number of blending layers and texture details can be reduced to retain the core visual effects; on high-end devices, all blending layers and additional visual effects can be enabled, such as real-time reflections, dynamic shadows, etc. When the scroll object is out of view or in the distance, the rendering accuracy can be automatically reduced or some dynamic effect calculations can be paused, and the full effect can be restored when the player's attention returns to the scroll. In addition, texture compression and resource preloading strategies can be implemented to ensure that the scroll ink-and-wash blending effect can transition smoothly without causing lag due to resource loading.

[0071] Optionally, in game development, the ink-wash effects on scroll objects can be tightly integrated with the game's narrative system to create a unique gaming experience. For example, a "memory replay" mechanic could be designed where, when the player triggers a specific plot point, the ink on the scroll appears in a specific order, gradually revealing hidden story content. Alternatively, an "ink perception" system could be designed to dynamically adjust the speed, range, and color depth of the ink-wash effects based on the player's in-game choices and progress, turning the scroll into a visual record of the player's gameplay journey. This integration not only enhances the game's narrative depth but also elevates the scroll's ink-wash effects from a purely visual effect to a functional element that supports game mechanics, providing players with a richer and more meaningful interactive experience.

[0072] In an optional embodiment, the method further includes the steps of obtaining a single-erase noise map and overlaying the single-erase noise map with the shading mask. By introducing the single-erase noise map and overlaying it with the shading mask, the natural randomness and texture richness of the ink shading effect can be further enhanced, making the ink shading more realistic and vivid, thereby improving the artistic expression of the overall visual effect.

[0073] For example, taking the foreground layer as an example, the single erasing direction map and the overall erasing direction map together constitute the erasing mask of this layer. This grayscale mask is multiplied with the texture map of this layer, and the masked part can be superimposed on other layers to achieve the effect of erasing. Figure 3a shown.

[0074] (1) A single erasing direction map (_ErasingLineDirectionTex, E) is used as the base, and the overall shading direction is controlled by grayscale. For example, the one used in the figure below allows the erasing to spread from the center to the surrounding areas.

[0075] (2) The overall erasing direction map (E1) is superimposed on E to enrich the erasing texture. For example, the one used in the figure below adds the texture of ink drops.

[0076] (3) Single-erasing noise map: further increases the richness and randomness of the erased texture.

[0077] In the above three pictures, each layer can be configured separately to achieve different erasing effects on each layer.

[0078] For example, on this basis, some properties are added to further improve the direction and texture performance of ink shading:

[0079] (1) Erase angle: Rotate the erase mask of this layer as a whole

[0080] (2) Single Erase Interval: This value is applied to the overall erase direction image (E1). The larger the value, the higher the contrast of the image. When the grayscale differences between ink drops are small, they drip continuously as the erasing progresses. When the grayscale differences are large, the intervals between ink drops become larger, and the dripping effect becomes more obvious.

[0081] (3) Example code and description:

[0082] float erasingMask = directionSample*_ErasingOffset+lineDirectionSample+(1-_ErasingProgress); directionSample: sampled from the overall erasing direction map

[0083] _ErasingOffset: single erasing interval

[0084] lineDirectionSample: Sampled from a single-erase direction map

[0085] _ErasingProgress: Erasing progress

[0086] Corresponding material parameter interface (Front layer), such as Figure 3b shown.

[0087] Optionally, you can use four layers to achieve a more realistic ink effect. The ink will separate into multiple layers when it is smudged, with light components (water molecules) spreading quickly and heavy particles (carbon black) spreading slowly, so the bottom layer appears as light water marks, the middle layer is darker, and the center area is the thickest ink area.

[0088] In view of the characteristics of ink, a four-layer drawing method is designed, namely the foreground layer (Front layer), the middle layer (Middle layer), the background layer (Back layer) and the base layer (Base layer), which serve as the thick ink area, the ink transition area, the water mark area and the bottom paper texture respectively. The four layers are superimposed together to achieve the final ink effect, such as Figure 4 shown.

[0089] Taking the back layer as an example, a realistic ink painting effect is achieved mainly through image offset and underlying image color.

[0090] (1) Image offset: UV offset in the up, down, left, and right directions. Each layer can be slightly staggered to create a staggered effect and make the shading effect richer.

[0091] (2) Bottom Image Color: All layers share the same texture base. The image color (RGBA format) is multiplied by the texture to get the color effect of this layer. Adjusting the transparency of the image color can get clear translucent water marks. In addition, different color tendencies can be superimposed on each layer to create a stylized effect.

[0092] The foreground, middle, and back layers each have independent image offset and bottom layer color parameters. Adjusting these parameters allows you to create a light, translucent bottom layer, a darker middle layer, and an opaque, rich top layer, recreating a realistic ink painting effect.

[0093] Furthermore, an independent ink spreading progress parameter can be adopted. Taking the background layer as an example, a layered ink spreading effect can be achieved by erasing the progress.

[0094] Erase Progress: This is a transparency parameter. In addition to the erase mask for each layer described above, an erase progress is added. The greater the erase progress, the more of the layer is revealed. When the erase progress is very large, the layer is completely revealed. Each layer's erase progress can be controlled independently, allowing for different spreading speeds. This creates an effect where the bottom layer diffuses fastest, the middle layers second, and the top layer (with thicker ink in the center) diffuses slowest, simulating the physical properties of ink spreading on rice paper in the real world.

[0095] like Figure 5 The figure shows a schematic diagram of a dynamic ink effect in an optional embodiment.

[0096] The optional Single Erase Noise Map is a special type of grayscale image used to add randomness and irregularity to the ink smudge effect. During the smudge process, actual ink diffusion often exhibits uneven characteristics, affected by factors such as paper texture, ink concentration, and moisture content, resulting in subtle variations and noise. The Single Erase Noise Map simulates these natural random variations, adding more natural textural detail to the smudge effect. The noise map can contain noise information of varying frequencies, amplitudes, and distributions, creating subtle perturbations and variations in the smudge process, preventing the smudge effect from appearing too regular and mechanical.

[0097] Optionally, in the process of superimposing the single-erasure noise map with the smudge mask, a variety of mathematical operations can be used, such as addition, multiplication, and mixing. Usually, the single-erasure noise map can be used as a modulation factor to fine-tune the smudge mask. For example, the grayscale value in the noise map can be mapped to a smaller range (such as -0.1 to 0.1), and then added to the grayscale value of the smudge mask. This will add subtle disturbances and changes to the edge area while maintaining the original smudge direction and main effect. In actual applications, the influence intensity of the noise map can also be adjusted according to different artistic needs, and the weight of the noise factor can be controlled by parameters so that the final effect can achieve a balance between regularity and randomness.

[0098] Optionally, a single-erased noise map can be overlaid with a smudge mask to create a more complex and natural control map for subsequent compositing with a texture map. This overlay process helps simulate the natural diffusion of ink on paper, including the bifurcation and aggregation of ink between paper fibers, as well as microscopic capillary phenomena. By modulating the noise map, the smudge effect maintains its directionality and overall form at a macro level, while exhibiting rich variations in microscopic details, such as the irregularities of ink diffusion edges, natural variations in light and dark transitions, and unique texture effects in localized areas. This processing method is particularly suitable for expressing artistic effects such as "broken ink" and "flying white" commonly seen in ink paintings, making digital ink smudges closer to the visual expression of traditional ink paintings.

[0099] Optionally, during the implementation of the graphical user interface, the single-erase noise map can be adjusted and controlled as an independent parameter. Designers can choose noise maps with different characteristics, such as fractal noise, Perlin noise, Worley noise, etc., and can even customize the noise map generation algorithm as needed. In addition, dynamic changing parameters can be set for the noise map, so that it changes over time or with user interaction, thereby creating a dynamically evolving ink and wash effect. For example, a noise map can be designed whose frequency and amplitude gradually decrease as the smudging progresses, simulating the natural phenomenon of ink diffusion gradually stabilizing as the water evaporates. The application of this dynamic noise can make the digital ink and wash effect more vivid and artistically expressive.

[0100] Optionally, single-erase noise maps can be created using procedural generation techniques, where algorithms dynamically create noise textures with various characteristics. This approach has several advantages over using pre-made static images: first, procedural generation can instantly create an infinite variety of noise patterns to meet the needs of different scenes and situations; second, algorithm parameters can be dynamically adjusted at runtime, allowing noise characteristics to adapt to environmental factors (such as light, time, user input, etc.); third, procedural generation is generally more storage-efficient, especially when high-resolution or multiple variations are required. Commonly used procedural noise algorithms include Perlin Noise, Simplex Noise, Fractal Brownian Motion, etc. These algorithms can generate a variety of texture effects ranging from organic and natural to abstract and geometric.

[0101] Optionally, when overlaying a single-erasure noise map with a gradient mask, you can consider introducing a physical simulation model to more accurately simulate the diffusion behavior of ink on paper. For example, you can combine the principles of fluid dynamics and consider factors such as the water absorbency, fiber orientation, and surface tension of the paper to establish a microscopic model of ink diffusion. In this model, the noise map is not only a visual decoration, but also a physical representation of the microstructure of the paper. Through this physically driven noise model, a more natural edge diffusion effect, ink accumulation, and special textures at the dry-wet junction can be achieved. Although this method has a high computational complexity, it can bring significant visual improvements in application scenarios that pursue extremely high artistic realism. It is particularly suitable for high-end art creation software or professional applications that require accurate simulation of traditional ink art effects.

[0102] In an optional embodiment, the method further includes the steps of setting an erasing angle parameter and rotating the direction of the shading mask according to the erasing angle parameter. Thus, by setting the erasing angle parameter and rotating the shading mask direction, the directionality of the ink shading can be flexibly controlled, thereby diversifying the ink effects and enhancing the artistic expression and realism of the image.

[0103] Optionally, the erase angle parameter can be an adjustable angle value, such as any value in the range of 0-360 degrees. By adjusting this parameter, the smudge mask can be rotated at a specific angle. When a specific smudge direction effect is required, art designers can directly modify the erase angle parameter instead of recreating the direction map, which greatly improves the creative efficiency. For example, when simulating horizontal writing from right to left, the angle can be set to 0 degrees; when it is necessary to express vertical writing from top to bottom, the angle can be adjusted to 90 degrees, so that the direction of the smudge mask will change accordingly, so that the smudge diffusion direction of the ink meets the expected visual effect. In this way, smudge effects in a variety of directions can be achieved while keeping the original smudge mask material unchanged.

[0104] Optionally, the erase angle parameter can be applied to the combined result of a single erase direction map and an overall erase direction map, so that the entire gradient mask is rotated as a whole according to the set angle. This rotation processing is performed in the image space, and the position of each pixel in the direction map is rotated and mapped according to the set angle through coordinate transformation, thereby obtaining a rotated gradient mask. In actual implementation, this can be achieved through the offset of UV coordinates and the calculation of the rotation matrix, that is, the rotation transformation is applied to the original UV coordinates and then the direction map is sampled, so that the rotated gradient effect can be obtained without preparing independent direction map resources for each angle.

[0105] Optionally, the erasing angle parameters can be dynamically adjusted at runtime so that the direction of the ink smudging can change over time or with user interaction. For example, you can design an erasing angle that changes slowly over time to simulate the natural effect of ink slowly flowing on paper; or automatically adjust the erasing angle according to the user's touch direction so that the ink smudging in the direction indicated by the user. This dynamic adjustment not only enhances the naturalness and interactivity of the ink smudging effect, but also makes the picture present a more vivid visual experience. In implementation, animation curves or interpolation algorithms can be used to smoothly transition between different angles to ensure that the change in smudging direction is natural and smooth.

[0106] Optionally, the Erase Angle parameter can be combined with other parameters such as smudging progress and contrast to create more complex and diverse ink smudging effects. For example, you can set one angle at the beginning of the smudging process and gradually transition to another angle as the smudging progresses, simulating the phenomenon of ink changing direction as it absorbs onto paper. This combination can more realistically simulate complex natural phenomena, making the ink smudging effect no longer a simple linear diffusion, but a more natural and organic process of change, further enhancing the artistry and realism of the visual expression.

[0107] Optionally, the erase angle parameter can also be combined with paper texture and environmental factors to simulate the physical properties of ink smudging under different conditions. For example, when simulating highly rough rice paper, the angle of the smudging mask can be set to change randomly to reflect the irregular diffusion of ink on the rough paper surface; while when simulating smooth paper, the consistency of the smudging angle can be maintained. In addition, the influence of gravity can be simulated to make the smudging diffuse slightly faster in the vertical direction and relatively slower in the horizontal direction. In this way, a more physically accurate ink smudging effect can be achieved through precise control of the angle parameters.

[0108] Optionally, to further enhance artistic expression, the erase angle parameter can be controlled by region, that is, different angle parameters are applied to different areas of the same gradient mask. This can be achieved through an additional control map, in which each pixel value corresponds to the angle offset of the region. This technology allows the ink to present complex effects as if it is blown by the breeze or flowing on uneven paper, greatly enhancing the naturalness and artistic expression of the gradient effect. In practical applications, this regional angle control can be used to create specific artistic styles, such as expressing the direction of water flow in landscape paintings, or the rhythm of ink marks in calligraphy works.

[0109] In an optional embodiment, the method further includes the steps of setting a single-erasure interval parameter and adjusting the contrast of the gradient mask based on the single-erasure interval parameter. Thus, by adjusting the single-erasure interval parameter, the contrast of the gradient mask can be directly controlled, thereby achieving a more delicate and controllable ink gradient effect, and making the ink drop effect present different visual expressions.

[0110] Optionally, the single erase interval parameter is an adjustable value, which mainly acts on the overall erase direction map and affects the interval effect of ink drops during the ink blending process. When the single erase interval parameter value is small, the grayscale contrast in the overall erase direction map is low, and the transition between ink drops is smoother, showing a continuous blending effect; when the single erase interval parameter value increases, the grayscale contrast in the overall erase direction map is enhanced, making the boundaries between ink drops more obvious, and the discontinuity of ink drops stronger, thereby achieving a clearer ink drop texture. This parameter adjustment allows the ink blending effect to transition from a continuous and smooth gradient to a clearly identifiable independent ink drop effect, increasing the richness and diversity of the blending effect.

[0111] Optionally, the contrast adjustment of the smudge mask is achieved by multiplying the single erase interval parameter with the sampling result of the overall erase direction map when calculating the smudge mask. During the implementation process, the formula can be used: smudge mask = overall erase direction map sampling value × single erase interval parameter + single erase direction map sampling value + (1-erasing progress). This calculation method allows the single erase interval parameter to directly affect the weight of the overall erase direction map in the final smudge mask, thereby changing the overall contrast of the smudge mask. When the overall erase direction map contains multiple areas with different grayscale differences, the adjustment of the single erase interval parameter will amplify or reduce these differences, thereby affecting the final ink drop effect, making the ink smudge visually present a different texture and rhythm.

[0112] Optionally, contrast adjustment changes the expression of ink smudges by affecting the distribution of grayscale values ​​in the smudge mask. When the contrast of the smudge mask is enhanced, the jumps in grayscale values ​​between different areas are more obvious, making the ink smudges show sharper edges and a clearer sense of layering at the boundaries of these areas; and when the contrast of the smudge mask is reduced, the grayscale value distribution is smoother, and the smudge effect is softer and more continuous. This adjustment of the contrast of the smudge mask allows the ink smudge to present a variety of expressions from soft and elegant to sharp and distinct according to different artistic needs, enhancing the artistic expression and adaptability of the ink smudge effect, meeting the needs of different scenes and different styles of paintings, and providing a richer and more diverse visual experience.

[0113] Optionally, the single erase interval parameter can be used in combination with other parameters such as erase angle parameter, erase progress parameter, etc. to jointly control the overall effect of ink blending. When it is necessary to present a dynamic ink blending process, the single erase interval parameter and the erase progress parameter can be adjusted synchronously with time, so that the interval effect of ink dripping is coordinated with the blending progress, creating a more vivid and natural ink flow effect. At the same time, the single erase interval parameter can also be set to different values ​​for different blending layers (such as foreground layer, middle ground layer, background layer), so that each layer presents different ink dripping texture and contrast effect, further enhancing the sense of layering and space of ink blending, and making the overall effect closer to the natural blending effect of traditional ink painting.

[0114] Optionally, the single-erase interval parameter can also be dynamically adjusted, automatically changing according to specific conditions through programming to simulate the impact of environmental factors on ink blending. For example, the impact of factors such as paper humidity changes, ink concentration changes, or external vibrations on ink diffusion speed and texture can be simulated, so that the ink blending effect can be naturally adjusted as these conditions change. When simulating an environment with high humidity, the single-erase interval parameter can be automatically lowered to reduce the interval between ink drops, presenting a more continuous and smooth blending effect; when simulating a dry environment, the single-erase interval parameter is automatically increased to make the ink drops more distinct and independent. This dynamic adjustment mechanism enables the ink blending effect to adaptively adjust according to changes in the simulated environment, providing a more realistic and immersive visual experience.

[0115] Optionally, in actual applications, the adjustment of the single erase interval parameters can be achieved through interactive elements such as sliders or numerical input boxes in the graphical user interface, allowing creators to preview the blending effects under different parameter values ​​in real time. In addition, preset configuration combinations can be designed to save parameter combinations of specific styles or effects as presets for users to quickly select and apply. For example, you can set presets such as "landscape painting style", "splashing ink style", and "fine brushwork style", each of which contains a single erase interval parameter value suitable for that style. This preset mechanism not only simplifies the parameter adjustment process, but also facilitates the creation of different styles of ink and wash blending effects, allowing even users without deep artistic skills to easily create professional-level ink and wash blending effects.

[0116] In an optional embodiment, the method further includes the step of setting an independent diffusion progress parameter for each shading layer to control the diffusion speed of each shading layer. By setting independent diffusion speed parameters for different shading layers, the physical properties of real ink shading on paper can be accurately simulated, resulting in a more natural and realistic ink shading effect.

[0117] Optionally, the blending progress parameter is actually the key parameter for controlling the transparency change of each blending layer. When the blending progress parameter value is small, the display area of ​​the corresponding blending layer is small. As the parameter value increases, the blending layer gradually spreads and shows more areas. This mechanism of independent parameter setting enables the system to finely control the diffusion rate of ink with different densities and different compositions, and simulate the physical behavior differences of different components in ink (such as water molecules and carbon black particles) when they diffuse on paper. In the specific implementation, the blending progress parameter is used as a transparency control factor and directly participates in the calculation formula of the blending mask: erasingMask = directionSample*ErasingOffset+lineDirectionSample+(1-ErasingProgress), where ErasingProgress is the blending progress parameter. By adjusting this value, the display range and diffusion state of the blending layer can be accurately controlled.

[0118] Optionally, in a multi-layer blending effect, this parameter control mechanism can achieve a staggered diffusion performance of each layer, so that the ink blending effect presents a sense of layering in the time dimension. Since the light components (water molecules) of the ink pigment will spread quickly during the diffusion process, while the heavy particles (carbon black) will spread slowly, this differentiated diffusion characteristic can be accurately simulated through the design of independent blending progress parameters. The system can set different blending progress change curves for the foreground layer, middle ground layer, background layer and bottom layer, so that at the same time point, different layers of ink will show different diffusion states, thereby achieving a more three-dimensional and spatial ink blending effect.

[0119] Optionally, the independent setting mechanism of the blending progress parameters also supports dynamic adjustment of the diffusion speed of each blending layer. The progress change can be triggered by a time function or user interaction to achieve a dynamic ink blending effect. For example, a function that changes with time can be designed: ErasingProgress = Mathf.Lerp(0,1,Time.time*speedFactor), where speedFactor is a speed factor set independently for each layer. By adjusting this factor, the diffusion speed can be controlled. This parametric control method can not only support preset blending animations, but also respond to user interactions, such as adjusting the blending progress according to how the user touches the screen, to achieve an interactive ink blending experience and enhance user participation and immersion.

[0120] Optionally, the blending progress parameter can also work in conjunction with other image processing parameters. For example, the color saturation, transparency, or texture details can be dynamically adjusted according to the blending progress to achieve a more complex blending visual effect. When the blending progress is different, the system can synchronously adjust the color mixing weight. For example, in the early stage of blending the foreground layer, the concentration of the ink can be appropriately enhanced. As the blending progresses, the concentration can be gradually reduced to simulate the natural phenomenon that the ink concentration is diluted as the diffusion area increases. This parameter association mechanism can create a more delicate and artistically expressive ink blending effect, making digital ink works closer to the visual characteristics of traditional ink paintings.

[0121] Optionally, the adjustment of the shading progress parameters can also be synchronized with the audio or narrative rhythm to achieve multimedia collaborative artistic expression. For example, at the critical moment of the game narrative, the shading progress parameters can be controlled to make the ink elements in the picture gradually appear or change with the rhythm of the background music or the development of the plot, thereby enhancing the narrative tension and artistic atmosphere. In addition, the progress parameters of different shading layers can be set with different response curves, such as linear, exponential or sine curves, to create a rhythmic shading effect with varied rhythms, making ink shading not only a visual effect, but also a form of temporal art expression.

[0122] In an alternative embodiment, independent diffusion progress parameters are set for each gradient layer, ensuring that the bottom gradient layer diffuses the fastest, the mid-ground gradient layer diffuses the second fastest, and the foreground gradient layer diffuses the slowest. By assigning different diffusion speeds to different layers, the physical diffusion properties of ink on rice paper in the real world can be simulated, resulting in a more realistic ink-based gradient effect.

[0123] Optionally, in the actual physical properties of ink materials, light components (mainly water molecules) will spread quickly, while heavy particles (such as carbon black) will spread slowly. This natural phenomenon is accurately simulated in this technical solution through the difference in diffusion speed of different shading layers. Specifically, the bottom shading layer mainly presents light water marks and paper textures, corresponding to the characteristics of rapid diffusion of water in ink, so its diffusion speed is set to the fastest; the mid-ground shading layer shows the transition area of ​​ink, where the degree of mixing of water and pigment is moderate, so its diffusion speed is set to moderate; and the foreground shading layer mainly presents the thick ink area, corresponding to the part with the highest pigment concentration. Since the pigment particles diffuse slowly, its diffusion speed is set to the slowest. This layered diffusion speed design makes the overall ink shading effect more visually natural and layered.

[0124] Optional, independent shading progress parameters can be understood as parameters that control the transparency of the erasing mask of each layer in terms of technical implementation. In the program, these parameters are named "_ErasingProgress", "_ErasingProgress2", etc., corresponding to different shading layers. When the erasing progress value increases, the area displayed by the corresponding shading layer will increase. When the progress value reaches the maximum, the shading layer will be fully visible. By setting different progress change rates for different shading layers, differentiated control of the diffusion speed of different layers can be achieved. For example, the shading progress parameter of the bottom layer can be quickly increased to the maximum value, the progress parameter of the middle ground layer can be increased at a medium speed, and the progress parameter of the foreground layer can be increased slowly, thereby visually presenting a natural effect of ink gradually penetrating from the outside to the inside, enhancing the artistic expression and realism of the overall picture.

[0125] Optional, differentiated settings for the blending progress parameters can not only simulate physical properties, but also produce rich artistic effects. For example, by adjusting the diffusion speed difference between the bottom layer and the mid-ground layer, the boundary clarity between the water mark area and the ink transition area can be controlled; by adjusting the diffusion speed difference between the mid-ground layer and the foreground layer, the degree of gradient between the ink transition area and the thick ink area can be controlled. This fine control allows the picture to present a transition from light and transparent to solemn and thick, creating the artistic effect of "five colors of ink" (burnt, thick, heavy, light, and clear) in traditional Chinese ink painting. At the same time, different speed settings can also create a dynamically changing visual rhythm, making the ink blending process itself an artistic expression, enhancing the user's aesthetic experience when watching the ink blending process.

[0126] Optionally, in actual applications, this differentiated diffusion speed setting can be achieved through animation curves or parameter interpolation. An independent animation curve can be set for each blending layer to control the change pattern of its blending progress parameters over time. For example, the bottom blending layer can use a steep linear curve or an acceleration curve to quickly reach the full display state; the mid-ground blending layer can use a linear curve with a medium slope or an easy-in and easy-out curve to make it diffuse at a medium speed; the foreground blending layer can use a slowly rising curve or a delayed start curve to make its diffusion speed the slowest. This precise control based on animation curves can make the ink blending effect more delicate and controllable, and can adapt to the needs of pictures of different styles and themes, providing a richer and more varied visual expression.

[0127] Optionally, to enhance interactivity and playability, the diffusion speed of the gradient layer can be associated with user operations or game progress. For example, the diffusion speed of the foreground layer can be adjusted according to the strength of the user's touch or click. The greater the strength, the closer the diffusion speed of the foreground layer is to the mid-ground layer, resulting in a thicker ink mark. Alternatively, the diffusion speed ratio of each gradient layer can be adjusted according to the emotional state of the character in the game. When the character is emotionally excited, the foreground layer can be accelerated to show a more unrestrained brushstroke style. When the character is emotionally calm, the default diffusion speed ratio is maintained, presenting an elegant and restrained ink effect. This dynamic diffusion speed adjustment associated with interaction or game logic can make the ink and wash effect not only a visual expression, but also a carrier of narrative and emotional expression.

[0128] Optionally, the direction and texture of the ink smudging are controlled. The control process uses the grayscale distribution information in the directional map to guide the direction and speed of ink diffusion, and the difference in grayscale values ​​is directly mapped to the dynamic change of the smudging. Secondly, the smudging mask generated by the directional map is synthesized with the texture map to achieve the detailed expression of the ink smudging. In addition, the control process can also include the dynamic adjustment of multiple parameters. For example, the erasing angle parameter can rotate the smudging direction as a whole, and the single erasing interval parameter can adjust the contrast of the smudging texture, thereby affecting the interval and prominence of the ink dripping effect. The comprehensive application of these control methods makes the ink smudging effect both conform to physical laws and full of artistic expression.

[0129] Optionally, in the process of generating the ink and wash blending effect, you can achieve a variety of visual presentations by adjusting different parameters. For example, the speed of the blending diffusion can be set according to different situations. Rapid diffusion can simulate the effect of thin ink with more water, and slow diffusion can simulate the effect of thick ink with thicker ink. In addition, you can also adjust the irregularity of the blending and increase the random noise factor to make the blending process more natural. In actual applications, the ink and wash blending effect is often not presented in a single layer, but through multi-layer superposition to achieve a rich sense of layering. Each layer can have its own unique blending direction and texture characteristics, which together constitute a complex and natural ink art effect. This multi-layered blending structure makes the final effect have visual characteristics that are closer to traditional ink paintings.

[0130] The exemplary embodiments of the present disclosure further provide a computer program product, which includes a computer program, and implements the above method when the computer program is executed by a processor.

[0131] In one embodiment, a computer program product may be a tangible product containing a computer program, such as a computer-readable storage medium storing the computer program. The computer-readable storage medium may be a storage medium based on electrical, magnetic, optical, electromagnetic, infrared, or other signals, including but not limited to random access memory (RAM), read-only memory (ROM), magnetic tape, floppy disk, flash memory (Flash), mechanical hard disk drive (HDD), solid-state drive (SSD), and the like. Exemplarily, the computer program product may be implemented as a non-volatile storage medium storing the computer program, such as a read-only memory, NAND flash memory, and the like.

[0132] In one embodiment, the computer program product may be an intangible product containing a computer program. For example, the computer program product may be implemented as a virtual digital product, such as a digital file such as an executable file or installation package storing the computer program.

[0133] The code of the computer program can be written in one or more programming languages. Programming languages ​​include C, Java, C++, etc. The program code can be executed entirely on the user computing device, partially on the user computing device, or as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device via any type of network, such as a local area network (LAN), a wide area network (WAN), etc., or can be connected to an external computing device (e.g., via an Internet connection provided by a carrier).

[0134] Computer programs can be carried or transmitted through electrical, magnetic, optical, electromagnetic, infrared, and other signals. Electronic devices can convert signals carrying computer programs into digital signals to run the computer programs. When a computer program is run on an electronic device, its code is used to enable the electronic device to execute (more specifically, enable the processor of the electronic device to execute) the method steps of various exemplary embodiments of the present disclosure, for example: an image processing method comprising: obtaining a direction map and a texture map; controlling the direction and texture of ink shading according to the direction map and the texture map; and displaying the effect of the ink shading in a graphical user interface.

[0135] The exemplary embodiments of the present disclosure also provide an electronic device. The electronic device may include a processor and a memory. The memory stores executable instructions for the processor, such as a computer program. The processor executes the executable instructions to perform the method steps of various exemplary embodiments of the present disclosure. The electronic device may also include a display for displaying a graphical user interface.

[0136] Reference below Figure 6, the electronic device is exemplarily described in the form of a general-purpose computing device. It should be understood that Figure 6 The electronic device 600 shown is merely an example and should not limit the functions and scope of use of the embodiments of the present disclosure.

[0137] like Figure 6 As shown, the electronic device 600 may include a processor 610 , a memory 620 , a bus 630 , an I / O (input / output) interface 640 , a network adapter 650 , and a display 660 .

[0138] The memory 620 may include volatile memory, such as RAM 621 and cache unit 622, and may also include non-volatile memory, such as ROM 623. The memory 620 may also include one or more program modules 624. Such program modules 624 include, but are 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. For example, the program modules 624 may include the modules in the aforementioned devices.

[0139] The processor 610 may include one or more processing units, for example: the processor 610 may include an AP (Application Processor), a modem processor, a GPU (Graphics Processing Unit), an ISP (Image Signal Processor), a controller, an encoder, a decoder, a DSP (Digital Signal Processor), a baseband processor and / or an NPU (Neural-Network Processing Unit) and other processing units.

[0140] The processor 610 can be used to execute the executable instructions stored in the memory 620 to execute the above-mentioned method of the present disclosure, such as executing the following method steps: an image processing method, comprising: obtaining a direction map and a texture map; controlling the direction and texture of ink blending according to the direction map and the texture map; and displaying the effect of ink blending in a graphical user interface.

[0141] The bus 630 is used to realize the connection between different components of the electronic device 600 and may include a data bus, an address bus, and a control bus.

[0142] The electronic device 600 can communicate with one or more external devices 700 (eg, a keyboard, a mouse, an external controller, etc.) through the I / O interface 640 .

[0143] The electronic device 600 can communicate with one or more networks via the network adapter 650. For example, the network adapter 650 can provide mobile communication solutions such as 3G / 4G / 5G, or wireless communication solutions such as wireless LAN, Bluetooth, and near-field communication. The network adapter 650 can communicate with other modules of the electronic device 600 via the bus 630.

[0144] The electronic device 600 can display a graphical user interface through the display 660, such as displaying a virtual scene, a virtual character, etc.

[0145] although Figure 6 Not shown, other hardware and / or software modules may also be provided in the electronic device 600, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID (Redundant Arrays of Independent Disks) systems, tape drives, and data backup storage systems.

[0146] As can be seen from the above, the technical solutions of the present disclosure can be implemented as methods, devices, systems, computer program products, storage media, electronic devices, etc. Those skilled in the art will understand that various aspects of the present disclosure can be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or an implementation that combines hardware and software aspects, such as "circuit", "module" or "system".

[0147] It should be understood that the present disclosure is not limited to the specific method steps or structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from the scope thereof. Those skilled in the art will easily think of other embodiments based on the specific embodiments provided by the present disclosure. Therefore, the specific embodiments provided by the present disclosure are merely exemplary, and the scope and spirit of the present disclosure are indicated by the claims, which should cover any variations, uses or adaptive changes of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary technical means in the field of the present technology that are not disclosed in the present disclosure.

Claims

1. An image processing method, characterized in that: The method comprises: Get the direction map and texture map; Controlling the direction and texture of ink shading according to the direction map and the texture map; The ink-wash effect is displayed in a graphical user interface.

2. The method according to claim 1, characterized in that The control of the direction and texture of ink shading includes: generating a gradient mask according to the direction map; The blending mask and the texture map are synthesized to obtain an ink-and-wash blending effect.

3. The method according to claim 2, characterized in that Generating a gradient mask according to the direction map includes: Obtain a single erasing direction map and an overall erasing direction map; The single erasing direction pattern and the overall erasing direction pattern are superimposed to form the shading mask.

4. The method according to claim 3, characterized in that The method further comprises: Get a single erasing noise map; The single-erase noise map is superimposed with the smudge mask.

5. The method according to claim 3, characterized in that The method further comprises: Set the erasing angle parameter and rotate the direction of the gradient mask according to the erasing angle parameter.

6. The method according to claim 3, characterized in that The method further comprises: A single erasing interval parameter is set, and the contrast of the gradient mask is adjusted according to the single erasing interval parameter.

7. The method according to claim 1, characterized in that The control of the direction and texture of ink shading includes: Build multiple gradient layers; Set the corresponding direction map and texture map for each shading layer; The various gradient layers are synthesized to obtain the ink gradient effect.

8. The method according to claim 7, characterized in that The multiple gradient layers include: a foreground layer, a mid-ground layer, a background layer and a bottom layer, wherein: The foreground layer is used to present the thick ink area; The mid-ground layer is used to present the ink-wash transition area; The background layer is used to present the water mark area; The bottom layer is used to present the texture of the bottom paper.

9. The method according to claim 7, characterized in that The step of setting a corresponding direction map and texture map for each shading layer includes: Set image offset parameters for each gradient layer to control the staggered effect between layers; Set color parameters for each gradient layer to control the color and transparency of each layer.

10. The method according to claim 7, characterized in that The method further comprises: Set independent blending progress parameters for each blending layer to control the diffusion speed of each blending layer.

11. The method according to claim 10, characterized in that The independent blurring progress parameters are set for each blurring layer so that: The bottom smudge layer diffuses the fastest; The diffusion speed of the mid-ground gradient layer is second fastest; The foreground gradient layer diffuses the slowest.

12. The method according to claim 1, characterized in that Displaying the ink-wash effect in a graphical user interface includes: The ink-wash effect is displayed on a scroll object in the graphical user interface.

13. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 12 is implemented.

14. An electronic device, characterized in that: include: processor; a memory for storing executable instructions of the processor; The processor is configured to perform the method according to any one of claims 1 to 12 by executing the executable instructions.