Model processing method and device, storage medium and electronic device

By obtaining the texture image and color gradient range of the initial 3D model in a virtual scene, mapping the hue value and generating gradient colors, the problem of low dyeing processing efficiency of the initial 3D model is solved, and efficient and personalized dyeing effects and real-time preview are achieved.

CN119251374APending Publication Date: 2025-01-03NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411442141.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-15
Publication Date
2025-01-03

AI Technical Summary

Technical Problem

In the prior art, the dyeing processing efficiency of the initial three-dimensional model in a virtual scene is low, and it relies on manual picking of masked images in image processing software. The process is cumbersome and the dyeing effect cannot be directly previewed, resulting in low model processing efficiency.

Method used

By obtaining the initial texture image and color gradient range of the initial three-dimensional model, mapping the initial hue value to the color gradient range based on the hue threshold, generating gradient colors, and adjusting pixel attribute information to achieve the dyeing processing of the target three-dimensional model.

Benefits of technology

It improves the processing efficiency of the model, simplifies the dyeing process, realizes real-time preview and personalized customization, and meets the needs of large-scale production and personalized.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119251374A_ABST
    Figure CN119251374A_ABST
Patent Text Reader

Abstract

The invention discloses a model processing method and device, a storage medium and an electronic device. The method comprises the following steps: acquiring an initial texture image and a color gradient range of an initial three-dimensional model; based on a hue threshold value of the initial texture image, mapping initial hue values of a plurality of pixels in the initial texture image into a color gradient range to obtain a mapping result; determining an initial gradient color corresponding to the initial hue value in a color gradient sequence corresponding to the color gradient range based on a mapping result; according to the initial gradient color, adjusting initial attribute information of a pixel corresponding to the initial hue value in the initial texture image to obtain target attribute information; and dyeing the initial three-dimensional model by using the target attribute information to obtain a target three-dimensional model. The technical problem of low model processing efficiency is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of computer graphics, and in particular to a model processing method, device, storage medium and electronic device. Background Art

[0002] Currently, in a virtual scene, in order to realize the demand for personalization and customization of the initial three-dimensional model, the initial three-dimensional model can be dyed.

[0003] In the related art, it is usually necessary to manually extract a mask map in image processing software (Photoshop, abbreviated as PS) to control the dyeing area of ​​the initial three-dimensional model. The process is relatively cumbersome and it is impossible to directly preview the effect of the model after dyeing, resulting in a technical problem of low model processing efficiency.

[0004] Currently, no effective solution has been proposed to address the problem of low processing efficiency of the above models. Summary of the invention

[0005] At least some embodiments of the present disclosure provide a model processing method, device, storage medium and electronic device to at least solve the technical problem of low model processing efficiency.

[0006] According to one embodiment of the present disclosure, a model processing method is provided. The method may include: obtaining an initial texture image of an initial three-dimensional model and a color gradient range, wherein multiple colors within the color gradient range are used to respectively generate gradient colors to be dyed to the initial three-dimensional model, and the gradient colors are used to represent the result formed by sequential transition of multiple colors; based on a hue threshold of the initial texture image, mapping initial hue values ​​of multiple pixels in the initial texture image to the color gradient range to obtain a mapping result, wherein the hue threshold is used to represent a threshold that the initial hue value is allowed to reach, and the mapping result is used to represent the correspondence between different initial hue values ​​and different colors in the color gradient range; based on the mapping result, determining an initial gradient color corresponding to the initial hue value in a color gradient sequence corresponding to the color gradient range, wherein the color gradient sequence is generated according to the arrangement order of multiple colors; adjusting initial attribute information of pixels corresponding to the initial hue value in the initial texture image according to the initial gradient color to obtain target attribute information, wherein the initial attribute information includes at least one of the following of the pixel: an initial hue value, an initial saturation, and an initial brightness; and dyeing the initial three-dimensional model using the target attribute information to obtain a target three-dimensional model.

[0007] According to one embodiment of the present disclosure, a model processing device is also provided. The device may include: an acquisition unit, used to acquire an initial texture image of an initial three-dimensional model, and a color gradient range, wherein multiple colors within the color gradient range are used to respectively generate gradient colors to be dyed to the initial three-dimensional model, and the gradient color is used to represent the result formed by the sequential transition of multiple colors; a mapping unit, used to map the initial hue values ​​of multiple pixels in the initial texture image to the color gradient range based on the hue threshold of the initial texture image, and obtain a mapping result, wherein the hue threshold is used to represent the threshold that the initial hue value is allowed to reach, and the mapping result is used to represent the relationship between different initial hue values ​​and different colors in the color gradient range. a corresponding relationship between the initial hue value and the initial hue value in the color gradient sequence corresponding to the color gradient range based on the mapping result, wherein the color gradient sequence is generated according to the arrangement order of multiple colors; an adjustment unit is used to adjust the initial attribute information of the pixel corresponding to the initial hue value in the initial texture image according to the initial gradient color to obtain the target attribute information, wherein the initial attribute information includes at least one of the following of the pixel: the initial hue value, the initial saturation and the initial brightness; a dyeing unit is used to dye the initial three-dimensional model using the target attribute information to obtain the target three-dimensional model.

[0008] According to one embodiment of the present disclosure, a computer-readable storage medium is further provided, wherein a computer program is stored in the computer-readable storage medium, wherein the computer program is configured to execute any of the above-mentioned model processing methods when running.

[0009] According to one embodiment of the present disclosure, an electronic device is also provided. The electronic device may include a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute any of the above-mentioned model processing methods.

[0010] According to one embodiment of the present disclosure, a computer program product is also provided. The computer program product may include a computer program, wherein the computer program is configured to execute any of the above-mentioned model processing methods when running.

[0011] According to one embodiment of the present disclosure, a computer program product is also provided. The computer program product may include a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and the computer program is configured to execute any of the above-mentioned model processing methods when running.

[0012] According to one embodiment of the present disclosure, a computer program is also provided, which is configured to execute any of the above-mentioned model processing methods when running.

[0013] In at least some embodiments of the present disclosure, an initial texture image of an initial three-dimensional model and a color gradient range are obtained, wherein multiple colors within the color gradient range are used to respectively generate gradient colors to be dyed to the initial three-dimensional model, and the gradient colors are used to represent the result formed by the sequential transition of multiple colors; based on the hue threshold of the initial texture image, the initial hue values ​​of multiple pixels in the initial texture image are mapped to the color gradient range to obtain a mapping result, wherein the hue threshold is used to represent the threshold that the initial hue value is allowed to reach, and the mapping result is used to represent the correspondence between different initial hue values ​​and different colors in the color gradient range; based on the mapping result, in the color gradient sequence corresponding to the color gradient range, an initial gradient color corresponding to the initial hue value is determined, wherein the color gradient sequence is generated according to the arrangement order of multiple colors; according to the initial gradient color, the initial attribute information of the pixel corresponding to the initial hue value in the initial texture image is adjusted to obtain the target attribute information, wherein the initial attribute information includes at least one of the following of the pixel: the initial hue value, the initial saturation and the initial brightness; using the target attribute information, the initial three-dimensional model is dyed to obtain the target three-dimensional model. That is to say, the embodiment of the present disclosure maps the initial hue values ​​of multiple pixels in the initial texture image to a color gradient range based on the hue threshold determined by traversing the pixels of the initial texture image of the initial three-dimensional model, so as to achieve the purpose of adjusting the initial hue, initial saturation and initial brightness of the pixels according to the specified gradient color, thereby achieving the technical effect of improving the processing efficiency of the model and solving the technical problem of low processing efficiency of the model. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] The drawings described herein are used to provide a further understanding of the present disclosure and constitute a part of the present application. The illustrative embodiments of the present disclosure and their descriptions are used to explain the present disclosure and do not constitute an improper limitation on the present disclosure. In the drawings:

[0015] Figure 1 is a hardware structure block diagram of a mobile terminal according to a model processing method of an embodiment of the present disclosure;

[0016] Figure 2 is a flow chart of a model processing method according to one embodiment of the present disclosure;

[0017] Figure 3 is a schematic diagram of a pixel before and after coloring according to one embodiment of the present disclosure;

[0018] Figure 4 is a schematic diagram of a preview of a dyeing effect according to one embodiment of the present disclosure;

[0019] Figure 5 is a schematic diagram of loading a 3D model according to one embodiment of the present disclosure;

[0020] Figure 6 is a schematic diagram of individually selecting colors according to one embodiment of the present disclosure;

[0021] Figure 7 is a schematic diagram of obtaining color according to a picture according to one embodiment of the present disclosure;

[0022] Figure 8 is a schematic diagram of individually selecting a color and adding it to a color list according to one embodiment of the present disclosure;

[0023] Fig. 9 is a schematic diagram of automatically generating a color card by extracting the main color of a picture according to one embodiment of the present disclosure;

[0024] Fig.10 is a structural block diagram of a model processing system according to one embodiment of the present disclosure;

[0025] Fig.11 is a schematic diagram of a 3D fashion model before dyeing according to one embodiment of the present disclosure;

[0026] Fig.12 is a schematic diagram of a 3D fashion model after dyeing according to one embodiment of the present disclosure;

[0027] Fig.13 is a structural block diagram of a model processing device according to one embodiment of the present disclosure;

[0028] Fig.14 is a schematic diagram of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0029] In order to enable those skilled in the art to better understand the scheme of the present disclosure, the technical scheme 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 described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in the field without creative work should fall within the scope of protection of the present disclosure.

[0030] 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 data used in this way can be interchangeable 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 that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products, or devices.

[0031] In a possible implementation, when the initial three-dimensional model needs to be dyed, a mask image can usually be manually extracted in PS to control the dyeing area of ​​the initial three-dimensional model. However, after practice and careful research, the inventor found that if the above method is used to dye the initial three-dimensional model, the method has a technical problem of low model processing efficiency because the process is relatively cumbersome and the effect of the model after dyeing cannot be directly previewed.

