Method and device for improving visual effect of open line

By overlaying pixel values ​​of the bright line texture map and the environment occlusion map, a new texture map containing shadow effects is generated, which solves the problem of inconsistent visual effects caused by the dependence on the renderer and achieves improved visual effects and versatility of bright lines.

CN121278799APending Publication Date: 2026-01-06LINGDI (ZHEJIANG) TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410912983.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-05
Publication Date
2026-01-06

AI Technical Summary

Technical Problem

Existing technologies for improving the visual effect of visible lines in 3D clothing design rely on the characteristics of the renderer, resulting in inconsistent visual effects and a lack of versatility.

Method used

By acquiring the user-input bright line texture map and environment occlusion map, pixel values ​​are superimposed to generate a new texture map containing shadow effects, thus generating a bright line mesh image and improving the visual effect.

Benefits of technology

It enhances the visual effect of visible lines and increases the sense of depth and realism of models without relying on renderer features, and has strong versatility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121278799A_ABST
    Figure CN121278799A_ABST
Patent Text Reader

Abstract

One or more embodiments of the invention provide a method and device for improving the visual effect of an open thread, and the method comprises the steps: obtaining a first texture map which is inputted by a user and is used for representing the open thread on a garment material, and an environment shielding map which comprises the shadow effect of the open thread; based on the first pixel value of each pixel in the first texture map and the second pixel value of each pixel in the environment shielding map, superposing the first pixel value and the second pixel value of each pixel corresponding to the position to obtain a third pixel value of each pixel, based on the third pixel value of each pixel, generating a second texture map for representing an open line containing the shadow effect; and outputting an open line grid picture generated based on the second texture map to the user.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification relates to the field of data processing technology, and in particular to a method and apparatus for enhancing the visual effect of bright lines. Background Technology

[0002] In 3D garment design, topstitching refers to the visible stitching on the surface of the fabric. Topstitching typically uses thicker thread and larger stitches to create decorative and functional seams. It not only serves a decorative purpose but also enhances the structure and three-dimensionality of the garment. Topstitching is a common detail element in garment design. Designers can draw topstitching on the 3D model of the garment, setting parameters such as color, height, margin to the edge, and stitch length. In this way, topstitching can achieve a realistic visual effect in a virtual environment, enhancing the detail and three-dimensionality of the garment design.

[0003] Related techniques can enhance the visual effect of bright lines by adding bright line material data to the renderer, but this method depends on the characteristics of the renderer, and different renderers produce inconsistent visual effects, which places high demands on users. Summary of the Invention

[0004] In view of the above, one or more embodiments of this specification provide the following technical solutions:

[0005] According to a first aspect of one or more embodiments of this specification, a method for enhancing the visual effect of bright lines is proposed, the method comprising:

[0006] Obtain a first texture map, input by the user, representing visible stitches on the clothing fabric, and an environment occlusion map including the shadow effect of the visible stitches;

[0007] Based on the first pixel value of each pixel in the first texture map and the second pixel value of each pixel in the environment occlusion map, the first pixel value and the second pixel value of each pixel corresponding to the position are superimposed to obtain the third pixel value of each pixel, and a second texture map is generated based on the third pixel value of each pixel to represent the bright line containing the shadow effect.

[0008] Output a bright-line mesh image generated based on the second texture map to the user.

[0009] According to a second aspect of one or more embodiments of this specification, a device for enhancing the visual effect of bright lines is provided, the method comprising:

[0010] The input module is used to obtain a first texture map representing visible lines on clothing fabric and an environment occlusion map including the shadow effect of the visible lines, which are input by the user.

[0011] The overlay module is used to overlay the first pixel value and the second pixel value of each pixel corresponding to a position based on the first pixel value of each pixel in the first texture map and the second pixel value of each pixel in the environment occlusion map to obtain the third pixel value of each pixel, and generate a second texture map to represent the bright line containing the shadow effect based on the third pixel value of each pixel.

[0012] The output module is used to output a bright-line mesh image generated based on the second texture map to the user.

[0013] As can be seen from the above embodiments, this specification can add the shadow effect contained in the AO map to the texture map by superimposing the corresponding pixels of the user-input AO map with the original texture map. This allows the generation of a bright line mesh image with shadow effect based on the new texture map, improving the visual effect of bright lines in the image. This method does not rely on the characteristics of the renderer to add material data for the bright lines, making it highly versatile. Attached Figure Description

[0014] Figure 1 This is a flowchart of an exemplary embodiment of a method for enhancing the visual effect of bright lines.

[0015] Figure 2 This is a schematic diagram of a texture mapping provided in an exemplary embodiment.

[0016] Figure 3 This is a schematic diagram of an environment occlusion map provided in an exemplary embodiment.

[0017] Figure 4 This is a flowchart of an exemplary embodiment of a method for enhancing the visual effect of bright lines.

[0018] Figure 5 This is a schematic diagram of a first image provided in an exemplary embodiment.

[0019] Figure 6 This is a schematic diagram of a second image provided in an exemplary embodiment.

