Virtual character garment editing method and device, storage medium and computer equipment

By superimposing the texture information of the pattern map in the game to the clothing map, the effect of custom clothing patterns is achieved, and the problem of low freedom of character dressing in the existing technology is solved, reducing the amount of game development and improving the richness of clothing performance is improved. Spend.

CN119295572APending Publication Date: 2025-01-10BEIJING PERFECT WORLD SOFTWARE TECH DEV CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311766478.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-20
Publication Date
2025-01-10

AI Technical Summary

Technical Problem

In existing games, the freedom to change characters is low, and players can only choose from the limited resources provided by artists and cannot customize the clothing patterns, resulting in large amounts of game development and limited performance of clothing.

Method used

By superimposing the texture information of the pattern map to the clothing map, the pattern selection and customization are realized, and single-point editing and tile editing methods are provided, which reduces the production needs of clothing maps, and improves the freedom of patterns and the freedom to modify clothing effects. .

Benefits of technology

There is no need to make multiple sets of maps for each costume, which reduces the amount of game development, improves the richness and customization of costume performance, and retains the original appearance effect of the costume.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119295572A_ABST
    Figure CN119295572A_ABST
Patent Text Reader

Abstract

The invention discloses a virtual character garment editing method and device, a storage medium and computer equipment, and the method comprises the steps: responding to a garment editing request of a virtual character, determining a target garment indicated by the garment editing request, at least one target editing pattern and an editing parameter corresponding to each target editing pattern, the editing parameter comprises an editing position; based on the editing position, performing texture information mapping on a pattern map corresponding to the target editing pattern to a first garment map corresponding to the target garment, so as to superpose the texture information of the pattern map in the texture information at the editing position of the first garment map to obtain a target garment editing map; and displaying a clothing editing effect of the target clothing based on the target clothing editing map. According to the method, multiple sets of chartlets do not need to be made for the clothes, and the effect of'embroidering 'the patterns on the clothes can be achieved only by superposing the texture information of the optional patterns on the clothes chartlets.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method and device for editing clothing of a virtual character, a storage medium, and a computer device. Background Art

[0002] Character dressing is an indispensable part of a high-quality game, which can bring players a better gaming experience and immersion. Clothing embroidery and dyeing is the practice of adding or replacing some textures for clothing without changing the model of the player's clothing. It can greatly enrich the player's clothing performance in the game with limited art resources.

[0003] In current games, most artists design multiple sets of textures with different colors and patterns based on the same game clothing model. Players can choose their favorite colors and patterns in the game and change the character's clothes by changing the model's textures. However, in this mode of changing clothes, players can only choose from a few sets of resources provided by the artists, which has a low degree of freedom. Summary of the invention

[0004] In view of this, the embodiments of the present application provide a method and apparatus, storage medium, and computer equipment for editing clothing of a virtual character, which displays the effect of superimposing a self-selected pattern on clothing through superimposed clothing maps, thereby eliminating the need to produce multiple sets of maps for clothing. Instead, the effect of "embroidering" the pattern on clothing can be obtained by simply superimposing the texture information of the self-selected pattern on the clothing map, thereby reducing the amount of game development and, on the basis of retaining the original appearance of the clothing, improving the freedom of the pattern and the freedom of modifying the clothing effect.

[0005] According to one aspect of the present application, a method for editing clothing of a virtual character is provided, the method comprising:

[0006] In response to a clothing editing request of a virtual character, determining a target clothing indicated by the clothing editing request, at least one target editing pattern, and editing parameters corresponding to each of the target editing patterns, wherein the editing parameters include an editing position;

[0007] Based on the editing position, mapping the texture information of the pattern map corresponding to the target editing pattern to the first clothing map corresponding to the target clothing, so as to superimpose the texture information of the pattern map on the texture information at the editing position of the first clothing map to obtain the target clothing editing map;

[0008] Based on the target clothing editing map, the clothing editing effect of the target clothing is displayed.

[0009] Optionally, the editing parameter further includes an editing mode, and the editing mode is one of preset editing mode types, and the preset editing mode types include a single-point editing mode and a tile editing mode;

[0010] When the editing mode is a single-point editing mode, the editing position is a fixed position;

[0011] In the case where the editing mode is a tiling editing mode, the editing position is a filling area, and the editing parameters further include a tiling parameter, which is used to indicate the tiling times and / or tiling density of the target editing pattern in the filling area.

[0012] Optionally, before responding to the clothing editing request for the virtual character, the method further includes:

[0013] Based on a first mask map corresponding to the target garment, determining editable modes corresponding to different positions in the target garment, wherein the first mask map has the same size as the first garment map, and color channel values ​​corresponding to each preset editing area in the first mask map are used to constrain the editable modes of the corresponding preset editing areas, wherein the editable modes include a single-point editing mode and a tiled editing mode;

[0014] When receiving single-point editing mode setting data, target editing pattern setting data and editing position setting data that meet the editable mode constraint, generating a clothing editing request corresponding to the single-point editing mode;

[0015] When the tiled editing mode setting data, the target editing pattern setting data, the editing position setting data and the tiled parameter setting data that meet the editable mode constraints are received, a clothing editing request corresponding to the tiled editing mode is generated.

[0016] Optionally, based on the editing position, mapping the texture information of the pattern map corresponding to the target editing pattern to the first clothing map corresponding to the target clothing, so as to superimpose the texture information of the pattern map on the texture information at the editing position of the first clothing map to obtain the target clothing editing map, comprises:

[0017] Based on the first mask map, obtaining a target editing parameter corresponding to the editing position, wherein the alpha channel value corresponding to each position in the first mask map is used to indicate the editing parameter of the corresponding position, and the editing parameter includes parameter intensity and / or transparency;