[0032] Based on the above, an embodiment of the present disclosure proposes a model processing method, which obtains an initial texture image of an initial three-dimensional model and a color gradient range; based on the hue threshold of the initial texture image, maps the initial hue values ​​of multiple pixels in the initial texture image to the color gradient range to obtain a mapping result; based on the mapping result, determines the initial gradient color corresponding to the initial hue value in the color gradient sequence corresponding to the color gradient range; according to the initial gradient color, adjusts the initial attribute information of the pixel corresponding to the initial hue value in the initial texture image to obtain target attribute information; uses the target attribute information to perform coloring processing on the initial three-dimensional model to obtain a target three-dimensional model, thereby achieving the technical effect of improving the processing efficiency of the model.

[0033] Considering that in the related art, when the coloring area of ​​the initial three-dimensional model is controlled by manually extracting a mask image in PS, there is a technical problem of low model processing efficiency. However, in the embodiment of the present disclosure, based on the hue threshold determined by traversing the pixels of the initial texture image of the initial three-dimensional model, the initial hue values ​​of multiple pixels in the initial texture image are mapped to the color gradient range, so that the initial hue, initial saturation and initial brightness of the pixels can be adjusted according to the specified gradient color, thereby achieving the technical effect of improving the model processing efficiency and solving the technical problem of low model processing efficiency.

[0034] According to one embodiment of the present disclosure, an embodiment of a method for processing a model 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.

[0035] The method embodiment can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, the mobile terminal can be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (MID for short), a tablet computer (PAD), a game console and other terminal devices. Figure 1 FIG. 1 is a hardware structure block diagram of a mobile terminal according to a model processing method of an embodiment of the present disclosure. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1 Only one is shown in the figure) processor 102 (the processor 102 may include but is not limited to a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processing (DSP) chip, a microcontroller unit (MCU), a programmable logic device (Field Programmable Gate Array, FPGA), a neural network processor (NPU), a tensor processor (TPU), an artificial intelligence (AI) type processor, etc.) and a memory 104 for storing data. Optionally, the mobile terminal may further include a transmission device 106, an input and output device 108, and a display device 110 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.

[0036] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the processing method of the model in the embodiment of the present disclosure. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, the processing method of the model described above is realized. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the mobile terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0037] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0038] The inputs in the input / output device 108 may come from a plurality of human interface devices (HIDs), such as keyboards and mice, game controllers, and other dedicated game controllers (such as steering wheels, fishing rods, dance mats, remote controls, etc.). In addition to providing input functions, some human interface devices may also provide output functions, such as force feedback and vibration of game controllers, audio output of controllers, etc.

[0039] The display device 110 may be, for example, a Heads Up Display (HUD), a touch screen liquid crystal display (LCD), and a touch display (also referred to as a "touch screen" or "touch display screen"). The LCD display enables the user to interact with the user interface of the mobile terminal. In some embodiments, the mobile terminal has a graphical user interface (GUI), and the user can interact with the GUI by finger contacts and / or gestures on the touch-sensitive surface. The human-computer interaction functions here may optionally include the following interactions: creating web pages, drawing, word processing, making electronic documents, games, video conferencing, instant messaging, sending and receiving emails, call interfaces, playing digital videos, playing digital music and / or web browsing, etc. The executable instructions for executing the above human-computer interaction functions are configured / stored in a computer program product or readable storage medium executable by one or more processors.

[0040] Those skilled in the art will understand that Figure 1 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.

[0041] In a possible implementation, the present disclosure provides a method for processing a model. Figure 2 is a flow chart of a model processing method according to one embodiment of the present disclosure, such as Figure 2 As shown, the method may include the following steps:

[0042] Step S202, obtaining an initial texture image of the initial three-dimensional model and a color gradient range, wherein the multiple colors within the color gradient range are used to respectively generate gradient colors to be dyed to the initial three-dimensional model, and the gradient colors are used to represent the result formed by sequential transition of multiple colors.

[0043] In the technical solution provided in the above step S202 of the present disclosure, the initial texture image and the color gradient range of the initial three-dimensional model can be obtained. The initial three-dimensional (3D) model can be a model to be dyed in a virtual scene, for example, a fashion model in a game or animation scene. The initial texture image can be a texture map of the initial three-dimensional model, which can be called an original texture image. The color gradient range can be determined by a plurality of colors selected by a user, and the plurality of colors within the color gradient range can be used to respectively generate gradient colors to be dyed to the initial three-dimensional model, and the gradient color can be used to represent the result (for example, a color result) formed by the sequential transition of a plurality of colors.

[0044] In this embodiment, according to the multiple colors selected by the user and the order of the multiple colors selected, the color gradient range obtained by sequentially arranging and combining the multiple colors can be determined. The color gradient range can be obtained, and the original texture image of the model to be dyed can be obtained to perform dyeing processing on the model to be dyed.

[0045] Step S204, based on the hue threshold of the initial texture image, the initial hue values ​​of multiple pixels in the initial texture image are mapped to the color gradient range to obtain a mapping result, wherein the hue threshold is used to indicate the threshold that the initial hue value is allowed to reach, and the mapping result is used to indicate the correspondence between different initial hue values ​​and different colors in the color gradient range.

[0046] In the technical solution provided in the above step S204 of the present disclosure, after obtaining the initial texture image and the color gradient range of the initial three-dimensional model, the initial hue values ​​of multiple pixels in the initial texture image can be mapped to the color gradient range based on the hue threshold of the obtained initial texture image to obtain a mapping result. Among them, the hue threshold can be used to indicate the threshold that the initial hue value is allowed to reach, and the hue threshold can include the minimum hue threshold and the maximum hue threshold of the initial texture image. For example, the minimum hue threshold can be represented by min_hue, and the maximum hue threshold can be represented by max_hue. The initial hue (Hue) value can be the hue value of each pixel in the initial texture image, and can be used to indicate the type of color of the initial texture image. The mapping result can be used to indicate the correspondence between different initial hue values ​​and different colors in the color gradient range.

[0047] In this embodiment, after obtaining the initial texture image and the color gradient range of the initial three-dimensional model, each pixel in the obtained initial texture image can be traversed, and the initial hue value of each pixel can be recorded. The minimum hue threshold and the maximum hue threshold are further determined from the recorded initial hue values ​​of the multiple pixels. Further based on the determined minimum hue threshold and maximum hue threshold, the initial hue values ​​of the multiple pixels in the initial texture image can be mapped to the color gradient range, that is, the initial hue value of each pixel is proportionally mapped to obtain a mapping result.

[0048] Step S206 , based on the mapping result, determining an initial gradient color corresponding to the initial hue value in a color gradient sequence corresponding to the color gradient range, wherein the color gradient sequence is generated according to the arrangement order of multiple colors.

[0049] In the technical solution provided in the above step S206 of the present disclosure, based on the hue threshold of the initial texture image, the initial hue values ​​of multiple pixels in the initial texture image are mapped to the color gradient range. After obtaining the mapping result, based on the obtained mapping result, the initial gradient color corresponding to the initial hue value can be determined in the color gradient sequence corresponding to the color gradient range. The color gradient sequence can be a gradient color sequence corresponding to the color gradient range, and the color gradient sequence is generated according to the arrangement order of multiple colors. The initial gradient color can be a pre-generated gradient color based on multiple colors selected by the user, or a gradient color specified by the user.

[0050] In this embodiment, after obtaining the mapping result, the initial hue value can be mapped to the color gradient sequence corresponding to the color gradient range according to the obtained mapping result. Further, the gradient color to which the initial hue value is mapped in the color gradient sequence can be determined, and the gradient color is determined as the initial gradient color.

[0051] Step S208, adjusting the initial attribute information of the pixel corresponding to the initial hue value in the initial texture image according to the initial gradient color to obtain target attribute information, wherein the initial attribute information includes at least one of the following of the pixel: initial hue value, initial saturation and initial brightness.

[0052] In the technical solution provided in the above step S208 of the present disclosure, after determining the initial gradient color corresponding to the initial hue value in the color gradient sequence corresponding to the color gradient range based on the mapping result, the initial attribute information of the pixel corresponding to the initial hue value in the initial texture image can be adjusted according to the determined initial gradient color to obtain the target attribute information. The initial attribute information may include at least one of the following of the pixel: initial hue value, initial saturation (Saturation) and initial brightness (Value). The initial saturation can be represented by origin_s. The initial brightness can be represented by origin_v. The target attribute information may include at least one of the following: adjusted hue value, adjusted saturation and adjusted brightness.

[0053] In this embodiment, after determining the initial gradient color corresponding to the initial hue value, the initial attribute information of the pixel corresponding to the initial hue value in the initial texture image can be adjusted according to the determined initial gradient color. For example, the initial hue value can be adjusted, the initial saturation and initial brightness can be retained, and the target attribute information can be obtained. Alternatively, the initial hue value, the initial saturation and the initial brightness can all be adjusted to obtain the target attribute information.

[0054] Step S210, using the target attribute information, coloring the initial three-dimensional model to obtain a target three-dimensional model.

[0055] In the technical solution provided in the above step S210 of the present disclosure, after adjusting the initial attribute information of the pixel corresponding to the initial hue value in the initial texture image according to the initial gradient color to obtain the target attribute information, the initial three-dimensional model can be dyed using the obtained target attribute information to obtain the target three-dimensional model. The target three-dimensional model can be a dyed three-dimensional model.

[0056] In this embodiment, after obtaining the target attribute information, the target attribute information may be converted in color space, and the initial texture image of the initial three-dimensional model may be updated to a dyed texture image, thereby obtaining a dyed target three-dimensional model.