[0020] Figure 7 This is a schematic diagram of a second texture image provided in an exemplary embodiment.

[0021] Figure 8A This is a schematic diagram of a visible grid provided in an exemplary embodiment.

[0022] Figure 8B This is a schematic diagram of a visible grid provided in an exemplary embodiment.

[0023] Figure 9AThis is a schematic diagram of a bright-line grid image provided in an exemplary embodiment.

[0024] Figure 9B This is a schematic diagram of a bright-line grid image provided in an exemplary embodiment.

[0025] Figure 9C This is a schematic diagram of a bright-line grid image provided in an exemplary embodiment.

[0026] Figure 9D This is a schematic diagram of a bright-line grid image provided in an exemplary embodiment.

[0027] Figure 10 This is a schematic diagram of the structure of a device provided in an exemplary embodiment.

[0028] Figure 11 This is a block diagram of an exemplary embodiment of a device for enhancing the visual effect of bright lines. Detailed Implementation

[0029] The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this manual are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation portals are provided for users to choose to authorize or refuse.

[0030] In 3D garment design, topstitching refers to the visible stitching on the surface of the fabric. Topstitching typically uses thicker thread and larger stitches to create decorative and functional seams. It not only serves a decorative purpose but also enhances the structure and three-dimensionality of the garment. Topstitching is a common detail element in garment design. Designers can draw topstitching on the 3D model of the garment, setting parameters such as color, height, margin to the edge, and stitch length. In this way, topstitching can represent a realistic stitching effect in a virtual environment, enhancing the detail and three-dimensionality of the garment design. This three-dimensionality makes the virtual garment appear more realistic and vivid, thus better showcasing the design effect.

[0031] In 3D clothing design, the common practice for enhancing the visual effect of visible lines is to directly add data representing shadow effects to the visible line material data and then render it using a renderer to improve the visual effect of the visible lines, such as increasing the depth and realism of the model. However, this method has certain limitations, relying on the characteristics of the renderer and supporting a limited number of renderers. To reduce the processing of the original visible line material data and improve the versatility of the enhancement method, there is an urgent need for a method that can improve the visual effect of visible lines without significantly changing the original visible line drawing process.

[0032] In view of this, this specification proposes a method to enhance the visual effect of bright lines. By obtaining an Ambient Occlusion (AO) map, which represents the shadow effect and is provided by the user, corresponding to the texture map of the original bright lines, and superimposing the AO map with the pixel values ​​of the corresponding pixels in the original texture map, a new texture map containing the shadow effect is generated. Thus, a bright line mesh image can be generated based on the new texture map.

[0033] In implementation, a first texture map representing visible lines on clothing fabric and an environment occlusion map including the shadow effect of the visible lines are obtained from user input; the first pixel value of each pixel in the first texture map and the second pixel value of each pixel corresponding to the position in the environment occlusion map are superimposed to obtain the third pixel value of each pixel, and a second texture map representing visible lines containing the shadow effect is generated based on the third pixel value of each pixel; and a visible line mesh image generated based on the second texture map is output to the user.

[0034] In the above technical solution, by superimposing the corresponding pixels of the AO map input by the user with the original texture map, the shadow effect contained in the AO map can be added to the texture map. Thus, a bright line mesh image with shadow effect can be generated based on the new texture map, which improves the visual effect of bright lines in the image. This method does not need to rely on the characteristics of the renderer to add material data for bright lines, making it highly versatile.

[0035] To enable those skilled in the art to better understand the technical solutions in this application, the technical solutions in this specification will be clearly and completely described below with reference to the accompanying drawings in the embodiments of this application.

[0036] Please see Figure 1 , Figure 1 This is an exemplary embodiment of a method for enhancing the visual effect of visible lines, which can be applied to the client side of a clothing design platform. The method for enhancing the visual effect of visible lines may include the following steps.

[0037] S101. Obtain the first texture map, input by the user, representing the visible lines on the clothing fabric, and the environment occlusion map including the shadow effect of the visible lines.

[0038] In one implementation, the client of the service design platform may include a user option in the interactive interface output to the user for uploading relevant material data representing visible lines on clothing fabric; in response to the user's input operation on the user option, the first texture map, ambient occlusion map (AO map), normal map, and other relevant parameters corresponding to the visible lines can be obtained.

[0039] Among them, the AO map corresponding to the bright line can be a map used to simulate the light occlusion effect, which is used to simulate the shadow effect on the surface of objects in the scene. The degree of occlusion can be represented by the pixel value of each pixel in the AO map.

[0040] In one implementation, the AO map can be a grayscale image.

[0041] S102. Based on the first pixel value of each pixel in the first texture map and the second pixel value of each pixel in the environment occlusion map, the first pixel value and the second pixel value of each pixel corresponding to the position are superimposed to obtain the third pixel value of each pixel, and a second texture map is generated based on the third pixel value of each pixel to represent the bright line containing the shadow effect.