[0018] Based on the editing position and the target editing parameters, texture information mapping is performed on the pattern map corresponding to the target editing pattern to the first clothing map corresponding to the target clothing, so that the texture information of the pattern map is superimposed on the texture information at the editing position of the first clothing map according to the target editing parameters to obtain the target clothing editing map.

[0019] Optionally, before displaying the clothing editing effect of the target clothing based on the target clothing editing map, the method further includes:

[0020] A first material parameter corresponding to the target editing pattern is determined, and based on the clothing position, the first material parameter is superimposed on the texture information at the editing position of the first clothing map to update the target clothing editing map.

[0021] Optionally, before displaying the clothing editing effect of the target clothing based on the target clothing editing map, the method further includes:

[0022] Based on the editing position, superimposing the normal information corresponding to the target editing pattern onto the normal map corresponding to the target clothing to obtain a target normal map of the target clothing;

[0023] Accordingly, displaying the clothing editing effect of the target clothing based on the target clothing editing map includes:

[0024] Based on the target clothing editing map and the target normal map, a clothing editing effect of the target clothing is displayed.

[0025] Optionally, the method further comprises:

[0026] In response to a garment dyeing request for the target garment, determining at least one dyeing region indicated by the garment dyeing request and a target dyeing color value for each dyeing region;

[0027] Based on the target dyeing color value, changing the color value corresponding to the dyeing area in the second clothing map corresponding to the target clothing to obtain the target clothing dyeing map;

[0028] Based on the target clothing dyeing map, a clothing dyeing effect of the target clothing is displayed.

[0029] Optionally, before responding to the request for dyeing clothes of the virtual character, the method further includes:

[0030] Determining a dyeable area in the target garment based on a second mask map corresponding to the target garment, wherein the second mask map has the same size as the second garment map, and color channel values ​​corresponding to different areas in the second mask map are used to mark whether the corresponding area is a dyeable area;

[0031] When receiving dyeing area selection data and target dyeing color value setting data satisfying the dyeable area constraint, generating the garment dyeing request;

[0032] Accordingly, the step of changing the color value corresponding to the dyed area in the second clothing map corresponding to the target clothing based on the target dyed color value to obtain the target clothing dyed map includes:

[0033] Based on the second mask map, obtaining target tinting parameters corresponding to each position of the tinted area, wherein the alpha channel value corresponding to each position in the second mask map is used to indicate the tinting parameters of the corresponding position, and the tinting parameters include parameter intensity and / or transparency;

[0034] Based on the target dyeing color value and the target dyeing parameter, the color values ​​corresponding to each position of the dyeing area in the second clothing map corresponding to the target clothing are changed to obtain the target clothing dyeing map.

[0035] Optionally, the step of changing the color value corresponding to the dyed area in the second clothing map corresponding to the target clothing based on the target dyed color value to obtain the target clothing dyed map includes:

[0036] Obtaining a primary color value corresponding to the dyed area in the second clothing map, and calculating a dyeing offset value according to the primary color value and the target dyeing color value;

[0037] Based on the dyeing offset value, a color value corresponding to the dyeing area in the second clothing map corresponding to the target clothing is changed.

[0038] Optionally, before displaying the clothing dyeing effect of the target clothing based on the target clothing dyeing map, the method includes:

[0039] A second material parameter corresponding to the dyed area is determined, and texture information corresponding to the dyed area in the target clothing dyeing map is changed based on the second material parameter to update the target clothing dyeing map.

[0040] According to another aspect of the present application, a virtual character clothing editing device is provided, the device comprising:

[0041] A parameter determination module, configured to respond to a clothing editing request of a virtual character, determine a target clothing indicated by the clothing editing request, at least one target editing pattern, and editing parameters corresponding to each of the target editing patterns, wherein the editing parameters include an editing position;

[0042] A texture determination module, for mapping texture information of a pattern texture corresponding to the target editing pattern to a first clothing texture corresponding to the target clothing based on the editing position, so as to superimpose the texture information of the pattern texture on the texture information at the editing position of the first clothing texture to obtain a target clothing editing texture;

[0043] The display module is used to display the clothing editing effect of the target clothing based on the target clothing editing map.

[0044] Optionally, the editing parameter further includes an editing mode, and the editing mode is one of preset editing mode types, and the preset editing mode types include a single-point editing mode and a tile editing mode;

[0045] When the editing mode is a single-point editing mode, the editing position is a fixed position;

[0046] In the case where the editing mode is a tiling editing mode, the editing position is a filling area, and the editing parameters further include a tiling parameter, which is used to indicate the tiling times and / or tiling density of the target editing pattern in the filling area.

[0047] Optionally, the parameter determination module is further used to:

[0048] Based on a first mask map corresponding to the target garment, determining editable modes corresponding to different positions in the target garment, wherein the first mask map has the same size as the first garment map, and color channel values ​​corresponding to each preset editing area in the first mask map are used to constrain the editable modes of the corresponding preset editing areas, wherein the editable modes include a single-point editing mode and a tiled editing mode;

[0049] When receiving single-point editing mode setting data, target editing pattern setting data and editing position setting data that meet the editable mode constraint, generating a clothing editing request corresponding to the single-point editing mode;

[0050] When the tiled editing mode setting data, the target editing pattern setting data, the editing position setting data and the tiled parameter setting data that meet the editable mode constraints are received, a clothing editing request corresponding to the tiled editing mode is generated.

[0051] Optionally, the map determination module is further used to:

[0052] Based on the first mask map, obtaining a target editing parameter corresponding to the editing position, wherein the alpha channel value corresponding to each position in the first mask map is used to indicate the editing parameter of the corresponding position, and the editing parameter includes parameter intensity and / or transparency;

[0053] Based on the editing position and the target editing parameters, texture information mapping is performed on the pattern map corresponding to the target editing pattern to the first clothing map corresponding to the target clothing, so that the texture information of the pattern map is superimposed on the texture information at the editing position of the first clothing map according to the target editing parameters to obtain the target clothing editing map.

[0054] Optionally, the map determination module is further used to:

[0055] A first material parameter corresponding to the target editing pattern is determined, and based on the clothing position, the first material parameter is superimposed on the texture information at the editing position of the first clothing map to update the target clothing editing map.

[0056] Optionally, the map determination module is further used to: based on the editing position, superimpose the normal information corresponding to the target editing pattern onto the normal map corresponding to the target clothing to obtain a target normal map of the target clothing;

[0057] Correspondingly, the display module is further used to display the clothing editing effect of the target clothing based on the target clothing editing map and the target normal map.

[0058] Optionally, the parameter determination module is further used to: in response to a clothing dyeing request for the target clothing, determine at least one dyeing region indicated by the clothing dyeing request and a target dyeing color value of each dyeing region;

[0059] The texture determination module is further used to: based on the target dyeing color value, change the color value corresponding to the dyeing area in the second clothing texture corresponding to the target clothing to obtain the target clothing dyeing texture;

[0060] The display module is further used to display the clothing dyeing effect of the target clothing based on the target clothing dyeing map.

[0061] Optionally, the parameter determination module is further used to:

[0062] Determining a dyeable area in the target garment based on a second mask map corresponding to the target garment, wherein the second mask map has the same size as the second garment map, and color channel values ​​corresponding to different areas in the second mask map are used to mark whether the corresponding area is a dyeable area;

[0063] When receiving dyeing area selection data and target dyeing color value setting data satisfying the dyeable area constraint, generating the garment dyeing request;

[0064] Accordingly, the map determination module is also used for:

[0065] Based on the second mask map, obtaining target tinting parameters corresponding to each position of the tinted area, wherein the alpha channel value corresponding to each position in the second mask map is used to indicate the tinting parameters of the corresponding position, and the tinting parameters include parameter intensity and / or transparency;

[0066] Based on the target dyeing color value and the target dyeing parameter, the color values ​​corresponding to each position of the dyeing area in the second clothing map corresponding to the target clothing are changed to obtain the target clothing dyeing map.

[0067] Optionally, the map determination module is further used to:

[0068] Obtaining a primary color value corresponding to the dyed area in the second clothing map, and calculating a dyeing offset value according to the primary color value and the target dyeing color value;

[0069] Based on the dyeing offset value, a color value corresponding to the dyeing area in the second clothing map corresponding to the target clothing is changed.

[0070] Optionally, the map determination module is further used to:

[0071] A second material parameter corresponding to the dyed area is determined, and texture information corresponding to the dyed area in the target clothing dyeing map is changed based on the second material parameter to update the target clothing dyeing map.

[0072] According to another aspect of the present application, a storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the above-mentioned clothing editing method for the virtual character is implemented.

[0073] According to another aspect of the present application, a computer device is provided, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor implements the above-mentioned virtual character clothing editing method when executing the program.

[0074] By means of the above technical scheme, the embodiment of the present application provides a method and device for editing clothing of a virtual character, a storage medium, and a computer device, which determine the target clothing, the target editing pattern, and the editing position of the target editing pattern indicated by the clothing editing request, and superimpose the texture information of the pattern map of the target editing pattern on the texture information at the editing position in the first clothing map of the target clothing to obtain the target clothing editing map, thereby using the target clothing editing map to display the clothing editing effect of superimposing the target editing pattern on the target clothing. The embodiment of the present application superimposes the texture information of the player's self-selected pattern on the clothing map, and displays the effect of superimposing the self-selected pattern on the clothing through the superimposed clothing map, so that there is no need to make multiple sets of maps for the clothing. It is only necessary to superimpose the texture information of the self-selected pattern on the clothing map to obtain the effect of "embroidering" the pattern on the clothing, which reduces the amount of game development, and on the basis of retaining the original appearance of the clothing, improves the freedom of the pattern and the freedom of modifying the clothing effect.

[0075] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0077] Figure 1 A schematic diagram of a flow chart of a method for editing clothing of a virtual character provided in an embodiment of the present application is shown;

[0078] Figure 2 A schematic diagram showing a flow chart of another method for editing clothing of a virtual character provided in an embodiment of the present application;

[0079] Figure 3 A schematic diagram showing a flow chart of another method for editing clothing of a virtual character provided in an embodiment of the present application;

[0080] Figure 4 A schematic structural diagram of a virtual character clothing editing device provided in an embodiment of the present application is shown;

[0081] Figure 5 A schematic diagram showing the effect of superimposing patterns on clothing provided by an embodiment of the present application is shown;

[0082] Figure 6 A schematic diagram of the effect of clothing dyeing provided by an embodiment of the present application is shown. DETAILED DESCRIPTION

[0083] The present application will be described in detail below with reference to the accompanying drawings and in combination with embodiments. It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other without conflict.

[0084] In this embodiment, a method for editing the clothing of a virtual character is provided. Figure 1 As shown, the method includes:

[0085] Step 101, in response to a clothing editing request of a virtual character, determining a target clothing indicated by the clothing editing request, at least one target editing pattern, and editing parameters corresponding to each of the target editing patterns, wherein the editing parameters include an editing position.