[0057] Through the above steps S202 to S210, an initial texture image of the initial three-dimensional model and a color gradient range are obtained, wherein the multiple colors within the color gradient range are used to respectively generate gradient colors to be dyed to the initial three-dimensional model, and the gradient colors are used to represent the result formed by the sequential transition of multiple colors; based on the hue threshold of the initial texture image, the initial hue values ​​of multiple pixels in the initial texture image are mapped to the color gradient range to obtain a mapping result, wherein the hue threshold is used to represent the threshold that the initial hue value is allowed to reach, and the mapping result is used to represent the relationship between different initial hue values ​​and color gradients. The corresponding relationship between different colors in the range; based on the mapping result, in the color gradient sequence corresponding to the color gradient range, determine the initial gradient color corresponding to the initial hue value, wherein the color gradient sequence is generated according to the arrangement order of multiple colors; according to the initial gradient color, adjust the initial attribute information of the pixel corresponding to the initial hue value in the initial texture image to obtain the target attribute information, wherein the initial attribute information includes at least one of the following of the pixel: initial hue value, initial saturation and initial brightness; use the target attribute information to dye the initial three-dimensional model to obtain the target three-dimensional model. That is to say, the embodiment of the present disclosure maps the initial hue values ​​of multiple pixels in the initial texture image to the color gradient range based on the hue threshold determined by traversing the pixels of the initial texture image of the initial three-dimensional model, so as to achieve the purpose that the initial hue, initial saturation and initial brightness of the pixel can be adjusted according to the specified gradient color, thereby achieving the technical effect of improving the processing efficiency of the model and solving the technical problem of low processing efficiency of the model.

[0058] The above method of the embodiment of the present disclosure is further introduced below.

[0059] As an optional embodiment, step S208, according to the initial gradient color, adjusts the initial attribute information of the pixel corresponding to the initial hue value in the initial texture image to obtain the target attribute information, including: converting the color data of the initial gradient color from the initial color space to the target color space to obtain a first target gradient color, wherein the initial color space is used to describe the color through a combination of different colors, and the target color space is used to represent the attribute information of the color; according to the first target gradient color, adjusts the initial attribute information to obtain the target attribute information.

[0060] In this embodiment, after determining the initial gradient color corresponding to the initial hue value in the color gradient sequence corresponding to the color gradient range based on the mapping result, the color data of the determined initial gradient color can be converted from the initial color space to the target color space to obtain the first target gradient color. Further, according to the obtained first target gradient color, the initial attribute information can be adjusted to obtain the target attribute information. Among them, the initial color space can be used to describe the color through the combination of different colors, and the initial color space can be a red, green, blue (Red Green Blue, referred to as RGB) color space. The target color space can be used to represent the attribute information of the color, and the target color space can be a hue, saturation, brightness (HueSaturation Value, referred to as HSV) color space. The first target gradient color can be a gradient color obtained by converting the color data of the initial gradient color from the RGB color space to the HSV color space.

[0061] Optionally, after determining the initial gradient color corresponding to the initial hue value, the color data of the initial gradient color can be converted from the RGB color space to the HSV color space to obtain a first target gradient color. Further, according to the obtained first target gradient color, initial attribute information such as initial hue value, initial saturation and initial brightness of the corresponding pixel in the initial texture image can be adjusted to obtain target attribute information.

[0062] As an optional embodiment, the initial attribute information is adjusted according to the first target gradient color to obtain the target attribute information, including: adjusting the initial hue value in the initial attribute information to the target hue value in the first target gradient color, and maintaining the initial saturation and initial brightness in the initial attribute information to obtain the target attribute information; or, adjusting the initial hue value in the initial attribute information to the target hue value in the first target gradient color, adjusting the initial saturation in the initial attribute information to the target saturation in the first target gradient color, and adjusting the initial brightness in the initial attribute information to the target brightness in the first target gradient color to obtain the target attribute information.

[0063] In this embodiment, after converting the color data of the initial gradient color from the initial color space to the target color space to obtain the first target gradient color, the initial hue value in the initial attribute information can be adjusted to the target hue value in the first target gradient color, and the initial saturation and initial brightness in the initial attribute information are maintained to obtain the target attribute information. Alternatively, the initial hue value in the initial attribute information can be adjusted to the target hue value in the first target gradient color, the initial saturation in the initial attribute information can be adjusted to the target saturation in the first target gradient color, and the initial brightness in the initial attribute information can be adjusted to the target brightness in the first target gradient color to obtain the target attribute information. Among them, the target hue value can be the hue value obtained after adjusting the initial hue value, which can be called the hue value of the new color and can be represented by new_hue. The target saturation can be the saturation obtained after adjusting the initial saturation. The target brightness can be the brightness obtained after adjusting the initial brightness. The target attribute information can include the target hue value, the initial saturation and the initial brightness, or the target attribute information can include the target hue value, the target saturation and the target brightness.

[0064] Optionally, after converting the color data of the initial gradient color from the RGB color space to the HSV color space to obtain the first target gradient color, the initial hue value in the initial attribute information can be adjusted to the target hue value in the first target gradient color, and the initial saturation and initial brightness in the initial attribute information are maintained to obtain the target attribute information. That is, this embodiment converts the RGB of the first target gradient color to HSV to obtain the relevant data of the hue value new_hue of the new color, while the saturation and brightness remain unchanged from the original pixel, so as to achieve the purpose of retaining the original picture details to the greatest extent and only changing the color effect.

[0065] Optionally, after converting the color data of the initial gradient color from the RGB color space to the HSV color space to obtain the first target gradient color, the initial hue value in the initial attribute information can be adjusted to the target hue value in the first target gradient color, the initial saturation in the initial attribute information can be adjusted to the target saturation in the first target gradient color, and the initial brightness in the initial attribute information can be adjusted to the target brightness in the first target gradient color to obtain the target attribute information. That is, this embodiment can adjust the hue value, saturation, and brightness of each pixel according to the specified gradient color.

[0066] As an optional embodiment, the target attribute information is used to perform a dyeing process on the initial three-dimensional model to obtain a target three-dimensional model, including: converting the target attribute information from the target color space to the initial color space to obtain a second target gradient color; using the second target gradient color, updating the initial texture image to the target texture image; using the target texture image, dyeing the corresponding dyeing area on the initial three-dimensional model to obtain the target three-dimensional model.

[0067] In this embodiment, after adjusting the initial attribute information of the pixel corresponding to the initial hue value in the initial texture image according to the initial gradient color to obtain the target attribute information, the obtained target attribute information can be converted from the target color space to the initial color space to obtain a second target gradient color. The initial texture image can be updated to the target texture image using the obtained second target gradient color. After the initial texture image is updated to the target texture image, the corresponding dyeing area on the initial three-dimensional model can be dyed using the obtained target texture image to obtain the target three-dimensional model. The second target gradient color can be a gradient color obtained by converting the target attribute information from the HSV color space to the RGB color space. The target texture image can be a dyed texture map.

[0068] Optionally, after converting the RGB of the first target gradient color to HSV and obtaining the relevant data of the hue value new_hue of the new color, while the saturation and brightness remain unchanged with the original pixel, the target attribute information including the target hue value, initial saturation and initial brightness can be converted from the HSV color space to the RGB color space to obtain the second target gradient color. That is, after obtaining the hue value new_hue of the new color while the saturation and brightness remain unchanged, the hue value new_hue, initial saturation origin_s and initial brightness origin_v of the new color can be recombined to obtain the recombined HSV color [new_hue, origin_s, origin_v], and the recombined HSV color is converted to RGB to obtain the second target gradient color, and the obtained second target gradient color is reassigned to the pixel to achieve pixel coloring.

[0069] Optionally, after obtaining the second target gradient color, the initial texture image can be updated to the target texture image using the obtained second target gradient color, that is, the texture map of the initial three-dimensional model is updated to the dyed texture map. Further, using the updated target texture image, the corresponding dyed area on the initial three-dimensional model can be dyed to obtain the target three-dimensional model.

[0070] This embodiment retains the saturation and brightness data of multiple pixels in the initial texture image, replaces the hue value of the corresponding target color, and then reverses the transformed color to RGB color.

[0071] As an optional embodiment, based on the mapping result, in the color gradient sequence corresponding to the color gradient range, an initial gradient color corresponding to the initial hue value is determined, including: according to the mapping result, mapping the initial hue value to the color gradient sequence; and determining the gradient color mapped to the initial hue value in the color gradient sequence as the initial gradient color.

[0072] In this embodiment, based on the hue threshold of the initial texture image, the initial hue values ​​of multiple pixels in the initial texture image are mapped to the color gradient range, and after obtaining the mapping result, the initial hue value can be mapped to the color gradient sequence according to the obtained mapping result. Further, the gradient color to which the initial hue value is mapped in the color gradient sequence can be determined as the initial gradient color.

[0073] As an optional embodiment, the method also includes: converting the color gradient sequence into a gradient color array according to the size information of the initial texture image, wherein the size information is used to determine the index position, the index position is used to traverse the color data of the gradient color included in the gradient color array, the color data of the gradient color is used to represent the color of the gradient color in the initial color space, and the initial color space is used to describe the color through a combination of different colors; according to the mapping result, mapping the initial hue value to the color gradient sequence, including: determining the proportion of the initial hue value in the hue threshold range of the initial texture image, wherein the hue threshold range is determined by the hue threshold; according to the mapping result, mapping the proportion to the gradient color array corresponding to the color gradient sequence.

[0074] In this embodiment, the color gradient sequence can be converted into a gradient color array according to the size information of the initial texture image. The proportion of the initial hue value in the hue threshold range of the initial texture image can be determined. Based on the hue threshold of the initial texture image, the initial hue values ​​of multiple pixels in the initial texture image are mapped to the color gradient range to obtain a mapping result, and after the color gradient sequence is converted into the gradient color array, the above proportion can be mapped to the gradient color array corresponding to the color gradient sequence according to the obtained mapping result. Among them, the size information can be the width information of the initial texture image, which can be used to determine the index position. The index position can be used to traverse the color data of the gradient color included in the gradient color array, the color data of the gradient color can be used to represent the color of the gradient color in the initial color space, and the initial color space can be used to describe the color through the combination of different colors. The hue threshold range can be determined by the hue threshold.