[0042] After obtaining the AO map corresponding to the first texture map input by the user, the first texture map can be superimposed on the AO frame map to generate a second texture map, so that the bright lines contained in the generated second texture map have the shadow effect contained in the AO map.

[0043] The overlay strategy for superimposing the first texture map onto the AO frame map can be set according to actual needs. For example, in one embodiment, the first pixel value and the second pixel value of each pixel corresponding to a position can be superimposed based on the first pixel value of each pixel in the first texture map and the second pixel value of each pixel in the environment occlusion map to obtain the third pixel value of each pixel. That is, it is equivalent to superimposing the shadow effect of the AO map for each pixel on each pixel in the first texture map to generate a second texture map for representing bright lines containing shadow effects; wherein, the pixel value of each pixel in the second texture map is the third pixel value.

[0044] There are various ways to superimpose the first and second pixel values ​​of each pixel corresponding to a position. For example, a preset superposition formula can be used to superimpose the first and second pixel values ​​to obtain the third pixel value of the pixel. The superposition formula can be a weighted sum of the first and second pixel values; or, the first and second pixel values ​​can be multiplied; or, the shadow coefficient of the corresponding pixel can be obtained based on the second pixel value, and the first pixel value can be multiplied by the shadow coefficient; and so on.

[0045] It should be noted that during the superposition calculation of pixel values ​​based on the preset superposition formula, some or all pixel values ​​can be normalized first, and then the superposition calculation can be performed based on the normalization result. For example, when multiplying the first pixel value and the second pixel value, the second pixel value can be normalized first, and then the normalized results of the first and second pixel values ​​can be multiplied. For simplicity, the pixel value normalization process will not be described in the following embodiments.

[0046] S103. Output a bright-line mesh image generated based on the second texture map to the user.

[0047] After obtaining the second texture map containing the shadow effect of the bright lines, the original bright line drawing process can be used to generate a bright line mesh image based on the second texture map and output the bright line mesh image to the user.

[0048] The exposed line mesh image can be obtained by copying the second texture map. The generated exposed line mesh image will also have corresponding shadow effects and can retain other content information of the original exposed lines, such as the style, color, stitch spacing, etc.

[0049] In the above technical solution, by superimposing the corresponding pixels of the AO map input by the user with the original texture map, the shadow effect contained in the AO map can be added to the texture map. Thus, a bright line mesh image with shadow effect can be generated based on the new texture map, which improves the visual effect of bright lines in the image. This method does not need to rely on the characteristics of the renderer to add material data for bright lines, making it highly versatile.

[0050] In one implementation, the interactive interface output to the user may further include a user option for setting an intensity value corresponding to the AO map; in response to the user's setting operation of the user option, the intensity value corresponding to the AO map can be obtained; wherein the intensity value is used to represent the degree of influence of the shadow effect contained in the AO map on the first texture map.

[0051] In one implementation, the intensity value can range from 0 to 1. The larger the intensity value, the greater the influence of the AO map on the first texture map, and the stronger the occlusion effect of the bright lines in the second texture map, and the more obvious the shadow effect it contains.

[0052] After obtaining the AO map corresponding to the first texture map input by the user, and the intensity value corresponding to the AO map, the first pixel value and the second pixel value of each pixel corresponding to the position can be superimposed based on the first pixel value of each pixel in the first texture map, the second pixel value of each pixel in the environment occlusion map, and the intensity value to obtain the third pixel value of each pixel.

[0053] In one implementation, if a preset superposition formula containing intensity values ​​is used to superimpose the first pixel value and the second pixel value, for example, the intensity value can be used as a weighting coefficient to weight the first pixel value and the second pixel value, such as using the following superposition formula P3=P1+Q·P2, where P1 represents the first pixel value, P2 represents the second pixel value, P3 represents the third pixel value, and Q represents the intensity value.

[0054] In one implementation, multiple AO maps corresponding to a first texture map input by the user, and intensity values ​​corresponding to each AO map, can be obtained. Based on the intensity values ​​of each AO map, the first pixel value of each pixel in the first texture map and the second pixel value of each pixel in each AO map can be superimposed to generate a second texture map corresponding to each AO map. A brightline mesh image corresponding to each AO map is then input to the user, allowing the user to evaluate different AO maps and different intensity values ​​based on the shadow effect of the bright lines in the output brightline mesh image.

[0055] In one implementation, after obtaining multiple AO maps corresponding to the first texture map input by the user, and the intensity values ​​corresponding to each AO map, the first pixel value of each pixel in the first texture map and the second pixel value of each pixel in the multiple AO maps are superimposed based on the intensity values ​​of each AO map to generate a second texture map for representing a bright line containing a shadow effect of multiple AO maps. Superimposing the first pixel value of each pixel in the first texture map and the second pixel value of each pixel in the multiple AO maps may include: sequentially superimposing the first pixel value of each pixel in the first texture map with the second pixel value of each pixel in each AO map according to a preset superposition order, ultimately generating the second texture map.

[0056] For the sake of simplicity, this manual will use an AO map corresponding to the first texture map and an intensity value corresponding to the AO map as examples for illustration.