[0086] In an embodiment of the present application, a player can initiate a clothing editing request for the clothing currently worn by the virtual character or other designated clothing in the game, and the clothing editing request is used to request to add a pattern to the indicated clothing to achieve a custom editing effect on the clothing. In response to the clothing editing request of the virtual character, the target clothing that needs to be pattern edited, one or more target editing patterns that need to be added to the target clothing, and the editing parameters of each target editing pattern on the target clothing are determined, wherein the editing parameters at least include the editing position, so that the target editing pattern is added to the editing position of the target clothing to achieve custom editing of the clothing appearance. Among them, the target editing pattern can be a preset pattern provided in the game, a pattern uploaded by the player, or a pattern drawn by the player in the game.

[0087] Step 102, based on the editing position, mapping the texture information of the pattern map corresponding to the target editing pattern to the first clothing map corresponding to the target clothing, so as to superimpose the texture information of the pattern map on the texture information at the editing position of the first clothing map to obtain the target clothing editing map.

[0088] In the embodiment of the present application, for each target editing pattern, the target editing pattern can be added to the clothing map of the target clothing according to the editing position corresponding to the target editing pattern. Specifically, the pattern map corresponding to the target editing pattern and the first clothing map corresponding to the target clothing can be obtained first, and then the pattern map is mapped to the first clothing map based on the editing position, so that the texture information of the pattern map is superimposed on the texture information at the editing position on the first clothing map through mapping, and the first clothing map to which the texture information mapping is completed is used as the target clothing editing map. At the editing position in the target clothing editing map, the effect of superimposing the target pattern on the original effect of the target clothing will be displayed.

[0089] Step 103: displaying the clothing editing effect of the target clothing based on the target clothing editing map.

[0090] In an embodiment of the present application, the appearance effect of the target garment is rendered according to the target garment editing map to show the clothing editing effect of the target garment, thereby achieving the effect of "embroidering" the target pattern on the target garment at the designated editing position of the target garment.

[0091] By applying the technical solution of this embodiment, the target clothing, target editing pattern and editing position of the target editing pattern indicated by the clothing editing request are determined, and the texture information of the pattern map of the target editing pattern is superimposed on the texture information at the editing position in the first clothing map of the target clothing to obtain the target clothing editing map, so as to use the target clothing editing map to display the clothing editing effect of the target editing pattern superimposed on the target clothing. The embodiment of the present application superimposes the texture information of the player's self-selected pattern on the clothing map, and displays the effect of superimposing the self-selected pattern on the clothing through the superimposed clothing map, so that there is no need to make multiple sets of maps for the clothing. It is only necessary to superimpose the texture information of the self-selected pattern on the clothing map to obtain the effect of "embroidering" the pattern on the clothing, which reduces the amount of game development, and on the basis of retaining the original appearance of the clothing, improves the freedom of the pattern and the freedom of modifying the clothing effect.

[0092] Further, as a refinement and extension of the specific implementation of the above embodiment, in order to fully illustrate the specific implementation process of this embodiment, another method for editing the clothing of a virtual character is provided, such as Figure 2 As shown, the method includes:

[0093] Step 201, based on the first mask map corresponding to the target garment, determine the editable modes corresponding to different positions in the target garment, wherein the first mask map has the same size as the first garment map, and the color channel values ​​corresponding to each preset editing area in the first mask map are used to constrain the editable modes of the corresponding preset editing areas, and the editable modes include a single-point editing mode and a tiled editing mode.

[0094] In the embodiment of the present application, the part that can be edited and the part that cannot be edited in the target garment can be pre-set, and the type of editing mode of the part that can be edited can also be restricted. Specifically, a first mask map (mask map) with the same size as the first garment map can be set, and the color channel values ​​at each position in the first mask map indicate whether the corresponding position can be edited and the editable mode. For example, the color channel value is red, indicating that the corresponding position cannot be edited, the color channel value is blue, indicating that the corresponding position can be edited in a single-point editing mode, and the color channel value is green, indicating that the corresponding position can be edited in a tiled editing mode. In a specific application scenario, the target garment can be divided into a plurality of pattern editing areas, and the color channel values ​​of each position in each pattern editing area are the same, indicating that the pattern editing area is a non-editable area, a single-point editing mode area, or a tiled editing mode area.

[0095] Step 202, when receiving the single-point editing mode setting data, the target editing pattern setting data and the editing position setting data that meet the editable mode constraints, a clothing editing request corresponding to the single-point editing mode is generated.

[0096] In an embodiment of the present application, a player can select a location in any area on a target garment for single-point editing, and set a target editing pattern and editing location to generate a garment editing request indicating a single-point editing mode.

[0097] Step 203, when receiving the tile editing mode setting data, the target editing pattern setting data, the editing position setting data and the tile parameter setting data that meet the editable mode constraints, a clothing editing request corresponding to the tile editing mode is generated.

[0098] In the embodiment of the present application, the player can also select any area on the target clothing for tile editing, and set the target editing pattern, editing position and tiling parameters. The tiling parameters can specifically include the number of tiling times and tiling density, so as to perform tiling filling of the target editing pattern in the selected area with the tiling parameters, thereby generating a clothing editing request indicating the tiling editing mode. Specifically, the tiling mode can be four-square continuous tiling.

[0099] In addition, it should be noted that when the player selects a target editing pattern, he or she can also rotate, scale, and perform other operations on the target editing pattern, and use the pattern after the operation as the target editing pattern.

[0100] Step 204, in response to the clothing editing request of the virtual character, determining the target clothing indicated by the clothing editing request, at least one target editing pattern, and editing parameters corresponding to each of the target editing patterns, wherein the editing parameters include an editing position.