[0075] Optionally, a gradient color array may be generated based on the size information of the color gradient sequence and the image width of the initial texture image. Further, the proportion of the initial hue value in the hue threshold range of the initial texture image may be determined. After the gradient color array is generated and the mapping result is obtained, the above proportion may be mapped to the gradient color array corresponding to the color gradient sequence.

[0076] For example, the color gradient sequence selected by the user may be [c1, c2, c3, c4], and the image width is 512 pixels (px), then the generated gradient color array is 512 [c1, c2, ..., c512], and the key point index of the gradient color array is four, corresponding to the four user color sequences respectively, and the index position may be the index when traversing the gradient color array according to the image width, that is, 1 to 512.

[0077] As an optional embodiment, the gradient color mapped to the initial hue value in the color gradient sequence is determined as the initial gradient color, including: the color data of the gradient color mapped to the ratio corresponding to the initial hue value in the gradient color array is determined as the color data of the initial gradient color.

[0078] In this embodiment, after the initial hue value is mapped to the color gradient sequence according to the mapping result, the color data of the gradient color mapped to the proportion of the initial hue value in the gradient color array can be determined as the color data of the initial gradient color.

[0079] As an optional embodiment, based on the hue threshold of the initial texture image, the hue values ​​of multiple pixels in the initial texture image are mapped to the color gradient range to obtain a mapping result, including: determining the maximum hue threshold and the minimum hue threshold of the initial texture image; determining the mapping parameters based on the maximum hue threshold, the minimum hue threshold and the color gradient range; adjusting the initial hue value according to the mapping parameters to obtain a mapping result.

[0080] In this embodiment, after obtaining the initial texture image and the color gradient range of the initial three-dimensional model, the maximum hue threshold and the minimum hue threshold of the initial texture image can be determined. After determining the maximum hue threshold and the minimum hue threshold of the initial texture image, the mapping parameters can be determined based on the determined maximum hue threshold, the minimum hue threshold and the obtained color gradient range. Further according to the determined mapping parameters, the initial hue value can be adjusted to obtain a mapping result. Among them, the minimum hue threshold can be represented by min_hue. The maximum hue threshold can be represented by max_hue. The mapping parameter can be a parameter for proportional mapping of the initial hue value of each pixel, which can be represented by hue_rate.

[0081] Optionally, after obtaining the initial texture image and the color gradient range of the initial three-dimensional model, each pixel in the obtained initial texture image can be traversed, and the initial hue value of each pixel can be recorded. The minimum hue threshold min_hue and the maximum hue threshold max_hue are further determined from the recorded initial hue values ​​of multiple pixels. Based on the determined minimum hue threshold and maximum hue threshold, and the obtained color gradient range, the mapping parameter hue_rate can be determined. Further, according to the determined mapping parameters, the initial hue value can be adjusted, that is, the initial hue value of each pixel is proportionally mapped to obtain a mapping result.

[0082] As an optional embodiment, the method also includes: determining the arrangement order of multiple colors in the color gradient range and the size information of the initial texture image; using the arrangement order and size information, performing linear gradient processing on the multiple colors in the color gradient range to obtain a color gradient sequence.

[0083] In this embodiment, the arrangement order of the multiple colors in the color gradient range and the size information of the initial texture image can be determined. After the arrangement order and the size information are determined, the multiple colors in the color gradient range are linearly gradient processed using the determined arrangement order and the size information to obtain a color gradient sequence.

[0084] Optionally, the arrangement order of the multiple colors in the color gradient range can be determined according to the order in which the user selects the multiple colors, and the size information of the initial texture image (i.e., the original texture size) can be determined according to the image width of the initial texture image. Further, using the determined arrangement order and size information, a linear gradient process can be performed on the multiple colors in the color gradient range, that is, a color gradient sequence is obtained by using a linear gradient method.

[0085] As an optional embodiment, the initial three-dimensional model is dyed using the target attribute information to obtain the target three-dimensional model, including: using the target attribute information, the initial three-dimensional model is dyed, and the obtained target three-dimensional model is previewed; the method also includes: in response to the adjustment operation, adjusting the previewed target three-dimensional model.

[0086] In this embodiment, after the initial attribute information of the pixel corresponding to the initial hue value in the initial texture image is adjusted according to the initial gradient color to obtain the target attribute information, the initial three-dimensional model can be dyed using the obtained target attribute information, and the obtained target three-dimensional model can be previewed. Further, in response to the adjustment operation, the previewed target three-dimensional model can be adjusted.

[0087] Optionally, this embodiment supports previewing the target 3D model. When the user previews the obtained target 3D model and finds that the target 3D model needs to be adjusted, an adjustment operation can be triggered. Further, in response to the adjustment operation, the previewed target 3D model can be adjusted, thereby achieving the effect of improving the modification efficiency of the target 3D model.

[0088] As an optional embodiment, the method also includes: converting the initial texture image into picture pixel data in binary format; based on the hue threshold of the initial texture image, mapping the initial hue values ​​of multiple pixels in the initial texture image to the color gradient range to obtain a mapping result, including: based on the hue threshold of the picture pixel data, mapping the initial hue values ​​of multiple pixels in the picture pixel data to the color gradient range to obtain a mapping result.

[0089] In this embodiment, the initial texture image can be converted into binary format image pixel data. After the initial texture image is converted into binary format image pixel data, based on the hue threshold of the converted image pixel data, the initial hue values ​​of multiple pixels in the image pixel data can be mapped to the color gradient range to obtain a mapping result.

[0090] Optionally, after acquiring the initial texture image, the acquired initial texture image may be converted into a data encoding (Base64) format, and the converted initial texture image may be parsed into image pixel data in a binary format to perform coloring processing on the image pixel data.

[0091] As an optional embodiment, obtaining a color gradient range includes: in response to a first input operation, obtaining multiple colors, and determining the multiple colors as a color gradient range; or, in response to a second input operation, obtaining a target image, and determining multiple colors extracted from the target image as a color gradient range.

[0092] In this embodiment, in response to the first input operation, multiple colors can be obtained, and the multiple colors are determined as a color gradient range. Or in response to the second input operation, a target image can be obtained, and multiple colors extracted from the target image can be determined as a color gradient range. The first input operation can be an operation of selecting a color individually. The second input operation can be an operation of obtaining a color through an image.

[0093] Optionally, this embodiment supports determining the color gradient range by selecting a color individually or obtaining a color through a picture. In response to the first input operation, multiple colors can be selected individually, and the selected multiple colors are determined as the color gradient range. In response to the second input operation, a target picture can be obtained, and multiple colors can be extracted from the target picture, and the extracted multiple colors can be determined as the color gradient range.

[0094] In an embodiment of the present disclosure, an initial texture image of an initial three-dimensional model and a color gradient range are obtained, wherein a plurality of colors within the color gradient range are used to respectively generate gradient colors to be dyed to the initial three-dimensional model, and the gradient colors are used to represent the result formed by sequential transition of a plurality of colors; based on a hue threshold of the initial texture image, initial hue values ​​of a plurality of pixels in the initial texture image are mapped to the color gradient range to obtain a mapping result, wherein the hue threshold is used to represent a threshold that the initial hue value is allowed to reach, and the mapping result is used to represent the correspondence between different initial hue values ​​and different colors in the color gradient range; based on the mapping result, in a color gradient sequence corresponding to the color gradient range, an initial gradient color corresponding to the initial hue value is determined, wherein the color gradient sequence is generated according to the arrangement order of a plurality of colors; according to the initial gradient color, initial attribute information of a pixel corresponding to the initial hue value in the initial texture image is adjusted to obtain target attribute information, wherein the initial attribute information includes at least one of the following of the pixel: an initial hue value, an initial saturation, and an initial brightness; and the initial three-dimensional model is dyed using the target attribute information to obtain a target three-dimensional model. That is to say, the embodiment of the present disclosure maps the initial hue values ​​of multiple pixels in the initial texture image to a color gradient range based on the hue threshold determined by traversing the pixels of the initial texture image of the initial three-dimensional model, so as to achieve the purpose of adjusting the initial hue, initial saturation and initial brightness of the pixels according to the specified gradient color, thereby achieving the technical effect of improving the processing efficiency of the model and solving the technical problem of low processing efficiency of the model.

[0095] The technical solution of the embodiment of the present disclosure is further introduced below with examples in combination with preferred implementation modes.

[0096] At present, in game development, fashion reserves can be used for rapid game production. With the increasing demand for personalized and customized character fashion models, traditional 3D model fashion dyeing technology usually relies on manually extracting identification (ID) masks in the image processing software PS to control the dyeing area. The process is cumbersome and inefficient, and it is impossible to directly preview the effect of fashion color change in 3D, which seriously restricts the application of 3D model fashion dyeing technology in large-scale production and personalized customization.

[0097] It should be noted that 3D models refer to digital representations of three-dimensional objects created by computer technology, and are usually used in games, animations, virtual reality (VR), etc. ID masks refer to masks used to identify different dyeing areas during the dyeing process of 3D models, and are usually created manually in image processing software to control the color application of different areas.

[0098] In the related art, first, when creating an ID mask map, it is necessary to create an ID mask map for controlling the dyeing area by manually cutting out the original color map, which is time-consuming, especially for models with complex patterns and multi-level dyeing requirements, each dyeing area needs to be carefully cut out one by one. Secondly, when redrawing the color map, after completing the production of the ID mask map, the color map needs to be redrawn according to different dyeing requirements. Usually, each dyeing area needs to be adjusted and colored separately to ensure that the final effect meets the design requirements. Finally, when applying the dyeing effect, the redrawn color map needs to be applied to the 3D model to achieve the desired dyeing effect. However, since the dyeing process relies entirely on manual operation and real-time preview cannot be achieved, the dyeing effect usually requires multiple adjustments to achieve the expected state.