[0057] In the above technical solutions, the influence of adding the shadow effect contained in the AO map to the texture map can be controlled by obtaining the intensity value corresponding to the AO map. This allows for flexible enhancement of the visual effect of bright lines in the image according to the user's actual needs.

[0058] Since the bright lines contained in the first texture map may occupy the edge area of ​​the first texture map, in order to add a shadow effect to the bright lines located in the edge area, the shadow effect contained in the AO map needs to be slightly larger than the area occupied by the bright lines in the first texture map. In other words, the size of the AO map can be required to be larger than the size of the first texture map.

[0059] In one implementation, when obtaining the AO map corresponding to the first texture map input by the user, it can be required that the width and height of the AO map are not less than the width and height of the first texture map. For example, the width of the AO map can be the same as the width of the first texture map, and the height of the AO map can be greater than the height of the first texture map.

[0060] When obtaining the AO map corresponding to the first texture map input by the user, it is possible to first check whether the AO map meets the preset activation conditions. These activation conditions may include: the width of the AO map is the same as the width of the first texture map; and the height of the AO map is not less than the height of the first texture map. The same width ensures that the stitch spacing of the visible lines remains unchanged, without affecting the actual size of the visible lines; while a height not less than the height of the first texture map ensures the integrity of the original visible line style and allows for the addition of outward-expanding shadow effects to the top and bottom edge areas of the original visible lines, further enhancing the visual effect of the visible lines.

[0061] Figure 2 A first texture map 210 input by the user is shown. Figure 3 An AO (Area of ​​Occlusion) map 310 input by the user is shown. After obtaining the user-input AO map 310, it can be first determined whether the AO map 310 meets the activation conditions, that is, whether the width of the AO map 310 is the same as the width of the first texture map 210, and whether the height of the AO map 310 is not less than the height of the first texture map 210. For example, the width of the first texture map 210 is 378 pixels and the height is 1228 pixels, and the width of the AO map 310 is 378 pixels and the height is 1428 pixels. It can be seen that the AO map 310 meets the above activation conditions, and subsequent steps can be performed.

[0062] In one implementation, after obtaining the AO map corresponding to the user input and the intensity value corresponding to the AO map, if it is determined that the size of the AO map meets the above-mentioned effective conditions, in order to facilitate the subsequent superposition of the first pixel value and the second pixel value of each pixel corresponding to the position, a transparent image corresponding to the first texture map can be created based on the size of the AO map; wherein, the size of the transparent image and the AO map are the same.

[0063] Create a transparent image with the same width and height as the AO map, then copy the first pixel value of each pixel in the first texture map into the transparent image to generate the first image corresponding to the AO map. In other words, it is equivalent to expanding the first texture map to the same height as the AO map.

[0064] When copying the first texture map to the transparent image, you can first determine the position of the shadow effect corresponding to the bright line in the AO map, and then copy the first texture map to the transparent image based on the position of the bright line, so that the position of the bright line in the generated first image is consistent with the shadow effect contained in the AO map.

[0065] Since users often create AO maps with bright lines in the middle area of ​​the AO map, the first texture map can be copied to the middle area of ​​the transparent image to generate the first image. That is, the fourth pixel value of each pixel in the middle area of ​​the first image is equal to the first pixel value of the corresponding pixel in the first texture map, while the fourth pixel values ​​of each pixel in other areas of the first image retain the pixel values ​​when the transparent image was created.

[0066] After generating the first image corresponding to the AO map, the fourth pixel value and the second pixel value of each pixel at a given location can be superimposed based on the fourth pixel value of each pixel in the first image, the second pixel value of each pixel in the environment occlusion map, and the intensity value, to obtain the third pixel value of each pixel. The method for superimposing the fourth pixel value and the second pixel value of each pixel at a given location can be set according to actual needs; for example, a preset superposition formula can be used.

[0067] Based on the above embodiments, by creating a transparent image of the same size as the AO map and copying the first texture map into the transparent image, it is convenient to subsequently overlay the first pixel value and the second pixel value of the corresponding pixel to generate a second texture map containing the shadow effect.

[0068] In one embodiment, the image format of each texture in this specification, such as the first texture map, the environment occlusion map, and the second texture map, can be set according to actual needs. It can be a texture that includes several preset color channels. For example, a grayscale image is an image containing a single color channel; an RGB image is an image containing three color channels: red (R), green (G), and blue (B); an RGBA image is an image that adds a transparency channel (Alpha) to the RGB image, and so on.

[0069] After obtaining the AO map corresponding to the first texture map input by the user, and the intensity value corresponding to the AO map, a transparent image of the same size as the AO map can be created first. The first texture map is copied to the corresponding color channels of the transparent image in all color channels to generate the first image corresponding to the AO map. Then, based on the fourth pixel value of each pixel in each color channel in the first image, the second pixel value of each pixel in each color channel in the AO map, and the intensity value corresponding to the AO map, the fourth pixel value and the second pixel value of each pixel in each color channel can be superimposed to obtain the third pixel value of each pixel in each color channel.

