Multi-role clothes changing method and device based on UV chartlet

By expanding the UV of the skin model to the same UV space in game applications and making mask maps, the problems of resource redundancy and memory pressure in the existing technology are solved, and flexible and efficient character dress-up rendering is achieved, which is suitable for mobile devices. use.

CN119251372APending Publication Date: 2025-01-03BEIJING XUEJING TECHNOLOGY CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing game applications require multiple texture masks when changing characters, resulting in resource redundancy and increased memory pressure, affecting user experience, especially on mobile devices.

Method used

By expanding the UVs of all skin models into the same UV space, dividing them into multiple areas, placing the UVs of the same type of skin models in each area, making a mask map, and putting the masks of different skin model combination sets into the mask map In different channels, the mask map is sampled using a common formula, and the mask logo is obtained by combining UV coordinates to achieve dyeing of any skin model combination set, and the rendered color is mixed with the unstained part of the character to obtain the final rendered color.

Benefits of technology

Reduces resource redundancy, provides flexible and efficient rendering methods, retaining original details and textures, while producing more realistic and beautiful results, suitable for efficient rendering needs of mobile devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119251372A_ABST
    Figure CN119251372A_ABST
Patent Text Reader

Abstract

The invention provides a multi-role reloading method and device based on UV chartlet, computing equipment and a computer readable storage medium, and the method comprises the steps: dividing a UV space into a plurality of different regions, and placing UVs of the same type of model in each region; and then making mask maps of all UV in the UV space, and putting masks formed by combining and sleeving different styles of skin models into different channels of the mask maps. When the model is rendered, a channel of a mask map is sampled through a general formula, and after a mask identifier is obtained in combination with a current model UV coordinate, dyeing of any skin model combination set can be realized. By means of the method, resource redundancy of the application is reduced, a flexible and efficient rendering mode is provided, and the method is suitable for the three-dimensional application running on the mobile terminal.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of computer graphics rendering, and in particular to a multi-role dressing method and apparatus based on UV mapping, a computing device, and a computer-readable storage medium. Background Art

[0002] In various existing game applications, changing the costumes of characters in the game is a common requirement. Existing technologies usually use a single texture to support the rendering of a single set of clothes. If there are multiple sets of clothes, multiple texture masks are required, which not only causes resource redundancy, but also requires multiple texture masks to be loaded in the memory at the same time when the application is running, increasing memory pressure and being unfriendly to mobile devices, affecting user experience. Summary of the invention

[0003] In view of this, the embodiments of the present application provide a multi-character dressing method and apparatus based on UV mapping, a computing device and a computer-readable storage medium to solve the technical defects existing in the prior art.

[0004] According to a first aspect of an embodiment of the present application, a multi-role dressing method based on UV mapping is provided, comprising:

[0005] Expand the UVs of all skin models to the same UV space; the UV space is divided into n regions, each region is used to place multiple UVs of the same type of skin model, and the multiple UVs do not overlap each other in the region to which they belong;

[0006] Creating a mask map, wherein each channel of the mask map places at least one set of UV masks of the skin suit;

[0007] Obtain a skin model combination set, calculate the UV coordinates of each model in the skin model combination set in a shader, and obtain a mask identifier corresponding to the UV coordinates;

[0008] According to the model in the skin model combination set, the corresponding channel in the mask map is sampled to obtain a sampling value;

[0009] Obtaining a rendering color of the model according to the mask identifier, the sampling value and the target color;

[0010] The rendered color is mixed with the original part of the character to obtain the final rendered color.

[0011] According to a second aspect of an embodiment of the present application, a multi-role dressing device based on UV mapping is provided, comprising:

[0012] A first calculation unit is used to obtain an input skin model combination set, calculate the UV coordinates of each model in the skin model combination set, and obtain a mask identifier corresponding to the UV coordinate;

[0013] A sampling unit, used for sampling corresponding channels in the mask map according to the model in the skin model combination set to obtain sampling values;

[0014] A second calculation unit obtains a rendering color of the model according to the mask identifier, the sampling value and the target color;

[0015] The color mixing unit is used to mix the rendering color with the original part of the character to obtain a final rendering color.

