Clothing generation method, apparatus, device, and storage medium
Patent Information
- Application Number
- CN202311705860.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-12
- Publication Date
- 2026-09-11
- Estimated Expiration
- 2043-12-12
AI Technical Summary
[0004]有鉴于此,本发明的目的在于提供一种服装生成方法、装置、设备及存储介质,以解决现有的游戏角色服装生成方案中模板过多,会导致游戏包体积大且组合的服装款式单一的问题
[0016] The above-described clothing generation method, apparatus, equipment, and storage medium. This method parses the collected clothing image resources, parameterizes the parsed clothing style textures, pattern textures, and logo textures to obtain a clothing configuration table; responds to configuration operations for each parameter item in the clothing configuration table, determines the configuration parameters for each parameter item, and performs texture baking on the target object based on these configuration parameters to generate the target clothing. By allowing adjustable settings for various clothing materials through the clothing configuration table, multiple templates are eliminated, reducing the size of the game data package. Furthermore, by adjusting the parameters in the clothing configuration table, clothing styles are diversified, solving the problem of limited clothing style combinations in existing clothing generation solutions.
Smart Images

Figure CN117883778B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and in particular to a method, apparatus, device, and storage medium for generating clothing. Background Technology
[0002] With the continuous development of game technology, especially multiplayer team strategy games, such as sports games, the main way to distinguish teammates from opponents is by designing different clothing or colors. For example, when clothing is used as a distinguishing identifier, jerseys are an essential element in all sports games, directly affecting the recognizability of players and teams.
[0003] Currently, the costume production process for game characters mainly involves pre-designing and drawing color textures, number textures, and various pattern textures for each jersey. These textures are designed independently for each jersey. During rendering, these textures are processed using material editing software and packaged into the game assets. When players select different teams and jerseys, the game directly loads the corresponding texture combination for rendering. Therefore, this method is not only time-consuming and costly in terms of design and production, but also cannot quickly adjust the design or generate design variations. Furthermore, since the game needs to include many different teams and jerseys, if each were an independent resource, it would result in an excessively large overall game asset package size, increasing download and installation time, and also preventing the editing and adjustment of sample styles. Summary of the Invention
[0004] In view of this, the purpose of the present invention is to provide a clothing generation method, apparatus, device and storage medium to solve the problem that the existing game character clothing generation scheme has too many templates, which leads to large game package size and limited clothing styles.
[0005] In a first aspect, embodiments of the present invention provide a method for generating clothing, comprising:
[0006] Collect various clothing image resources, and parse each of the clothing image resources to obtain clothing style texture maps, pattern texture maps, and logo texture maps;
[0007] The clothing style map, the pattern texture map, and the logo map are parameterized to obtain a clothing configuration table, wherein the clothing configuration table contains multiple parameter items;
[0008] In response to configuration operations for each parameter item in the clothing configuration table, the configuration parameters for each parameter item are determined, and texture baking is performed on the target object based on each configuration parameter to generate the target clothing.
[0009] Secondly, embodiments of the present invention provide a garment manufacturing apparatus, comprising:
[0010] The acquisition module is used to acquire various clothing image resources and parse each clothing image resource to obtain clothing style texture maps, pattern texture maps, and logo texture maps.
[0011] The parameterization module is used to parameterize the clothing style map, the pattern texture map, and the logo map to obtain a clothing configuration table, wherein the clothing configuration table contains multiple parameter items;
[0012] The generation module is used to respond to configuration operations for each parameter item in the clothing configuration table, determine the configuration parameters of each parameter item, and perform texture baking on the target object based on each configuration parameter to generate the target clothing.
[0013] Thirdly, embodiments of the present invention provide an electronic device, including a processor and a memory, wherein the memory stores machine-executable instructions that can be executed by the processor, and the processor executes the machine-executable instructions to implement the clothing generation method provided above.
[0014] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing computer-executable instructions. When the computer-executable instructions are invoked and executed by a processor, the computer-executable instructions cause the processor to implement the clothing generation method provided above.
[0015] The embodiments of the present invention bring the following beneficial effects:
[0016] The above-described clothing generation method, apparatus, equipment, and storage medium. This method parses the collected clothing image resources, parameterizes the parsed clothing style textures, pattern textures, and logo textures to obtain a clothing configuration table; responds to configuration operations for each parameter item in the clothing configuration table, determines the configuration parameters for each parameter item, and performs texture baking on the target object based on these configuration parameters to generate the target clothing. By allowing adjustable settings for various clothing materials through the clothing configuration table, multiple templates are eliminated, reducing the size of the game data package. Furthermore, by adjusting the parameters in the clothing configuration table, clothing styles are diversified, solving the problem of limited clothing style combinations in existing clothing generation solutions.
[0017] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention are realized and obtained in accordance with the structures particularly pointed out in the description, claims and drawings.
[0018] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0019] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0020] Figure 1 A flowchart of a clothing generation method provided in an embodiment of the present invention;
[0021] Figure 2 Another flowchart of the clothing generation method provided in the embodiment of the present invention;
[0022] Figure 3 This is a rendering of a clothing style texture provided in an embodiment of the present invention;
[0023] Figure 4 This is an example of the effect of a pattern texture mapping provided in an embodiment of the present invention;
[0024] Figure 5 A schematic diagram of a garment production device provided in an embodiment of the present invention;
[0025] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0026] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0027] like Figure 1 The illustration shows an embodiment of a clothing generation method provided by the present invention, which specifically includes the following steps:
[0028] Step S101: Collect various clothing image resources and parse each clothing image resource to obtain clothing style texture map, pattern texture map and logo texture map.
[0029] In this step, the clothing style texture map, pattern texture map, and logo texture map are actually texture materials that have been pre-collected and extracted. That is, they can be obtained by pre-collecting clothing images, models, and effects on different game characters, or by pre-collecting clothing images, models, and effects of the same game character in different scenes.
[0030] The clothing style texture can be understood as the type or style of clothing, such as long sleeves, short sleeves, or the cut of the garment. For example, the cut could be fitted or loose. Taking a soccer jersey as an example, the clothing style texture represents the jersey's cut, such as a long-sleeved soccer jersey. The overall shape of the jersey is composed of multiple pieces of fabric of different shapes. Specifically, it can be understood as the entire long-sleeved jersey having multiple patterned areas, and these patterned areas forming the clothing style texture. Figure 3 As shown.
[0031] The pattern texture map refers to the overall woven texture of the garment (such as the regional layout texture, the woven texture of the needle and thread, etc.), the printed pattern texture, the color texture of each area, etc.
[0032] The logo sticker can be a brand logo, or even an advertising graphic. For jerseys, the logo sticker is the team's logo, such as the team emblem or other iconic patterns.
[0033] Then, the components of the clothing in each texture material are extracted manually or by analytical algorithms. These are various different textures. The components of each texture material are then compared to extract the common parts between the clothing. Finally, the common parts are used as the components of the clothing to build a common clothing template.
[0034] In practical applications, all clothing is basically composed of three parts: style, pattern, and logo. Style can be understood as long-sleeved or short-sleeved, or the pattern of the garment. Pattern refers to how many areas the garment is divided into, and each area can have different patterns, textures, logos, etc.
[0035] Based on the clothing template, corresponding textures are extracted from different clothing image resources, namely clothing style textures, pattern textures, and logo textures, thus constructing three texture sets.
[0036] Step S102 involves parametric processing of the clothing style map, pattern texture map, and logo map to obtain a clothing configuration table. This table contains multiple parameter items, including clothing type number, style number, neckline position and size, cuff position and size, clothing size, main color, secondary color, back number, and even various mixing methods for pattern styles, different variations of the chest advertisement, etc.
[0037] In this embodiment, the parameterization process refers to converting each texture into a parameterized image, which can be simply understood as a digital graphic. Specifically, it involves extracting the constituent elements or parameters of each texture, abstracting entities based on the extracted constituent elements or parameters to obtain parameter items, and constructing a clothing configuration table based on the abstracted parameter items.
[0038] Specifically, each texture is parameterized according to the classification of clothing texture resources. For the best results, the outline lines of the clothing style texture are extracted, closed regions within the outline lines are identified to obtain multiple region blocks, and the color, coloring method, and color distribution pattern of each region block are extracted. Furthermore, the process also includes identifying the sleeve type of the clothing in the clothing style texture, such as short sleeves or long sleeves.
[0039] For parametric pattern texture maps, the main task is to extract the texture outline, such as the texture style and the direction of the texture lines. Similarly, for logo texture maps, the overall texture is extracted to obtain a texture tile.
[0040] In another embodiment, the parameterization process for each texture also includes:
[0041] Elements extracted from textures of the same type are compared with each other. Based on the comparison results, common parts are selected to determine the parameter items to be stored in the clothing configuration table. For parts that are not common, a general parameter item is set and also stored in the clothing configuration table.
[0042] Step S103: Respond to the configuration operation for each parameter item in the clothing configuration table, determine the configuration parameters for each parameter item, and perform texture baking on the target object based on each configuration parameter to generate the target clothing.
[0043] In this embodiment, the configuration operation can be a touch operation or a control command / instruction. Based on the user's input of the clothing design requirements, the target parameter items and configuration values of each component of the clothing are determined by parsing the keywords in the design requirements. Then, control commands / instructions are constructed based on the parameter items and configuration values. The corresponding parameter items are then retrieved from the clothing configuration table based on the control commands / instructions, and the configuration values are stored in the record items corresponding to the parameter items to adjust the configuration parameters.
[0044] Then, the data of each parameter item is read from the clothing configuration table, and then input into the engine for baking to obtain the texture of the target clothing. Finally, these textures are superimposed on the target object to obtain the target clothing.
[0045] In practical applications, when reading data from the clothing configuration table, the data is read according to the textures at different locations. For example, for clothing styles, all parameter items and corresponding data belonging to the clothing style in the clothing configuration table are read, and the data of these parameter items are baked to obtain the style texture. This process is repeated. After all textures are baked, the baked textures are pasted onto the target object according to their corresponding positions, thereby realizing the rendering of the clothing of the target object.
[0046] The aforementioned clothing generation method analyzes the components of each collected garment and abstracts them into adjustable parameters. It then establishes a parameterized clothing scheme, obtaining a corresponding clothing configuration table. Based on adjustment operations, the values of the parameter items in the clothing configuration table are adjusted. Finally, the adjusted data is read and baked in real-time within the game. In other words, this invention significantly reduces the jersey production cycle and cost through parameterization and generation processes, enabling rapid, real-time output of more variations and increasing game playability. It also reduces the game release package size, optimizing the game's overall size. Parameterized configuration also makes adjusting and updating jersey styles more flexible and convenient.
[0047] The following embodiments provide a specific implementation of a clothing generation method, which is specifically illustrated using a jersey in a sports game as an example. Figure 2 As shown, the method specifically includes the following steps:
[0048] Step S201: Collect various clothing image resources and parse each clothing image resource to obtain clothing style texture map, pattern texture map and logo texture map.
[0049] Specifically, by identifying the clothing outlines in each of the clothing image resources, a clothing style texture map is obtained; all pattern areas in each of the clothing image resources are identified, and the pattern areas are classified according to their content to obtain pattern texture maps and logo maps.
[0050] In this embodiment, after acquiring various clothing image resources, the method further includes:
[0051] Contour recognition is performed on each clothing image resource. Based on the recognized contours, multiple closed regions are determined. Then, based on each closed region, the clothing components are combined to obtain a general clothing model that can be applied to various collected clothing items. The clothing components are generated, namely jersey style, pattern texture, and logo.
[0052] Furthermore, when analyzing clothing image resources, the analysis is based on the outlines of three components: jersey style, pattern texture, and logo, to obtain the corresponding texture.
[0053] In practical applications, character data from different sports games is collected, and then jersey rendering data, such as jersey images, is extracted from the character data. These jersey images are then used as references to analyze the constituent elements of the jersey. Comparative analysis of the analysis results reveals that a jersey consists of three parts: jersey style, pattern texture, and logo. These three components are then used as the types of textures extracted, and three types of textures are extracted from various jersey images.
[0054] In this embodiment, before extracting the textures corresponding to the three components of jersey style, pattern texture, and logo, the clothing in each of the collected clothing image resources is mapped according to the same coordinate space so that the size or proportion of each component of each clothing image resource is adapted to the general clothing model.
[0055] Alternatively, after extracting the textures, a mapping transformation can be performed on each texture, that is, mapping the clothing style texture, the pattern texture, and the logo texture to the same texture coordinate space, thereby ensuring that all jerseys, whether long-sleeved or short-sleeved, have the same UV, maximizing UV.
[0056] Step S202: Extract all texture elements from the clothing style texture map, pattern texture map, and logo texture map respectively.
[0057] In this step, the texture element includes at least one of color, color blending mode, cuff type, texture lines, and line shape.
[0058] First, the outlines of the garment pattern texture are identified. Then, regions are determined based on these outlines. Colors are extracted from each region, and the relationships between these regions are identified to obtain the garment's pattern. Further, the color distribution within each region is identified to determine the color blending method, such as color gradient. Simultaneously, the cuff type in the garment pattern texture is also identified, such as... Figure 3 As shown.
[0059] Then, the pattern texture map is identified, specifically by identifying and extracting the lines and their combined shapes to obtain the texture, as well as extracting the texture's direction, such as... Figure 4 As shown.
[0060] Finally, the textures and color blocks in the logo texture are identified and extracted to obtain the logo.
[0061] In another embodiment, after extracting the texture elements from each texture, the method further includes:
[0062] Compare the texture elements in each of the described clothing style textures, each of the described pattern textures, and each of the described logo textures;
[0063] Based on the comparison results, the proportion of each texture element in each of the clothing style textures, pattern textures, and logo textures in the corresponding textures is calculated, as well as the number of variable texture elements and variable texture elements in each of the clothing style textures, pattern textures, and logo textures.
[0064] In practical applications, not all texture elements in each extracted clothing style texture map, pattern texture map, and logo texture map need to be adjusted; some elements do not need to be adjusted. Therefore, in order to reduce the number of adjustable parameters, it is necessary to filter the extracted elements to obtain the parameters that will actually change, and to calculate the proportion of each element. For example, the proportions of the main color, secondary color, and back number on the jersey are different. Based on these different proportions, the rendering range of the parameter is set, which is the control range of the parameter.
[0065] Step S203: Abstract each texture element to obtain the corresponding parameter items and the configuration range corresponding to the parameter items.
[0066] Specifically, the corresponding parameter items are determined based on the variable texture elements in each of the clothing style texture maps, each of the pattern texture maps, and each of the logo texture maps; the corresponding configuration range is determined based on the proportion and quantity of the variable texture elements in each of the clothing style texture maps, each of the pattern texture maps, and each of the logo texture maps.
[0067] Step S204: Based on the element combination relationship of the clothing, construct the association relationship between each parameter item, and generate a clothing configuration table based on the association relationship and the corresponding configuration range of each parameter item.
[0068] In this embodiment, parameters such as the adjustment of colors in different parts of the jersey, the jersey's main color, secondary color, back number, etc., various mixing methods of patterns, different variations of the chest advertisement, and whether there are collars and cuffs are included, but are not limited to, the above-mentioned jersey detail adjustments. These parameters are configured in a table.
[0069] In another embodiment, after the step of parameterizing the clothing style map, the pattern texture map, and the logo map to obtain the clothing configuration table, the method further includes:
[0070] The parameter items in the clothing configuration table are visualized to obtain the parameter configuration panel.
[0071] Specifically, the parameter items in the clothing configuration table are extracted and written sequentially to the corresponding positions in the parameter configuration panel template to obtain the parameter configuration panel.
[0072] To improve the compatibility of the parameter configuration panel, after the step of parameterizing the clothing style map, the pattern texture map, and the logo map to obtain the clothing configuration table, the method further includes:
[0073] Extract the immutable texture elements from each of the clothing style textures, pattern textures, and logo textures, and abstract the corresponding fixed parameter items from the immutable texture elements, and write them into the parameter configuration panel.
[0074] In practical applications, elements other than color, color blending mode, cuff type, texture lines and line shapes are filtered out from the extracted texture elements and integrated into a general parameter item. Then, the corresponding element content is used as the configuration scope of this general parameter item, and a parameter item is added to the parameter configuration panel to be exposed on the panel.
[0075] Step S205: Respond to the configuration operation for each parameter item in the clothing configuration table, determine the configuration parameters for each parameter item, and perform texture baking on the target object based on each configuration parameter to generate the target clothing.
[0076] In this step, in response to touch operations on each parameter item on the parameter configuration panel, the parameter value of each parameter item is determined;
[0077] According to the texture classification, the parameter values of the corresponding parameter items are read from the parameter configuration panel, and real-time baking is performed to obtain the corresponding pattern texture.
[0078] All the pattern textures obtained from baking are superimposed onto the corresponding positions of the target object to obtain the target clothing.
[0079] Specifically, users adjust the corresponding parameters in the parameter configuration panel according to the requirements of the target garment they want to generate. The adjusted values are then updated in the garment configuration table. Finally, the corresponding parameters are read from the garment configuration table and baked to obtain the texture.
[0080] In summary, by allowing adjustable settings for various clothing materials through the clothing configuration table, multiple templates are no longer required, thus reducing the size of the game data package. Furthermore, by adjusting the parameters in the clothing configuration table, clothing styles can be diversified, solving the problem of limited clothing styles in existing clothing generation solutions.
[0081] For the corresponding method embodiments described above, see [link to relevant documentation]. Figure 5 The diagram shows a garment production apparatus, which includes:
[0082] The acquisition module 510 is used to acquire various clothing image resources and parse each clothing image resource to obtain clothing style texture map, pattern texture map and logo texture map;
[0083] The parameterization module 520 is used to parameterize the clothing style map, the pattern texture map and the logo map to obtain a clothing configuration table, wherein the clothing configuration table contains multiple parameter items;
[0084] The generation module 530 is used to respond to the configuration operation for each parameter item in the clothing configuration table, determine the configuration parameters of each parameter item, and perform texture baking on the target object based on each configuration parameter to generate the target clothing.
[0085] In this embodiment, the acquisition module 510 is specifically used for:
[0086] Identify the clothing outlines in each of the clothing image resources to obtain clothing style textures;
[0087] Identify all pattern regions in each of the clothing image resources, and classify the pattern regions according to their content to obtain pattern texture maps and logo maps.
[0088] In this embodiment, the acquisition module 510 is further configured to:
[0089] The clothing style texture map, the pattern texture map, and the logo texture map are mapped to the same texture coordinate space.
[0090] In this embodiment, the parameterization module 520 is specifically used for:
[0091] Extract all texture elements from the clothing style texture map, the pattern texture map, and the logo texture map respectively;
[0092] The texture elements are abstracted to obtain the corresponding parameter items and the configuration range of the parameter items;
[0093] Based on the element combination relationship of the clothing, the association relationship between each parameter item is constructed, and a clothing configuration table is generated based on the association relationship and the corresponding configuration range of each parameter item.
[0094] In this embodiment, the parameterization module 520 is further configured to:
[0095] Compare the texture elements in each of the described clothing style textures, each of the described pattern textures, and each of the described logo textures;
[0096] Based on the comparison results, the proportion of each texture element in each of the clothing style textures, pattern textures, and logo textures in the corresponding textures is calculated, as well as the number of variable texture elements and variable texture elements in each of the clothing style textures, pattern textures, and logo textures.
[0097] In this embodiment, the parameterization module 520 is specifically used for:
[0098] The corresponding parameter items are determined based on the variable texture elements in each of the clothing style texture maps, each of the pattern texture maps, and each of the logo texture maps;
[0099] The corresponding configuration range is determined based on the proportion and number of variable texture elements in each of the clothing style textures, pattern textures, and logo textures.
[0100] In this embodiment, the parameterization module 520 is further configured to:
[0101] The parameter items in the clothing configuration table are visualized to obtain the parameter configuration panel.
[0102] In this embodiment, the parameterization module 520 is specifically used for:
[0103] Extract the parameter items from the clothing configuration table and write the extracted parameters sequentially to the corresponding positions in the parameter configuration panel template to obtain the parameter configuration panel.
[0104] In this embodiment, the parameterization module 520 is further configured to:
[0105] Extract the immutable texture elements from each of the clothing style textures, pattern textures, and logo textures, and abstract the corresponding fixed parameter items from the immutable texture elements, and write them into the parameter configuration panel.
[0106] In this embodiment, the generation module 530 is specifically used for:
[0107] In response to touch operations on each parameter item on the parameter configuration panel, determine the parameter value of each parameter item;
[0108] According to the texture classification, the parameter values of the corresponding parameter items are read from the parameter configuration panel, and real-time baking is performed to obtain the corresponding pattern texture.
[0109] All the pattern textures obtained from baking are superimposed onto the corresponding positions of the target object to obtain the target clothing.
[0110] In this example, by analyzing the components of each garment collected and abstracting them into adjustable parameters, a parameterized garment scheme is established, resulting in a corresponding garment configuration table. Adjustments are made to the values of the parameter items in the garment configuration table based on adjustment operations. Finally, the adjusted data is read and baked in real-time within the game. This invention significantly reduces the jersey production cycle and cost through parameterization and generation processes, enabling rapid, real-time output of more variations and increasing game playability. It also reduces the game release package size, optimizing the game's overall size. Parameterized configuration also makes adjusting and updating jersey styles more flexible and convenient.
[0111] This embodiment also provides an electronic device, including a processor and a memory. The memory stores machine-executable instructions that can be executed by the processor. The processor executes the machine-executable instructions to implement the clothing generation method provided in the above embodiment. This electronic device can be a server or a terminal device.
[0112] See Figure 6 As shown, the electronic device includes a processor 600 and a memory 601. The memory 601 stores machine-executable instructions that can be executed by the processor 600. The processor 600 executes the machine-executable instructions to implement the above-described garment production method.
[0113] Furthermore, Figure 6 The electronic device shown also includes a bus 602 and a communication interface 603, with the processor 600, communication interface 603 and memory 601 connected via the bus 602.
[0114] The memory 601 may include high-speed random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one communication interface 603 (which can be wired or wireless), such as the Internet, wide area network, local area network, or metropolitan area network. The bus 602 may be an ISA bus, PCI bus, or EISA bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 6 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.
[0115] The processor 600 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of the processor 600 or by instructions in software form. The processor 600 may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this invention. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this invention can be directly manifested as execution by a hardware decoding processor, or execution by a combination of hardware and software modules in the decoding processor. The software module can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory 601. The processor 600 reads the information from memory 601 and, in conjunction with its hardware, completes the following steps:
[0116] Collect various clothing image resources, and parse each of the clothing image resources to obtain clothing style texture maps, pattern texture maps, and logo texture maps;
[0117] The clothing style map, the pattern texture map, and the logo map are parameterized to obtain a clothing configuration table, wherein the clothing configuration table contains multiple parameter items;
[0118] In response to configuration operations for each parameter item in the clothing configuration table, the configuration parameters for each parameter item are determined, and texture baking is performed on the target object based on each configuration parameter to generate the target clothing.
[0119] The steps described above for parsing the clothing image resources to obtain clothing style texture maps, pattern texture maps, and logo texture maps include:
[0120] Identify the clothing outlines in each of the clothing image resources to obtain clothing style textures;
[0121] Identify all pattern regions in each of the clothing image resources, and classify the pattern regions according to their content to obtain pattern texture maps and logo maps.
[0122] The steps described above for parsing the clothing image resources to obtain clothing style texture maps, pattern texture maps, and logo texture maps also include:
[0123] The clothing style texture map, the pattern texture map, and the logo texture map are mapped to the same texture coordinate space.
[0124] The above-mentioned steps of parametrically processing the clothing style map, the pattern texture map, and the logo map to obtain the clothing configuration table include:
[0125] Extract all texture elements from the clothing style texture map, the pattern texture map, and the logo texture map respectively;
[0126] The texture elements are abstracted to obtain the corresponding parameter items and the configuration range of the parameter items;
[0127] Based on the element combination relationship of the clothing, the association relationship between each parameter item is constructed, and a clothing configuration table is generated based on the association relationship and the corresponding configuration range of each parameter item.
[0128] After the steps of extracting all texture elements from the clothing style texture map, the pattern texture map, and the logo texture map respectively, the method further includes:
[0129] Compare the texture elements in each of the described clothing style textures, each of the described pattern textures, and each of the described logo textures;
[0130] Based on the comparison results, the proportion of each texture element in each of the clothing style textures, pattern textures, and logo textures in the corresponding textures is calculated, as well as the number of variable texture elements and variable texture elements in each of the clothing style textures, pattern textures, and logo textures.
[0131] The steps described above for abstracting each texture element to obtain the corresponding parameter items and the configuration range of the parameter items include:
[0132] The corresponding parameter items are determined based on the variable texture elements in each of the clothing style texture maps, each of the pattern texture maps, and each of the logo texture maps;
[0133] The corresponding configuration range is determined based on the proportion and number of variable texture elements in each of the clothing style textures, pattern textures, and logo textures.
[0134] After the step of parameterizing the clothing style map, the pattern texture map, and the logo map to obtain the clothing configuration table, the method further includes:
[0135] The parameter items in the clothing configuration table are visualized to obtain the parameter configuration panel.
[0136] The above-described visualization of each parameter item in the clothing configuration table yields a parameter configuration panel, including:
[0137] Extract the parameter items from the clothing configuration table and write the extracted parameters sequentially to the corresponding positions in the parameter configuration panel template to obtain the parameter configuration panel.
[0138] After the step of parameterizing the clothing style map, the pattern texture map, and the logo map to obtain the clothing configuration table, the method further includes:
[0139] Extract the immutable texture elements from each of the clothing style textures, pattern textures, and logo textures, and abstract the corresponding fixed parameter items from the immutable texture elements, and write them into the parameter configuration panel.
[0140] The above response addresses the configuration operations of each parameter item in the clothing configuration table, determines the configuration parameters of each parameter item, and performs texture baking on the target object based on each configuration parameter to generate the target clothing. The steps include:
[0141] In response to touch operations on each parameter item on the parameter configuration panel, determine the parameter value of each parameter item;
[0142] According to the texture classification, the parameter values of the corresponding parameter items are read from the parameter configuration panel, and real-time baking is performed to obtain the corresponding pattern texture.
[0143] All the pattern textures obtained from baking are superimposed onto the corresponding positions of the target object to obtain the target clothing.
[0144] In this embodiment, various clothing materials can be adjusted through a clothing configuration table, eliminating the need for multiple templates and reducing the size of the game data package. At the same time, by adjusting the parameters in the clothing configuration table, the variety of clothing styles is achieved, solving the problem of limited clothing styles in existing clothing generation schemes.
[0145] This embodiment also provides a computer-readable storage medium storing computer-executable instructions. When the computer-executable instructions are invoked and executed by a processor, the computer-executable instructions cause the processor to perform the following steps:
[0146] Collect various clothing image resources, and parse each of the clothing image resources to obtain clothing style texture maps, pattern texture maps, and logo texture maps;
[0147] The clothing style map, the pattern texture map, and the logo map are parameterized to obtain a clothing configuration table, wherein the clothing configuration table contains multiple parameter items;
[0148] In response to configuration operations for each parameter item in the clothing configuration table, the configuration parameters for each parameter item are determined, and texture baking is performed on the target object based on each configuration parameter to generate the target clothing.
[0149] The steps described above for parsing the clothing image resources to obtain clothing style texture maps, pattern texture maps, and logo texture maps include:
[0150] Identify the clothing outlines in each of the clothing image resources to obtain clothing style textures;
[0151] Identify all pattern regions in each of the clothing image resources, and classify the pattern regions according to their content to obtain pattern texture maps and logo maps.
[0152] The steps described above for parsing the clothing image resources to obtain clothing style texture maps, pattern texture maps, and logo texture maps also include:
[0153] The clothing style texture map, the pattern texture map, and the logo texture map are mapped to the same texture coordinate space.
[0154] The above-mentioned steps of parametrically processing the clothing style map, the pattern texture map, and the logo map to obtain the clothing configuration table include:
[0155] Extract all texture elements from the clothing style texture map, the pattern texture map, and the logo texture map respectively;
[0156] The texture elements are abstracted to obtain the corresponding parameter items and the configuration range of the parameter items;
[0157] Based on the element combination relationship of the clothing, the association relationship between each parameter item is constructed, and a clothing configuration table is generated based on the association relationship and the corresponding configuration range of each parameter item.
[0158] After the steps of extracting all texture elements from the clothing style texture map, the pattern texture map, and the logo texture map respectively, the method further includes:
[0159] Compare the texture elements in each of the described clothing style textures, each of the described pattern textures, and each of the described logo textures;
[0160] Based on the comparison results, the proportion of each texture element in each of the clothing style textures, pattern textures, and logo textures in the corresponding textures is calculated, as well as the number of variable texture elements and variable texture elements in each of the clothing style textures, pattern textures, and logo textures.
[0161] The steps described above for abstracting each texture element to obtain the corresponding parameter items and the configuration range of the parameter items include:
[0162] The corresponding parameter items are determined based on the variable texture elements in each of the clothing style texture maps, each of the pattern texture maps, and each of the logo texture maps;
[0163] The corresponding configuration range is determined based on the proportion and number of variable texture elements in each of the clothing style textures, pattern textures, and logo textures.
[0164] After the step of parameterizing the clothing style map, the pattern texture map, and the logo map to obtain the clothing configuration table, the method further includes:
[0165] The parameter items in the clothing configuration table are visualized to obtain the parameter configuration panel.
[0166] The above-described visualization of each parameter item in the clothing configuration table yields a parameter configuration panel, including:
[0167] Extract the parameter items from the clothing configuration table and write the extracted parameters sequentially to the corresponding positions in the parameter configuration panel template to obtain the parameter configuration panel.
[0168] After the step of parameterizing the clothing style map, the pattern texture map, and the logo map to obtain the clothing configuration table, the method further includes:
[0169] Extract the immutable texture elements from each of the clothing style textures, pattern textures, and logo textures, and abstract the corresponding fixed parameter items from the immutable texture elements, and write them into the parameter configuration panel.
[0170] The above response addresses the configuration operations of each parameter item in the clothing configuration table, determines the configuration parameters of each parameter item, and performs texture baking on the target object based on each configuration parameter to generate the target clothing. The steps include:
[0171] In response to touch operations on each parameter item on the parameter configuration panel, determine the parameter value of each parameter item;
[0172] According to the texture classification, the parameter values of the corresponding parameter items are read from the parameter configuration panel, and real-time baking is performed to obtain the corresponding pattern texture.
[0173] All the pattern textures obtained from baking are superimposed onto the corresponding positions of the target object to obtain the target clothing.
[0174] In this embodiment, various clothing materials can be adjusted through a clothing configuration table, eliminating the need for multiple templates and reducing the size of the game data package. At the same time, by adjusting the parameters in the clothing configuration table, the variety of clothing styles is achieved, solving the problem of limited clothing styles in existing clothing generation schemes.
[0175] The computer program products of the garment generation method, apparatus, electronic device and storage medium provided in the embodiments of the present invention include a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods described in the preceding method embodiments. For specific implementation, please refer to the method embodiments, which will not be repeated here.
[0176] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the system and apparatus described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0177] Furthermore, in the description of the embodiments of the present invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in the present invention based on the specific circumstances.
[0178] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0179] In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0180] Finally, it should be noted that the above embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for generating clothing, characterized in that, The method includes: Collect various clothing image resources, identify the clothing outlines in each of the clothing image resources, and obtain clothing style textures; Identify all pattern regions in each of the clothing image resources, and classify the pattern regions according to their pattern content to obtain pattern texture maps and logo maps; Map the clothing style texture map, the pattern texture map, and the logo texture map to the same texture coordinate space; The clothing style map, the pattern texture map, and the logo map are parameterized to obtain a clothing configuration table, wherein the clothing configuration table contains multiple parameter items; In response to configuration operations for each parameter item in the clothing configuration table, the configuration parameters for each parameter item are determined, and texture baking is performed on the target object based on each configuration parameter to generate the target clothing.
2. The garment production method according to claim 1, characterized in that, The step of parameterizing the clothing style map, the pattern texture map, and the logo map to obtain the clothing configuration table includes: Extract all texture elements from the clothing style texture map, the pattern texture map, and the logo texture map respectively; The texture elements are abstracted to obtain the corresponding parameter items and the configuration range of the parameter items; Based on the element combination relationship of the clothing, the association relationship between each parameter item is constructed, and a clothing configuration table is generated based on the association relationship and the corresponding configuration range of each parameter item.
3. The garment production method according to claim 2, characterized in that, After the steps of extracting all texture elements from the clothing style texture map, the pattern texture map, and the logo texture map respectively, the method further includes: Compare the texture elements in each of the described clothing style textures, each of the described pattern textures, and each of the described logo textures; Based on the comparison results, the proportion of each texture element in each of the clothing style textures, pattern textures, and logo textures in the corresponding textures is calculated, as well as the number of variable texture elements and variable texture elements in each of the clothing style textures, pattern textures, and logo textures.
4. The garment production method according to claim 3, characterized in that, The step of abstracting each of the texture elements to obtain the corresponding parameter items and the configuration range corresponding to the parameter items includes: The corresponding parameter items are determined based on the variable texture elements in each of the clothing style texture maps, each of the pattern texture maps, and each of the logo texture maps; The corresponding configuration range is determined based on the proportion and number of variable texture elements in each of the clothing style textures, pattern textures, and logo textures.
5. The garment production method according to claim 2, characterized in that, After the step of parameterizing the clothing style map, the pattern texture map, and the logo map to obtain the clothing configuration table, the method further includes: The parameter items in the clothing configuration table are visualized to obtain the parameter configuration panel.
6. The garment production method according to claim 5, characterized in that, The step of visualizing each parameter item in the clothing configuration table to obtain a parameter configuration panel includes: Extract the parameter items from the clothing configuration table and write the extracted parameters sequentially to the corresponding positions in the parameter configuration panel template to obtain the parameter configuration panel.
7. The garment production method according to claim 6, characterized in that, After the step of parameterizing the clothing style map, the pattern texture map, and the logo map to obtain the clothing configuration table, the method further includes: Extract the immutable texture elements from each of the clothing style textures, pattern textures, and logo textures, and abstract the corresponding fixed parameter items from the immutable texture elements, and write them into the parameter configuration panel.
8. The garment production method according to claim 6, characterized in that, The steps of responding to the configuration operations of each parameter item in the clothing configuration table, determining the configuration parameters of each parameter item, and performing texture baking on the target object based on each configuration parameter to generate the target clothing include: In response to touch operations on each parameter item on the parameter configuration panel, determine the parameter value of each parameter item; According to the texture classification, the parameter values of the corresponding parameter items are read from the parameter configuration panel, and real-time baking is performed to obtain the corresponding pattern texture. All the pattern textures obtained from baking are superimposed onto the corresponding positions of the target object to obtain the target clothing.
9. A garment production device, characterized in that, The device includes: The acquisition module is used to acquire various clothing image resources, identify clothing outlines in each clothing image resource, and obtain clothing style textures; identify all pattern regions in each clothing image resource, classify the pattern regions according to the pattern content, and obtain pattern textures and logo textures; and map the clothing style textures, pattern textures, and logo textures to the same texture coordinate space. The parameterization module is used to parameterize the clothing style map, the pattern texture map, and the logo map to obtain a clothing configuration table, wherein the clothing configuration table contains multiple parameter items; The generation module is used to respond to configuration operations for each parameter item in the clothing configuration table, determine the configuration parameters of each parameter item, and perform texture baking on the target object based on each configuration parameter to generate the target clothing.
10. An electronic device, characterized in that, It includes a processor and a memory, the memory storing machine-executable instructions that can be executed by the processor, the processor executing the machine-executable instructions to implement the garment production method of any one of claims 1-8.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when invoked and executed by a processor, cause the processor to implement the garment generation method according to any one of claims 1-8.
Citation Information
Patent Citations
Special effect bullet screen interaction method and device, equipment and storage medium
CN116437135A
Pattern display method and device, equipment, medium and program product
CN116983655A