[0099] Therefore, the above method relies on manual operation, which is time-consuming and labor-intensive when making ID mask maps and redrawing color maps. Especially when dealing with complex models and multi-level dyeing requirements, the workload increases exponentially, resulting in low efficiency; the accuracy of manual operation is limited by personal skill level, and it is difficult to maintain consistency in large-scale production. The work of different designers may have obvious differences, which affects the uniformity of the overall dyeing effect, resulting in low accuracy; since the dyeing process is usually carried out in a two-dimensional plane, it is impossible to preview the dyeing effect in real time in a 3D environment, resulting in the need for repeated adjustments in the dyeing process, further reducing work efficiency and making it difficult to achieve real-time preview; it is impossible to flexibly adjust according to specific image content and dyeing requirements, the degree of automation is low, and there is a lack of intelligent dyeing adjustment capabilities. For complex patterns and multi-level dyeing requirements, it is difficult to achieve natural color transitions and consistent dyeing effects, and the adaptability is poor; since the dyeing process is cumbersome and time-consuming, it is difficult to meet the user's demand for personalized customization. Each time the color scheme is changed, the map needs to be redrawn and adjusted, which reduces the flexibility and user experience of the product and limits the demand for personalized customization.

[0100] In order to solve the above problems, the present disclosure proposes a real-time customized dyeing technology for 3D fashion models, which can solve the following problems: the related technology relies on manually creating ID mask maps and redrawing color maps. The whole process is time-consuming and prone to errors, especially when dealing with complex models and multi-level dyeing requirements. The efficiency is low and cannot meet the requirements of large-scale production. The efficiency of manual operation is low; the dyeing process is usually carried out in a two-dimensional environment, and the dyeing effect cannot be previewed in real time on the 3D model. Usually, multiple adjustments are required to achieve the expected effect, which increases the time cost, and lacks the ability to flexibly adjust the dyeing according to the specific image content and user needs, making it difficult to achieve real-time preview and flexible adjustment; with the continuous improvement of users' demand for personalization and customization, the relevant dyeing methods lack flexibility, and each adjustment of the color scheme needs to be remade, which greatly limits the customization ability of the product, making it difficult to cope with diverse market demands and unable to meet personalized customization needs.

[0101] It should be noted that HSV is a model used to describe color, in which Hue refers to the type of color, Saturation refers to the purity of the color, and Value refers to the brightness of the color. RGB is a color model that uses different combinations of red, green, and blue to represent various colors. It is widely used in displays and digital image processing.

[0102] In this embodiment, for the process of HSV color space conversion and adjustment, the RGB value and HSV value of the image are switched as needed through the method of converting RGB to HSV (rgbToHsv) and the method of converting HSV to RGB (hsvToRgb), and the hue, saturation and brightness are dynamically adjusted during the dyeing process. The hue-based dyeing method retains the light and dark details of the original texture map to a large extent. Compared with direct color replacement, this embodiment can make the dyeing effect more natural.

[0103] During the adjustment process, the original texture image is converted to HSV mode, each pixel in the image is traversed, and the hue value of each pixel is recorded to find the minimum hue value min_hue and the maximum hue value max_hue of all pixels. Further, based on the minimum hue value and the maximum hue value, each pixel in the image is proportionally mapped, so that the original texture pixel hue value corresponds to the color gradient range selected by the user.

[0104] Optionally, the target RGB color selected by the user is converted to HSV, and the original texture image is converted to HSV mode. After the pixels are proportionally mapped using the minimum hue value and the maximum hue value calculated above, the hue values ​​of the original texture pixels are mapped to the color gradient range selected by the user.

[0105] For the process of gradient color generation and texture color mapping, according to the color order selected by the user and the original texture size, a corresponding color gradient sequence is generated using a linear gradient method and applied to the dyed area of ​​the image. Gradient colors are generated based on the color list (userColor) provided by the user in order to create a more natural color transition effect. When applying gradient colors, the hue value of each pixel is mapped to the corresponding position of the gradient color sequence, thereby replacing the color in the original image and achieving a gradient dyeing effect.

[0106] It should be noted that gradient color refers to the color effect formed by the gradual transition of two or more colors, which is often used to increase the visual layering of the image. Gradient color is generated based on the color list selected by the user, and the gradient order is consistent with the color order selected by the user. Here, replacing the color in the original image to achieve the gradient coloring effect is a preliminary confirmation of the replacement color. The following also requires replacing the saturation and lightness values ​​of the obtained gradient color.

[0107] Determine the gradient array size and key point index based on the number of selected colors and image width. The gradient array is an array generated based on the color gradient sequence plus the image width. For example, if the gradient sequence selected by the user is [c1, c2, c3, c4] and the image width is 512px, then the gradient array size is 512 [c1, c2, ..., c512], and the key point index is 4, corresponding to the 4 color sequences selected by the user. Traverse the gradient array and calculate the RGB color corresponding to the current index data based on the index position. The index position is the index when traversing the gradient array based on the image width, for example, the index is 1 to 512 as mentioned above. The above steps can generate a more natural linear gradient array (RGB format) based on the color selected by the user.

[0108] The process of adjusting hue and texture at the pixel level, where hue adjustment refers to the process of changing the color characteristics of each pixel in the image by adjusting the hue value, which is particularly common in the HSV color space. The image is processed pixel by pixel, and the HSV value of each pixel is calculated and mapped to the pre-generated gradient color to ensure that the hue, saturation, and lightness of each pixel can be adjusted according to the specified gradient color, thereby achieving a detailed dyeing effect. The position of each pixel Hue value in the entire image Hue value range can be calculated, and the corresponding position can be converted into a proportional value, mapped to the above-generated gradient color array, and the new pixel RGB value can be obtained.

[0109] Figure 3This is a schematic diagram of the pixel before and after coloring according to one embodiment of the present disclosure. After replacing the hue, the saturation and lightness also need to be replaced to obtain the final replacement color result. Convert the RGB of the gradient color to HSV to obtain the relevant data of the hue new_hue of the new color, while the saturation origin_s and lightness origin_v remain unchanged from the original pixel, so as to maximize the retention of the details of the original image and only change the color. Finally, convert the reorganized HSV color [new_hue, origin_s, origin_v] to RGB and reassign the pixel to achieve the following effect. Figure 3 Pixel staining shown.

[0110] Figure 4 is a schematic diagram of a preview of a dyeing effect according to one embodiment of the present disclosure, such as Figure 4 As shown in the figure, for the 3D real-time preview of the dyeing effect based on the graphics library (ThreeJs), the canvas application programming interface (HTML5 Canvas Application Programming Interface, referred to as HTML5 Canvas API) is used to process the image, and the image pixel data method (Canvas.getImageData) and the image pixel data method (Canvas.putImageData) are used to save the dyed image in Base64 format. Further, through the ThreeJs technology, the mesh sub-objects under the model to be dyed are traversed, and the model object texture is updated to the dyed texture map according to the model's map ID, and ThreeJS is notified to update the view, so that the entire dyeing process can be realized as follows. Figure 4 Real-time execution and preview shown.

[0111] The above method of the embodiment of the present disclosure is further introduced below.

[0112] Figure 5 is a schematic diagram of loading a 3D model according to one embodiment of the present disclosure, such as Figure 5As shown, the front view, rear view, top view and side view of the model can be viewed. For the process of loading 3D models, the 3D model is automatically imported from the 3D model resource library (MUSE warehouse) or other model resource library, and the embedded map file of the model is obtained. Specifically, on the ThreeJS script side, according to the loading method of the texture map, it can be divided into built-in texture (DataTexture) and external texture (Texture). DataTexture passes the texture image data (usually pixels) directly to the texture in the form of a data array (Unit8Array) for display. Texture loads external texture images through external connections, and the external connection form can be Base64, transmission hypertext (Http) or storage of binary data (Blob), etc. In order to facilitate the subsequent pixel-level processing of the image, the present disclosure uniformly converts the texture map into Base64 format on the script side, and then parses it into binary image pixel data for subsequent processing.

[0113] It should be noted that, according to the actual situation of the model map, when the model map loading mode includes both internal and external loading modes, corresponding processing is performed. However, no matter what loading mode the original model map adopts, this embodiment will convert it into binary image data for output.

[0114] For the coloring method, this embodiment provides a user interface, allowing the user to select multiple colors and configure a gradient color scheme. Figure 6 is a schematic diagram of selecting a color individually according to one embodiment of the present disclosure, such as Figure 6 As shown, selecting a color means selecting a color individually, and selecting an image means obtaining a color through an image. Hexadecimal color codes (HEX) and template colors are provided, where #FFFFFF represents pure white. Users can select a color ( Figure 6 The staining was performed using #7A566C, #CCA37E, and #9C5C94). Figure 7 is a schematic diagram of obtaining color according to an embodiment of the present disclosure, such as Figure 7 As shown, it supports the method of obtaining colors through pictures, and provides the method of adding color cards, so that users can select colors ( Figure 7 #7A566C, #CCA37E, #9C5C94) were used for staining.

[0115] This embodiment generates a gradient color sequence according to the color selected by the user and applies it to the dyed area. Figure 8 is a schematic diagram of selecting a color individually and adding it to a color list according to one embodiment of the present disclosure, such as Figure 8As shown, it supports selecting colors individually and adding them to the color list. HEX and template colors are provided. Among them, HEX selects #71b6b6, and users can select colors ( Figure 8 The staining was performed using #29E6E6, #29A7A7, and #71B6B6) as shown in the figure. Fig. 9 is a schematic diagram of automatically generating a color card by extracting the main color of a picture according to one embodiment of the present disclosure, such as Fig. 9 As shown, it supports extracting the main color of the image and automatically generating a color card. It also provides the ability to add a color card, so users can select the color ( Fig. 9 After applying the staining scheme, users can preview the staining effect in real time, such as Figure 4 as shown, with minor adjustments and modifications.