[0016] According to a third aspect of an embodiment of the present application, a computing device is provided, comprising a memory, a processor, and computer instructions stored in the memory and executable on the processor, wherein when the processor executes the instructions, the steps of the multi-character dressing method based on UV mapping are implemented.

[0017] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, which stores computer instructions, and when the instructions are executed by a processor, the steps of the multi-character dressing method based on UV mapping are implemented.

[0018] Through the method provided by the embodiment of the present application, the UV space is divided into a plurality of different areas, and the UV of the same type of model is placed in each area; then, a mask map of all UVs in the UV space is made, and the masks of different skin model combination sets are placed in different channels of the mask map. When rendering the model, the channels of the mask map are sampled by a general formula, and after the mask identifier is obtained in combination with the UV coordinates of the current model, the coloring of any skin model combination set can be achieved. In addition, in order to make the rendering result retain the original details and texture while producing a more realistic and beautiful result, the grayscale image of the skin model combination set is used as an interpolated mask, and the rendering color is mixed with the undyed part of the character to obtain the final rendering color. The above method not only reduces the resource redundancy of the application, but also provides a flexible and efficient rendering method. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 is a structural block diagram of a computing device provided in an embodiment of the present application;

[0020] Figure 2 It is a flow chart of a multi-role dressing method based on UV mapping provided in an embodiment of the present application;

[0021] Figure 3This is a schematic diagram of the effect of expanding the UV images of multiple skin models to multiple regions of the same UV space, provided by an embodiment of the present application;

[0022] Figure 4 This is a schematic diagram of the effect of generating a mask map for UV space provided by an embodiment of the present application;

[0023] Figure 5 This is a schematic diagram of the effect of generating a grayscale mask of a skin model combination set provided in an embodiment of the present application;

[0024] Figure 6 This is a schematic diagram of the grayscale masking effect of the skin model combination set provided in the embodiment of the present application;

[0025] Figure 7 It is a structural schematic diagram of a multi-role dressing device based on UV mapping provided in an embodiment of the present application. DETAILED DESCRIPTION

[0026] Many specific details are described in the following description to facilitate a full understanding of the present application. However, the present application can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of the present application, so the present application is not limited by the specific implementation disclosed below.

[0027] The terms used in one or more embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of the present application. The singular forms of "a", "said" and "the" used in one or more embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or more embodiments of the present application refers to and includes any or all possible combinations of one or more associated listed items.

[0028] It should be understood that, although the terms first, second, etc. may be used to describe various information in one or more embodiments of the present application, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of the present application, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "in response to determination".

[0029] In the present application, a multi-character dressing method and apparatus based on UV mapping, a computing device and a computer-readable storage medium are provided, which will be described in detail one by one in the following embodiments.

[0030] Figure 1The structure block diagram of a computing device 100 according to an embodiment of the present application is shown. The components of the computing device 100 include but are not limited to a memory 110 and a processor 120. The processor 120 is connected to the memory 110 via a bus 130, and the database 150 is used to store data.

[0031] The computing device 100 also includes an access device 140 that enables the computing device 100 to communicate via one or more networks 160. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 140 may include one or more of any type of network interface (e.g., a network interface card (NIC)) whether wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a World Wide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, a near field communication (NFC) interface, and the like.

[0032] In one embodiment of the present application, the above components of the computing device 100 and Figure 1 Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Figure 1 The computing device structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of the present application. Those skilled in the art may add or replace other components as needed.

[0033] Computing device 100 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smartphone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other type of mobile device, or a stationary computing device such as a desktop computer or PC.

[0034] In the embodiments of the present application, Figure 2 A flowchart of a multi-character dressing method based on UV mapping provided by the present application is shown, including steps 202 to 210.

[0035] Step 202: Expand the UVs of all skin models into the same UV space; wherein the UV space is divided into n regions, each region is used to place multiple UVs of the same type of skin model, and the multiple UVs do not overlap each other in the region to which they belong.

[0036] In this step, the UVs of different types of skin models are expanded into the same UV space; for example, the replaceable skin of a character includes hair, top, pants and shoes, so the UVs of multiple hair, clothes, pants and shoe models are expanded into the same UV space.

[0037] Preferably, the UV space is pre-planned into multiple rectangular areas, and a specific area is allocated for each type of model. When UV unfolding, multiple sets of UVs of the same type of skin model are placed in the same area, and it is ensured that UVs of different types of models do not overlap.