[0070] For example, taking an RGB image as an example, since RGB includes three color channels: R channel, G channel, and B channel, after obtaining the AO map corresponding to the first texture map input by the user, and the intensity value corresponding to the AO map, the first pixel value of each pixel in the first texture map in the R channel, the first pixel value of the G channel, and the first pixel value of the B channel can be copied to the R channel, G channel, and B channel of the corresponding pixel in the middle area of ​​the transparent image, respectively, to generate the first image; then, based on the intensity value, for the R channel, G channel, and B channel, the fourth pixel value and the second pixel value of the pixel in the same position of the first image and the AO map are superimposed to obtain the third pixel value of each pixel in the R channel, G channel, and B channel, and a second texture map is generated based on the third pixel value of each pixel in the R channel, G channel, and B channel to represent the bright lines containing the shadow effect.

[0071] In one implementation, the intensity value corresponding to the AO map obtained by the user input can include intensity values ​​for different color channels. For example, the interactive interface output to the user can include a user option for setting the intensity value corresponding to the AO map, and the user option can also be used to set the color channel to which the intensity value is applied. In response to the user's setting operation of the user option for setting the intensity value, the intensity values ​​for different color channels input by the user can be obtained. For any one of the several color channels, based on the intensity value corresponding to any one color channel, the fourth pixel value of each pixel in the first image in any one color channel and the second pixel value of the corresponding pixel in the AO map in any one color channel can be superimposed to obtain the third pixel value of each pixel in any one color channel. Then, a second texture map can be generated based on the third pixel values ​​of each pixel in each color channel.

[0072] In one implementation, the plurality of color channels includes a transparency channel; for example, taking an RGBA image as an example, it includes four color channels: R channel, G channel, B channel, and Alpha channel (transparency channel).

[0073] For simplicity, the following embodiments will use RGBA images as examples for illustration.

[0074] In one implementation, the service design platform can provide users with multiple overlay formulas for overlaying calculations of the first image and the AO map, and output user options for selecting overlay formulas in the interactive interface. In response to the user's selection of the user options for selecting overlay formulas, the platform can obtain the overlay formula selected by the user.

[0075] In one implementation, after determining the superposition formula, based on the fourth pixel value of each pixel in the first image, the second pixel value of each pixel in the environment occlusion map, and the intensity value, the fourth pixel value and the second pixel value of each pixel in each of the several color channels can be superimposed using the determined superposition formula to obtain the third pixel value of each pixel in each color channel.

[0076] In one implementation, different overlay formulas can be used for different color channels. For example, an overlay formula corresponding to the alpha channel T0 and overlay formulas corresponding to other channels Ti can be set separately. Taking an RGBA image as an example, a first overlay formula for the alpha channel and a second overlay formula for the r, g, and b channels can be set separately.

[0077] In one implementation, for the transparency channel T0, the fourth pixel value P40 of each pixel in the first image in the transparency channel T0, the second pixel value P20 of each pixel in the AO map in the transparency channel T0, and the intensity value Q corresponding to the AO map can be used to calculate the third pixel value P30 of each pixel in the transparency channel T0 by superimposing the fourth pixel value P40 and the second pixel value P20 of each pixel at the corresponding position using a first superposition formula corresponding to the transparency channel T0. The specific overlay calculation process may include: multiplying the second pixel value P20 of each pixel in the AO map in the transparency channel T0 with the intensity value Q to obtain the fifth pixel value P50 = P20·Q of each pixel in the transparency channel; multiplying the fifth pixel value P50 of each pixel in the transparency channel T0 corresponding to the position with the difference (1-P40) between 1 and the fourth pixel value to obtain the sixth pixel value P60 of each pixel in the transparency channel P60 = P50·(1-P40) = P20·Q·(1-P40); and further, adding the fourth pixel value P40 and the sixth pixel value P60 of each pixel in the transparency channel T0 corresponding to the position to obtain the third pixel value P30 = P40 + P60 = P40 of each pixel in the transparency channel T0;

[0078] For channels Ti other than the alpha channel, the third pixel value P3i of each pixel in other channels Ti can be calculated by superimposing the fourth pixel value P4i and the second pixel value P2i of each pixel in other channels Ti in the AO map, and the intensity value Q corresponding to the AO map, based on the fourth pixel value P4i and the second pixel value P2i of each pixel at the corresponding position. The specific overlay calculation process may include: multiplying the fourth pixel value P4i of each pixel in other channels Ti and the fourth pixel value P40 in the transparency channel T0 to obtain the seventh pixel value P7i = P4i·P40 of each pixel in other channels Ti; multiplying the second pixel value P2i of each pixel in other channels Ti and the fifth pixel value P50 in the transparency channel T0, and then multiplying it with the difference (1-P40) between 1 and the fourth pixel value P40 in the transparency channel T0 to obtain the eighth pixel value P8i of each pixel in other channels Ti = P2i·P50·(1-P40); and further, dividing the sum of the seventh pixel value P7i and the eighth pixel value P8i of each pixel in other channels Ti by the third pixel value P30 in the transparency channel T0 to obtain the third pixel value P3i of each pixel in other channels Ti = (P7i+P8i) / P30.