[0116] Fig.10 is a structural block diagram of a model processing system according to one embodiment of the present disclosure, such as Fig.10 As shown, the processing system 1000 of the model may include: an image preprocessing module 1002, a dyeing region identification module 1004, a color matching and application module 1006, and a gradient color and custom scheme module 1008. First, a 3D fashion model is input, and the 3D fashion model is preprocessed based on the image preprocessing module 1002, and further, the region of the preprocessed 3D fashion model that needs to be dyed is identified based on the dyeing region identification module 1004. After the user selects a color interface, the color selected by the user is applied based on the color matching and application module 1006, and the 3D fashion model is dyed based on the gradient color and custom scheme module 1008, and finally the final 3D dyeing effect is output.

[0117] Fig.11 is a schematic diagram of a 3D fashion model before dyeing according to one embodiment of the present disclosure, Fig.12 This is a schematic diagram of a 3D fashion model after dyeing according to one of the embodiments of the present disclosure. This embodiment realizes the automation and refinement of the 3D model fashion dyeing process. Through automated model preprocessing, edge detection, and intelligent identification of dyeing areas, the steps of manual participation are significantly reduced, and the overall efficiency of 3D model dyeing is greatly improved. In particular, when responding to large-scale production needs, the production cycle is significantly shortened and production efficiency is greatly improved; through the computer's efficient traversal of the image's pixel data, with the help of RGB and HSV color conversion, an automatic and highly refined dyeing effect is achieved. Especially when processing complex patterns and gradient colors, the brightness and darkness data of the original texture is retained to ensure the natural transition and uniformity of the color, ensuring the beauty and authenticity of the final dyeing effect, and achieving a high-precision dyeing effect.

[0118] This embodiment provides a function of real-time preview of dyeing effects, so that users can directly view and adjust dyeing results in the ThreeJS environment, which not only improves the interactivity of the design, but also reduces the time spent on repeated adjustments, and supports real-time preview and flexible adjustment; by supporting multiple color schemes and gradient color configurations, it can meet users' personalized customization needs for 3D model fashions, and users can flexibly choose and apply different dyeing schemes to better adapt to diverse needs and enhance personalized customization capabilities; compared with traditional dyeing methods that are highly dependent on manual operations, the present disclosure reduces dependence on professional designers by introducing automation technology, greatly reduces labor costs, and can achieve high-quality dyeing effects even without a professional art background, thereby reducing labor costs.

[0119] In an embodiment of the present disclosure, an initial texture image of an initial three-dimensional model and a color gradient range are obtained, wherein a plurality of colors within the color gradient range are used to respectively generate gradient colors to be dyed to the initial three-dimensional model, and the gradient colors are used to represent the result formed by sequential transition of a plurality of colors; based on a hue threshold of the initial texture image, initial hue values ​​of a plurality of pixels in the initial texture image are mapped to the color gradient range to obtain a mapping result, wherein the hue threshold is used to represent a threshold that the initial hue value is allowed to reach, and the mapping result is used to represent the correspondence between different initial hue values ​​and different colors in the color gradient range; based on the mapping result, in a color gradient sequence corresponding to the color gradient range, an initial gradient color corresponding to the initial hue value is determined, wherein the color gradient sequence is generated according to the arrangement order of a plurality of colors; according to the initial gradient color, initial attribute information of a pixel corresponding to the initial hue value in the initial texture image is adjusted to obtain target attribute information, wherein the initial attribute information includes at least one of the following of the pixel: an initial hue value, an initial saturation, and an initial brightness; and the initial three-dimensional model is dyed using the target attribute information to obtain a target three-dimensional model. That is to say, the embodiment of the present disclosure maps the initial hue values ​​of multiple pixels in the initial texture image to a color gradient range based on the hue threshold determined by traversing the pixels of the initial texture image of the initial three-dimensional model, so as to achieve the purpose of adjusting the initial hue, initial saturation and initial brightness of the pixels according to the specified gradient color, thereby achieving the technical effect of improving the processing efficiency of the model and solving the technical problem of low processing efficiency of the model.

[0120] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present disclosure, or the part that contributes to the relevant technology, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods of each embodiment of the present disclosure.

[0121] In the present embodiment, a processing device for a model is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "unit" can implement a combination of software and / or hardware of a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware is also possible and conceived.

[0122] Fig.13 is a structural block diagram of a processing device for a model according to one embodiment of the present disclosure, such as Fig.13 As shown, the processing device 1300 of the model may include: an acquisition unit 1302 , a mapping unit 1304 , a determination unit 1306 , an adjustment unit 1308 and a coloring unit 1310 .

[0123] The acquisition unit 1302 is used to acquire the initial texture image of the initial three-dimensional model and the color gradient range, wherein the multiple colors within the color gradient range are used to respectively generate the gradient colors to be dyed to the initial three-dimensional model, and the gradient colors are used to represent the result formed by the sequential transition of multiple colors.

[0124] The mapping unit 1304 is used to map the initial hue values ​​of multiple pixels in the initial texture image to the color gradient range based on the hue threshold of the initial texture image to obtain a mapping result, wherein the hue threshold is used to indicate the threshold that the initial hue value is allowed to reach, and the mapping result is used to indicate the correspondence between different initial hue values ​​and different colors in the color gradient range.

[0125] The determining unit 1306 is configured to determine, based on the mapping result, an initial gradient color corresponding to the initial hue value in a color gradient sequence corresponding to the color gradient range, wherein the color gradient sequence is generated according to an arrangement order of multiple colors.

[0126] The adjustment unit 1308 is used to adjust the initial attribute information of the pixel corresponding to the initial hue value in the initial texture image according to the initial gradient color to obtain target attribute information, wherein the initial attribute information includes at least one of the following of the pixel: initial hue value, initial saturation and initial brightness.

[0127] The coloring unit 1310 is used to color the initial three-dimensional model using the target attribute information to obtain a target three-dimensional model.

[0128] Optionally, the adjustment unit 1308 includes: a first conversion module, used to convert the color data of the initial gradient color from the initial color space to the target color space to obtain a first target gradient color, wherein the initial color space is used to describe the color through a combination of different colors, and the target color space is used to represent the attribute information of the color; a first adjustment module, used to adjust the initial attribute information according to the first target gradient color to obtain the target attribute information.

[0129] Optionally, the first adjustment module includes: a first adjustment sub-module, used to adjust the initial hue value in the initial attribute information to the target hue value in the first target gradient color, and maintain the initial saturation and initial brightness in the initial attribute information, to obtain the target attribute information; or, a second adjustment sub-module, used to adjust the initial hue value in the initial attribute information to the target hue value in the first target gradient color, adjust the initial saturation in the initial attribute information to the target saturation in the first target gradient color, and adjust the initial brightness in the initial attribute information to the target brightness in the first target gradient color, to obtain the target attribute information.

[0130] Optionally, the dyeing unit 1310 includes: a second conversion module, used to convert the target attribute information from the target color space to the initial color space to obtain a second target gradient color; an updating module, used to update the initial texture image to the target texture image using the second target gradient color; and a dyeing module, used to use the target texture image to dye the corresponding dyeing area on the initial three-dimensional model to obtain the target three-dimensional model.

[0131] Optionally, the determination unit 1306 includes: a first mapping module, used to map the initial hue value to the color gradient sequence according to the mapping result; and a first determination module, used to determine the gradient color mapped to the initial hue value in the color gradient sequence as the initial gradient color.

[0132] Optionally, the device also includes: a first conversion unit, used to convert the color gradient sequence into a gradient color array according to size information of the initial texture image, wherein the size information is used to determine the index position, the index position is used to traverse the color data of the gradient color included in the gradient color array, the color data of the gradient color is used to represent the color of the gradient color in the initial color space, and the initial color space is used to describe the color through combinations of different colors; the first mapping module includes: a first determination submodule, used to determine the proportion of the initial hue value in the hue threshold range of the initial texture image, wherein the hue threshold range is determined by the hue threshold; a mapping submodule, used to map the proportion to the gradient color array corresponding to the color gradient sequence according to the mapping result.

[0133] Optionally, the first determination module includes: a second determination submodule, configured to determine the color data of the gradient color mapped to the ratio corresponding to the initial hue value in the gradient color array as the color data of the initial gradient color.

[0134] Optionally, the mapping unit 1304 includes: a second determination module, used to determine the maximum hue threshold and the minimum hue threshold of the initial texture image; a third determination module, used to determine the mapping parameters based on the maximum hue threshold, the minimum hue threshold and the color gradient range; and a second adjustment module, used to adjust the initial hue value according to the mapping parameters to obtain a mapping result.

[0135] Optionally, the device also includes: a first determination unit, used to determine the arrangement order of multiple colors in the color gradient range, and size information of the initial texture image; a processing unit, used to use the arrangement order and size information to perform linear gradient processing on the multiple colors in the color gradient range to obtain a color gradient sequence.

[0136] Optionally, the dyeing unit 1310 includes: a preview module, which is used to use the target attribute information to dye the initial three-dimensional model and preview the obtained target three-dimensional model; the device also includes: a first adjustment unit, which is used to adjust the previewed target three-dimensional model in response to the adjustment operation.

[0137] Optionally, the device also includes: a second conversion unit, used to convert the initial texture image into image pixel data in binary format; a mapping unit 1304, including: a second mapping module, used to map the initial hue values ​​of multiple pixels in the image pixel data to a color gradient range based on the hue threshold of the image pixel data to obtain a mapping result.