[0101] In an embodiment of the present application, the editing parameters also include an editing mode, and the editing mode is one of the preset editing mode types, and the preset editing mode types include a single-point editing mode and a tiled editing mode; when the editing mode is the single-point editing mode, the editing position is a fixed position; when the editing mode is the tiled editing mode, the editing position is a filling area, and the editing parameters also include a tiled parameter, and the tiled parameter is used to indicate the number of tiles and / or tile density of the target editing pattern in the filling area.

[0102] Step 205, based on the first mask map, obtaining target editing parameters corresponding to the editing position, wherein the alpha channel values ​​corresponding to each position in the first mask map are used to indicate the editing parameters of the corresponding position, and the editing parameters include parameter intensity and / or transparency; based on the editing position and the target editing parameters, mapping the texture information of the pattern map corresponding to the target editing pattern to the first clothing map corresponding to the target clothing, so as to superimpose the texture information of the pattern map on the texture information at the editing position of the first clothing map according to the target editing parameters to obtain the target clothing editing map.

[0103] In the embodiment of the present application, the editing parameters for superimposing patterns at different positions of the target garment can also be pre-set, and the editing parameters include parameter intensity and transparency. The editing parameters can be stored in the alpha channel of the first mask map corresponding to the target garment, and the editing parameters at the corresponding positions are represented by the alpha channel values ​​corresponding to different positions. Thus, when performing texture information mapping, the editing parameters corresponding to the editing position are first read out in the first mask map as the target editing parameters, and then the texture information in the pattern map corresponding to the target editing pattern is converted according to the target editing parameters based on the editing position and superimposed on the texture information of the first garment map of the target garment, so as to obtain the target garment editing map.

[0104] Step 206, determining a first material parameter corresponding to the target editing pattern, and based on the clothing position, superimposing the first material parameter on the texture information at the editing position of the first clothing map to update the target clothing editing map.

[0105] In the embodiment of the present application, when editing the pattern of clothing, the player can simultaneously apply the multi-dimensional material parameters corresponding to the pattern, including but not limited to the pattern's overlapping colors, noise, flash points, self-luminescence, roughness, reflection refractive index, highlight influence intensity, anisotropic highlights, mixed intensity, etc. The effect can be superimposed on the original clothing parameters.

[0106] Step 207: Based on the editing position, the normal information corresponding to the target editing pattern is superimposed on the normal map corresponding to the target clothing to obtain a target normal map of the target clothing.

[0107] Step 208: Displaying the clothing editing effect of the target clothing based on the target clothing editing map and the target normal map.

[0108] In the embodiment of the present application, the normal effect of the target edited pattern can also be added to the target clothing to increase the concave and convex feeling of the pattern on the clothing, making the effect more vivid and realistic. Specifically, according to the editing position, the normal information corresponding to the target edited pattern can be superimposed on the normal map of the target clothing to obtain the target normal map of the target clothing. Therefore, when displaying the clothing editing effect, the effect is displayed based on the target clothing editing map and the target normal map. Figure 5 The figure shows a schematic diagram of the effect of laying a pattern on clothing.

[0109] Furthermore, the present application embodiment also provides another method for editing the clothing of a virtual character, such as Figure 3 As shown, the method includes:

[0110] Step 301, based on a second mask map corresponding to the target garment, determining a dyeable area in the target garment, wherein the second mask map has the same size as the second garment map, and color channel values ​​corresponding to different areas in the second mask map are used to mark whether the corresponding area is a dyeable area.

[0111] In the embodiment of the present application, the editing of the target clothing can be as follows: Figure 1 , 2 The pattern editing shown can also be Figure 3 The dyeing editing shown can also be a combination of the two. Taking the dyeing editing for the target clothing as an example, the parts that can be dyed and the parts that cannot be dyed in the target clothing can be pre-set. Specifically, a second mask map (mask map) with the same size as the clothing map of the target clothing can be set, and the color channel values ​​at each position in the second mask map are used to mark whether the corresponding position can be dyed. In a specific application scenario, the target clothing can be divided into multiple dyeing editing areas, and the color channel values ​​of each position in each dyeing editing area are the same, indicating that the dyeing editing area is a dyeable area or an undyable area. The division method of the dyeing editing area can be the same or different from the division method of the pattern editing area. The pattern editing area can be divided according to the components of the clothing, and the dyeing editing area can be divided according to the color blocks on the clothing. For example, the parts of the same color system on the clothing are divided into the same dyeing area.

[0112] Among them, in the embodiment of the present application, the first clothing map is the name of the clothing map for the scene of pattern editing, and the second clothing map is the name of the clothing map for the scene of clothing dyeing. For the same piece of clothing, the first clothing map and the second clothing map are the same map. If the clothing is pattern edited first and then dyed, the second clothing map used in the dyeing stage is the target clothing editing map generated after pattern editing; and if the clothing is dyed first and then pattern edited, the first clothing map used in the pattern editing stage is the target clothing dyeing map generated after dyeing.

[0113] Step 302, when receiving dyeing area selection data and target dyeing color value setting data that satisfy the dyeable area constraint, generating the garment dyeing request; in response to the garment dyeing request for the target garment, determining at least one dyeing area indicated by the garment dyeing request and a target dyeing color value for each dyeing area.

[0114] Step 303: based on the target dyeing color value, change the color value corresponding to the dyeing area in the second clothing map corresponding to the target clothing to obtain the target clothing dyeing map.

