Clothing model processing method and device, electronic equipment and storage medium
Through the automated process of template files and binding tools, the cumbersome problem of the clothing model binding process in the game is solved, and the automated binding of the clothing model is realized, and the production efficiency is improved.
Patent Information
- Application Number
- CN202311851082.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-28
- Publication Date
- 2025-07-01
AI Technical Summary
The binding process of clothing models in the game requires cumbersome manual operations, resulting in inefficient production efficiency, especially in the presence of a lot of repetitive labor in bone binding, weight configuration and physical parameter settings.
The hierarchical detail model idea is adopted to realize the automated binding process of clothing models through template files and binding tools, including vertex mapping, weight configuration and material parameter configuration, and use hierarchical iterative binding tools and one-click binding functions to reduce manual operations.
The automated binding of the clothing model has been realized, which reduces human resource consumption, improves production efficiency, reduces repetitive labor, and improves the production and iteration efficiency of clothing assets.
Smart Images

Figure CN120227637A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of game technologies, and particularly to a method, apparatus, electronic device, and storage medium for processing clothing models. Background Art
[0002] In games, to make the game visuals rich and diverse, different clothing items are designed for use in the game. During the production process of clothing, multiple steps are involved, and a large amount of data needs to be bound or configured, such as bone binding, material configuration, and so on.
[0003] In related technologies, the setting of many data requires manual completion by art designers, which is time-consuming and laborious, resulting in low production efficiency of clothing assets. Summary of the Invention
[0004] Embodiments of this application provide a method, apparatus, electronic device, and storage medium for processing clothing models, which can reduce the human resource requirements in the process of making clothing models and improve production efficiency.
[0005] In a first aspect, embodiments of this application provide a method for processing a clothing model, including:
[0006] Obtaining a target clothing model to be bound, and a template file of a target reference clothing model corresponding to the target clothing model, where the template file includes a clothing material configuration file of the target reference clothing model and at least one weight configuration file corresponding to vertices;
[0007] Performing vertex mapping on the target clothing model and the target reference clothing model to obtain a first vertex mapping relationship;
[0008] Based on the first vertex mapping relationship and the weight configuration file, performing at least one vertex weight configuration on the target clothing model;
[0009] Based on the clothing material configuration file, performing clothing material parameter configuration on the target clothing model until the binding process of the target clothing model is completed.
[0010] In a second aspect, embodiments of this application further provide a device for processing a clothing model, including:
[0011] An obtaining unit, configured to obtain a target clothing model to be bound, and a template file of a target reference clothing model corresponding to the target clothing model, where the template file includes a clothing material configuration file of the target reference clothing model and at least one weight configuration file corresponding to vertices;
[0012] A mapping unit, configured to perform vertex mapping on the target clothing model and the target reference clothing model to obtain a first vertex mapping relationship;
[0013] A weight configuration unit, configured to perform at least one vertex weight configuration on the target clothing model based on the first vertex mapping relationship and the weight configuration file.
[0014] A parameter configuration unit, configured to perform clothing material parameter configuration on the target clothing model based on the clothing material configuration file until the binding process of the target clothing model is completed.
[0015] In a third aspect, an embodiment of the present application further provides an electronic device, including a memory storing multiple instructions; a processor loads the instructions from the memory to execute the steps of any clothing model processing method provided by the embodiments of the present application.
[0016] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, which stores multiple instructions, and the instructions are suitable for being loaded by a processor to execute the steps of any clothing model processing method provided by the embodiments of the present application.
[0017] In a fifth aspect, an embodiment of the present application further provides a computer program product, including a computer program or instructions, and when the computer program or instructions are executed by a processor, the steps in any clothing model processing method provided by the embodiments of the present application are implemented.
[0018] By adopting the solution of the application embodiment, a target clothing model to be subjected to a binding process and a template file of a target reference clothing model corresponding to the target clothing model can be obtained, where the template file includes a clothing material configuration file of the target reference clothing model and at least one weight configuration file corresponding to vertices; perform vertex mapping on the target clothing model and the target reference clothing model to obtain a first vertex mapping relationship; perform at least one vertex weight configuration on the target clothing model based on the first vertex mapping relationship and the weight configuration file; perform clothing material parameter configuration on the target clothing model based on the clothing material configuration file until the binding process of the target clothing model is completed. Thus, based on the template file, the information of the already bound reference clothing model can be reused on the target clothing model to be bound, realizing the automatic binding of the target clothing model, reducing the human resources required in the clothing asset production process, and improving the production efficiency. Description of the Drawings
[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for description in the embodiments. Obviously, the following drawings are only some embodiments of the present application. For those skilled in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0020] Figure 1It is a schematic flowchart of an embodiment of the clothing model processing method provided in the embodiments of the present application;
[0021] Figure 2 It is a schematic diagram of a clothing model provided in the embodiments of the present application;
[0022] Figure 3 It is a schematic diagram of the template file provided in the embodiments of the present application;
[0023] Figure 4 It is a schematic diagram of the interface of the L0 tool provided in the embodiments of the present application;
[0024] Figure 5 It is a schematic diagram of a clothing model provided in the embodiments of the present application;
[0025] Figure 6 It is another schematic diagram of a clothing model provided in the embodiments of the present application;
[0026] Figure 7 It is a schematic diagram of the vertex mapping of the sub-model of the clothing model provided in the embodiments of the present application;
[0027] Figure 8 It is a schematic diagram of the interface of the weight mapping tool provided in the embodiments of the present application;
[0028] Figure 9 It is a schematic diagram of the skinning weights of the refined mesh vertices provided in the embodiments of the present application;
[0029] Figure 10 It is provided in the embodiments of the present application for Figure 9 A schematic diagram of the skinning weight screening in;
[0030] Figure 11 It is provided in the embodiments of the present application for Figure 10 A schematic diagram of clustering the skinning weights in;
[0031] Figure 12 It is provided in the embodiments of the present application for Figure 11 A schematic diagram of weighting the selected skinning weights in;
[0032] Figure 13 It is provided in the embodiments of the present application for Figure 12 A schematic diagram of the weights obtained after normalizing the processed skinning weights in;
[0033] Figure 14 It is a schematic diagram of the comparison of the subdivided clothing models obtained by different subdivision algorithms provided in the embodiments of the present application;
[0034] Figure 15 It is a schematic diagram of the interface of the automatic assembly tool provided in the embodiments of the present application;
[0035] Figure 16 It is a schematic diagram of the interface of the automatic fabric type detection tool provided in the embodiment of the present application;
[0036] Figure 17 It is a schematic diagram after configuring the collision body for the role model in the embodiment of the present application;
[0037] Figure 18 It is a schematic diagram of the parameter storage method of the collision body provided in the embodiment of the present application;
[0038] Figure 19 It is a schematic diagram of the interface of the collision body template tool in the editing mode provided in the embodiment of the present application;
[0039] Figure 20 It is a schematic diagram of the interface of the collision body mirroring tool in the standard mode provided in the embodiment of the present application;
[0040] Figure 21(a) is a schematic diagram of a node in the collision body mirroring tool provided in the embodiment of the present application;
[0041] Figure 21(b) is a schematic diagram of a node in the collision body mirroring tool provided in the embodiment of the present application;
[0042] Figure 21(c) is a schematic diagram of a node in the collision body mirroring tool provided in the embodiment of the present application;
[0043] Figure 21(d) is a schematic diagram of the connection line between nodes in the collision body mirroring tool provided in the embodiment of the present application;
[0044] Figure 21(e) is a schematic diagram of the connection line between nodes in the collision body mirroring tool provided in the embodiment of the present application;
[0045] Figure 21(f) is a schematic diagram of the connection line between nodes in the collision body mirroring tool provided in the embodiment of the present application;
[0046] Figure 22 It is a schematic diagram of the interface of the collision body mirroring tool provided in the embodiment of the present application;
[0047] Figure 23 It is a schematic diagram of the mirror image relationship of the collision body of the role model in the embodiment of the present application;
[0048] Figure 24 It is a schematic diagram of the interface of the fabric physical parameter transfer tool provided in the embodiment of the present application;
[0049] Figure 25 It is a schematic diagram of the interface of the physical parameter self-check tool provided in the embodiment of the present application;
[0050] Figure 26It is a schematic diagram of the interface of the collision body self-check tool provided in the embodiments of the present application;
[0051] Figure 27 It is a schematic diagram of the interface of the FBX topology check tool provided in the embodiments of the present application;
[0052] Figure 28 It is a schematic flowchart of an embodiment of a clothing model processing device provided in the embodiments of the present application;
[0053] Figure 29 It is a schematic diagram of the structure of an electronic device provided in the embodiments of the present application. Detailed implementation manners
[0054] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative efforts belong to the scope of protection of the present application. At the same time, in the description of the embodiments of the present application, terms such as "first" and "second" are only used for distinguishing descriptions and cannot be understood as indicating or implying relative importance. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more features. In the description of the embodiments of the present application, "a plurality of" means two or more, unless otherwise specifically defined.
[0055] The embodiments of the present application provide a clothing model processing method, device, electronic device, and computer-readable storage medium.
[0056] Specifically, this embodiment will be described from the perspective of the clothing model processing device. The clothing model processing device can be specifically integrated in an electronic device, that is, the clothing model processing method in the embodiments of the present application can be executed by the electronic device. Optionally, the electronic device can be a terminal device with data processing capabilities. Among them, the terminal device can be a mobile phone, a tablet computer, a smart Bluetooth device, a laptop computer, a game console, or a personal computer (PC), etc.
[0057] Optionally, the electronic device can also be a server. The server can be an independent server or a server network or server cluster composed of servers, including but not limited to a computer, a network host, a single network server, a set of multiple network servers, or a cloud server composed of multiple servers. Among them, the cloud server is composed of a large number of computers or network servers based on cloud computing (CloudComputing).
[0058] The clothing model processing method provided by the embodiments of the present application can be applied to a clothing model processing system. Among them, the clothing model processing system may include a terminal device and a server. The terminal can be a device that includes both receiving and transmitting hardware, that is, a device with receiving and transmitting hardware capable of performing two-way communication on a two-way communication link. The terminal device and the server can perform two-way communication through a network.
[0059] Optionally, the clothing model processing method of the present disclosure can be implemented through a binding system (or called a binding tool). The binding system can be partially set on the terminal device and partially set on the server, and the functions provided by the binding system can be realized through the two-way communication between the terminal device and the server.
[0060] The following will be described in detail with reference to the accompanying drawings respectively. In this embodiment, the execution entity is taken as the terminal device. It should be noted that the description order of the following embodiments does not limit the preferred order of the embodiments. Although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order from that shown in the drawings.
[0061] For ease of understanding, the following is a brief introduction to the clothing production process in game development in this application:
[0062] Optionally, the clothing production process in game development includes multiple steps such as original design, 3D modeling, binding, material texturing, animation production, and physical simulation.
[0063] ① Original Design is the first step in clothing production. In this step, it is necessary to design according to factors such as the style and theme of the game, as well as the character image and personality of the character, determine the overall style and characteristics of the clothing, and produce a preliminary concept sketch;
[0064] ② After completing the concept design, 3D modeling is required to produce a 3D model of the clothing. In this step, it is necessary to use digital content creation software (DCC) to model according to the concept sketch and produce models of various parts of the clothing;
[0065] ③ After completing 3D modeling, it is necessary to perform material texturing on the clothing. This step is to make the clothing look more realistic and delicate. Developers need to use image editing software to produce textures, apply the textures to various parts of the clothing, and set the properties of the clothing material, such as reflectivity, roughness, transparency, etc.;
[0066] ④Bind the fashion model. This refers to binding the skeletal system to the model vertices so that each part of the clothing can perform skeletal animation. Generally, skeletal binding needs to be carried out in DCC. Developers need to add bones to the model, set the hierarchical structure of the bones, and assign a certain weight value to each joint to determine the action effect and deformation degree of this part when the bones move;
[0067] ⑤Finally, animate the fashion model or perform physics simulation. Animating means that after binding the bones of the clothing, key frames of the bones in each action are made to complete the animation. This kind of animation does not interact with the environment; Physics simulation is a program simulation technology that simulates the physical properties and movements of clothing materials (such as fabrics) based on solving physical formulas by the program. The clothing materials made by this method can interact with the environment in real time and are more realistic. Usually, in the game, only one of manual animation or program physics simulation for the fabric is required to ensure that the rendering effect and physical effect in the game can be displayed normally, but both can also be used.
[0068] If physics simulation is selected, then usually developers also need to set the physical parameters of the clothing. The physical parameters include but are not limited to: parameters such as the stiffness, weight, stretchability of the fabric.
[0069] In an example, the scope of clothing model binding can be extended as needed. For example, clothing model binding can also include making the collider of the game character, setting the collision detection parameters of the fabric, etc.
[0070] The fashion binding workflow mentioned in the present invention refers to the set of all art asset development steps that need to be bound and made by artists determined based on the specific game development technology selection. In an example, it can include: skeletal binding, weight assignment, physical parameter setting, collider production, collision detection parameter setting, and effect debugging.
[0071] In the related technology, for each fashion binding process, designers need to switch and process in different software. For example, in the binding link, after receiving the fashion model completed by upstream modeling, the designer first needs to perform skeletal binding and skinning weight painting of the fashion model in the DCC software; then import various assets into the engine and manually assemble the fashion and character models, paint the weights of the physics cloth, establish the mapping relationship between the deform cloth and the physics cloth, set various physical parameters of the cloth, and make the collider, etc. in turn. Therefore, the binding process is cumbersome in manual operation and there is a lot of repetitive labor.
[0072] Among them, the wrapping cloth refers to the clothing model to be bound, and the physical cloth refers to when the clothing structure is relatively complex, a proxy model with a relatively simple structure will be made as the physical cloth. The physical cloth will actually participate in the cloth simulation to generate physical animations in real time and can interact with the scene. Since the time-consuming of the physical simulation of the cloth is directly related to the number of vertices of the model, calculating the physical animation based on the simplified model helps to reduce the consumption of hardware performance and make the animation smoother. After that, the calculation results of the physical cloth are transmitted to the wrapping cloth (referring to the original clothing model) through the mapping relationship to display the animation results. See the appendix Figure 2 , what is shown in the mesh is the physical cloth, and the rest is the wrapping cloth. In the game, the physical animation of the fashion skirt will be calculated based on the physical cloth and then transmitted to the wrapping cloth.
[0073] In the actual game, in order to minimize the intersection of the physical cloth calculation with the character's body, the bone binding of the fashion made by the artist will also be bound, and a set of manually made cloth animations will be made based on the bones. The weight of the manually made cloth animation will be increased at the positions where the weight of the physical simulation of the cloth is small. Interpolating between the physical animation and the manual animation can effectively reduce the cloth intersection and improve the visual effect.
[0074] Based on the deficiencies in the related technologies, the present invention proposes a method for processing clothing models, aiming to reduce the repetitive labor in the traditional binding process and improve the production and iteration efficiency of game fashion assets; please refer to Figure 1 , the specific process of the method for processing clothing models can be as follows in steps 101 to 104, where:
[0075] Step 101: Obtain the target clothing model to be bound and the template file of the target reference clothing model corresponding to the target clothing model. Among them, the template file includes the clothing material configuration file of the target reference clothing model and at least one weight configuration file corresponding to the vertices;
[0076] In this embodiment, a binding tool is provided for the user. This tool can be installed on the terminal device, and through this tool, various components can be provided for the user to use to complete the binding process.
[0077] In the present disclosure, the idea of the Level-of-Details (LOD) model in graphics rendering technology is pioneered and applied to the art asset workflow design. LOD is a technology for improving rendering efficiency. It can adjust the detail level of the model according to the distance and perspective between the observer and the 3D model to achieve better performance and higher rendering efficiency. A model with LOD usually contains multiple different precision levels, and each level has its own geometry and texture map. From the low level to the high level, the details of the model gradually increase, but at the same time, the corresponding resource consumption will also gradually increase.
[0078] Returning to garment binding, there are actually many commonalities in the designs of most new and old garments. For example, many garments can be divided into three parts: the body main part, the cuffs, and the skirt. According to the applicant's experience, in many cases, perhaps only the cuffs and the skirt need to perform physical cloth simulation, while the model of the body main part does not. Therefore, the applicant thought of mapping the information (such as various weights and physical parameters, etc.) set for the old fashion during the binding process to the new fashion according to the garment parts, so as to quickly provide a draft for the binding artist. For the binding artist to enter the game for testing and then trim the problematic parts.
[0079] Based on the above core idea, this application provides a binding tool that provides a hierarchical iterative garment binding workflow (HIGB). Based on this tool, the target clothing model can be quickly bound first, and then the binding artist can enter the game to test the target clothing model, and then use this tool to perform detailed trimming on the problematic parts.
[0080] Optionally, in this disclosure, the binding process of the target clothing model is divided into multiple sub-processes, and a lowest-level binding component (subdivision tool) is set for each sub-process in the binding tool, which is used to complete the corresponding sub-process when triggered by the user.
[0081] Optionally, the binding tool also provides a one-key binding function, which is implemented through a first-level binding component.
[0082] In one instance, the lowest-level binding component can be directly configured under the first-level binding component. In another example, an intermediate-level binding tool can also be set. For example, the subdivision tools in the binding process merge the tool functions step by step in three levels, namely the first-level binding component, the second-level binding component, and the third-level binding component (subdivision tool).
[0083] When in use, first, the first-level binding component will extract the commonalities between the new clothing and the existing clothing, map various information such as the weights, bindings, and physical parameters of the existing clothing to the new clothing based on the template file, and quickly obtain the bound new clothing for the binding artist to self-check; if there are deficiencies, the artist will then refine it based on the next-level subdivision tool, realizing the layer-by-layer operation of the clothing model from macro to detail. If it is found that the clothing effect has reached the standard in a certain level, the editing can be directly ended and the binding result can be quickly obtained.
[0084] In the present disclosure, a templated design is also introduced into the binding system, and various types of information such as the weights, bindings, and physical parameters of existing clothing are stored as template files in independent CSV or JSON formats (or any other feasible file format). When a new fashion item needs to be bound, the corresponding parts of the new and old fashion items can be matched according to the sub-model name, and then the data recorded in the template file is mapped from the old fashion item to the new fashion item; the data mapping for different parts is divided into two cases:
[0085] a) Data that can be directly applied, such as various physical parameters of the fabric;
[0086] b) Data that needs to establish a mapping relationship before it can be applied, such as the weight data of each vertex of the fabric. For this type of data, we first calculate the mapping relationship of the corresponding vertices in the two fashion items based on the t-FFD (free-form deformation by using triangular mesh) algorithm, and then transfer the data.
[0087] In the present disclosure, the first, second, and third-level binding components described above are designed based on the idea of call path compression. Commonly used existing tools are made into buttons, shortcut menus, etc. to compress the call path of the tools to improve efficiency; for example, if there is an existing tool that needs to be called through 5 levels of secondary menus, at this time, we directly make this function an independent button that can be directly accessed on a tool panel, and the 5 search processes can be compressed into 1 time, improving the call efficiency.
[0088] In one example, obtaining the target clothing model to be bound and the template file of the target reference clothing model corresponding to the target clothing model includes:
[0089] Obtaining the target clothing model to be bound and the template file of the target reference clothing model corresponding to the target clothing model through the first-level binding component;
[0090] The method further includes:
[0091] Receiving a one-key binding trigger operation for the first-level binding component, starting the binding process for the target clothing model until the binding process is completed, and obtaining the bound target clothing model.
[0092] In an optional example, the structure of the template file is as shown in the appendix Figure 3As shown, the Character Template (L0 tool, i.e., the first-level binding component) is a complete character template that indexes all intermediate step-by-step templates (L1 tools, i.e., the second-level binding components). At the same time, each L0 template comes with a preview image (Thumbnail) for easy preview when the binding artist is searching; the L1 template will index the fashion assets on the right (L2 tools, i.e., the third-level binding components), including the fashion models from upstream, the character skeletons, and the fashion skin binding data, physical fabric weight data, etc. generated during the binding process. Over time, the cloud will gradually form a fashion template database, which will continuously accelerate the fashion binding efficiency.
[0093] In this embodiment, at least two second-level binding components are provided under the first-level binding component, and at least two third-level binding components are provided under each second-level binding component. One third-level binding component corresponds to one sub-process; wherein, the second-level binding component can be operated independently by the user to re-perform the sub-process of the third-level binding component under the second-level binding component on the target clothing model that has completed the binding; the third-level binding component can be operated independently by the user to re-perform the corresponding sub-process on the target clothing model that has completed the binding.
[0094] The following combines the attached Figure 4 to illustrate the L0 one-key mapping tool.
[0095] The L0 one-key mapping tool can complete the model assembly, fabric physical weight mapping, wrapping weight generation, physical parameter setting, collision body generation, parameter self-check of the target clothing model at one key according to the data recorded in the template file, and automatically generate a high-precision version of the subdivided fashion assets; the implementation method of the L0 tool is to automatically call all L1 tools in sequence.
[0096] Optionally, see Figure 4 , this interface diagram is the interface diagram of the L0 tool. The user can select the target clothing model to be processed through this interface, and set the address information of the template file of the target reference clothing model through this interface (the template file can come from the cloud or local, and this embodiment has no restrictions). Among them, clicking the Figure 4 button A shown can load the template file stored in the cloud or local folder; clicking the Figure 4 button B shown can manually refresh the template file (for the case where the template file fails to load or is updated again midway after being loaded); clicking the Figure 4 button C shown can map the data recorded in the template file to the currently selected target clothing model in sequence.
[0097] Optionally, after obtaining the target clothing model to be bound and the template file of the target reference clothing model corresponding to the target clothing model through the first-level binding component, the following steps are further included:
[0098] Based on the template file of the target reference clothing model, display the rendering preview screen of the target reference clothing model through the terminal device.
[0099] For example, after clicking Figure 4 the button A as shown to load the template file, the preview image of the target reference clothing model of the current template will be displayed on the interface, and the loading status of each template will be prompted. If the template cannot be found or there is a problem during the loading process, specific error information will be prompted on the interface and the button C will be disabled. For example, if the template cannot be found, it will prompt "Template not found + specific template file name"; if there is an error in template reading, it will prompt "Template loading error + specific template file name".
[0100] Step 102: Perform vertex mapping on the target clothing model and the target reference clothing model to obtain the first vertex mapping relationship;
[0101] Step 103: Based on the first vertex mapping relationship and the weight configuration file, perform at least one vertex weight configuration on the target clothing model;
[0102] For the convenience of understanding the present disclosure, an exemplary introduction to the setting of the L1-level tool is given here. It can be understood that the number of L1 tools and the number and functions of the L2 tools included therein can be set as needed, and this embodiment has no limitation on this.
[0103] As follows, an optional exemplary setting of the L1 tool and the L2 tool is given in this embodiment.
[0104] L1) Step-by-step automation tool
[0105] The L1 distributed automation tool also follows the path compression design principle. Optionally, in one example, the fashion binding process is divided into 5 major stages: the DCC stage, the assembly stage, the cloth production stage, the collision body production stage, and the self-check stage. Each stage records the binding operations to be performed through the corresponding template file. When the user uses it, they only need to pick up the template file path, and then click the button after selecting the target asset file or the fashion model in the scene to complete all the binding work of this stage with one click; the implementation method of the L1 tool is to automatically call the associated L2 tools in sequence.
[0106] L1) The step-by-step automation tool includes:
[0107] ① DCC tool
[0108] The DCC stage provides two subdivision tools: the weight mapping tool and the fashion model automatic subdivision tool. The weight mapping tool can provide the weight mapping function. In one example, the weight mapping tool can map the skin weights, that is, map the skin weights of the old fashion model to the new fashion. The fashion model automatic subdivision tool is used to generate a high-precision subdivided fashion model.
[0109] For the specific implementation methods of the two tools, see Sections ①-② of the L2 tool below. The DCC stage encapsulates the usage processes of these two tools. Users can load the Skin Weight Template (sub-model configuration template), and this template file determines which sub-models in the target clothing model need to have their weights mapped or be subdivided without manual selection.
[0110] Optionally, the Skin Weight Template is a csv (Comma Separated Value) file that records which sub-models of which clothing parts in the clothing model need to have their weights mapped or be subdivided. Its file structure is shown in Table 1.
[0111] Table 1 Skin Weight Template file structure
[0112]
[0113]
[0114] In the present disclosure, for a clothing model, the sub-models of the same part have the same name. For example, for two pieces of clothing, the sub-model of the sleeve can be named body_body_sleeve. Thus, the Skin Weight Template file can indicate the sub-model parts of the new clothing model to which the template file is applied that need to have their weights mapped by recording the sub-model names and the corresponding identifiers indicating whether to map the weights.
[0115] It can be understood that if there are multiple types of weights to be mapped by the weight mapping tool, these multiple mappings can use the same Skin Weight Template file, or a corresponding Skin Weight Template can be defined for each mapping. This embodiment has no limitation on this.
[0116] ② Assembly tool
[0117] In the assembly stage, three sub-tools are provided: the automatic model assembly tool, the automatic model material creation tool, and the automatic fabric type detection tool, which are used to automatically assemble the character model and clothing model from the upstream, automatically add textures and materials to the clothing model, and finally add a Cloth Solver or Wrap Solver to different types of fabrics.
[0118] The specific implementation methods of the three tools are shown in Sections ③ - ⑤ of the L2 tool below. The assembly tool encapsulates the usage processes of these three tools, and users can load the Type Template shown in Table 2 with one key to complete the call of the three tools. TypeTemplate is a composite template, and the ones with colons before and after are template type tags, which are used to mark the start of different types of data.
[0119] In the fabric type template of Table 2, the first column records the fabric type, and the second column records the regular expression. The automatic fabric type detection tool will match each sub-model name in the fashion model one by one based on the recorded regular expression and mark the fabric type.
[0120] Table 2 Type Template file structure
[0121]
[0122]
[0123] ③ Fabric production tools
[0124] In the fabric production stage, three tools are provided: the fabric physical parameter transfer tool, the weight mapping tool (used for the transfer of physical fabric weights), and the wrapped fabric weight generation tool. The fabric physical parameter transfer tool is used to transfer the fabric physical parameters of the old fashion to the new fashion. The weight mapping tool is used to transfer the physical fabric weights of the old fashion to the physical fabric of the new fashion. The wrapped fabric weight generation tool is used to generate weight information for the wrapped fabric of the new fashion (the wrapped fabric weight is used to indicate the movement range of the vertices of the new clothing model, such as the movement radius).
[0125] The specific implementation methods of the three tools are shown in Section ① and Sections ⑧ - ⑨ of the L2 tool below. The fabric production tool encapsulates the usage processes of these three tools, and the terminal device can load the Physics Data BorrowTemplate shown in Table 3 and the Wrap Template shown in Table 4 with one key to complete the call of the three tools.
[0126] Table 3 Physics Data Borrow Template file structure
[0127]
[0128] Table 4 Wrap Template File Structure
[0129]
[0130]
[0131] ④ Collider Production Tools
[0132] Two tools are provided in the collider production stage: the collider template tool and the collider mirror tool.
[0133] For the specific implementation methods of the two tools, see Sections ⑥ - ⑦ of the L2 tool below. The collider production tool at the L1 level only calls the collider template tool, which can add spherical and capsule colliders for the physical simulation of fashion based on the Collider Template shown in Table 5.
[0134] Table 5 Collider Template File Structure
[0135]
[0136] Among them, the capsule colliders are recorded in the :Connections: column. Each capsule collider is composed of two spherical colliders. Therefore, each capsule collider recorded in :Connections: only contains a set of numbered data, respectively recording the numbers of the two spherical colliders in the :Nodes: column that are referenced.
[0137] When adding colliders to the character model of the clothing model, since each spherical collider will reference a bone, directly match the corresponding bone based on the bone name and add the spherical collider at the template bone position; for the capsule collider, which is linked by two spherical colliders, link them according to the corresponding relationship recorded in the table after adding the spherical colliders. For example, the starting ID and ending ID recorded in the 9th row of the table are 0 and 1, indicating that this capsule is composed of two spherical colliders with the bones named 'Bip001 Head' and 'Bone_Neck' as the centers of the spheres.
[0138] ⑤ Self - check Tools
[0139] Three tools are provided in the self - check stage: the physical parameter self - check tool, the collider self - check tool, and the FBX
[0140] Topology check tool, which is used to perform checks before submitting the completed fashion assets. If incorrect parameter configurations are found, submission will be rejected until the problems are fixed.
[0141] The specific implementation methods of the three tools are shown in the last three sections of the L2 tool below. ValidateTemplate shown in Table 6 is used for the physical parameter self-check tool. The first column in the table is the physical parameter name, the second column is the parameter type, 0 represents integer type, 1 represents floating-point type, and 2 represents switch. Both integer and floating-point data record the minimum and maximum values respectively, and the switch only records two states, 0 and 1, representing the switch off and on respectively.
[0142] Table 6 Validate Template (Detection Template) file structure
[0143]
[0144]
[0145] The following is an introduction to the L2) point-to-point automation tool.
[0146] The L2 automation tool is the most detailed point-to-point tool, and the design intention of each tool is aimed at a specific requirement point. The L2 tool enables all fabric problems entering this level to be solved, and at the same time, the efficiency of solving problems can be higher than the working efficiency of manual operation without tools. For the tools at the L2 level, each tool has a corresponding window page, which can provide data viewing and user interaction functions. Through the user interaction function, the generation of the template file corresponding to the tool can be realized, or the tool can be used to solve the problems of the target clothing model under the sub-process corresponding to the tool.
[0147] The L2 tool can include:
[0148] ① Weight mapping tool
[0149] The weight mapping tool can be used for both the transfer of skinning weights and the transfer of physical fabric weights. In an optional example, the sub-processes in the binding process can include the skinning weight binding sub-process and the physical fabric weight transfer sub-process, and these two sub-processes can be realized through the weight mapping tool.
[0150] It can be understood that in an example, the weight mapping tool of this proposal can be split into multiple weight mapping tools according to the number of mapped weight types, and each weight mapping tool can map one kind of weight.
[0151] The following introduces the skinning weight binding sub-process, which includes Step 102 - Step 103.
[0152] It can be understood that certain clothing parts in the reference clothing model may be specially customized and not those typically set in the clothing model, such as streamers. If the sub-model names of the clothing for which mapping is to be performed are not restricted, it may occur that the sub-models on the target reference clothing model do not have corresponding sub-models on the target clothing model. To improve the accuracy of the weight mapping of the common clothing parts between the target clothing model and the target reference clothing model, optionally, the template file of the present disclosure further includes a sub-model configuration template, and the sub-model configuration template includes the sub-model names of the target reference clothing model and first indication information indicating whether weight mapping is to be performed on the sub-model (see Table 1 above);
[0153] Optionally, the step of "performing vertex mapping on the target clothing model and the target reference clothing model to obtain a first vertex mapping relationship" may include: determining the target sub-model names that need to perform weight mapping according to the sub-model configuration template; matching the sub-models with the same target sub-model names in the target reference clothing model and the target clothing model; performing vertex mapping on the matched sub-models with the same name to obtain the first vertex mapping relationship between the sub-models with the same name in the target reference clothing model and the target clothing model.
[0154] It can be understood that in the different weight mapping sub-processes implemented by the weight mapping tool, the same sub-model configuration template (i.e., Table 1) can be used for different weights, or personalized sub-model configuration templates can be set for different weights (the different personalized sub-model configuration templates can be the same or different), and the applicant has no restrictions on this.
[0155] In one example, the weight configuration file includes skinning weight binding information;
[0156] Optionally, the detailed steps of step 103 in the skinning weight binding sub-process may include:
[0157] Based on the skinning weight binding information, determining the bones bound to each vertex of the target reference clothing model and the first skinning weight corresponding to the bones;
[0158] Based on the first vertex mapping relationship, and the bones bound to each vertex of the target reference clothing model and the first skinning weight corresponding to the bones, binding bones to the vertices of the target clothing model and setting the second skinning weight corresponding to the bones bound to the vertices of the target clothing model.
[0159] In this embodiment, the skin weight binding information may include the bones bound to each vertex of the target reference clothing model and the first skin weights corresponding to the bones, or the skin weight binding information may include the binding relationship between the target reference clothing model and the bones and the identification information of the storage file of the first skin weights of the bones. Based on this identification information, the bones bound to each vertex of the target reference clothing model and the first skin weights corresponding to the bones can be obtained. The present application has no limitation on this.
[0160] The physical fabric weight transfer sub - process of this embodiment includes steps 102 - 103. The target clothing model includes a first clothing model body and a first proxy model corresponding to the first clothing model body. The weight configuration file includes: the second physical fabric weights of each vertex of the second proxy model of the target reference clothing model, where the second physical fabric weights are used to indicate the movement radius of the vertices on the second proxy model. The first proxy model includes a simplified model of at least one sub - model of the first clothing model body, and the second proxy model includes a simplified model of at least one sub - model of the second clothing model body. For example, referring to Figure 2 , Figure 2 the mesh model on the clothing model in [reference] is the proxy model (of the lower - body skirt of the clothing), and the other parts are the body of the clothing model.
[0161] Among them, the refinement steps of step 103 in the physical fabric weight transfer sub - process may include: determining the vertex mapping coefficient when the vertices of the second proxy model are mapped to the vertices of the first proxy model based on the first vertex mapping relationship between the first proxy model and the second proxy model; and performing a weighting process on the second physical fabric weights of the vertices of the second proxy model corresponding to the vertices of the first proxy model based on the vertex mapping coefficient to obtain the first physical fabric weights of the vertices of the first proxy model.
[0162] Optionally, the weighting process includes but is not limited to weighted summation.
[0163] Optionally, in this embodiment, when the weight data of the target reference clothing needs to be applied to the target clothing model, first, the corresponding sub - models can be matched according to the fabric name (or sub - model identifier, such as sub - model name, etc.), and then the first mapping relationship of the corresponding vertices in the two sets of fashion models is calculated based on the t - FFD (free - form deformation by using triangular mesh) algorithm, as shown in the appendix Figure 7 The weights of the physical fabric vertices in the new fashion model are the weighted summation of the weights of the physical fabric vertices in the existing fashion model.
[0164] For example, taking the first proxy model as A1 and the second proxy model as B1, A1-1 represents point 1 on the first proxy model, and B1-1, 2, 3 represent points 1, 2, and 3 on the second proxy model. Assuming that in the first vertex mapping relationship, the points mapped to point A1-1 are B1-1, 2, 3, then after mapping, B1-1, 2, 3 each have a vertex mapping coefficient k1, k2, k3, respectively representing the influence degree of B1-1, 2, 3 on A1-1. If the second physical fabric weights of B1-1, 2, 3 are n1, n2, n3 respectively, then in one example, the first physical fabric weight of A1-1 is n1*k1 + n2*k2 + n3*k3.
[0165] Taking the weight transfer of fashion physical fabrics as an example again: For Figure 5 and Figure 6 two sets of fashion models with similar structures, the physical fabric weights in Figure 6 can be stored vertex by vertex as a weight file in JSON format; the format of the weight file includes information such as weightList, xList, yList, zList, type, name, etc. weightList records the weight value of the current vertex; xList, yList, zList are used to record the coordinates of the corresponding vertex, and the vertex coordinates will be used to map the weight value to other fashion models; type is used to distinguish whether the current fabric is a physical fabric or a wrapping fabric, and name indicates the sub-model name corresponding to the weight file.
[0166] It can be understood that the weights in this embodiment, such as skinning weights and physical fabric weights, can both store the weights of vertices in the above weight file format. In the weight file of skinning weights, weightList records the skinning weight value of the current vertex, and in the weight file of physical fabric weights, weightList records the physical fabric weight value of the current vertex.
[0167] Optionally, the interface design of this tool can be referred to Figure 8 as shown. When the user clicks button A, the tool will automatically search for all sub-models on the selected target clothing model that can perform weight mapping according to the first indication information of the sub-model configuration template, and automatically match the sub-models in the target reference clothing model by name, and display the available operations in the list; the user can click the "Re-map" button in column B to perform the weight mapping operation for each sub-model.
[0168] ② Fashion model automatic subdivision tool
[0169] In this embodiment, the fashion model automatic subdivision tool is used to automatically subdivide the fashion model and weights after the production of low-precision fashion assets for the mobile version of the game is completed, so as to generate a set of high-precision fashion assets for the PC version of the game. Optionally, after the binding process of the target clothing model is completed in this embodiment, the fashion model automatic subdivision tool can automatically perform model subdivision to obtain a higher-precision model.
[0170] In one example, both the input and output of this tool are FBX files. The tool can also provide a subdivision button. After this subdivision button is operated, the tool can generate a high-precision subdivision model for the selected clothing model. For example, when using it, the user first selects an FBX model file of a clothing model in the game engine, and clicks the subdivision button provided on the window page of the tool to complete the subdivision with one click. The FBX file of the high-precision model after subdivision will automatically add the suffix "_subdivide" and be stored in the same path as the FBX model of the clothing model. In an optional example, this path can also be customized through the tool.
[0171] In addition, since current games increasingly focus on cross-platform compatibility, that is, the game can run on different platforms (including but not limited to IOS, Android, PC, and console), and players on different platforms can communicate with each other. Cross-platform compatibility allows players on different platforms to gather in the same game community, increasing the number of users and interactivity of the game, but it will cause the in-game art assets to not be universal. For example, due to the small screen and insufficient processor performance of mobile devices (such as mobile phones and tablets), low-precision art assets are usually used; while the PC usually has a larger screen and sufficient performance. If the art assets of the mobile device are directly used on the PC, the problem of insufficient details will be exposed, and the physical simulation of the fashion will appear very rigid, which is very obvious when viewed on a large screen. Therefore, a set of independent high-precision assets are required for the PC. However, if another set of assets is manually produced, various weight information and physical parameters need to be manually reallocated. At this time, it is necessary to rely on the model subdivision algorithm to automatically generate high-precision assets to improve production efficiency. The number of skin weights of the subdivision vertices obtained by the existing model subdivision algorithm will be much greater than 4. Simply discarding small weights will cause the skin to be uneven when the skeleton moves, and the fashion surface will tear.
[0172] The present disclosure intends to propose an automatic fashion model subdivision algorithm with limited skin weights (Automatic Mesh Subdivision Algorithm with Limited Skin Weights, MSwLW), which greatly improves the skin weight subdivision effect of the existing algorithm, so that the high-precision fashion after subdivision can obtain a smooth skinning animation result in the game engine without additional manual processing.
[0173] In this example, the subprocess in the binding process may include a model subdivision subprocess.
[0174] Optionally, in this embodiment, the model subdivision subprocess may include: performing mesh subdivision processing on the target clothing model to obtain a subdivided clothing model; determining the bones bound to the vertices on the subdivided clothing model and the skinning weights of each bone in the target clothing model based on the vertex correspondence between the subdivided clothing model and the target clothing model; for each vertex on the subdivided clothing model, if the number of bones bound to the vertex is not less than a preset number, clustering the skinning weights of the multiple bones bound to the vertex based on the hierarchical distance of the bones to obtain multiple weight clusters; determining the preset number of skinning weights arranged in the front as the currently selected weights; based on the weight clusters with the currently selected weight number of 0 and the currently selected weights, reselecting the preset number of currently selected weights from the weight clusters; and obtaining the target skinning weights of the bones corresponding to the currently selected weights in the subdivided clothing model based on the currently selected weights.
[0175] Furthermore, the currently selected weights of the multiple bones bound to the same vertex may be normalized to obtain the target skinning weights of the bones bound to the vertex in the subdivided clothing model.
[0176] In this embodiment, the preset number can be set according to actual needs. In one example, the preset number may be the maximum number of bones that a vertex can bind.
[0177] Optionally, clustering the skinning weights of the multiple bones bound to the vertex based on the hierarchical distance of the bones to obtain multiple weight clusters includes, but is not limited to: traversing the bone weights of the multiple bones bound to the same vertex, adding the first traversed bone weight to a weight cluster, continuing the traversal, and if the hierarchical distance between the traversed bone weight and the bone weight in an existing weight cluster does not exceed a preset bone hierarchical distance (this distance can be set according to actual needs, for example, set to 3), adding the traversed bone weight to the existing weight cluster, otherwise adding the bone weight to a new weight cluster.
[0178] In one example, the weight rotation method may be used for reselecting weights. That is, the step of reselecting the preset number of currently selected weights from the weight clusters based on the weight clusters with the currently selected weight number of 0 and the currently selected weights may include:
[0179] If there is a target weight cluster with the currently selected weight number of 0 in the weight clusters, selecting the maximum skinning weight from the target weight cluster;
[0180] Replace the minimum value in the current selected weights with the maximum skin weight. If the number of current selected weights in the weight cluster is 0, return the target weight cluster, and select the maximum skin weight from the target weight cluster until all weight clusters are traversed or the maximum number of iterations is reached.
[0181] The following combines Figure 9 - 14 Illustrate the selection process of the skin weights of the vertices of the subdivision model by way of example:
[0182] The main innovation of MSwLW is to introduce the concept of "clustering" into skin weight subdivision. The main algorithm process includes the following steps:
[0183] See Figure 9 , a large triangle is subdivided into four small triangles. The points with numerical marks are bone points, and the numerical values represent the skin weights of the bones for the subdivision vertices.
[0184] Step A: When the number of skin weights of the mesh subdivision points is greater than 4, they can be sorted by weight size first, and the top four weights are determined as the initial current selected weights;
[0185] For example, Figure 10 , the left 4 weights are retained. It can be understood that Step A can also be carried out after Step B, and this example has no restrictions on this.
[0186] Step B: Based on the DBSCAN (Density-Based Spatial Clustering of Applications with Noise) algorithm, cluster the bones according to the hierarchical distance. Each "cluster" is an island, and a weight sum (Island Weight, IW) is calculated for each island;
[0187] Here we use the hierarchical distance between bones for clustering, which is different from the traditional DBSCAN; given a hierarchical threshold, for example, given a hierarchical distance threshold of 3, and then there are 4 bones, where bone C is a sub-bone of bone B, bone B is a sub-bone of bone A, and bone D is independent. At this time, the hierarchical distance from bone C to bone A is 2, and the distance from bone B to A is 1, then bones ABC are clustered into one category, and bone D is in a separate category.
[0188] For example, see Figure 11 , three islands are clustered, namely island1, island2, and island3.
[0189] Step C, perform weight rotation, try to make each island retain at least one weight, the weight retained in each weight rotation is the maximum value of all currently unselected weights (i.e., weights other than the currently selected weights) in the island, when the number of retained weights (the currently selected weights determined) has reached 4, the weight selected in the weight rotation will replace the smallest one among the retained weights (the currently selected weights in the previous text), and repeat this step until the loop end condition is reached. Optionally, the loop end condition includes but is not limited to: traversing all islands or reaching the maximum number of iterations, and then scaling the selected skin weights in the island according to the IW of each island;
[0190] For example, see Figure 12 After the weight rotation is completed, each currently selected weight is weighted based on the weight sum of the weight cluster to which it belongs, that is, the currently selected weight is multiplied by the IW of the cluster to which it belongs to obtain a new currently selected weight.
[0191] Step D: Finally, perform weight normalization again to obtain the result. After verification on various types of clothing assets, the above method can obtain smooth skin weight subdivision results when the number of weights is limited.
[0192] Normalize the currently selected weights obtained after step E to obtain the target skin weights of the bones bound to the vertices in the subdivided clothing model. For example, see Figure 13 , Figure 13 The weight in is Figure 12 The scaled and normalized skin weights of the selected 4 skin vertices.
[0193] See also Figure 14 , Figure 14 The middle right picture is a comparison of the segmentation results when the skirt rotates under the segmentation algorithm in this example. The left picture is the traditional algorithm, which directly discards the segmentation results obtained by small weights.
[0194] In one example, some sub-models in the clothing model may not need to be subdivided. In order to reduce the resource consumption of model subdivision, the sub-model configuration template may also include: second indication information indicating whether the sub-model is to be subdivided (see Table 1); wherein, the sub-model names of each fashion asset in the game are the same, and will be directly matched according to the "sub-model name" recorded in Table 1. Models with the same name will then decide whether to map weights and whether to subdivide based on the information recorded in the second and third columns; for example, for the piece of cloth "body_body", according to the recorded information True, it means that weight mapping is required and subdivision is also required.
[0195] Optionally, perform mesh subdivision processing on the target clothing model to obtain a subdivided clothing model, which may include: determining a sub-model that needs mesh subdivision in the target clothing model based on the second indication information, and only performing mesh subdivision on the sub-model that needs mesh subdivision in the target clothing model, without performing mesh subdivision on other sub-models.
[0196] ③ Automatic model assembly tool
[0197] The interface design of the automatic assembly tool is as shown in the appendix Figure 15 shown. Based on the asset paths recorded in Table 2 template, the user first clicks button A, and the assembly tool will automatically load the sub-models of each part of the virtual character model in the corresponding directory; then click button B to assemble the sub-models of the parts into a complete character and fashion asset.
[0198] In one example, the virtual character model can be a character model that has been assembled onto the target reference clothing model, or a virtual character model that needs to be selected from a local file or a cloud file according to the situation. This example has no restrictions on this.
[0199] Optionally, the sub-process further includes a character assembly sub-process: including: obtaining the character model corresponding to the target clothing model; assembling the character model onto the target clothing model. Optionally, Table 2 also records the path information of the character model bound to the target reference clothing model, and the character model can be obtained according to this path information for binding.
[0200] Step 104, based on the clothing material configuration file, configure the clothing material parameters for the target clothing model until the binding process of the target clothing model is completed.
[0201] In this embodiment, the L2 peer-to-peer tool further includes:
[0202] ④ Automatic fabric type detection tool
[0203] The interface design of the automatic fabric type detection tool is as shown in the appendix Figure 16 shown. After entering the page, the user clicks button A to load the fabric type template in the template file (see Table 2); in the fabric type template of Table 2, the first column records the fabric type, and the second column records the regular expression. The automatic fabric type detection tool will match and mark the fabric type one by one for the sub-model names in the target clothing model (on the model body and the proxy model) based on the recorded regular expression. It can be understood that the fabric type of the sub-model on the model body is wrapping fabric, and the fabric type of the sub-model on the proxy model is physical fabric.
[0204] Still referring to Figure 16, click button C, and different types of fabrics will automatically add different solvers: physical fabrics will add a cloth solver, and wrapped fabrics will add a wrap solver. The cloth solver calculates information such as the forces and velocities of each vertex of the model every frame based on XPBD to form a physical animation; the wrapped fabric "copies" the physical animation from the physical fabric based on the wrapping weights of each vertex between the wrapped model and the proxy model. At the final rendering, the physical fabric will be hidden and only the wrapped fabric will be visible.
[0205] Optionally, the fabric type detection tool at the L2 level also provides a function to manually add various types of solvers, which is located in Figure 16 area D. In one example, the terminal device can display a preview screen of the target clothing model, and the user can click on the preview screen to select a sub-model on the model. After selecting the sub-model, then click the Figure 16 solver addition button provided in area D to add the corresponding solver to the sub-model, but the user needs to judge by himself whether the solver type matches the fabric type. The number of solver addition buttons can be multiple, corresponding to different types of solvers.
[0206] Correspondingly, the sub-process in the binding process can also include a solver addition sub-process. The template file also includes the sub-model type determination information (i.e., the fabric type template), and the sub-model type determination information is used to judge whether the sub-model on the clothing model belongs to the clothing model body or the corresponding proxy model;
[0207] Before configuring the clothing material parameters for the target reference clothing model based on the clothing material configuration file, the following solver addition sub-process is also included:
[0208] Based on the sub-model type determination information, determine the sub-models in the target clothing model that belong to the first clothing model body and the sub-models that belong to the first proxy model;
[0209] Add a wrap solver to the sub-models that belong to the first clothing model body, and add a cloth solver to the sub-models that belong to the first proxy model.
[0210] ⑤ Automatic model material creation tool
[0211] For the interface design of the automatic material creation tool, reference can also be made to Figure 16As shown below. First, the user clicks button A to load the asset path template; then clicks button B, and the tool will automatically search for the textures corresponding to the names of each clothing sub-model in the texture directory based on the asset paths recorded in Table 2 template, create materials (the material names correspond to the sub-models, with the suffix "_mat" added), apply the textures to the materials, and then apply the materials to the sub-models corresponding to the target clothing model.
[0212] That is, in this example, the sub-process in the binding process may include: a material creation sub-process. The clothing material configuration file in this application may include a Type Template file, which records the storage paths of the texture information and material information of the target reference clothing model. Based on the clothing material configuration file, configure the clothing material parameters for the target clothing model. Configuring the clothing material parameters for the target clothing model includes:
[0213] According to the storage paths of the texture information and material information, obtain the sub-model texture information and sub-model material information of the target reference clothing model. Among them, the sub-model texture information and sub-model material information include sub-model identifiers;
[0214] According to the sub-model identifiers in the sub-model texture information and sub-model material information, determine the sub-model texture information and sub-model material information to be applied to the sub-models in the target clothing model, and perform material settings on the sub-models in the target clothing model based on the determined sub-model texture information and sub-model material information.
[0215] Optionally, the path information can be a local path or a storage path in a cloud storage system, and there is no restriction on this.
[0216] ⑥ Collider Template Tool
[0217] In physical simulation, a collider is usually regarded as a shape. It can be parameterizable or non-parameterizable. Colliders are used to detect whether collisions occur between objects and calculate the rebound force and movement trajectory after the collision, etc.
[0218] Among them, parameterizable means that the shape can be directly described by a set of mathematical formulas, such as: sphere, capsule, cuboid, etc.; while non-parameterizable means a complex shape that cannot be directly described by a formula, such as: human body. Non-parameterizable shapes are usually discretized into a finite number of triangular patches for description, and each triangular patch needs to be calculated for collision detection in turn.
[0219] In cloth simulation, the cloth needs to collide with the character's body. Therefore, collision bodies also need to be created for the character's body during the binding phase. Since directly using the triangular mesh of the character's body model has too many polygons, and the game is a real-time application that must have a sufficiently high frame rate, in order to speed up the calculation, we will use several parametric collision bodies to roughly build the shape of the character's body, as Figure 17 shown.
[0220] The collision bodies used in this disclosure include but are not limited to two types: sphere and capsule. Both collision bodies are parametric collision bodies, and their storage methods are as Figure 18 shown. The sphere collision bodies are stored in area A, and the main parameters they contain are: the name of the referenced bone, the radius, and the displacement. Each sphere collision body will reference a character body bone as the origin of the sphere collision body, and the actual position of the sphere collision body is the position obtained by adding the displacement vector to the position of the referenced bone. Taking the collision body at the chin position as an example, there is no bone named "chin" in the character skeleton (the same is true for the hands, there is only a bone at the wrist, and no bone at the fingertips), only the "head" bone. Therefore, two vertically distributed collision bodies can only be created based on the "head" bone. The upper collision body corresponds to the head, and the lower collision body is obtained by adding displacement based on the head bone.
[0221] Figure 18 In, the capsule collision bodies are stored in area B. Each capsule collision body consists of two sphere collision bodies. Therefore, each capsule collision body recorded in area B only contains a set of numbered data, which respectively record the numbers of the two sphere collision bodies referenced in area A.
[0222] Optionally, in this application, the template file further includes a collision body parameter template file, which includes the bones referenced by the first type of collision body of the target reference clothing model and the collision body generation parameters of the bones, as well as the association relationship between the second type of collision body and the first type of collision body of the target reference clothing model. Optionally, the first type of collision body is a sphere collision body, and the second type of collision body is a capsule collision body.
[0223] Optionally, the sub-process in the binding process further includes: a collision body setting sub-process. This sub-process includes:
[0224] Generating the first type of collision body for the character model of the target clothing model based on the bones referenced by the first type of collision body and the collision body generation parameters of the bones, as well as the bones bound to the target clothing model;
[0225] Generating the second type of collision body for the character model of the target clothing model based on the association relationship between the second type of collision body and the first type of collision body.
[0226] Optionally, referring to signing form 5, the collider generation parameters include but are not limited to: collider radius, X, Y, and Z coordinates of the displacement of the collider, and so on.
[0227] In one example, the collider template tool also provides a function for generating collider templates, which can be interacted with by the user to generate collider templates. Its interface design is as Figure 19 shown, and it is a node-based editor. Among them, the nodes represent spherical colliders, and the connections represent capsule colliders.
[0228] Among them, both the nodes and the connections have three states: standard, MUTED, and deleted, as Figure 21(a) - Figure 21(f) shown. The collider production tool is divided into an editing mode ( Figure 19 ) and a standard mode ( Figure 20 ). In the editing mode, collider templates can be made; in the standard mode, operations such as adding, deleting, and modifying colliders on the character's body can be performed based on the already-made templates, but the nodes themselves cannot be moved or have their states changed anymore.
[0229] The editing mode can move, add, or delete the "nodes" on the tool interface. A node refers to a small window like that in Figure 21(a). At the same time, the bone name referenced by the collider can also be modified; however, physical parameters such as the bone radius and displacement referenced by the collider cannot be changed. These physical parameters must be edited in the standard mode.
[0230] In the editing mode:
[0231] 1. First, the user clicks the Figure 19 "Add Node" button in, and a spherical collider node can be newly added to the page, and the node can be dragged and placed arbitrarily;
[0232] 2. The user can input a node name for the node, and the node name needs to be the same as the bone name referenced by the spherical collider;
[0233] 3. Between two nodes, the user can respectively click the "Con" button (see the left figure in Figure 21(b)), and a connection can be created between the two nodes, so that a capsule collider composed of two spherical colliders at the head and tail of the connection can be created;
[0234] 4. Click the "-" button on the node (see the left figure in Fig. 21(b)), and the node will enter the MUTED state (see the right figure in Fig. 21(b)). At this time, the node will turn gray but will not be deleted; the node in the MUTED state will not be actually created as a collider when finally using the template; the MUTED state helps the same complete template to be reused among characters with various different structures; for example, for a character without legs, he does not need the leg collider. At this time, there is no need to create a separate template file for him, but directly use the collider template of the complete body, and then mark the leg collider as MUTED.
[0235] 5. When the node is already in the MUTED state, in the editing mode, the node can be completely deleted by further clicking the "X" button (see Fig. 21(c)).
[0236] 6. In the editing mode, a "-" button will appear on the connection line (see Fig. 21(e)). Clicking it can make the connection line enter the MUTED state. At this time, the connection line turns gray but will not be deleted; when using the template, the connection line in the MUTED state will not be actually converted into a capsule collider.
[0237] 7. When the connection line is already in the MUTED state, in the editing mode, the connection line can be completely deleted by further clicking the "X" button (see Fig. 21(f)).
[0238] 8. In the MUTED state, a "+" button will appear for both the node and the connection line in the editing state (for the node, see Fig. 21(c); for the connection line, see Fig. 21(f)). Clicking it can reactivate the node or the connection line to make it enter the standard state.
[0239] After completing the template editing, you can click the "Save Graph" button to save the Collider Template (i.e., the collider parameter template file mentioned above). The template structure is shown in Table 5.
[0240] The Collider Template is a composite template. Below the ":Node:" label is the node data. The first column is the reference bone name of the spherical collider, the second column is the sphere radius, the third column is used to mark whether the current node is in the MUTED state, the third to fifth columns are the sphere displacements, and the last two columns record the placement positions of the nodes in the template; below the ":Connections:" label is the connection line data. The first two columns record the numbers of the starting and ending nodes of the capsule, and the third column records whether the current connection line is in the MUTED state. Click Figure 19 "Load Graph" shown in can load the saved CSV template file.
[0241] In the standard mode of the tool:
[0242] 1. Refer to Figure 20 , the content displayed on the node in the standard mode will become radius and displacement. Adjusting these parameters will directly affect the parameters of the corresponding collision body on the character;
[0243] 2. Refer to Figure 20 and Figure 21(d). In the standard mode, an "H" button will be displayed on the connection line. Clicking the button can highlight the corresponding capsule for easy searching. When the capsule is highlighted, the "H" button will turn green, and when it is not highlighted, the button is yellow.
[0244] ⑦ Collision body mirroring tool
[0245] For the convenience of quickly generating collision bodies, the present disclosure also provides a collision body mirroring tool for generating collision body mirroring with one key.
[0246] The interface design of the collision body mirroring tool is as follows Figure 22 shown. After making the collision body on one side of the character's body, the collision body on the other side can be directly generated through the mirroring tool.
[0247] When in use, the user can select the character or clothing model through the preview screen of the clothing model displayed in the view, and then click the "Mirror L→R" button to mirror the left collision body to the right; click the "Mirror R→L" button to mirror the right collision body to the left.
[0248] Meanwhile, the tool provides a batch mirroring function. Multiple character or fashion models whose collision bodies need to be mirrored can be selected in the list, and then click the button to automatically mirror all collision bodies.
[0249] Optionally, the tool also provides a preview function. Click the Figure 22 "Preview" button in, and the mirroring relationship between the left and right collision bodies (the mirroring relationship is established based on the bone hierarchy) will be displayed in the view. As Figure 23 shown, the arrow points from the replication source to the replication target to avoid errors in the symmetric direction.
[0250] ⑧ Wrapped cloth weight generation tool
[0251] This tool can directly generate the vertex weight mapping between two models based on t-FFD according to the corresponding relationship between the wrapped cloth and the physical cloth recorded in Table 4. Table 4 is part of the template file in this application, and it includes: the second clothing model body of the target reference clothing model and the first corresponding relationship of each sub-model in the second proxy model; for example, the sub-model body_body on the body corresponds to the sub-model body_body_xiuzi_sim on the proxy model.
[0252] In this example, the subprocess in the binding process may include a cloth weight mapping subprocess, which includes: determining a second correspondence between each submodel of the first clothing model ontology and the first proxy model based on the first correspondence;
[0253] Performing submodel vertex mapping between the first clothing model ontology and the first proxy model based on the second correspondence to obtain a second vertex mapping relationship;
[0254] Determining the first wrapped cloth weight of the vertices of the first clothing model ontology based on the second vertex mapping relationship and the first physical cloth weight of the vertices of the first proxy model, where the first wrapped cloth weight is used to indicate the movement range of the vertices of the first clothing model ontology.
[0255] Optionally, the movement range can be characterized by a movement radius.
[0256] ⑨ Cloth Physical Parameter Transfer Tool
[0257] The interface design of the cloth physical parameter transfer tool is as Figure 24 shown. When the user uses this tool alone, first select the character or clothing model, click button C, and the tool will automatically obtain all the submodels with physical solvers on the clothing model and add them to the list in area B.
[0258] In area B, the cloth submodels checked in the first column will have parameter transfer performed; the second column records the physical parameter data source (submodel of the target reference clothing model); the third column records the collision body source (target reference clothing model).
[0259] After completing the configuration in area B, click button E to automatically copy the physical parameters in the target reference clothing model to the target clothing model. Click the "Export Data Template" button in area D to export Physics DataBorrow Template, whose data structure is shown in Table 3. The first column is the submodel name of the reference clothing model, the second column is the source of the physical parameters required for the submodel, and the third column is the collision body source of the submodel. That is, Physics Data BorrowTemplate, as part of the template file, provides the clothing physical parameter addresses of each submodel of the target reference clothing model.
[0260] Click button A to select an existing template file, and then click the "Import Model Data Template" button in area D to load the template data into the tool interface for further operation. It can be understood that in the tools at L0 and L1 levels, the existing template will be automatically loaded and the parameter transfer operation will be directly performed.
[0261] In this example, the subprocesses in the binding process may include: a physical parameter transfer subprocess, which includes: obtaining the physical parameter information of each sub-model of the target reference clothing model based on the address of the clothing physical parameters; and transferring the clothing physical parameter information of each sub-model of the target reference clothing model to the corresponding sub-model of the target clothing model.
[0262] The binding process of this embodiment further includes: a parameter detection subprocess, and the number of parameter detection subprocesses is set as needed. That is, several types of parameter detections are required, and several detection subprocesses can be set.
[0263] For example, after the target clothing model completes the binding process, it further includes:
[0264] Performing at least one preset type of parameter detection based on the information of the target clothing model, where the parameter detection includes physical parameter detection, collision body detection, and model topology detection of the target clothing model;
[0265] If the detection passes, store the information of the target clothing model that has completed the binding;
[0266] If the detection fails, display an error prompt message through the terminal, and the error prompt message is used to prompt the detected error.
[0267] The following is an example of a parameter detection tool in this application, and this example does not limit the number of detections and the setting of detection objects in the L2 point-to-point tool.
[0268] Optionally, see the following example of the detection tool:
[0269] ⑩ Physical parameter self-check tool
[0270] The interface design of the physical parameter self-check tool is as Figure 25 shown. When this tool is used alone by typing, the user first clicks the "Get Blank Template" button in area C, and the tool will automatically obtain all the physical parameters of the physical fabric (proxy model) of the clothing model to be detected, and list the parameter names, parameter types, and parameter ranges in the list in area B.
[0271] Then the user can edit the parameter ranges listed in area B. If the range is 0, it means there is no limit. After setting the range, click the "Export Parameter Template" button to export the Validate Template shown in Table 6, that is, the physical parameter detection template. The first column in the table records the parameter names, the second column records the parameter types, 0 represents integer type, 1 represents floating-point type, and 2 represents switch.
[0272] Finally, click the D button "Perform parameter self-check according to the template" to check whether the physical parameter values correctly fall within the range of the set template, and out-of-bounds parameters will report errors.
[0273] In the tools at L0 and L1 levels, the device will automatically load the existing physical parameter detection template and perform parameter range checks. At the same time, a parameter range check will also be performed when submitting fashion assets.
[0274] 11. Collider self-check tool
[0275] Optionally, the collider self-check tool is integrated into the collider creation tool window, as shown in Figure 26 shown. When using it, the user can first add the fashion sub-model to the Figure 26 list A in the window through the "Add" and "Remove" buttons in area B of Figure 26 . Check the sub-model in list A and then click the Figure 26 button C to perform the collider self-check.
[0276] Optionally, the check items can include: whether the total number of colliders exceeds the standard (too many colliders will cause performance problems), whether the radius of the spherical collider is 0 (useless colliders), and whether the first and last reference numbers of the capsule collider are out of bounds. The check will be automatically performed in the tools at L0 and L1 levels. Optionally, a collider check will also be performed when submitting fashion assets.
[0277] 12. FBX topology check tool
[0278] The interface of the FBX topology check tool is designed as shown in Figure 27 shown. Click the Figure 27 button A in Figure 27 to automatically find all fashion models in the project and list them in the Figure 27 list in area C of
[0279] Click the
[0280] button B in
[0281] to perform the topology check. The check content includes: whether there are problems with the fashion asset references, and whether the topology of the fashion FBX is inconsistent with the data recorded in the cloth solver (used in the case where the original clothing model has been modified upstream after the cloth binding has been completed). Among them, the topology of a 3D model refers to the set of vertex position data, triangle array data, UV data, etc. of the model. Topology inconsistency means that these data have changed. In the tools at L0 and L1 levels, the check will be automatically performed. Optionally, an FBX topology check will also be performed when submitting fashion assets.It can be understood that the L2-level point-to-point tools in this disclosure cover the operations required for the clothing binding process. Therefore, for the non-common parts in new and old clothing, tools in the L2 level can be selected according to specific problems for manual accelerated binding.
[0282] In this application, after one-key binding at the L0 level, the binding artist can enter the game to control the game character to perform various actions to confirm whether the cloth intersects with the game character's limbs. If an intersection occurs, it is necessary to switch to the L1-level tool for fine-tuning. At this time, the binding artist will first check various parameters of the cloth based on the L1 self-check tool, and can determine which specific tool in the L1 level needs to be distributed for re-production according to the error message prompted by the tool check. For example, if the self-check tool prompts that the cloth collision body is too large or too small, it is distributed to the collision body tool for manual repair.
[0283] After the L1 level is repaired, similarly, enter the game again to observe whether the cloth physical simulation effect is correct. At this time, there will usually be no large-area intersections, but there may be some minor intersection problems. At this time, enter the L2 level for fine-tuning. The tools in the L2 level correspond one-to-one with those in the L1 level. The L2-DCC tool corresponds to the L1-DCC tool, the L2-assembly tool corresponds to the L1-assembly tool, the L2-cloth tool corresponds to the L1-cloth production tool, the L2-collision body tool corresponds to the L1-collision body tool, and the L2-self-check tool corresponds to the L1-self-check tool. For example, the position of the minor intersection may be that the physical weight of the cloth is not smooth. At this time, the binding artist must have repaired the weight based on the cloth tool at the L1 level. Next, the corresponding "cloth production tool" at the L2 level will be selected to fine-tune the skinning weight. The specific selection of the three point-to-point tools in the L2 level is determined by the binding artist himself. Taking the skinning weight repair mentioned above as an example, the "weight mapping tool" will be selected to fine-tune the local weight.
[0284] By adopting this application, one-key operation can be realized, the binding process required for automatically binding the clothing template can be carried out, the binding of the clothing model can be completed, manual configuration operations can be reduced, human resource consumption can be reduced, and the production efficiency of clothing assets can be improved.
[0285] Furthermore, L1 and L2 provide more refined tools to further modify the problems that occur after the clothing model is bound.
[0286] This embodiment also provides a clothing model processing device. For example, as Figure 28 shown, the clothing model processing device may include:
[0287] An acquisition unit 2801, configured to acquire a target clothing model to be bound, and a template file of a target reference clothing model corresponding to the target clothing model, where the template file includes a clothing material configuration file of the target reference clothing model and at least one weight configuration file corresponding to vertices;
[0288] A mapping unit 2802, configured to perform vertex mapping on the target clothing model and the target reference clothing model to obtain a first vertex mapping relationship;
[0289] A weight configuration unit 2803, configured to perform at least one vertex weight configuration on the target clothing model based on the first vertex mapping relationship and the weight configuration file;
[0290] A parameter configuration unit 2804, configured to perform clothing material parameter configuration on the target clothing model based on the clothing material configuration file until the binding process of the target clothing model is completed.
[0291] In an optional example, the template file further includes a sub-model configuration template, where the sub-model configuration template includes a sub-model name of the target reference clothing model and first indication information indicating whether weight mapping is performed on the sub-model;
[0292] A mapping unit, configured to determine a target sub-model name that needs to perform weight mapping according to the first indication information; match sub-models with the same target sub-model name in the target reference clothing model and the target clothing model; perform vertex mapping on the matched sub-models with the same name to obtain a first vertex mapping relationship between the sub-models with the same name in the target reference clothing model and the target clothing model.
[0293] In an optional example, the weight configuration file includes skinning weight binding information;
[0294] A weight configuration unit, configured to determine bones bound to each vertex of the target reference clothing model and a first skinning weight corresponding to the bones based on the skinning weight binding information; based on the first vertex mapping relationship, and the bones bound to each vertex of the target reference clothing model and the first skinning weight corresponding to the bones, bind bones to vertices of the target clothing model and set a second skinning weight corresponding to the bound bones.
[0295] In an optional example, the target clothing model includes a first clothing model body and a first proxy model corresponding to the first clothing model body. The weight configuration file includes: the second physical fabric weights of the vertices of the second proxy model of the target reference clothing model, where the proxy model includes a simplified model of at least one sub-model of the clothing model body, and the second physical fabric weight is used to indicate the movement radius of the vertex on the second proxy model;
[0296] A weight configuration unit, configured to determine a vertex mapping coefficient when the vertices of the second proxy model are mapped to the vertices of the first proxy model based on the first vertex mapping relationship between the first proxy model and the second proxy model; and perform a weighting process on the second physical fabric weights of the vertices of the second proxy model corresponding to the vertices of the first proxy model based on the vertex mapping coefficient to obtain the first physical fabric weights of the vertices of the first proxy model.
[0297] In an optional example, the template file further includes: the first corresponding relationship between the second clothing model body of the target reference clothing model and each sub-model in the second proxy model;
[0298] The apparatus further includes: a wrapping fabric weight generation unit, configured to determine a second corresponding relationship between each sub-model of the first clothing model body and the first proxy model based on the first corresponding relationship; perform sub-model vertex mapping between the first clothing model body and the first proxy model based on the second corresponding relationship to obtain a second vertex mapping relationship; and determine the first wrapping fabric weights of the vertices of the first clothing model body based on the second vertex mapping relationship and the first physical fabric weights of the vertices of the first proxy model, where the first wrapping fabric weight is used to indicate the movement range of the vertex of the first clothing model body.
[0299] In an optional example, the template file further includes the sub-model type determination information, where the sub-model type determination information is used to determine whether a sub-model on the clothing model belongs to the clothing model body or the corresponding proxy model;
[0300] The apparatus further includes: a solver processing unit, configured to, before configuring the clothing material parameters of the target reference clothing model based on the clothing material configuration file, determine the sub-models belonging to the first clothing model body and the sub-models belonging to the first proxy model in the target clothing model based on the sub-model type determination information; add a wrapping solver to the sub-models belonging to the first clothing model body, and add a fabric solver to the sub-models belonging to the first proxy model.
[0301] In an optional example, the clothing material profile includes the storage paths of the texture information and material information of the target reference clothing model, and a parameter configuration unit for obtaining the sub-model texture information and sub-model material information of the target reference clothing model according to the storage paths of the texture information and material information, where the sub-model texture information and sub-model material information include sub-model identifiers; matching the sub-model texture information and sub-model material information to be applied to the sub-models in the target clothing model according to the sub-model identifiers in the sub-model texture information and sub-model material information; and performing material setting on the sub-models in the target clothing model based on the determined sub-model texture information and sub-model material information.
[0302] In an optional example, the template file further includes the clothing physical parameter addresses of each sub-model of the target reference clothing model;
[0303] The device further includes a physical parameter transfer unit for, after performing material setting on the sub-models in the target clothing model based on the determined sub-model texture information and sub-model material information, obtaining the physical parameter information of each sub-model of the target reference clothing model based on the clothing physical parameter addresses; and transferring the clothing physical parameter information of each sub-model of the target reference clothing model to the corresponding sub-models of the target clothing model.
[0304] In an optional example, the device further includes: a character assembly unit for obtaining the character model corresponding to the target clothing model; and assembling the character model onto the target clothing model.
[0305] In an optional example, the template file further includes a collider parameter template file, which includes the bones referenced by the first type of colliders of the target reference clothing model and the collider generation parameters of the bones, as well as the association relationship between the second type of colliders and the first type of colliders of the target reference clothing model; the device further includes: a collider setting unit for generating the first type of colliders for the character model of the target clothing model based on the bones referenced by the first type of colliders and the collider generation parameters of the bones, and the bones bound to the target clothing model; and generating the second type of colliders for the character model of the target clothing model based on the association relationship between the second type of colliders and the first type of colliders.
[0306] In an optional example, the device further includes: a subdivision model generation unit, configured to, after completing the binding process of the target clothing model, perform mesh subdivision processing on the target clothing model to obtain a subdivided clothing model; determine the bones bound to the vertices on the subdivided clothing model and the skinning weights of each bone in the target clothing model based on the vertex correspondence between the subdivided clothing model and the target clothing model; for each vertex on the subdivided clothing model, if the number of bones bound to the vertex is not less than a preset number, cluster the skinning weights of the multiple bones bound to the vertex based on the hierarchical distance of the bones to obtain multiple weight clusters; determine the preset number of skinning weights ranked at the front as the currently selected weights; based on the weight clusters with the currently selected weight number being 0 and the currently selected weights, reselect the preset number of currently selected weights from the weight clusters; and obtain the target skinning weights of the bones corresponding to the currently selected weights in the subdivided clothing model based on the currently selected weights.
[0307] In an optional example, the subdivision model generation unit is further configured to perform normalization processing on the currently selected weights of the multiple bones bound to the same vertex to obtain the target skinning weights of the bones bound to the vertex in the subdivided clothing model.
[0308] In an optional example, the subdivision model generation unit is configured to, if there is a target weight cluster with the number of currently selected weights being 0 in the weight clusters, select the maximum skinning weight from the target weight cluster; replace the minimum value in the currently selected weights with the maximum skinning weight, and return to the step of selecting the maximum skinning weight from the target weight cluster if there is a target weight cluster with the number of currently selected weights being 0 in the weight clusters, until all the weight clusters are traversed or the maximum number of iterations is reached.
[0309] In an optional example, the device further includes: a parameter detection unit, configured to, after the target clothing model completes the binding process, perform at least one type of preset parameter detection based on the information of the target clothing model, where the parameter detection includes at least one of physical parameter detection, collision body detection, and model topology detection of the target clothing model; if the detection passes, store the information of the target clothing model that has completed the binding; if the detection fails, display an error prompt message through the terminal, and the error prompt message is used to prompt the detected error.
[0310] In an optional example, the device is applied to a binding system, and the binding system includes a first-level binding component; an acquisition unit, configured to obtain a target clothing model to be subjected to a binding process and a template file of a target reference clothing model corresponding to the target clothing model through the first-level binding component.
[0311] The device further includes: an automation unit, configured to receive a one-key binding trigger operation for the first-level binding component, start the binding process for the target clothing model until the binding process is completed, and obtain the target clothing model with the binding completed.
[0312] In an optional example, the binding process is divided into multiple sub-processes. At least two second-level binding components are provided under the first-level binding component, and at least two third-level binding components are provided under each second-level binding component. One third-level binding component corresponds to one sub-process;
[0313] Among them, the second-level binding component can be operated by the user separately to re-perform the sub-process of the third-level binding component under the second-level binding component for the target clothing model with the binding completed;
[0314] The third-level binding component can be operated by the user separately to re-perform the corresponding sub-process for the target clothing model with the binding completed.
[0315] In an optional example, the device further includes: a preview unit, configured to, after obtaining the target clothing model to be bound and the template file of the target reference clothing model corresponding to the target clothing model through the first-level binding component, display a rendered preview image of the target reference clothing model based on the template file of the target reference clothing model through a terminal device.
[0316] By using the device of this embodiment, one-key operation can be realized, the binding process required for binding the clothing template can be automatically performed, the binding of the clothing model can be completed, manual configuration operations can be reduced, human resource consumption can be reduced, and the production efficiency of clothing assets can be improved.
[0317] Correspondingly, an embodiment of the present application further provides an electronic device. The electronic device can be a terminal, and the terminal can be a terminal device such as a smart phone, a tablet computer, a notebook computer, a touch screen, a game console, a personal computer (PC, Personal Computer), a personal digital assistant (Personal Digital Assistant, PDA), etc. Alternatively, the electronic device can be a server.
[0318] As Figure 29 shown, Figure 29The figure is a schematic structural diagram of an electronic device provided by an embodiment of the present application. The electronic device 2900 includes a processor 2901 having one or more processing cores, a memory 2902 having one or more computer-readable storage media, and a computer program stored on the memory 2902 and executable on the processor. Among them, the processor 2901 is electrically connected to the memory 2902. Those skilled in the art can understand that the structure of the electronic device shown in the figure does not constitute a limitation on the electronic device, and it may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0319] The processor 2901 is the control center of the electronic device 2900, connecting various parts of the entire electronic device 2900 through various interfaces and lines. By running or loading software programs and / or units stored in the memory 2902, and calling data stored in the memory 2902, it executes various functions of the electronic device 2900 and processes data, thereby monitoring the entire electronic device 2900. The processor 2901 can be a central processing unit (CPU), a graphics processing unit (GPU), a network processor (NP), etc., and can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present application.
[0320] In the embodiment of the present application, the processor 2901 in the electronic device 2900 will load the instructions corresponding to the processes of one or more application programs into the memory 2902 according to the following steps, and the processor 2901 will run the application programs stored in the memory 2902 to implement various functions, such as:
[0321] Obtain a target clothing model to be bound, and a template file of a target reference clothing model corresponding to the target clothing model, where the template file includes a clothing material configuration file of the target reference clothing model and at least one weight configuration file corresponding to vertices;
[0322] Perform vertex mapping on the target clothing model and the target reference clothing model to obtain a first vertex mapping relationship;
[0323] Based on the first vertex mapping relationship and the weight configuration file, perform at least one vertex weight configuration on the target clothing model;
[0324] Based on the clothing material configuration file, perform clothing material parameter configuration on the target clothing model until the binding process of the target clothing model is completed.
[0325] For the specific implementation of each of the above operations, reference can be made to the previous embodiments, which will not be elaborated here.
[0326] Optionally, asFigure 29 As shown, the electronic device 2900 further includes: a touch display screen 2903, a radio frequency circuit 2904, an audio circuit 2905, an input unit 2906, and a power supply 2907. Among them, the processor 2901 is electrically connected to the touch display screen 2903, the radio frequency circuit 2904, the audio circuit 2905, the input unit 2906, and the power supply 2907 respectively. Those skilled in the art can understand that Figure 29 the structure of the electronic device shown in does not constitute a limitation on the electronic device, and it may include more or fewer components than shown, or combine some components, or have different component arrangements.
[0327] The touch display screen 2903 can be used to display a graphical user interface and receive operation instructions generated by the user acting on the graphical user interface. The touch display screen 2903 may include a display panel and a touch panel. Among them, the display panel can be used to display information input by the user or information provided to the user, as well as various graphical user interfaces of the electronic device. These graphical user interfaces can be composed of graphics, text, icons, videos, and any combination thereof. Optionally, the display panel can be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc. The touch panel can be used to collect touch operations of the user on or near it (such as operations of the user using a finger, a stylus, or any suitable object or accessory on or near the touch panel), and generate corresponding operation instructions, and the operation instructions execute the corresponding program. Optionally, the touch panel can include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the touch position of the user and detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into touch point coordinates, and then sends it to the processor 2901, and can receive and execute the commands sent by the processor 2901. The touch panel can cover the display panel. When the touch panel detects a touch operation on or near it, it transmits it to the processor 2901 to determine the type of touch event. Subsequently, the processor 2901 provides a corresponding visual output on the display panel according to the type of touch event. In the embodiments of the present application, the touch panel and the display panel can be integrated into the touch display screen 2903 to implement input and output functions. However, in some embodiments, the touch panel and the touch panel can be implemented as two independent components to implement input and output functions. That is, the touch display screen 2903 can also be used as a part of the input unit 2906 to implement the input function.
[0328] The radio frequency circuit 2904 can be used to transmit and receive radio frequency signals to establish wireless communication with a network device or other electronic devices, and transmit and receive signals with the network device or other electronic devices.
[0329] The audio circuit 2905 can be used to provide an audio interface between the user and the electronic device through a speaker and a microphone. The audio circuit 2905 can transmit the electrical signal converted from the received audio data to the speaker, and the speaker converts it into a sound signal for output; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 2905 and then converted into audio data. After the audio data is output to the processor 2901 for processing, it is sent through the radio frequency circuit 2904 to, for example, another electronic device, or the audio data is output to the memory 2902 for further processing. The audio circuit 2905 may also include an earphone jack to provide communication between the peripheral earphone and the electronic device.
[0330] The input unit 2906 can be used to receive input digital, character information or user characteristic information (such as fingerprint, iris, face information, etc.), and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function controls.
[0331] The power supply 2907 is used to supply power to each component of the electronic device 2900. Optionally, the power supply 2907 can be logically connected to the processor 2901 through a power management system, so as to implement functions such as management of charging, discharging, and power consumption management through the power management system. The power supply 2907 may also include any components such as one or more DC or AC power supplies, a recharge system, a power failure detection circuit, a power converter or inverter, and a power status indicator.
[0332] Although Figure 29 not shown in the figure, the electronic device 2900 may also include a camera, a sensor, a Wi-Fi module, a Bluetooth module, etc., which will not be elaborated here.
[0333] In the above embodiments, the descriptions of each embodiment have their own focuses. For the parts not detailed in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0334] Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructions or by controlling relevant hardware through instructions. The instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0335] For this reason, the embodiments of the present application provide a computer-readable storage medium, in which multiple computer programs are stored. The computer programs can be loaded by a processor to execute the steps of the following clothing model processing method:
[0336] Obtain a target clothing model to be bound, and a template file of the target reference clothing model corresponding to the target clothing model, where the template file includes a clothing material configuration file of the target reference clothing model and at least one weight configuration file corresponding to vertices;
[0337] Perform vertex mapping on the target clothing model and the target reference clothing model to obtain a first vertex mapping relationship;
[0338] Based on the first vertex mapping relationship and the weight configuration file, perform at least one vertex weight configuration on the target clothing model;
[0339] Based on the clothing material configuration file, perform clothing material parameter configuration on the target clothing model until the binding process of the target clothing model is completed.
[0340] For the specific implementation of each of the above operations, reference may be made to the previous embodiments and will not be elaborated herein.
[0341] Among them, the computer-readable storage medium may include: read-only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disc, etc.
[0342] Since the computer program stored in the computer-readable storage medium can execute any clothing model processing method provided in the embodiments of the present application, the beneficial effects that can be achieved by any clothing model processing method provided in the embodiments of the present application can be realized. For details, reference may be made to the previous embodiments and will not be elaborated herein.
[0343] According to one aspect of the present application, there is also provided a computer program product or computer program. The computer program product or computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the electronic device executes the methods provided in the various optional implementation manners in the above embodiments.
[0344] In the above embodiments of the clothing model processing device, computer-readable storage medium, electronic device, and computer program product, the descriptions of each embodiment have their own emphases. For parts not detailed in a certain embodiment, reference may be made to the relevant descriptions of other embodiments. Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes and the beneficial effects that can be brought by the above-described clothing model processing device, computer-readable storage medium, computer program product, electronic device, and their corresponding units can refer to the description of the clothing model processing method in the above embodiments, and will not be elaborated herein specifically.
[0345] The above has introduced in detail a method, device, electronic device, computer-readable storage medium, and computer program product for processing a clothing model provided by an embodiment of the present application. Specific examples are used herein to elaborate on the principle and implementation manner of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application; at the same time, for those skilled in the art, according to the idea of the present application, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to the present application.
Claims
1. A method for processing a clothing model, characterized in that Including: Obtain a target clothing model to be bound, and a template file of a target reference clothing model corresponding to the target clothing model, where the template file includes a clothing material configuration file of the target reference clothing model and at least one weight configuration file corresponding to vertices; Perform vertex mapping on the target clothing model and the target reference clothing model to obtain a first vertex mapping relationship; Based on the first vertex mapping relationship and the weight configuration file, perform at least one vertex weight configuration on the target clothing model; Based on the clothing material configuration file, perform clothing material parameter configuration on the target clothing model until the binding process of the target clothing model is completed.
2. The clothing model processing method according to claim 1, wherein, The template file further includes a sub-model configuration template, and the sub-model configuration template includes the sub-model name of the target reference clothing model and first indication information indicating whether weight mapping is performed on the sub-model; The performing vertex mapping on the target clothing model and the target reference clothing model to obtain a first vertex mapping relationship includes: According to the first indication information, determine the target sub-model name that needs to perform weight mapping; Match the sub-models with the same target sub-model name in the target reference clothing model and the target clothing model; Perform vertex mapping on the matched sub-models with the same name to obtain a first vertex mapping relationship between the sub-models with the same name in the target reference clothing model and the target clothing model.
3. The clothing model processing method according to claim 1, characterized in that The weight configuration file includes skinning weight binding information; The performing at least one vertex weight configuration on the target clothing model based on the first vertex mapping relationship and the weight configuration file includes: Based on the skinning weight binding information, determine the bones bound to each vertex of the target reference clothing model and the first skinning weight corresponding to the bones; Based on the first vertex mapping relationship, and the bones bound to each vertex of the target reference clothing model and the first skinning weight corresponding to the bones, bind bones to the vertices of the target clothing model and set the second skinning weight corresponding to the bound bones.
4. The clothing model processing method according to claim 1, characterized in that The target clothing model includes a first clothing model body and a first proxy model corresponding to the first clothing model body, and the weight configuration file includes: the second physical fabric weight of each vertex of the second proxy model of the target reference clothing model, where the proxy model includes a simplified model of at least one sub-model of the clothing model body, and the second physical fabric weight is used to indicate the movement radius of the vertex on the second proxy model; The performing at least one vertex weight configuration on the target clothing model based on the first vertex mapping relationship and the weight configuration file includes: Based on the first vertex mapping relationship between the first proxy model and the second proxy model, determine the vertex mapping coefficient when the vertices of the second proxy model are mapped to the vertices of the first proxy model; Based on the vertex mapping coefficient, perform weighted processing on the second physical fabric weight of the vertex of the second proxy model corresponding to the vertex of the first proxy model to obtain the first physical fabric weight of the vertex of the first proxy model.
5. The clothing model processing method according to claim 4, characterized in that The template file further includes: a first correspondence between the second clothing model body of the target reference clothing model and each sub-model in the second proxy model; The method further includes: Based on the first correspondence, determining a second correspondence between the first clothing model body and each sub-model of the first proxy model; Based on the second correspondence, performing sub-model vertex mapping between the first clothing model body and the first proxy model to obtain a second vertex mapping relationship; Based on the second vertex mapping relationship and the first physical fabric weight of the vertices of the first proxy model, determining the first wrapped fabric weight of the vertices of the first clothing model body, where the first wrapped fabric weight is used to indicate the movement range of the vertices of the first clothing model body.
6. The clothing model processing method according to claim 1, characterized in that The template file further includes sub-model type determination information, which is used to determine whether a sub-model on the clothing model belongs to the clothing model body or the corresponding proxy model; Before configuring the clothing material parameters of the target reference clothing model based on the clothing material configuration file, it further includes: Based on the sub-model type determination information, determining the sub-models that belong to the first clothing model body and the sub-models that belong to the first proxy model in the target clothing model; Adding a wrapping solver to the sub-models that belong to the first clothing model body and adding a fabric solver to the sub-models that belong to the first proxy model.
7. The clothing model processing method according to claim 1, wherein The clothing material configuration file includes the storage paths of the texture information and material information of the target reference clothing model. Configuring the clothing material parameters of the target clothing model based on the clothing material configuration file includes: According to the storage paths of the texture information and material information, obtaining the sub-model texture information and sub-model material information of the target reference clothing model, where the sub-model texture information and sub-model material information include sub-model identifiers; According to the sub-model identifiers in the sub-model texture information and sub-model material information, matching the sub-model texture information and sub-model material information to be applied to the sub-models in the target clothing model; Performing material setting on the sub-models in the target clothing model based on the determined sub-model texture information and sub-model material information.
8. The clothing model processing method according to claim 7, characterized in that, The template file further includes the clothing physical parameter addresses of each sub-model of the target reference clothing model; After performing material setting on the sub-models in the target clothing model based on the determined sub-model texture information and sub-model material information, it further includes: Based on the clothing physical parameter addresses, obtaining the physical parameter information of each sub-model of the target reference clothing model; Transmitting the clothing physical parameter information of each sub-model of the target reference clothing model to the corresponding sub-models of the target clothing model.
9. The clothing model processing method according to claim 1, characterized in that The method further includes: Obtaining the character model corresponding to the target clothing model; Assembling the character model onto the target clothing model.
10. The clothing model processing method according to claim 9, characterized in that, The template file further includes a collider parameter template file, which includes the bones referenced by the first type of colliders of the target reference clothing model and the collider generation parameters of the bones, as well as the association relationship between the second type of colliders and the first type of colliders of the target reference clothing model; The method includes: Based on the bones referenced by the first type of colliders and the collider generation parameters of the bones, as well as the bones bound to the target clothing model, generating the first type of colliders for the character model of the target clothing model; Based on the association relationship between the second type of colliders and the first type of colliders, generating the second type of colliders for the character model of the target clothing model.
11. The clothing model processing method according to claim 1, characterized in that, After completing the binding process of the target clothing model, it further includes: Performing mesh subdivision processing on the target clothing model to obtain a subdivided clothing model; Based on the vertex correspondence relationship between the subdivided clothing model and the target clothing model, determining the bones bound to the vertices on the subdivided clothing model and the skinning weights of each bone in the target clothing model; For each vertex on the subdivided clothing model, if the number of bones bound to the vertex is not less than a preset number, clustering the skinning weights of the multiple bones bound to the vertex based on the hierarchical distance of the bones to obtain multiple weight clusters; Determining the preset number of skinning weights arranged in the front as the currently selected weights; Based on the weight clusters with the currently selected weight number of 0 and the currently selected weights, reselecting the preset number of currently selected weights from the weight clusters; Based on the currently selected weights, obtaining the target skinning weights of the bones corresponding to the currently selected weights in the subdivided clothing model.
12. The clothing model processing method according to claim 11, wherein, The obtaining the target skinning weights of the bones corresponding to the currently selected weights in the subdivided clothing model based on the currently selected weights includes: Performing normalization processing on the currently selected weights of the multiple bones bound to the same vertex to obtain the target skinning weights of the bones bound to the vertex in the subdivided clothing model.
13. The clothing model processing method according to claim 11, characterized in that, The reselecting the preset number of currently selected weights from the weight clusters based on the weight clusters with the currently selected weight number of 0 and the currently selected weights includes: If there is a target weight cluster with the number of currently selected weights of 0 in the weight clusters, selecting the maximum skinning weight from the target weight cluster; Using the maximum skinning weight to replace the minimum value in the currently selected weights, and returning to the step of selecting the maximum skinning weight from the target weight cluster if there is a target weight cluster with the number of currently selected weights of 0 in the weight clusters until all weight clusters are traversed or the maximum number of iterations is reached.
14. The clothing model processing method according to claim 1, wherein After the target clothing model completes the binding process, it further includes: Based on the information of the target clothing model, performing at least one type of preset parameter detection, where the parameter detection includes at least one of physical parameter detection, collider detection, and model topology detection of the target clothing model; If the detection is passed, storing the information of the target clothing model that has completed the binding; If the detection fails, an error prompt message is displayed through the terminal, and the error prompt message is used to prompt the detected error.
15. The method for processing a clothing model according to any one of claims 1-14, characterized in that, The method is applied to a binding system, and the binding system includes a first-level binding component; The obtaining of the target clothing model to be bound and the template file of the target reference clothing model corresponding to the target clothing model includes: Obtaining the target clothing model to be bound and the template file of the target reference clothing model corresponding to the target clothing model through the first-level binding component; The method further includes: Receiving a one-key binding trigger operation for the first-level binding component, starting the binding process for the target clothing model until the binding process is completed, and obtaining the bound target clothing model.
16. The clothing model processing method according to claim 15, characterized in that, The binding process is divided into multiple sub-processes. At least two second-level binding components are provided under the first-level binding component, and at least two third-level binding components are provided under each second-level binding component. One third-level binding component corresponds to one sub-process; Among them, the second-level binding component can be operated by the user separately to re-perform the sub-process of the third-level binding component under the second-level binding component on the bound target clothing model; The third-level binding component can be operated by the user separately to re-perform the corresponding sub-process on the bound target clothing model.
17. The clothing model processing method according to claim 15, characterized in that, After obtaining the target clothing model to be bound and the template file of the target reference clothing model corresponding to the target clothing model through the first-level binding component, it further includes: Based on the template file of the target reference clothing model, a rendering preview screen of the target reference clothing model is displayed through the terminal device.
18. A clothing model processing device, characterized in that, Including: An obtaining unit, configured to obtain the target clothing model to be bound and the template file of the target reference clothing model corresponding to the target clothing model, where the template file includes the clothing material configuration file of the target reference clothing model and at least one weight configuration file corresponding to the vertices; A mapping unit, configured to perform vertex mapping on the target clothing model and the target reference clothing model to obtain a first vertex mapping relationship; A weight configuration unit, configured to perform at least one vertex weight configuration on the target clothing model based on the first vertex mapping relationship and the weight configuration file; A parameter configuration unit, configured to perform clothing material parameter configuration on the target clothing model based on the clothing material configuration file until the binding process of the target clothing model is completed.
19. An electronic device, characterized in that, It includes a processor and a memory, and the memory stores multiple instructions; the processor loads the instructions from the memory to execute the steps of the clothing model processing method according to any one of claims 1 to 17.
20. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores multiple instructions, and the instructions are suitable for being loaded by the processor to execute the steps of the clothing model processing method according to any one of claims 1 to 17.
Citation Information
Cited By
Method and device for determining calculation complexity of animation resources, computer equipment, medium and program product
CN121564152A
A method and device for determining the computational complexity of an animation resource, a computer device, a medium and a program product
CN121564152B