[0038] In a feasible implementation, the UV space is divided into four quadrants. UVs of the same type of skin model are placed in each quadrant, such as Figure 3 As shown:

[0039] The first quadrant is used to place the hair model UV. When performing UV unfolding, unfold the four hair models to the first quadrant in a non-overlapping UV manner;

[0040] The second quadrant is used to place the UV of the top model. When unfolding the UV, unfold the four top models to the second quadrant in a non-overlapping UV manner.

[0041] The third quadrant is used to place the pants model UV. When performing UV unfolding, unfold the four pants models to the third quadrant in a non-overlapping UV manner;

[0042] The fourth quadrant is used to place the shoe model UV. When performing UV unfolding, the four pants models are unfolded to the fourth quadrant in a non-overlapping UV manner.

[0043] Those skilled in the art should be aware that the above-mentioned UV space division method is only an example, and those skilled in the art can implement other division methods according to different needs, such as dividing the UV space into multiple rectangles of different sizes or other shapes to place the remaining model UVs such as eyes, beards, eyebrows, etc.; similarly, each area can be placed with any number of model UVs according to needs, rather than the four in the above example, which will not be repeated here.

[0044] Step 204: Create a mask map, and place at least one set of UV mask maps of the skin model set in each channel of the mask map.

[0045] In this step, a UV mask map (UV Mask Map) is made for the UV space. Conventional 3D software has built-in UV mask generation tools.

[0046] Specifically, in an embodiment of the present application, when making a mask map, four channels RGBA of the mask map are used to place masks of different skin suits respectively.

[0047] Still taking the four quadrants in step 202 as an example, when making a mask map, a mask of the first skin suit is placed in the R channel of the mask map, and the first skin suit includes: hair 1, clothes 1, pants 1 and shoes 1;

[0048] The G channel of the mask map continues to place the four parts of the second skin suit, including hair 2, clothes 2, pants 2 and shoes 2;

[0049] By analogy, the B channel is used to place the mask of the third skin set, and the A channel is used to place the mask of the fourth skin set, such as Figure 4 shown.

[0050] For the remaining skin sets, you can continue to put them into the RGBA channels in sequence. For example, put the mask of the fifth skin set into the R channel, the mask of the sixth skin set into the G channel, and so on.

[0051] Among them, the base color of the mask map is black, and the parts that need to be dyed, such as hair and tops, are made into semi-transparent gray or white.

[0052] Step 206: Obtain the skin model combination set, calculate the UV coordinates of each model in the skin model combination set in the shader, and obtain the mask identifier corresponding to the current UV coordinate.

[0053] In the rendering stage, a target skin model combination set to be rendered is obtained, and the combination set includes any combination of skin models, for example:

[0054] Combination set 1: 1 hair, 1 top, 1 pants, 1 shoe;

[0055] Combination set 2: Hair 1, Top 2, Pants 3, Shoes 4;

[0056] Combination set 3: 2 hairs, 2 tops, 3 pants, 1 shoe; ...

[0058] The UV coordinates of the current model in the target skin model combination set are calculated in the shader to obtain the mask mark of the area where the UV coordinates are located.

[0059] In a feasible implementation, still taking the four quadrants in step 202 as an example, the region where the current UV coordinates are located can be determined by the step function according to the segmentation characteristics of the UV region. The schematic code is as follows:

[0060] For the hair model in the combination, get its UV coordinates i.uv.x, i.uv.y;

[0061] float2 uv_step = float2(step(0.5,i.uv.x),step(0.5,i.uv.y)); / / If the x or y coordinate of UV is greater than 0.5, the corresponding uv_step component is 1, otherwise it is 0, thus dividing the UV space into four areas

[0062] float mask_2 = min(uv_step.x, uv_step.y); / / The second quadrant is the upper right corner, corresponding to x>0.5 and y>0.5

[0063] float mask_3 = saturate(1-max(uv_step.x,uv_step.y)); / / The third quadrant is the lower left corner, corresponding to x<0.5 and y<0.5

[0064] float mask_4 = saturate(1-(mask_3+mask_2+uv_step.y)); / / the fourth quadrant