[0115] In an embodiment of the present application, a player can perform dyeing operations in a dyeable area of ​​a target garment. When the player selects a dyeable area and sets a target dyeing color value, a garment dyeing request can be generated, thereby changing the color value of the dyeing area in the second garment map of the target garment to the target dyeing color value, and obtaining a target garment dyeing map, so that when the garment effect is displayed using the map, the dyeing effect of the changed garment color can be displayed.

[0116] Optionally, the method of changing the color value corresponding to the dyeing area in the second clothing map corresponding to the target clothing based on the target dyeing color value to obtain the target clothing dyeing map includes: obtaining the target dyeing parameters corresponding to each position of the dyeing area based on the second mask map, wherein the alpha channel value corresponding to each position in the second mask map is used to indicate the dyeing parameters of the corresponding position, and the dyeing parameters include parameter intensity and / or transparency; and changing the color values ​​corresponding to each position of the dyeing area in the second clothing map corresponding to the target clothing based on the target dyeing color value and the target dyeing parameters to obtain the target clothing dyeing map.

[0117] Among them, the dyeing parameters for dyeing different dyeable areas of the target clothing can also be pre-set, and the dyeing parameters include parameter intensity, transparency, etc. The dyeing parameters can be stored in the alpha channel of the second mask map corresponding to the target clothing, and the dyeing parameters at the corresponding positions are represented by the alpha channel values ​​corresponding to different dyeing areas. Therefore, when dyeing, the dyeing parameters corresponding to the dyeing area in the second mask map are first read as the target dyeing parameters, and then based on the target dyeing color value and the target dyeing parameters, the color value of the dyeing area in the second clothing map of the target clothing is changed to obtain the target clothing dyeing map. By controlling the transparency and intensity parameters at different positions in the second mask map, the transparency and parameter intensity of the color superposition can be controlled, so that the control effect of the dyeing effect can be achieved. For example, by setting the dyeing parameters that change gradually according to a certain rule, the gradient effect of changing the transparency of a single color or the gradient effect of multi-channel and multi-hue can be achieved.

[0118] Optionally, based on the target dyeing color value, changing the color value corresponding to the dyeing area in the second clothing map corresponding to the target clothing to obtain the target clothing dyeing map includes: obtaining the primary color value corresponding to the dyeing area in the second clothing map, and calculating the dyeing offset value according to the primary color value and the target dyeing color value; based on the dyeing offset value, changing the color value corresponding to the dyeing area in the second clothing map corresponding to the target clothing.

[0119] Among them, when performing color replacement, in order to retain the color richness of the clothing itself, when dyeing the clothing, the color value of the dyeing area may not be directly changed to the target dyeing color value, but the color value of the dyeing area may be offset toward the target dyeing color value, thereby retaining the color richness of the clothing while achieving clothing dyeing. Specifically, a primary color may be set for each dyeing area in advance, so that when dyeing, the primary color value of the dyeing area in the second clothing map is first obtained, and the dyeing offset value is calculated using the primary color value and the target dyeing color value, and the color value of the dyeing area of ​​the clothing map is changed based on the dyeing offset value, and the color value of the position to be dyed is offset instead of directly replacing it with the target dyeing color value, such as Figure 6 As shown, this dyeing method can retain the richness of the color of the clothing.

[0120] Step 304, determining a second material parameter corresponding to the dyed area, and modifying texture information corresponding to the dyed area in the target clothing dyeing map based on the second material parameter to update the target clothing dyeing map.

[0121] Step 305: displaying the clothing dyeing effect of the target clothing based on the target clothing dyeing map.

[0122] In the embodiment of the present application, when dyeing, the material multi-dimensional parameters in the preset dyeing settings can be applied simultaneously, including but not limited to overlapping colors, noise, flash point, self-luminescence, roughness, reflection refractive index, highlight influence intensity, anisotropic highlight, mixed intensity, etc. Its effect can be superimposed on the original clothing parameters. Thus, the dyeing effect of the target clothing is displayed using the target clothing dyeing map finally obtained.

[0123] By applying the technical solution of this embodiment, the clothing performance is greatly enriched without changing the model of the character clothing itself and the original material map. The same pattern resource can be used for multiple clothing. Compared with the original practice of re-making the texture when replacing the color pattern of different clothing, it saves development time and art resources, and enriches the performance effect.

[0124] Further, as Figure 1 The specific implementation of the method, the embodiment of the present application provides a virtual character clothing editing device, such as Figure 4 As shown, the device comprises:

[0125] A parameter determination module, configured to respond to a clothing editing request of a virtual character, determine a target clothing indicated by the clothing editing request, at least one target editing pattern, and editing parameters corresponding to each of the target editing patterns, wherein the editing parameters include an editing position;

[0126] A texture determination module, for mapping texture information of a pattern texture corresponding to the target editing pattern to a first clothing texture corresponding to the target clothing based on the editing position, so as to superimpose the texture information of the pattern texture on the texture information at the editing position of the first clothing texture to obtain a target clothing editing texture;

[0127] The display module is used to display the clothing editing effect of the target clothing based on the target clothing editing map.

[0128] Optionally, the editing parameter further includes an editing mode, and the editing mode is one of preset editing mode types, and the preset editing mode types include a single-point editing mode and a tile editing mode;

[0129] When the editing mode is a single-point editing mode, the editing position is a fixed position;

[0130] In the case where the editing mode is a tiling editing mode, the editing position is a filling area, and the editing parameters further include a tiling parameter, which is used to indicate the tiling times and / or tiling density of the target editing pattern in the filling area.

[0131] Optionally, the parameter determination module is further used to:

[0132] Based on a first mask map corresponding to the target garment, determining editable modes corresponding to different positions in the target garment, wherein the first mask map has the same size as the first garment map, and color channel values ​​corresponding to each preset editing area in the first mask map are used to constrain the editable modes of the corresponding preset editing areas, wherein the editable modes include a single-point editing mode and a tiled editing mode;

[0133] When receiving single-point editing mode setting data, target editing pattern setting data and editing position setting data that meet the editable mode constraint, generating a clothing editing request corresponding to the single-point editing mode;

[0134] When the tiled editing mode setting data, the target editing pattern setting data, the editing position setting data and the tiled parameter setting data that meet the editable mode constraints are received, a clothing editing request corresponding to the tiled editing mode is generated.

[0135] Optionally, the map determination module is further used to:

[0136] Based on the first mask map, obtaining a target editing parameter corresponding to the editing position, wherein the alpha channel value corresponding to each position in the first mask map is used to indicate the editing parameter of the corresponding position, and the editing parameter includes parameter intensity and / or transparency;

[0137] Based on the editing position and the target editing parameters, texture information mapping is performed on the pattern map corresponding to the target editing pattern to the first clothing map corresponding to the target clothing, so that the texture information of the pattern map is superimposed on the texture information at the editing position of the first clothing map according to the target editing parameters to obtain the target clothing editing map.

[0138] Optionally, the map determination module is further used to:

[0139] A first material parameter corresponding to the target editing pattern is determined, and based on the clothing position, the first material parameter is superimposed on the texture information at the editing position of the first clothing map to update the target clothing editing map.

[0140] Optionally, the map determination module is further used to: based on the editing position, superimpose the normal information corresponding to the target editing pattern onto the normal map corresponding to the target clothing to obtain a target normal map of the target clothing;

[0141] Correspondingly, the display module is further used to display the clothing editing effect of the target clothing based on the target clothing editing map and the target normal map.

[0142] Optionally, the parameter determination module is further used to: in response to a clothing dyeing request for the target clothing, determine at least one dyeing region indicated by the clothing dyeing request and a target dyeing color value of each dyeing region;

[0143] The texture determination module is further used to: based on the target dyeing color value, change the color value corresponding to the dyeing area in the second clothing texture corresponding to the target clothing to obtain the target clothing dyeing texture;

[0144] The display module is further used to display the clothing dyeing effect of the target clothing based on the target clothing dyeing map.

[0145] Optionally, the parameter determination module is further used to:

[0146] Determining a dyeable area in the target garment based on a second mask map corresponding to the target garment, wherein the second mask map has the same size as the second garment map, and color channel values ​​corresponding to different areas in the second mask map are used to mark whether the corresponding area is a dyeable area;

[0147] When receiving dyeing area selection data and target dyeing color value setting data satisfying the dyeable area constraint, generating the garment dyeing request;

[0148] Accordingly, the map determination module is also used for:

[0149] Based on the second mask map, obtaining target tinting parameters corresponding to each position of the tinted area, wherein the alpha channel value corresponding to each position in the second mask map is used to indicate the tinting parameters of the corresponding position, and the tinting parameters include parameter intensity and / or transparency;

[0150] Based on the target dyeing color value and the target dyeing parameter, the color values ​​corresponding to each position of the dyeing area in the second clothing map corresponding to the target clothing are changed to obtain the target clothing dyeing map.

[0151] Optionally, the map determination module is further used to:

[0152] Obtaining a primary color value corresponding to the dyed area in the second clothing map, and calculating a dyeing offset value according to the primary color value and the target dyeing color value;

[0153] Based on the dyeing offset value, a color value corresponding to the dyeing area in the second clothing map corresponding to the target clothing is changed.

[0154] Optionally, the map determination module is further used to:

[0155] A second material parameter corresponding to the dyed area is determined, and texture information corresponding to the dyed area in the target clothing dyeing map is changed based on the second material parameter to update the target clothing dyeing map.

[0156] It should be noted that for other corresponding descriptions of the functional units involved in the virtual character clothing editing device provided in the embodiment of the present application, reference can be made to Figures 1 to 3 The corresponding description in the method will not be repeated here.

[0157] The embodiment of the present application also provides a computer device, which can be a personal computer, a server, a network device, etc. The computer device includes a bus, a processor, a memory and a communication interface, and can also include an input and output interface and a display device. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store location information. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, the steps in each method embodiment are implemented.

[0158] Those skilled in the art will appreciate that the structure of the above-mentioned computer device is only a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components, or combine certain components, or have a different arrangement of components.

[0159] In one embodiment, a computer-readable storage medium is provided. The computer-readable storage medium may be non-volatile or volatile, and stores a computer program thereon. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0160] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0161] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0162] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0163] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0164] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for editing clothing of a virtual character, characterized in that: The method comprises: In response to a clothing editing request of a virtual character, determining a target clothing indicated by the clothing editing request, at least one target editing pattern, and editing parameters corresponding to each of the target editing patterns, wherein the editing parameters include an editing position; Based on the editing position, mapping the texture information of the pattern map corresponding to the target editing pattern to the first clothing map corresponding to the target clothing, so as to superimpose the texture information of the pattern map on the texture information at the editing position of the first clothing map to obtain the target clothing editing map; Based on the target clothing editing map, the clothing editing effect of the target clothing is displayed.

2. The method according to claim 1, characterized in that The editing parameters also include an editing mode, and the editing mode is one of preset editing mode types, and the preset editing mode types include a single-point editing mode and a tiled editing mode; When the editing mode is a single-point editing mode, the editing position is a fixed position; In the case where the editing mode is a tiling editing mode, the editing position is a filling area, and the editing parameters further include a tiling parameter, which is used to indicate the tiling times and / or tiling density of the target editing pattern in the filling area.