[0138] Optionally, the acquisition unit 1302 is used to obtain a color gradient range, including: a first acquisition module, used to obtain multiple colors in response to a first input operation, and determine the multiple colors as a color gradient range; or, a second acquisition module, used to obtain a target image in response to a second input operation, and determine multiple colors extracted from the target image as a color gradient range.

[0139] Optionally, the initial three-dimensional model is a fashion model in a virtual scene.

[0140] In this embodiment, the initial texture image of the initial three-dimensional model and the color gradient range are obtained by the acquisition unit 1302, wherein the multiple colors in the color gradient range are used to generate the gradient colors to be dyed to the initial three-dimensional model respectively, and the gradient colors are used to represent the result formed by the sequential transition of multiple colors. The mapping unit 1304 maps the initial hue values ​​of multiple pixels in the initial texture image to the color gradient range based on the hue threshold of the initial texture image to obtain a mapping result, wherein the hue threshold is used to represent the threshold that the initial hue value is allowed to reach, and the mapping result is used to represent the correspondence between different initial hue values ​​and different colors in the color gradient range. The determination unit 1306 determines the initial gradient color corresponding to the initial hue value in the color gradient sequence corresponding to the color gradient range based on the mapping result, wherein the color gradient sequence is generated according to the arrangement order of multiple colors. The adjustment unit 1308 adjusts the initial attribute information of the pixel corresponding to the initial hue value in the initial texture image according to the initial gradient color to obtain the target attribute information, wherein the initial attribute information includes at least one of the following of the pixel: initial hue value, initial saturation and initial brightness. The dyeing unit 1310 uses the target attribute information to dye the initial three-dimensional model to obtain the target three-dimensional model. That is, the embodiment of the present disclosure maps the initial hue values ​​of multiple pixels in the initial texture image to the color gradient range based on the hue threshold determined by traversing the pixels of the initial texture image of the initial three-dimensional model, so as to achieve the purpose that the initial hue, initial saturation and initial brightness of the pixel can be adjusted according to the specified gradient color, thereby achieving the technical effect of improving the processing efficiency of the model and solving the technical problem of low processing efficiency of the model.

[0141] It should be noted that the above-mentioned units can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to this: the above-mentioned units are all located in the same processor; or the above-mentioned units are located in different processors in any combination.

[0142] An embodiment of the present disclosure further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.

[0143] Optionally, in this embodiment, the computer-readable storage medium may be configured to store a computer program for performing the following steps:

[0144] S1, obtaining an initial texture image of an initial three-dimensional model and a color gradient range, wherein a plurality of colors within the color gradient range are used to respectively generate gradient colors to be dyed to the initial three-dimensional model, and the gradient colors are used to represent a result formed by sequential transition of a plurality of colors;

[0145] S2, based on the hue threshold of the initial texture image, mapping the initial hue values ​​of multiple pixels in the initial texture image to the color gradient range to obtain a mapping result, wherein the hue threshold is used to indicate the threshold that the initial hue value is allowed to reach, and the mapping result is used to indicate the correspondence between different initial hue values ​​and different colors in the color gradient range;

[0146] S3, based on the mapping result, determining an initial gradient color corresponding to the initial hue value in a color gradient sequence corresponding to the color gradient range, wherein the color gradient sequence is generated according to an arrangement order of multiple colors;

[0147] S4, adjusting the initial attribute information of the pixel corresponding to the initial hue value in the initial texture image according to the initial gradient color to obtain target attribute information, wherein the initial attribute information includes at least one of the following of the pixel: initial hue value, initial saturation and initial brightness;

[0148] S5, using the target attribute information, coloring the initial three-dimensional model to obtain a target three-dimensional model.

[0149] Optionally, in this embodiment, the above-mentioned computer-readable storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.

[0150] An embodiment of the present disclosure further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0151] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0152] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:

[0153] S1, obtaining an initial texture image of an initial three-dimensional model and a color gradient range, wherein a plurality of colors within the color gradient range are used to respectively generate gradient colors to be dyed to the initial three-dimensional model, and the gradient colors are used to represent a result formed by sequential transition of a plurality of colors;

[0154] S2, based on the hue threshold of the initial texture image, mapping the initial hue values ​​of multiple pixels in the initial texture image to the color gradient range to obtain a mapping result, wherein the hue threshold is used to indicate the threshold that the initial hue value is allowed to reach, and the mapping result is used to indicate the correspondence between different initial hue values ​​and different colors in the color gradient range;

[0155] S3, based on the mapping result, determining an initial gradient color corresponding to the initial hue value in a color gradient sequence corresponding to the color gradient range, wherein the color gradient sequence is generated according to an arrangement order of multiple colors;

[0156] S4, adjusting the initial attribute information of the pixel corresponding to the initial hue value in the initial texture image according to the initial gradient color to obtain target attribute information, wherein the initial attribute information includes at least one of the following of the pixel: initial hue value, initial saturation and initial brightness;

[0157] S5, using the target attribute information, coloring the initial three-dimensional model to obtain a target three-dimensional model.

[0158] An embodiment of the present disclosure further provides a computer program product, which may include a computer program, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.

[0159] Optionally, in this embodiment, the computer program product may be configured to include a computer program for performing the following steps:

[0160] S1, obtaining an initial texture image of an initial three-dimensional model and a color gradient range, wherein a plurality of colors within the color gradient range are used to respectively generate gradient colors to be dyed to the initial three-dimensional model, and the gradient colors are used to represent a result formed by sequential transition of a plurality of colors;

[0161] S2, based on the hue threshold of the initial texture image, mapping the initial hue values ​​of multiple pixels in the initial texture image to the color gradient range to obtain a mapping result, wherein the hue threshold is used to indicate the threshold that the initial hue value is allowed to reach, and the mapping result is used to indicate the correspondence between different initial hue values ​​and different colors in the color gradient range;

[0162] S3, based on the mapping result, determining an initial gradient color corresponding to the initial hue value in a color gradient sequence corresponding to the color gradient range, wherein the color gradient sequence is generated according to an arrangement order of multiple colors;

[0163] S4, adjusting the initial attribute information of the pixel corresponding to the initial hue value in the initial texture image according to the initial gradient color to obtain target attribute information, wherein the initial attribute information includes at least one of the following of the pixel: initial hue value, initial saturation and initial brightness;

[0164] S5, using the target attribute information, coloring the initial three-dimensional model to obtain a target three-dimensional model.

[0165] An embodiment of the present disclosure further provides a computer program product, which may include a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and the computer program is configured to execute the steps of any of the above method embodiments when running.

[0166] Optionally, in this embodiment, the computer program product may be configured to include a non-volatile computer-readable storage medium, and the non-volatile computer-readable storage medium may be configured to store a computer program for performing the following steps:

[0167] S1, obtaining an initial texture image of an initial three-dimensional model and a color gradient range, wherein a plurality of colors within the color gradient range are used to respectively generate gradient colors to be dyed to the initial three-dimensional model, and the gradient colors are used to represent a result formed by sequential transition of a plurality of colors;

[0168] S2, based on the hue threshold of the initial texture image, mapping the initial hue values ​​of multiple pixels in the initial texture image to the color gradient range to obtain a mapping result, wherein the hue threshold is used to indicate the threshold that the initial hue value is allowed to reach, and the mapping result is used to indicate the correspondence between different initial hue values ​​and different colors in the color gradient range;

[0169] S3, based on the mapping result, determining an initial gradient color corresponding to the initial hue value in a color gradient sequence corresponding to the color gradient range, wherein the color gradient sequence is generated according to an arrangement order of multiple colors;

[0170] S4, adjusting the initial attribute information of the pixel corresponding to the initial hue value in the initial texture image according to the initial gradient color to obtain target attribute information, wherein the initial attribute information includes at least one of the following of the pixel: initial hue value, initial saturation and initial brightness;

[0171] S5, using the target attribute information, coloring the initial three-dimensional model to obtain a target three-dimensional model.

[0172] An embodiment of the present disclosure further provides a computer program, which is configured to execute the steps of any of the above method embodiments when running.

[0173] Optionally, in this embodiment, the computer program is configured to perform the following steps:

[0174] S1, obtaining an initial texture image of an initial three-dimensional model and a color gradient range, wherein a plurality of colors within the color gradient range are used to respectively generate gradient colors to be dyed to the initial three-dimensional model, and the gradient colors are used to represent a result formed by sequential transition of a plurality of colors;

[0175] S2, based on the hue threshold of the initial texture image, mapping the initial hue values ​​of multiple pixels in the initial texture image to the color gradient range to obtain a mapping result, wherein the hue threshold is used to indicate the threshold that the initial hue value is allowed to reach, and the mapping result is used to indicate the correspondence between different initial hue values ​​and different colors in the color gradient range;

[0176] S3, based on the mapping result, determining an initial gradient color corresponding to the initial hue value in a color gradient sequence corresponding to the color gradient range, wherein the color gradient sequence is generated according to an arrangement order of multiple colors;

[0177] S4, adjusting the initial attribute information of the pixel corresponding to the initial hue value in the initial texture image according to the initial gradient color to obtain target attribute information, wherein the initial attribute information includes at least one of the following of the pixel: initial hue value, initial saturation and initial brightness;

[0178] S5, using the target attribute information, coloring the initial three-dimensional model to obtain a target three-dimensional model.

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

[0180] Fig.14 is a schematic diagram of an electronic device according to an embodiment of the present disclosure. Fig.14 As shown, the electronic device 1400 is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0181] like Fig.14 As shown, the electronic device 1400 is in the form of a general computing device. The components of the electronic device 1400 may include but are not limited to: the at least one processor 1410, the at least one memory 1420, a bus 1430 connecting different system components (including the memory 1420 and the processor 1410), and a display 1440.

[0182] The memory 1420 stores program codes, which can be executed by the processor 1410, so that the processor 1410 executes the steps described in the method part of the embodiment of the present disclosure according to various exemplary embodiments of the present disclosure.