[0065] float mask_1 = saturate(1-(mask_2+mask_3+mask_4)); / / first quadrant

[0066] For the UV coordinate (0.1, 0.6), first calculate uv_step: uv_step = (0, 1);

[0067] Then calculate the mask identity for each quadrant:

[0068] mask_2=min(0,1)=0

[0069] mask_3=saturate(1-max(0,1))=0

[0070] mask_4=saturate(1-(0+0+1))=0

[0071] mask_1=saturate(1-(0+0+0))=1 / / Indicates that the coordinate is located in the first quadrant

[0072] Perform the same calculation for other models in the combination. For example, the mask of the top is marked as:

[0073] mask_1=0, mask_2=1, mask_3=0, mask_4=0.

[0074] This embodiment clearly demonstrates how to accurately identify different regions in the UV space through the correlation algorithm. Each UV coordinate has a non-zero mask flag only in the quadrant to which it belongs, and the mask flag value is zero in other quadrants.

[0075] Those skilled in the art should know that the above algorithm for determining the UV coordinate area is only an example, and its calculation method can be adjusted according to different division methods of the UV space, which will not be described in detail here.

[0076] Step 208: sampling the corresponding channels in the mask map according to the models in the skin model combination set to obtain sampling values; obtaining the rendering color of each model according to the mask identifier, sampling value and target color of the model.

[0077] In this step, the corresponding channel in the mask map is further sampled according to the target model in the skin model combination set to obtain a sampling value.

[0078] In a feasible embodiment, for the skin model combination set 2: hair 1, top 2, pants 3, shoes 4, the following sampling is performed:

[0079] For the hair 1 model, its mask information is in the R channel of the mask map, and the sampling result is Mask.r;

[0080] For the top 2 model, its mask information is in the G channel of the mask map, and the sampling result is Mask.g;

[0081] For the pants 3 model, its mask information is in the B channel of the mask map, and the sampling result is Mask.b;

[0082] For the shoe 4 model, its mask information is in the A channel of the mask map, and the sampling result is Mask.a;

[0083] Similarly, for the skin model combination set 3: hair 2, top 2, pants 3, shoes 1, the sampling results are as follows:

[0084] For the hair 2 model, its mask information is in the G channel of the mask map, and the sampling result is Mask.g;

[0085] For the top 2 model, its mask information is in the G channel of the mask map, and the sampling result is Mask.g;

[0086] For the pants 3 model, its mask information is in the B channel of the mask map, and the sampling result is Mask.b;

[0087] For the shoe 1 model, its mask information is in the R channel of the mask map, and the sampling result is Mask.r; ...

[0089] Combined with the mask identification result obtained in step 206, a coloring formula common to each model is obtained:

[0090] CustomColor = Mask.[i1]*mask_[j1]*target color 1+Mask.[i2]*mask_[j1]*target color 2+Mask.[i3]*mask_[j1]*target color 3+Mask.[i4]*mask_[j1]*target color 4+...Mask.[i n ]*mask_[j m ]*Target color n

[0091] The above parameters i n Represents one of the RGBA channels of the mask map, Mask.[i n ] is the sampling value of one of the RGBA channels of the mask map, which is used to indicate which skin the current model comes from. mask_[j1] is the mask identifier, which indicates the correspondence between the current model UV and each rectangular area, so that the coloring of any skin model combination set can be achieved through this general formula.

[0092] For example, when rendering combination 2, for hair model 1, according to the UV coordinates of this model, mask_1=1 is obtained, and other mask identifiers (mask_2, mask_3, mask_4) are all 0, so the current hair rendering color: hairColor=CustomColor=Mask.r*mask_1*target color;

[0093] Replace the target model with coat 2. According to the UV coordinates of the model, mask_2 = 1, and other mask flags are all 0, so the current coat rendering color is: clothcolor = CustomColor = Mask.g*mask_2*target color;

[0094] The same method is used to dye pants 3 and shoes 4 in combination 2, which will not be repeated here.

[0095] Preferably, when the rendering and coloring of the model is obtained, the corresponding grayscale image mask is recorded at the same time.

[0096] Taking the hair model as an example, there is a feasible way to calculate its grayscale mask: hairMask = max(hairColor.a, max(hairColor.b, max(hairColor.r, hairColor.g))).