[0079] After obtaining the third pixel value P30 in the transparency channel T0 and the third pixel value P3i in other channels Ti through superposition calculation, a second texture map representing the bright lines containing the shadow effect can be generated based on the third pixel value P30 in the transparency channel T0 and the third pixel value P3i in other channels Ti.

[0080] Figure 4 This demonstrates a method for enhancing the visual effect of bright lines, such as... Figure 4 As shown, the method may include the following steps.

[0081] S401. Obtain the first texture map 210 input by the user, the AO map 310 corresponding to the first texture map 210, and the intensity value Q (0~1) corresponding to the AO map;

[0082] S402. Determine whether the AO map meets the preset activation conditions. The activation conditions include: the width of the AO map 310 is the same as the width of the first texture map 210; the height of the AO map 310 is not less than the height of the first texture map 210; if the AO map 310 meets the activation conditions, then continue to execute step S403.

[0083] S403. Based on the size of the AO map, create a transparent map corresponding to the first texture map; wherein the width and height of the transparent map are the same as the width and height of the AO map;

[0084] S404. Copy the first pixel value P1 of each pixel in the first texture map 210 to the middle area of ​​the transparent map to generate the first image 510 (e.g., ...). Figure 5 (as shown); wherein, the fourth pixel value P4 of each pixel in the middle area of ​​the first image is equal to the first pixel value P1 of each pixel in the first texture map 210, and the fourth pixel value P4 of each pixel in other areas of the first image other than the middle area is the original pixel value of the transparent image.