[0183] The memory 1420 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 14201 and / or a cache memory unit 14202, and may further include a read-only memory unit (ROM) 14203, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory.

[0184] In some examples, the memory 1420 may also include a program / utility 14204 having a set (at least one) of program modules 14205, such program modules 14205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination thereof may include the implementation of a network environment. The memory 1420 may further include a memory remotely disposed relative to the processor 1410, and these remote memories may be connected to the electronic device 1400 via a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0185] The bus 1430 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a local bus of the processor 1410, or a bus using any of a variety of bus architectures.

[0186] The display 1440 may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the electronic device 1400 .

[0187] Optionally, the electronic device 1400 may also communicate with one or more external devices 1500 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), one or more devices that enable a user to interact with the electronic device 1400, and / or any device that enables the electronic device 1400 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed through an input / output (I / O) interface 1450. Furthermore, the electronic device 1400 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through a network adapter 1460. Fig.14 As shown, the network adapter 1460 communicates with other modules of the electronic device 1400 via the bus 1430. It should be understood that although Fig.14 Not shown, other hardware and / or software modules may be used in conjunction with the electronic device 1400, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, redundant arrays of independent disks (RAID) systems, tape drives, and data backup storage systems.

[0188] The electronic device 1400 may further include: a keyboard, a cursor control device (such as a mouse), an input / output interface (I / O interface), a network interface, a power supply and / or a camera.

[0189] It can be understood by those skilled in the art that Fig.14 The structure shown is only for illustration and does not limit the structure of the above electronic device. Fig.14 More or fewer components as shown, or with Figure 1 The memory 1420 may be used to store computer programs and corresponding data, such as the computer programs and corresponding data corresponding to the model processing method in the embodiment of the present disclosure. The processor 1410 executes various functional applications and data processing by running the computer programs stored in the memory 1420, that is, implements the above-mentioned model processing method.

[0190] The serial numbers of the above-mentioned embodiments of the present disclosure are only for description and do not represent the advantages or disadvantages of the embodiments.

[0191] In the above embodiments of the present disclosure, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0192] In the several embodiments provided in the present disclosure, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

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

[0194] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0195] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present disclosure, or the part that contributes to the relevant technology or all or part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the various embodiments of the present disclosure. The aforementioned storage medium includes: U disk, read-only memory (ROM), random access memory (RAM), mobile hard disk, disk or optical disk, etc., which can store program code.

[0196] The above are only preferred embodiments of the present disclosure. It should be pointed out that, for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present disclosure. These improvements and modifications should also be regarded as the protection scope of the present disclosure.

Claims

1. A model processing method, characterized in that: include: Acquire an initial texture image of an initial three-dimensional model, and a color gradient range, wherein a plurality of colors within the color gradient range are used to respectively generate gradient colors to be dyed to the initial three-dimensional model, and the gradient colors are used to represent a result formed by sequential transition of the plurality of colors; Based on the hue threshold of the initial texture image, initial hue values ​​of a plurality of pixels in the initial texture image are mapped to the color gradient range to obtain a mapping result, wherein the hue threshold is used to indicate a threshold that the initial hue value is allowed to reach, and the mapping result is used to indicate a correspondence between different initial hue values ​​and different colors in the color gradient range; Based on the mapping result, determining an initial gradient color corresponding to the initial hue value in a color gradient sequence corresponding to the color gradient range, wherein the color gradient sequence is generated according to an arrangement order of the plurality of colors; According to the initial gradient color, adjusting the initial attribute information of the pixel corresponding to the initial hue value in the initial texture image to obtain target attribute information, wherein the initial attribute information includes at least one of the following of the pixel: the initial hue value, the initial saturation and the initial brightness; The target attribute information is used to perform coloring processing on the initial three-dimensional model to obtain a target three-dimensional model.

2. The method according to claim 1, characterized in that: According to the initial gradient color, the initial attribute information of the pixel corresponding to the initial hue value in the initial texture image is adjusted to obtain target attribute information, including: Converting color data of the initial gradient color from an initial color space to a target color space to obtain a first target gradient color, wherein the initial color space is used to describe color through a combination of different colors, and the target color space is used to represent attribute information of the color; According to the first target gradient color, the initial attribute information is adjusted to obtain the target attribute information.

3. The method according to claim 2, characterized in that According to the first target gradient color, the initial attribute information is adjusted to obtain the target attribute information, including: The initial hue value in the initial attribute information is adjusted to the target hue value in the first target gradient color, and the initial saturation and the initial brightness in the initial attribute information are maintained to obtain the target attribute information; or The initial hue value in the initial attribute information is adjusted to the target hue value in the first target gradient color, the initial saturation in the initial attribute information is adjusted to the target saturation in the first target gradient color, and the initial brightness in the initial attribute information is adjusted to the target brightness in the first target gradient color to obtain the target attribute information.

4. The method according to claim 2, characterized in that Using the target attribute information, the initial three-dimensional model is subjected to coloring processing to obtain a target three-dimensional model, including: Converting the target attribute information from the target color space to the initial color space to obtain a second target gradient color; Using the second target gradient color, updating the initial texture image to a target texture image; The target texture image is used to perform dyeing processing on the corresponding dyeing area on the initial three-dimensional model to obtain the target three-dimensional model.

5. The method according to claim 1, characterized in that: Based on the mapping result, determining an initial gradient color corresponding to the initial hue value in a color gradient sequence corresponding to the color gradient range includes: According to the mapping result, mapping the initial hue value to the color gradient sequence; The gradient color to which the initial hue value is mapped in the color gradient sequence is determined as the initial gradient color.

6. The method according to claim 5, characterized in that The method further comprises: According to the size information of the initial texture image, the color gradient sequence is converted into a gradient color array, wherein the size information is used to determine an index position, the index position is used to traverse the color data of the gradient color included in the gradient color array, the color data of the gradient color is used to represent the color of the gradient color in an initial color space, and the initial color space is used to describe color through a combination of different colors; According to the mapping result, mapping the initial hue value to the color gradient sequence includes: Determine the proportion of the initial hue value in the hue threshold range of the initial texture image, wherein the hue threshold range is determined by the hue threshold; and map the proportion to the gradient color array corresponding to the color gradient sequence according to the mapping result.

7. The method according to claim 6, characterized in that Determining the gradient color to which the initial hue value is mapped in the color gradient sequence as the initial gradient color includes: The color data of the gradient color mapped to the proportion corresponding to the initial hue value in the gradient color array is determined as the color data of the initial gradient color.

8. The method according to claim 1, characterized in that: Based on the hue threshold of the initial texture image, the hue values ​​of multiple pixels in the initial texture image are mapped into the color gradient range to obtain a mapping result, including: Determining a maximum hue threshold and a minimum hue threshold of the initial texture image; Determining mapping parameters based on the maximum hue threshold, the minimum hue threshold and the color gradient range; The initial hue value is adjusted according to the mapping parameter to obtain the mapping result.

9. The method according to claim 1, characterized in that: The method further comprises: Determining the arrangement order of the plurality of colors in the color gradient range and the size information of the initial texture image; The arrangement order and the size information are used to perform linear gradient processing on the plurality of colors in the color gradient range to obtain the color gradient sequence.

10. The method according to any one of claims 1 to 9, characterized in that Using the target attribute information, the initial three-dimensional model is subjected to coloring processing to obtain a target three-dimensional model, including: Using the target attribute information, coloring the initial three-dimensional model, and previewing the obtained target three-dimensional model; The method further includes: in response to an adjustment operation, adjusting the previewed target three-dimensional model.

11. The method according to any one of claims 1 to 9, characterized in that The method further comprises: Converting the initial texture image into picture pixel data in binary format; Based on the hue threshold of the initial texture image, the initial hue values ​​of multiple pixels in the initial texture image are mapped to the color gradient range to obtain a mapping result, including: based on the hue threshold of the image pixel data, the initial hue values ​​of multiple pixels in the image pixel data are mapped to the color gradient range to obtain the mapping result.

12. The method according to any one of claims 1 to 9, characterized in that Get the color gradient range, including: In response to a first input operation, a plurality of the colors are acquired, and the plurality of the colors are determined as the color gradient range; or, In response to the second input operation, a target image is acquired, and the plurality of colors extracted from the target image are determined as the color gradient range.

13. The method according to any one of claims 1 to 9, characterized in that The initial three-dimensional model is a fashion model in a virtual scene.

14. A model processing device, characterized in that: include: An acquisition unit, used for acquiring an initial texture image of an initial three-dimensional model and a color gradient range, wherein a plurality of colors within the color gradient range are used to respectively generate gradient colors to be dyed to the initial three-dimensional model, and the gradient colors are used to represent a result formed by sequential transition of the plurality of colors; A mapping unit, configured to map initial hue values ​​of a plurality of pixels in the initial texture image to the color gradient range based on a hue threshold of the initial texture image, to obtain a mapping result, wherein the hue threshold is used to indicate a threshold that the initial hue value is allowed to reach, and the mapping result is used to indicate a correspondence between different initial hue values ​​and different colors in the color gradient range; a determining unit, configured to determine, based on the mapping result, an initial gradient color corresponding to the initial hue value in a color gradient sequence corresponding to the color gradient range, wherein the color gradient sequence is generated according to an arrangement order of the plurality of colors; An adjustment unit, configured to adjust the initial attribute information of the pixel corresponding to the initial hue value in the initial texture image according to the initial gradient color, to obtain target attribute information, wherein the initial attribute information includes at least one of the following of the pixel: the initial hue value, initial saturation, and initial brightness; The coloring unit is used to color the initial three-dimensional model using the target attribute information to obtain a target three-dimensional model.

15. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program is configured to execute the method described in any one of claims 1 to 13 when executed by a processor.

16. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to perform the method described in any one of claims 1 to 13.

17. A computer program product, characterized in that The invention comprises a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 13.