[0097] Further grayscale masks of other models are obtained, including, for example:

[0098] Grayscale mask of the top: clothMask

[0099] Grayscale mask of pants: pantsMask

[0100] Grayscale image mask of shoes: shoesMask

[0101] Then the grayscale mask CustomMask of the current skin model combination set is obtained = hairMask+clothMask+pantsMask+shoesMask, such as Figure 5 shown.

[0102] Step 210: Mix the above rendering color with the original part of the character to obtain the final rendering color.

[0103] In order to retain the original details and texture of the rendered results while achieving the desired color changes and producing a more realistic and beautiful result, it is also necessary to mix the rendered color with the original part of the character to obtain the final rendered color.

[0104] The original part of the above-mentioned character is the part that is not dyed in the current rendering process, such as the skin covered by the current top, or other types of tops covered by the current top.

[0105] Specifically, the original image Albedo of the target model is sampled, and linear interpolation is performed on the original image Albedo and the rendering color CustomColor obtained in step 208:

[0106] FinalColor=lerp(Albedo,CustomColor,Mask)

[0107] The mask is used to control the mixing ratio of CustomColor and Albedo. It is usually a color value ranging from 0 to 1. The size of the color value determines the mixing ratio.

[0108] Preferably, when performing linear interpolation, the grayscale mask of the current skin model combination set is used as the interpolation mask, such as Figure 6 shown.

[0109] FinalColor = lerp(Albedo, CustomColor, CustomMask). Because CustomMask is a grayscale image, not either 0 or 1, semi-transparent coloring can be achieved.

[0110] Further, the rendering of the model and the entire skin model combination set is completed based on the final rendering color obtained.

[0111] In the above-mentioned embodiment of the present application, in order to efficiently realize rendering on the mobile terminal, reduce resource redundancy and support diverse rendering requirements, the UV space is divided into a plurality of different areas, and UVs of the same type of model are placed in each area; then a mask map of all UVs in the UV space is made, and masks of different skin model combination sets are placed in different channels of the mask map. When rendering the model, the channels of the mask map are sampled by a general formula, and after the mask identifier is obtained in combination with the UV coordinates of the current model, the coloring of any skin model combination set can be achieved. In addition, in order to make the rendering result retain the original details and texture while producing a more realistic and beautiful result, the grayscale image of the skin model combination set is used as an interpolated mask to mix the rendering color with the undyed part of the character to obtain the final rendering color.

[0112] Corresponding to the above method embodiment, the present application also provides an embodiment of a multi-role dressing device based on UV mapping, such as Figure 7 As shown, the device uses a UV space and mask map generated by a multi-role dressing method based on UV map, including:

[0113] A first calculation unit is used to obtain an input skin model combination set, calculate the UV coordinates of each model in the skin model combination set, and obtain a mask identifier corresponding to the UV coordinate;

[0114] A sampling unit, used for sampling corresponding channels in the mask map according to the model in the skin model combination set to obtain sampling values;

[0115] A second calculation unit obtains a rendering color of the model according to the mask identifier, the sampling value and the target color;

[0116] The color mixing unit is used to mix the rendering color with the undyed part of the character to obtain a final rendering color.

[0117] The above is a schematic scheme of a multi-role dressing device based on UV mapping in this embodiment. It should be noted that the technical scheme of the physical simulation device of the virtual object and the technical scheme of the multi-role dressing method based on UV mapping belong to the same concept. The details not described in detail in the technical scheme of the multi-role dressing device based on UV mapping can be referred to the description of the technical scheme of the multi-role dressing method based on UV mapping.

[0118] In one embodiment of the present application, a computing device is also provided, including a memory, a processor, and computer instructions stored in the memory and executable on the processor, wherein when the processor executes the instructions, the steps of the multi-character dressing method based on UV mapping are implemented.

[0119] The above is a schematic scheme of a computing device of this embodiment. It should be noted that the technical scheme of the computing device and the technical scheme of the multi-role dressing method based on UV mapping are of the same concept. For details not described in detail in the technical scheme of the computing device, please refer to the description of the technical scheme of the multi-role dressing method based on UV mapping.