[0085] S405. Multiply the second pixel value P20 of each pixel in the AO map in the transparency channel T0 by the intensity value Q to obtain the fifth pixel value P50 = P20·Q of each pixel in the transparency channel T0. Based on the fifth pixel value P50 of each pixel in the transparency channel T0 and the second pixel value P2i in other channels Ti besides the transparency channel, generate the second image 610 (e.g., Figure 6 (as shown); where, in the second image, the pixel value of each pixel in the transparency channel T0 is the fifth pixel value P50; and the pixel value of each pixel in other channels Ti in the second image is the second pixel value P2i.

[0086] S406. For each color channel in the plurality of color channels, a superposition formula corresponding to each color channel is used to superimpose the pixel values ​​of corresponding pixels in the first image and the second image to obtain the third pixel value of each pixel in each color channel, and a second texture image 710 is generated based on the third pixel value of each pixel in each color channel (e.g., ...). Figure 7 (as shown);

[0087] The superposition formula for the transparent channel T0 can be expressed as follows:

[0088] P30 = P40 + P50(1 - P40)

[0089] Wherein, P30 represents the third pixel value of each pixel in the second texture image in the alpha channel T0; P40 represents the fourth pixel value of each pixel in the first image in the alpha channel T0; and P50 represents the fifth pixel value of each pixel in the second image in the alpha channel T0.

[0090] The superposition formula for other channels Ti can be expressed as follows:

[0091]

[0092] Wherein, P3i represents the third pixel value of each pixel in the second texture image in other channels Ti; P4i represents the fourth pixel value of each pixel in the first image in other channels Ti; and P2i represents the second pixel value of each pixel in the second image in other channels Ti.

[0093] S407. When creating a bright-line mesh, the height of the bright-line mesh is determined based on the height of the AO map, and a bright-line mesh image is generated based on the height and the second texture image.

[0094] Using the existing visible line drawing process, when creating the visible line mesh, the height ratio between the second texture image and the original first texture image can be obtained first. Based on this ratio, the height of the visible line mesh to be drawn is determined. The position of the visible line is determined by the distance from its center point to the line and will not change due to changes in the visible line height. Although the height of the visible line is higher than before, because the edges are transparent, the actual visible line style remains basically the same as before. The only difference is the addition of shadows, without affecting the actual displayed visible line style.

[0095] like Figure 8A and Figure 8B As shown, Figure 8A Image 810 in the image represents the original brightline mesh without AO mapping and intensity values. Figure 8BImage 820 shows the new brightline mesh determined based on the height ratio of the second texture map to the original first texture map after adding the AO map. It can be seen that although the brightline mesh is raised, the original position of the brightline remains unchanged when drawing the brightline mesh, and the actual style effect of the brightline is not changed.

[0096] Figures 9A-9D The visual effects of bright lines in the bright line grid images output to the user at different intensity values ​​are shown respectively. Figure 9A Image 910 in Figure 9B Image 920 in Figure 9C Image 930 and Figure 9D Image 940 in the image shows the visual effects of bright lines with intensity values ​​of 0, 0.3, 0.6 and 1.0. It can be seen that the higher the intensity value, the stronger the shadow effect of the bright lines and the more obvious the three-dimensional effect.

[0097] Figure 10 This is a schematic structural diagram of a device provided in an exemplary embodiment. Please refer to... Figure 10 At the hardware level, the device includes a processor 1002, an internal bus 1004, a network interface 1006, memory 1008, and non-volatile memory 1010, and may also include other hardware required for its functions. One or more embodiments of this specification can be implemented in software, for example, the processor 1002 reads the corresponding computer program from the non-volatile memory 1010 into memory 1008 and then runs it. Of course, besides software implementation, one or more embodiments of this specification do not exclude other implementation methods, such as logic devices or a combination of hardware and software, etc. That is to say, the execution entity of the following processing flow is not limited to individual logic units, but can also be hardware or logic devices.

[0098] Please refer to Figure 11 The visual enhancement device for exposed lines can be applied to, for example... Figure 10 The device shown implements the technical solution of this specification. The visual effect enhancement device for the visible line may include: an input module 1101, an overlay module 1102, and an output module 1103.

[0099] The input module 1101 is used to acquire a first texture map representing visible lines on clothing fabric and an environment occlusion map including the shadow effect of the visible lines, input by the user; the overlay module 1102 is used to overlay the first pixel value and the second pixel value of each pixel corresponding to a position based on the first pixel value of each pixel in the first texture map and the second pixel value of each pixel in the environment occlusion map to obtain the third pixel value of each pixel, and generate a second texture map representing visible lines containing the shadow effect based on the third pixel value of each pixel; the output module 1103 is used to output a visible line mesh image generated based on the second texture map to the user.

[0100] In one embodiment, the input module 1101 is further configured to obtain an intensity value corresponding to the environment occlusion map; wherein the intensity value is used to represent the degree of influence of the environment occlusion map on the first texture map;

[0101] The overlay module 1102 is used to overlay the first pixel value and the second pixel value of each pixel corresponding to a position based on the first pixel value of each pixel in the first texture map, the second pixel value of each pixel in the environment occlusion map and the intensity value, to obtain the third pixel value of each pixel.

[0102] In one embodiment, the width of the environment occlusion map is the same as the width of the first texture map; the height of the environment occlusion map is greater than the height of the first texture map.

[0103] In one embodiment, the overlay module 1102 is used to create a transparent image corresponding to the first texture map based on the size of the environment occlusion map; wherein the transparent image and the environment occlusion map have the same size; the first texture map is copied into the transparent image to generate a first image; based on the fourth pixel value of each pixel in the first image, the second pixel value of each pixel in the environment occlusion map, and the intensity value, the fourth pixel value and the second pixel value of each pixel corresponding to the position are overlaid to obtain the third pixel value of each pixel.

[0104] In one embodiment, the first texture map, the environment occlusion map, and the second texture map are maps including a plurality of preset color channels; the overlay module 1102 is used to, based on the fourth pixel value of each pixel in each color channel in the first image, the second pixel value of each pixel in each color channel in the environment occlusion map, and the intensity value, respectively, overlay the fourth pixel value and the second pixel value of each pixel in each color channel for each of the plurality of color channels to obtain the third pixel value of each pixel in each color channel.

[0105] In one embodiment, the plurality of color channels includes a transparency channel; the overlay module 1102 is configured to, for the transparency channel, multiply the second pixel value of each pixel in the environment occlusion map in the transparency channel by the intensity value to obtain the fifth pixel value of each pixel in the transparency channel; multiply the fifth pixel value of each pixel at the corresponding position in the transparency channel by the difference between 1 and the fourth pixel value to obtain the sixth pixel value of each pixel in the transparency channel; and further, add the fourth pixel value and the sixth pixel value of each pixel at the corresponding position in the transparency channel to obtain the third pixel value of each pixel in the transparency channel; for colors other than the transparency channel... For other channels, the fourth pixel value of each pixel at the corresponding position in the other channel is multiplied by the fourth pixel value in the transparency channel to obtain the seventh pixel value of each pixel in the other channel; and the second pixel value of each pixel at the corresponding position in the other channel is multiplied by the fifth pixel value in the transparency channel, and then multiplied by the difference between 1 and the fourth pixel value in the transparency channel to obtain the eighth pixel value of each pixel in the other channel; and further, the sum of the seventh and eighth pixel values ​​of each pixel at the corresponding position in the other channel is divided by the third pixel value in the transparency channel to obtain the third pixel value of each pixel in the other channel.

[0106] Based on the same concept as the methods described above, this specification also provides an electronic device, including: a processor; a memory for storing processor-executable instructions; wherein the processor performs the steps of the method as described in any of the above embodiments by executing the executable instructions.

[0107] Based on the same concept as the methods described above, this specification also provides a computer-readable storage medium having computer instructions stored thereon that, when executed by a processor, implement the steps of the methods as described in any of the above embodiments.

[0108] Based on the same concept as the methods described above, this specification also provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the steps of the methods as described in any of the above embodiments.

Claims

1. A method for enhancing the visual effect of a naked line, characterized in that, The method comprises: obtaining a first texture map input by a user for representing a bright line on a garment fabric and an ambient occlusion map including a shadow effect of the bright line; superimposing first pixel values of respective pixels in the first texture map and second pixel values of the respective pixels in the ambient occlusion map to obtain third pixel values of the respective pixels, and generating a second texture map for representing the bright line including the shadow effect based on the third pixel values of the respective pixels; outputting a bright line grid picture generated based on the second texture map to the user.

2. The method of claim 1, wherein, The method further comprises: obtaining an intensity value corresponding to the ambient occlusion map, wherein the intensity value is used to represent an influence degree of the ambient occlusion map on the first texture map; the superimposing the first pixel values of the respective pixels in the first texture map and the second pixel values of the respective pixels in the ambient occlusion map to obtain the third pixel values of the respective pixels comprises: superimposing the first pixel values of the respective pixels in the first texture map, the second pixel values of the respective pixels in the ambient occlusion map and the intensity value to obtain the third pixel values of the respective pixels.

3. The method according to claim 1 or 2, characterized in that, The width of the ambient occlusion map is the same as the width of the first texture map, and the height of the ambient occlusion map is greater than the height of the first texture map.

4. The method according to claim 1 or 2, characterized in that, The superimposing the first pixel values of the respective pixels in the first texture map, the second pixel values of the respective pixels in the ambient occlusion map and the intensity value to obtain the third pixel values of the respective pixels comprises: creating a transparent picture corresponding to the first texture map based on the size of the ambient occlusion map, wherein the size of the transparent picture is the same as that of the ambient occlusion map; copying the first texture map into the transparent picture to generate a first picture; superimposing fourth pixel values of respective pixels in the first picture, the second pixel values of the respective pixels in the ambient occlusion map and the intensity value to obtain the third pixel values of the respective pixels.

5. The method of claim 4, wherein, The first texture map, the ambient occlusion map and the second texture map are maps including a plurality of preset color channels. The superimposing the fourth pixel values of the respective pixels in the first picture, the second pixel values of the respective pixels in the ambient occlusion map and the intensity value to obtain the third pixel values of the respective pixels comprises: The fourth pixel value of each pixel corresponding in position in each color channel and the second pixel value of each pixel in the environment occlusion map are superimposed to obtain a third pixel value of each pixel in each color channel respectively for each color channel in the plurality of color channels based on the fourth pixel value of each pixel in each color channel in the first picture, the second pixel value of each pixel in each color channel in the environment occlusion map and the intensity value.

6. The method of claim 5, wherein, The plurality of color channels comprises a transparent channel; The fourth pixel value of each pixel corresponding in position in each color channel and the second pixel value of each pixel are superimposed to obtain a third pixel value of each pixel in each color channel respectively for each color channel in the plurality of color channels, comprising: For the transparent channel, the second pixel value of each pixel in the transparent channel in the environment occlusion map is multiplied by the intensity value to obtain a fifth pixel value of each pixel in the transparent channel; the fifth pixel value of each pixel in the transparent channel corresponding in position is multiplied by a difference between 1 and the fourth pixel value to obtain a sixth pixel value of each pixel in the transparent channel; and further, the fourth pixel value of each pixel in the transparent channel corresponding in position and the sixth pixel value are added to obtain a third pixel value of each pixel in the transparent channel; For other channels except the transparent channel, the fourth pixel value of each pixel in the other channels corresponding in position and the fourth pixel value in the transparent channel are multiplied to obtain a seventh pixel value of each pixel in the other channels; and the second pixel value of each pixel in the other channels corresponding in position and the fifth pixel value in the transparent channel are multiplied, and then multiplied by a difference between 1 and the fourth pixel value in the transparent channel to obtain an eighth pixel value of each pixel in the other channels; and further, the sum of the seventh pixel value and the eighth pixel value of each pixel in the other channels corresponding in position are divided by the third pixel value in the transparent channel to obtain a third pixel value of each pixel in the other channels.

7. A device for enhancing the visual effect of a naked line, characterized in that Comprising: An input module configured to obtain a first texture map input by a user and representing a bright line on a fabric of a garment and an environment occlusion map including a shadow effect of the bright line; An superimposition module configured to superimpose a first pixel value of each pixel in the first texture map and a second pixel value of each pixel in the environment occlusion map to obtain a third pixel value of each pixel based on the first pixel value and the second pixel value of each pixel corresponding in position, and generate a second texture map representing the bright line including the shadow effect based on the third pixel value of each pixel; An output module configured to output a bright line grid picture generated based on the second texture map to the user.

8. An electronic device, comprising: Comprising: A processor; A memory for storing processor-executable instructions; wherein the processor implements the steps of the method of any one of claims 1-6 by running the executable instructions.

9. A computer-readable storage medium, characterized in that, A computer program product having stored thereon computer instructions that, when executed by a processor, implement the steps of the method of any one of claims 1-6.

10. A computer program product, characterised in that, comprising computer program / instructions which, when executed by a processor, implement the steps of the method according to any one of claims 1-6.