3. The method according to claim 2, characterized in that Before responding to the clothing editing request for the virtual character, the method further includes: Based on a first mask map corresponding to the target garment, determining editable modes corresponding to different positions in the target garment, wherein the first mask map has the same size as the first garment map, and color channel values ​​corresponding to each preset editing area in the first mask map are used to constrain the editable modes of the corresponding preset editing areas, wherein the editable modes include a single-point editing mode and a tiled editing mode; When receiving single-point editing mode setting data, target editing pattern setting data and editing position setting data that meet the editable mode constraint, generating a clothing editing request corresponding to the single-point editing mode; When the tiled editing mode setting data, the target editing pattern setting data, the editing position setting data and the tiled parameter setting data that meet the editable mode constraints are received, a clothing editing request corresponding to the tiled editing mode is generated.

4. The method according to claim 3, characterized in that The step of mapping texture information of a pattern map corresponding to the target editing pattern to a first clothing map corresponding to the target clothing based on the editing position, so as to superimpose the texture information of the pattern map on the texture information at the editing position of the first clothing map to obtain the target clothing editing map, comprises: Based on the first mask map, obtaining a target editing parameter corresponding to the editing position, wherein the alpha channel value corresponding to each position in the first mask map is used to indicate the editing parameter of the corresponding position, and the editing parameter includes parameter intensity and / or transparency; Based on the editing position and the target editing parameters, texture information mapping is performed on the pattern map corresponding to the target editing pattern to the first clothing map corresponding to the target clothing, so that the texture information of the pattern map is superimposed on the texture information at the editing position of the first clothing map according to the target editing parameters to obtain the target clothing editing map.

5. The method according to claim 1, characterized in that Before displaying the clothing editing effect of the target clothing based on the target clothing editing map, the method further includes: A first material parameter corresponding to the target editing pattern is determined, and based on the clothing position, the first material parameter is superimposed on the texture information at the editing position of the first clothing map to update the target clothing editing map.

6. The method according to claim 1, characterized in that Before displaying the clothing editing effect of the target clothing based on the target clothing editing map, the method further includes: Based on the editing position, superimposing the normal information corresponding to the target editing pattern onto the normal map corresponding to the target clothing to obtain a target normal map of the target clothing; Accordingly, displaying the clothing editing effect of the target clothing based on the target clothing editing map includes: Based on the target clothing editing map and the target normal map, a clothing editing effect of the target clothing is displayed.

7. The method according to any one of claims 1 to 6, characterized in that The method further comprises: In response to a garment dyeing request for the target garment, determining at least one dyeing region indicated by the garment dyeing request and a target dyeing color value for each dyeing region; Based on the target dyeing color value, changing the color value corresponding to the dyeing area in the second clothing map corresponding to the target clothing to obtain the target clothing dyeing map; Based on the target clothing dyeing map, a clothing dyeing effect of the target clothing is displayed.

8. The method according to claim 7, characterized in that Before responding to the request for dyeing clothes of the virtual character, the method further includes: Determining a dyeable area in the target garment based on a second mask map corresponding to the target garment, wherein the second mask map has the same size as the second garment map, and color channel values ​​corresponding to different areas in the second mask map are used to mark whether the corresponding area is a dyeable area; When receiving dyeing area selection data and target dyeing color value setting data satisfying the dyeable area constraint, generating the garment dyeing request; Accordingly, the step of changing the color value corresponding to the dyed area in the second clothing map corresponding to the target clothing based on the target dyed color value to obtain the target clothing dyed map includes: Based on the second mask map, obtaining target tinting parameters corresponding to each position of the tinted area, wherein the alpha channel value corresponding to each position in the second mask map is used to indicate the tinting parameters of the corresponding position, and the tinting parameters include parameter intensity and / or transparency; Based on the target dyeing color value and the target dyeing parameter, the color values ​​corresponding to each position of the dyeing area in the second clothing map corresponding to the target clothing are changed to obtain the target clothing dyeing map.

9. The method according to claim 7, characterized in that: The step of changing the color value corresponding to the dyed area in the second clothing map corresponding to the target clothing based on the target dyed color value to obtain the target clothing dyed map comprises: Obtaining a primary color value corresponding to the dyed area in the second clothing map, and calculating a dyeing offset value according to the primary color value and the target dyeing color value; Based on the dyeing offset value, a color value corresponding to the dyeing area in the second clothing map corresponding to the target clothing is changed.

10. The method according to claim 7, characterized in that Before displaying the clothing dyeing effect of the target clothing based on the target clothing dyeing map, the method includes: A second material parameter corresponding to the dyed area is determined, and texture information corresponding to the dyed area in the target clothing dyeing map is changed based on the second material parameter to update the target clothing dyeing map.

11. A clothing editing device for a virtual character, characterized in that: The device comprises: A parameter determination module, configured to respond to a clothing editing request of a virtual character, determine a target clothing indicated by the clothing editing request, at least one target editing pattern, and editing parameters corresponding to each of the target editing patterns, wherein the editing parameters include an editing position; A texture determination module, for mapping texture information of a pattern texture corresponding to the target editing pattern to a first clothing texture corresponding to the target clothing based on the editing position, so as to superimpose the texture information of the pattern texture on the texture information at the editing position of the first clothing texture to obtain a target clothing editing texture; The display module is used to display the clothing editing effect of the target clothing based on the target clothing editing map.

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

13. A computer device comprising a storage medium, a processor, and a computer program stored in the storage medium and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 10 is implemented.