[0120] An embodiment of the present application also provides a computer-readable storage medium storing computer instructions, which, when executed by a processor, implement the steps of the multi-character dressing method based on UV mapping as described above.

[0121] The above is a schematic scheme of a computer-readable storage medium of this embodiment. It should be noted that the technical scheme of the storage medium and the technical scheme of the multi-role dressing method based on UV mapping are of the same concept, and the details not described in detail in the technical scheme of the storage medium can be found in the description of the technical scheme of the multi-role dressing method based on UV mapping.

[0122] The above describes specific embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0123] The computer instructions include computer program codes, which may be in source code form, object code form, executable files or some intermediate forms, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0124] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described action sequence, because according to the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0125] In the above embodiments, 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.

[0126] The preferred embodiments of the present application disclosed above are only used to help explain the present application. The optional embodiments do not describe all the details in detail, nor do they limit the invention to the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of the present application. The present application selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present application, so that those skilled in the art can understand and use the present application well. The present application is only limited by the claims and their full scope and equivalents.

Claims

1. A multi-role dressing method based on UV mapping, characterized in that: include: Unwrap the UVs of all skin models to the same UV space; The UV space is divided into n regions, each region is used to place multiple UVs of the same type of skin model, and the multiple UVs do not overlap each other in the region to which they belong; Creating a mask map, wherein each channel of the mask map places at least one set of UV masks of the skin suit; Obtain a skin model combination set, calculate the UV coordinates of each model in the skin model combination set in a shader, and obtain a mask identifier corresponding to the UV coordinates; According to the model in the skin model combination set, the corresponding channel in the mask map is sampled to obtain a sampling value; Obtaining a rendering color of the model according to the mask identifier, the sampling value and the target color; The rendered color is mixed with the original part of the character to obtain the final rendered color.

2. The method according to claim 1, wherein: The UV coordinates of each model in the skin model combination set are calculated in the shader to obtain the mask identifier corresponding to the UV coordinates, including: The area where the current UV coordinates are located is determined according to the segmentation characteristics of the UV area; the mask mark of the area where the UV coordinates are located is 1, and the mask marks of other areas are 0.

3. The method according to claim 2, wherein: Obtaining the rendering color of the model according to the mask identifier, the sampling value and the target color includes: Through the following formula: CustomColor = Mask.[i1]*mask_[j1]*target color 1+Mask.[i2]*mask_[j1]*target color 2+Mask.[i3]*mask_[j1]*target color 3+Mask.[i4]*mask_[j1]*target color 4+...Mask.[i n ]*mask_[j m ]*Target color n Get the rendering color CustomColor of each model, where Mask.[i n ] is the sampling value of a channel in the mask map, mask_[j m ] is a mask mark, which is used to indicate the corresponding relationship between the current model and the area.

4. The method according to claim 1, wherein: The rendered color is mixed with the original part of the character to obtain the final rendered color including: Sample the original Albedo of the target model; Linear interpolation is performed on the original image Albedo and the rendering color to obtain the final rendering color.

5. The method according to claim 4, wherein: Linear interpolation of the original image Albedo and the rendering color to obtain the final rendering color includes: Get the grayscale mask of the current skin model combination set as the mask for linear interpolation; The grayscale image mask of the current skin model combination set is formed by combining the grayscale image masks of each model in the current skin model combination set.

6. The method according to claim 1, wherein: The UV space is divided into n regions including: The UV space is divided into n rectangular regions.

7. A multi-role dressing device based on UV mapping, the device uses the UV space and mask mapping generated by the method of claim 1, characterized in that: include: A first calculation unit is used to obtain an input skin model combination set, calculate the UV coordinates of each model in the skin model combination set, and obtain a mask identifier corresponding to the UV coordinate; A sampling unit, used for sampling corresponding channels in the mask map according to the model in the skin model combination set to obtain sampling values; A second calculation unit obtains a rendering color of the model according to the mask identifier, the sampling value and the target color; The color mixing unit is used to mix the rendering color with the original part of the character to obtain a final rendering color.

8. A computing device comprising a memory, a processor, and computer instructions stored in the memory and executable on the processor, characterized in that: When the processor executes the instructions, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium storing computer instructions, characterized in that: When the instruction is executed by a processor, the steps of the method described in any one of claims 1 to 6 are implemented.