A method, apparatus, storage medium, and electronic device for adapting virtual character clothing.

By using a target processing network for feature reasoning and cross-region matching, the problems of low efficiency and insufficient deformation accuracy in virtual character clothing binding are solved, achieving efficient and controllable clothing adaptation effects, which are suitable for industrial mass production.

CN123118995APending Publication Date: 2026-11-17HUNAN HAPPLY SUNSHINE INTERACTIVE ENTERTAINMENT MEDIA CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611627124.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-21
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

Existing technologies for virtual character clothing binding suffer from problems such as low efficiency, insufficient standardization, lack of semantic awareness, stiff deformation effects, and poor controllability, making it difficult to achieve clothing mesh adaptation that balances automation efficiency and deformation accuracy.

Method used

Feature reasoning is performed through a target processing network to obtain semantic partitioning information and physical attribute parameters. Cross-regional matching relationships are used to partition and geometrically deform the clothing mesh data. The deformed clothing mesh data is then corrected by combining semantic partitioning information and physical attribute parameters to achieve matching between clothing and character meshes.

Benefits of technology

It achieves interpretable and controllable character costume wearing effects while ensuring automated processing efficiency, avoiding pattern damage and movement tearing, and is suitable for industrial mass production scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123118995A_ABST
    Figure CN123118995A_ABST
Patent Text Reader

Abstract

This invention provides a method, apparatus, storage medium, and electronic device for virtual character clothing adaptation, applied in the field of character simulation technology. After performing feature inference on character mesh data and clothing mesh data, this invention utilizes semantic partitioning information to partition the clothing, and combines physical attribute parameters to perform differentiated geometric deformation on the vertices of each partition. This allows each clothing partition to achieve a fitting effect based on its own attributes, avoiding the pattern destruction and stiff deformation problems caused by globally uniform parameters. Furthermore, the semantic partitioning information and cross-region matching relationships guide the matching process, ensuring that matching is based on semantic region correspondence rather than spatial distance. This avoids motion tearing and distortion problems caused by matching errors, thus achieving an interpretable and controllable character clothing wearing effect while ensuring automated processing efficiency, and better adapting to industrial mass production scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of virtual character simulation technology, and in particular to a method, apparatus, storage medium, and electronic device for adapting virtual character clothing. Background Technology

[0002] In the field of digital humans, dressing 3D virtual characters and achieving dynamic effects driven by skeletons is one of the core aspects of virtual content creation. Currently, the mainstream methods for dressing and binding digital human clothing can be divided into three categories: manual production solutions, purely geometric automatic algorithm solutions, and purely AI end-to-end generation solutions.

[0003] However, each of the three existing technical solutions has its own insurmountable defects: the manual solution is inefficient and lacks standardization, the pure geometric solution lacks semantic perception and the deformation effect is stiff, and the pure AI solution has poor controllability and is difficult to guarantee accuracy.

[0004] Therefore, there is an urgent need for a clothing mesh adaptation technology solution that can balance automation efficiency and deformation accuracy, while also having the ability to handle regional differences. Summary of the Invention

[0005] In view of the above problems, the present invention provides a method, apparatus, storage medium, and electronic device for adapting virtual character clothing to overcome or at least partially solve the above problems. The technical solution is as follows:

[0006] A method for adapting virtual character clothing includes:

[0007] Obtain character mesh data and clothing mesh data;

[0008] The target processing network is used to perform feature reasoning on the character mesh data and clothing mesh data to obtain semantic partitioning information, physical attribute parameters and cross-region matching relationships;

[0009] Using the semantic partitioning information, the clothing mesh data is divided into multiple clothing partitions;

[0010] For each clothing section, the physical attribute parameters and the cross-region matching relationship are used to perform geometric deformation processing on the vertex coordinates within the clothing section to obtain deformed clothing mesh data that fits the character mesh data;

[0011] The deformed clothing mesh data is corrected using the semantic partitioning information and the physical attribute parameters to obtain corrected clothing mesh data;

[0012] Using the semantic partitioning information and the cross-regional matching relationship, the character mesh data is matched with the corrected clothing mesh data to obtain the finished clothing data.

[0013] Optionally, for each clothing section, using the physical attribute parameters and the cross-region matching relationship, the vertex coordinates within the clothing section are geometrically deformed to obtain deformed clothing mesh data that fits the character mesh data, including:

[0014] For each clothing section, the cross-region matching relationship is used to determine the character function area corresponding to the current clothing section, and the surface position of the character function area is used to generate the basic fitting offset.

[0015] Generate garment pattern offset using the original topology of the current garment partition and the topology under the current deformation state;

[0016] By utilizing the coordinate differences between each vertex within the current clothing partition and its neighboring vertices, a boundary smoothing offset is generated;

[0017] By combining the physical property parameters, the current coordinates of the current vertex are iteratively optimized using the basic fitting offset, the clothing pattern offset, and the boundary smoothing offset to obtain the deformed clothing mesh data that fits the character mesh data.

[0018] Optionally, generating the garment pattern offset using the original topology of the current garment partition and the topology under the current deformation state includes:

[0019] Obtain the original adjacent edge lengths and original triangular face curvatures of each vertex in the current clothing partition before deformation processing;

[0020] Get the current neighbor edge length and current triangle curvature of the current vertex and its neighboring vertices in the current iteration;

[0021] Determine the difference between the current adjacent edge length and the corresponding original adjacent edge length;

[0022] Determine the curvature difference between the current triangular patch curvature and the corresponding original triangular patch curvature;

[0023] The topological feature difference value is obtained by using the difference in side length and the difference in curvature;

[0024] If the topological feature difference value is greater than zero, the retraction direction is determined based on the topological feature difference value, and a garment pattern offset is generated along the retraction direction.

[0025] Optionally, the step of matching the character mesh data with the corrected clothing mesh data using the semantic partitioning information and the cross-regional matching relationship to obtain the finished clothing data includes:

[0026] Based on the semantic partitioning information, the clothing partition to which each vertex in the corrected clothing mesh data belongs is determined, and the rigidity coefficient of each clothing partition is obtained;

[0027] For any vertex, based on the cross-region matching relationship, determine the corresponding character functional region of the vertex on the character mesh data, and obtain the first bone skinning weight of the character functional region; adjust the first bone skinning weight based on the rigidity coefficient of the clothing partition to which the vertex belongs, and obtain the second bone skinning weight; perform global normalization on the second bone skinning weight to obtain the third bone skinning weight; and assign the third bone skinning weight to the vertex.

[0028] The vertices after being assigned skinning weights to the third bone are combined to form the finished garment data.

[0029] Optionally, the step of correcting the deformed clothing mesh data using the semantic partitioning information and the physical attribute parameters to obtain corrected clothing mesh data includes:

[0030] Based on the semantic partitioning information, the clothing partition to which each vertex belongs in the deformed clothing mesh data is determined, and the adaptive gravity weight of each clothing partition is obtained.

[0031] For any of the clothing zones, the adaptive gravity weight of the clothing zone is used to generate the gravity offset of each vertex within the clothing zone; based on the fitting weight coefficient of the clothing zone, the current coordinates of each vertex within the clothing zone and the coordinates of each vertex after adding the gravity offset are processed to obtain the corrected coordinates of each vertex within the clothing zone.

[0032] The corrected coordinates of each vertex within each of the clothing zones are combined to form the corrected clothing mesh data.

[0033] Optionally, the process of obtaining the target processing network includes:

[0034] Obtain multiple character mesh training data and multiple clothing mesh training data, randomly pair each character mesh training data with each clothing mesh training data, and construct multiple sets of paired samples;

[0035] Semantic annotation is performed on the character mesh training data in each paired sample to obtain bone weight annotation data;

[0036] Semantic annotation is performed on the clothing mesh training data in each paired sample to obtain physical attribute annotation data and character-clothing region matching annotation data;

[0037] The labeled paired samples are input into the multi-task processing network, and the multi-task processing network is jointly trained through multiple training tasks.

[0038] The loss value for each task is calculated by pre-set loss function and backpropagated. The target processing network is obtained after the training loss converges.

[0039] Optionally, obtaining the character mesh data and clothing mesh data includes:

[0040] Obtain the original character mesh data and the original clothing mesh data;

[0041] The original character mesh data and the original clothing mesh data are unified to the same three-dimensional world coordinate system, and are unified to the same baseline standing posture and the same size ratio;

[0042] The original character mesh data and the original clothing mesh data after unified processing are cleaned by removing redundant vertices and redundant faces to generate character mesh data and clothing mesh data.

[0043] A virtual character clothing adaptation device includes: a grid data acquisition unit, a data feature reasoning unit, a clothing partitioning unit, a clothing grid data deformation unit, a clothing grid data correction unit, and a finished clothing data acquisition unit;

[0044] The grid data acquisition unit is used to acquire character grid data and clothing grid data;

[0045] The data feature reasoning unit is used to perform feature reasoning on the character mesh data and clothing mesh data using the target processing network to obtain semantic partitioning information, physical attribute parameters and cross-regional matching relationships.

[0046] The clothing partitioning unit is used to divide the clothing grid data into multiple clothing partitions using the semantic partitioning information;

[0047] The clothing mesh data deformation unit is used to perform geometric deformation processing on the vertex coordinates within each clothing partition using the physical attribute parameters and the cross-region matching relationship, so as to obtain deformed clothing mesh data that fits the character mesh data.

[0048] The clothing mesh data correction unit is used to correct the deformed clothing mesh data using the semantic partitioning information and the physical attribute parameters to obtain corrected clothing mesh data.

[0049] The finished garment data acquisition unit is used to match the character mesh data with the corrected garment mesh data using the semantic partitioning information and the cross-regional matching relationship to obtain finished garment data.

[0050] A computer-readable storage medium having a program stored thereon, which, when executed by a processor, implements the virtual character clothing adaptation method.

[0051] An electronic device includes at least one processor, at least one memory connected to the processor, and a bus; wherein the processor and the memory communicate with each other via the bus; the processor is used to call program instructions in the memory to execute the virtual character clothing adaptation method.

[0052] By employing the above technical solutions, this invention provides a virtual character clothing adaptation method, device, storage medium, and electronic device. After performing feature reasoning on character mesh data and clothing mesh data, it utilizes semantic partitioning information to partition the clothing and combines physical attribute parameters to perform differentiated geometric deformation on the vertices of each partition. This allows each clothing partition to achieve a fitting effect based on its own attributes, avoiding the pattern destruction and stiff deformation problems caused by globally uniform parameters. Furthermore, it uses semantic partitioning information and cross-regional matching relationships to guide the matching process, ensuring that matching is based on semantic region correspondence rather than spatial distance. This avoids motion tearing and distortion problems caused by matching errors, thus achieving an interpretable and controllable character clothing wearing effect while ensuring automated processing efficiency, and ultimately better adapting to industrial mass production scenarios.

[0053] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and in order to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description

[0054] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:

[0055] Figure 1 The diagram illustrates a flowchart of one embodiment of the virtual character clothing adaptation method provided in this invention.

[0056] Figure 2 The diagram shows a specific implementation of step S130 in the virtual character clothing adaptation method provided in this embodiment of the invention.

[0057] Figure 3 A schematic diagram of the structure of the virtual character clothing adaptation device provided in an embodiment of the present invention is shown;

[0058] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present invention is shown. Detailed Implementation

[0059] Exemplary embodiments of the invention will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this invention will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.

[0060] like Figure 1 The diagram shows a flowchart of one embodiment of the virtual character clothing adaptation method provided by this invention. The method may include:

[0061] S100: Obtain character mesh data and clothing mesh data.

[0062] Among them, character mesh data refers to a three-dimensional virtual character mesh model that has completed skeletal binding and character functional area division. It includes vertex three-dimensional coordinates, topological patch structure, texture information, and skeletal skinning weights, and is used as the target carrier for clothing wearing.

[0063] Among them, clothing mesh data refers to a three-dimensional clothing mesh model, which includes vertex three-dimensional coordinates, topological patch structure and texture information, but does not include skeletal skinning weights, and is used as a clothing object to be adapted to the character mesh.

[0064] Specifically, embodiments of the present invention can acquire original character mesh data and original clothing mesh data, and perform standardization and mesh cleaning on the original character mesh data and original clothing mesh data respectively to generate character mesh data and clothing mesh data. Furthermore, embodiments of the present invention can collect character mesh data containing different body types such as height, weight, and standard when acquiring original character mesh data from a 3D asset library, using these as input character objects for different body types, so that the target processing network can learn and adapt to characters of various body types.

[0065] As examples, embodiments of the present invention can export a standard body shape virtual character model with completed skeletal rigging and an original unrigged clothing model from the asset library. The two models are then imported into 3D production software, uniformly set to T-pose posture and aligned to the origin of the world coordinate system. After cleaning operations such as removing isolated vertices and overlapping triangles, standardized input data, namely character mesh data and clothing mesh data, are obtained.

[0066] S110. Use the target processing network to perform feature reasoning on character mesh data and clothing mesh data to obtain semantic partitioning information, physical attribute parameters and cross-region matching relationships.

[0067] Semantic partitioning information refers to the semantically labeled data output by the target processing network inference, which may include the functional region partitioning results of the character mesh and the physical attribute region partitioning results of the clothing mesh. The character functional regions may include the shoulder and neck functional region, chest and back functional region, waist and abdomen functional region, upper arm functional region, forearm functional region, thigh functional region, and calf functional region; the clothing physical attribute regions may include rigid fitted regions, flexible tight-fitting regions, draped loose regions, and rigid accessory regions.

[0068] Among them, the physical attribute parameters refer to the numerical parameters output by the target processing network inference, including the rigidity coefficient and the fitting weight coefficient of each clothing area. The rigidity coefficient is used to control the rigidity of the clothing area during the deformation process, and the fitting weight coefficient is used to control the fitting priority between the clothing area and the character surface.

[0069] Among them, cross-regional matching relationship refers to the correspondence data output by the target processing network inference, which is used to represent the one-to-one correspondence between the physical attribute areas of clothing and the functional areas of the role, and restricts clothing areas to be matched and weighted only with the corresponding functional areas of the role.

[0070] Specifically, in this embodiment of the invention, standardized character mesh data and clothing mesh data can be input into a target processing network. The target processing network performs multi-scale feature encoding on the dual mesh data through a shared low-level feature extraction structure, and then performs global contour alignment prediction, human body functional region segmentation of the character mesh, physical attribute region segmentation of the clothing mesh, regression of the rigidity coefficient and fitting weight coefficient of each clothing partition, and establishment of matching relationships between human body functional regions and clothing physical attribute regions in parallel. The target processing network outputs the above multi-task inference results as semantic partitioning information, physical attribute parameters, and cross-region matching relationships. The semantic partitioning information includes the human body functional partition mask of the character mesh and the physical attribute partition mask of the clothing mesh. The physical attribute parameters include the rigidity coefficient and fitting weight coefficient of each clothing partition. The cross-region matching relationship is used to define the one-to-one correspondence between each physical attribute region of the clothing and each human body functional region of the character.

[0071] As examples, the target processing network provided in this embodiment of the invention can automatically segment the character mesh into functional areas such as the shoulder and neck, chest and back, waist and abdomen, upper arm, forearm, thigh, and calf. It can also automatically segment the clothing mesh into a neckline area as a rigid fitting area and a body area as a flexible tight-fitting area. The network outputs a rigidity coefficient of 0.6 and a fitting weight coefficient of 0.8 for the body area, and establishes a matching correspondence between the body area and the functional areas of the character's torso.

[0072] S120. Using semantic partitioning information, the clothing grid data is divided into multiple clothing partitions.

[0073] Among them, clothing partitioning refers to dividing the clothing grid data into multiple independent clothing region units based on the clothing physical attribute region division results in the semantic partitioning information. Each clothing partition has a unified physical attribute type and corresponding rigidity coefficient and fitting weight coefficient.

[0074] Specifically, in this embodiment of the invention, the vertices of the clothing mesh data can be classified according to their physical attribute type based on the physical attribute partition mask of the clothing mesh in the semantic partition information, and divided into multiple clothing partitions. Each clothing partition corresponds to one physical attribute type of rigid fitting area, flexible tight-fitting area, draped loose area and hard accessory area. The vertex sets of different clothing partitions do not overlap, and the vertex sets of all clothing partitions constitute complete clothing mesh data.

[0075] As examples, for a dress garment mesh, embodiments of the present invention can classify the vertices of the mesh into a rigid neckline partition, a flexible upper body partition, and a loose skirt partition based on the index value of the physical attribute partition mask in the semantic partition information, with each partition being separated by a partition boundary marker.

[0076] S130. For each clothing section, use physical attribute parameters and cross-region matching relationships to perform geometric deformation processing on the vertex coordinates within the clothing section to obtain deformed clothing mesh data that fits the character mesh data.

[0077] Vertex coordinates refer to the position data of each vertex in the clothing mesh data in three-dimensional space. They are used for geometric transformation and position update during deformation processing, so that the clothing mesh gradually fits the character mesh surface from the initial state.

[0078] Among them, the deformed clothing mesh data refers to the three-dimensional mesh data obtained after the clothing mesh data has undergone geometric deformation processing. Its vertex coordinates have been optimized by multi-vector iterative superposition of basic fitting offset, clothing pattern offset and boundary smoothing offset to achieve fitting with the character mesh.

[0079] Specifically, in this embodiment of the invention, three types of offsets can be generated for each clothing section: a fitting adjustment amount based on the positional relationship of the corresponding character's functional area, a pattern protection amount based on the difference between the original shape and the current deformed shape, and a boundary smoothing amount based on the relative positional relationship between vertices and neighboring vertices. After assigning and superimposing weights to the three types of offsets according to physical property parameters, the vertex coordinates are iteratively updated until convergence, resulting in the deformed clothing mesh data.

[0080] As examples, for the skirt section of a dress, embodiments of the present invention can determine the thigh functional area corresponding to the skirt section based on the cross-region matching relationship, and then project each vertex of the skirt onto the curved surface of the thigh functional area to generate a fitting adjustment amount; when the current side length of a skirt vertex exceeds the original side length due to stretching during iteration, a pattern protection amount that converges to the original length is generated for reverse correction; the coordinate difference between each vertex in the skirt section and its neighboring vertices is used to generate a boundary smoothing amount to eliminate jagged edges on the mesh boundary; and the vertex coordinates are iteratively updated after assigning different superposition weights to the above three types of offsets based on the rigidity coefficient in the physical property parameters until the displacement of all vertices is less than a preset threshold, and the skirt mesh and the thigh area are fitted together.

[0081] S140. Use semantic partitioning information and physical attribute parameters to correct the deformed clothing mesh data to obtain corrected clothing mesh data.

[0082] Among them, the corrected clothing mesh data refers to the three-dimensional mesh data obtained after the deformed clothing mesh data has undergone differential physical correction processing. Its vertex coordinates have been processed by adaptive gravity offset and fit-gravity weighted fusion, which has the effect of natural drape texture and eliminating clipping defects.

[0083] Specifically, in this embodiment of the invention, for each vertex to which the clothing partition belongs, the gravity offset of each vertex is generated according to the physical property parameters of the clothing partition. The current coordinates of each vertex in the clothing partition and the coordinates after superimposing the gravity offset are weighted and fused according to the fitting weight coefficient of the clothing partition to obtain the corrected coordinates of each vertex and combine them to form the corrected clothing mesh data.

[0084] As examples, the skirt section has a large adaptive gravity weight due to its low rigidity coefficient in the physical property parameters. Each vertex droops vertically under the action of the gravity field. The current coordinates and the coordinates after the superimposed gravity offset are then weighted and merged with the fit weight coefficient to form a natural drooping fold effect. The neckline rigid fit section has almost no gravity drooping displacement due to its high rigidity coefficient, maintaining a close fit with the character's neck.

[0085] S150. Using semantic partitioning information and cross-regional matching relationships, match the character mesh data with the corrected clothing mesh data to obtain the finished clothing data.

[0086] Among them, the finished garment data refers to the final output data obtained after the corrected garment mesh data is matched with the skeleton skin weights. Each vertex has been assigned an appropriate skeleton skin weight, which can be directly used for dynamic deformation and motion performance under skeleton drive.

[0087] Specifically, in this embodiment of the invention, for each vertex in the corrected clothing mesh data, the rigidity coefficient of the clothing partition to which the vertex belongs is determined based on semantic partition information, and the corresponding character functional area and corresponding skeletal skinning weight of the vertex in the character mesh data are determined based on cross-region matching relationship; after weighting the skeletal skinning weight according to the rigidity coefficient, global normalization processing is performed, and the normalized skeletal skinning weight is assigned to the vertex, and the finished clothing data is formed by combining all vertices.

[0088] As examples, for a vertex in the skirt area of ​​a dress mesh, this embodiment of the invention can determine its corresponding thigh functional area based on the cross-region matching relationship, obtain the bone skin weight of the thigh functional area, multiply it by the rigidity coefficient of the skirt partition, and then perform global normalization processing, assigning the normalized weight to the vertex; after all vertices in the skirt area have completed the above weighting, they are combined into finished garment data, so that the skirt produces a natural swaying deformation effect with the thigh movement during the character's walking action.

[0089] This invention provides a virtual character clothing adaptation method. After performing feature inference on character mesh data and clothing mesh data, it utilizes semantic partitioning information to partition the clothing. Combined with physical attribute parameters, it applies differentiated geometric deformation to the vertices of each partition, enabling each clothing partition to achieve a fitting effect based on its own attributes. This avoids the pattern destruction and stiff deformation problems caused by globally uniform parameters. Furthermore, it uses semantic partitioning information and cross-regional matching relationships to guide the matching process, ensuring that matching is based on semantic region correspondence rather than spatial distance. This avoids motion tearing and distortion problems caused by matching errors. Thus, while ensuring automated processing efficiency, it achieves an interpretable and controllable character clothing wearing effect, thereby better adapting to industrial mass production scenarios.

[0090] Optionally, in the above Figure 1 Based on one or more corresponding embodiments, in another optional embodiment provided by the present invention, after step S150, the method may further include:

[0091] The finished garment data is connected to the automated data production pipeline. Multiple standard posture character mesh data of different styles or body types are randomly combined with multiple standard posture garment mesh data of different categories or styles. Steps S100 to S150 are executed respectively to generate finished garment data that can be directly driven to deform in batches and output to the target application scenario.

[0092] This invention, through its embodiment, connects to an automated data production pipeline after obtaining finished garment data. It batch-combines multiple character mesh data of different styles or body types with multiple garment mesh data of different categories or styles, enabling the automated production of a large number of finished garment assets that can be directly driven to transform. This solves the problem that traditional manual production methods cannot adapt to the mass production needs of combining massive amounts of clothing with digital humans, and realizes the construction of an industrialized AI content production pipeline.

[0093] Optional, based on Figure 1 The method shown is as follows: Figure 2 The diagram shows a specific implementation of step S130 in the virtual character clothing adaptation method provided in this embodiment of the invention. Step S130 may specifically include:

[0094] S200. For each clothing section, determine the character function area corresponding to the current clothing section using cross-region matching relationship, and generate the basic fitting offset using the curved position of the character function area.

[0095] Among them, the character functional area refers to the human body functional areas divided in the character mesh data according to the skeletal drive range. These areas can include the shoulder and neck functional area, chest and back functional area, waist and abdomen functional area, upper arm functional area, forearm functional area, thigh functional area, and calf functional area. Each area corresponds to a specific skeletal drive range.

[0096] Among them, the surface position refers to the projection position of the clothing partition vertex in the character's functional area. It is the precise projection point coordinate of the clothing vertex on the mesh surface of the character's functional area, and is used to calculate the spatial gap between the clothing vertex and the character's surface.

[0097] Among them, the basic fit offset refers to the displacement of each vertex within the clothing section from its current spatial position to the corresponding projection point coordinates on the mesh surface of the character's functional area. It is used to eliminate the spatial gap between the clothing and the character and achieve a close fit between the areas.

[0098] Specifically, in this embodiment of the invention, for each vertex in the current clothing partition, the corresponding character functional area of ​​the vertex is determined according to the cross-region matching relationship. A ray is emitted from the vertex along the normal direction to the triangular mesh surface of the character functional area. The intersection point of the ray and the triangular mesh surface is calculated as the precise projection point. The spatial coordinates of the precise projection point are subtracted from the spatial coordinates of the current vertex to obtain the difference vector. The difference vector is used as the basic fitting offset of the current vertex. This offset is used to eliminate the spatial gap between the current vertex and the character surface.

[0099] As some examples, for the skirt section in the dress mesh, the embodiments of the present invention can determine the thigh functional area of ​​the character corresponding to the skirt section based on the cross-region matching relationship, and then emit rays from each vertex in the skirt section along its respective normal direction to the triangular mesh surface of the thigh functional area and calculate the intersection point to obtain the accurate projection point of each vertex on the surface of the character's thigh. The coordinates of each projection point are subtracted from the current coordinates of each vertex to obtain the basic fitting offset of each vertex. This offset causes the skirt vertex to move towards the thigh surface to eliminate the spatial gap between the two.

[0100] As other examples, in embodiments of the present invention, the calculation method for the basic bonding offset is expressed as follows:

[0101] ;

[0102] in, The current spatial coordinates of the current vertex; The precise projection coordinates of the point obtained after emitting a ray from the current vertex onto the triangular mesh surface of the character's functional area; This is the base fit offset for the current vertex. This difference vector is used to drive the current vertex to move towards the character's surface to eliminate spatial gaps. This base fit offset is only used to compensate for the original spatial gap between the clothing and the character, and does not produce any active stretching or compression deformation. The offset is only used for fit alignment, ensuring fit accuracy without damaging the original pattern structure of the clothing.

[0103] In this embodiment of the invention, the basic fitting offset is calculated using the above-mentioned difference formula. The basic fitting offset is defined as the difference vector between the coordinates of the projection point and the coordinates of the current vertex. This ensures that the fitting displacement of each vertex is uniquely determined by the spatial gap between it and the character surface, thus guaranteeing the accuracy and interpretability of the fitting process.

[0104] S210. Using the original topology of the current garment partition and the topology under the current deformation state, generate the garment pattern offset.

[0105] The original topology refers to the local geometric measurement relationship between the vertices of the garment section before deformation processing. It can include the side length of the adjacent side of each vertex and the curvature of the triangular facet, which is used as a benchmark for measuring the pattern change during deformation.

[0106] The topology under the current deformation state refers to the local geometric metric relationship between the current vertex and the neighboring vertices of the garment partition in the current iteration. It can include the current side length and current curvature in the current iteration, and is used to compare with the original topology to determine whether the pattern has been distorted.

[0107] Among them, the garment pattern offset refers to the reverse correction displacement generated when the current side length and current curvature of the garment section deviate from their respective original reference values ​​during the deformation process, in order to make the vertices converge to the original reference values, and is used to restore the original garment pattern.

[0108] Specifically, in this embodiment of the invention, for the current vertex, the side lengths of the adjacent edges and the curvature of the triangle facets of the current clothing partition cached before deformation processing can be used as the original topological reference. The original topological reference is compared with the side lengths of the adjacent edges and the curvature of the triangle facets of the current vertex in the current iteration to obtain the topological feature difference value. When the topological feature difference value is greater than zero, the retraction direction is determined according to the topological feature difference value, and the clothing pattern offset is generated along the retraction direction.

[0109] As examples, suppose the original side length between a vertex in a skirt partition and its neighboring vertices is 0.5 units. In a certain iteration, the current side length of this vertex is stretched to 0.7 units, and the current curvature also increases accordingly. The side length difference is 0.2. After weighting, the curvature difference yields a topological feature difference value of 0.15. Since this value is greater than zero, the retraction direction of the vertex towards its original position is determined, and a displacement along this direction is generated as the garment pattern offset, so that the current side length and current curvature regress to their respective original reference values.

[0110] As other examples, in embodiments of the present invention, the calculation method for clothing pattern offset is expressed as follows:

[0111] ;

[0112] in, These are the original position coordinates of the current vertex before deformation processing; The coordinates of the current vertex after deformation in the current iteration; This is the normalization function; The topological feature difference value (obtained by weighted summation of side length error and curvature error); This is the offset of the clothing pattern at the current vertex. This clothing pattern offset is a pure reverse correction vector, which only generates a valid value when there is a distortion error in the mesh. When there is no distortion, this vector returns to zero and does not participate in the deformation superposition, thus mathematically eliminating the problem of pattern stretching distortion.

[0113] S220. Utilize the coordinate differences between each vertex within the current clothing partition and its neighboring vertices to generate a boundary smoothing offset.

[0114] Among them, the boundary smoothing offset refers to the difference between the coordinates of each vertex in the clothing partition and the average coordinates of the neighboring vertices. It is used to make the abrupt vertices converge towards the neighborhood average to eliminate the boundary faults and hard edges of the mesh between adjacent clothing partitions.

[0115] Specifically, in this embodiment of the invention, for each vertex within the current clothing partition, the spatial coordinates of all neighboring vertices within its neighborhood range are obtained, the average of the spatial coordinates of all neighboring vertices is calculated as the neighborhood center coordinates, the spatial coordinates of the current vertex are subtracted from the neighborhood center coordinates to obtain the coordinate difference, and the coordinate difference is used as the boundary smoothing offset, which is used to drive the current vertex to converge towards its neighborhood center.

[0116] As examples, suppose there is a deviation between the coordinates of a vertex on the boundary of a skirt section and the average coordinates of its neighboring vertices. Subtracting the average coordinates of the neighboring vertices from the vertex coordinates yields a difference vector, which serves as a boundary smoothing offset. This offset drives the vertex to converge toward its neighborhood center, thereby eliminating the unevenness and hard edges on the boundary of the section.

[0117] As other examples, in embodiments of the present invention, the boundary smoothing offset is calculated as follows:

[0118] ;

[0119] in, This represents the number of valid vertices in the neighborhood of the current vertex. The current spatial coordinates of the current vertex; Let be the current spatial coordinates of the j-th neighboring vertex; This is the boundary smooth offset of the current vertex.

[0120] S230. Combining physical property parameters, the current coordinates of the current vertex are iteratively optimized using the basic fit offset, clothing pattern offset, and boundary smoothing offset to obtain the deformed clothing mesh data that fits the character mesh data.

[0121] The optimized vertex coordinates refer to the updated coordinate values ​​of the current vertex within the clothing partition after a single iteration of optimization. These coordinates are obtained by superimposing the basic fit offset, clothing pattern offset, and boundary smoothing offset onto the current coordinates, and are used to replace the current vertex coordinates for the next iteration.

[0122] Specifically, in this embodiment of the invention, physical property parameters are combined to iteratively optimize the current coordinates of the current vertex using basic fitting offset, clothing pattern offset, and boundary smoothing offset to obtain optimized vertex coordinates. The iteration is repeated until a preset convergence condition is met to obtain deformed clothing mesh data that fits the character mesh data. The preset convergence condition refers to the termination condition used to determine whether the iteration has ended during the deformation iterative optimization process. It can be that the displacement of all vertices is less than a preset threshold. At this time, the mesh deformation residual converges and stabilizes, the iteration stops, and the deformed clothing mesh data composed of the current vertex coordinates is output.

[0123] Furthermore, in this embodiment of the invention, the current spatial coordinates of the current vertex are superimposed with the basic fitting offset, the clothing pattern offset, and the boundary smoothing offset, respectively. The basic fitting offset is multiplied by the rigidity coefficient in the physical property parameters as the superposition weight; the clothing pattern offset is multiplied by a preset global pattern protection coefficient as the superposition weight; and the boundary smoothing offset is multiplied by the region smoothing convergence coefficient output by the target processing network inference as the superposition weight. The sum of these three weighted offsets is added to the current spatial coordinates to obtain the optimized vertex coordinates of the current vertex. After performing the above optimization operation on all vertices within the current clothing partition, the current vertex coordinates are updated, and the next iteration begins. After each iteration, the sum of the displacements of all vertices is calculated. When the displacements of all vertices are less than a preset threshold, the preset convergence condition is satisfied, the iteration is terminated, and the current vertex coordinates are combined into deformed clothing mesh data.

[0124] As examples, for a vertex in the skirt section, its current coordinates are summed with the base fit offset weighted by the rigidity coefficient, the clothing pattern offset weighted by the global pattern protection coefficient, and the boundary smoothing offset weighted by the smoothing coefficient to obtain the optimized vertex coordinates after a single iteration. The above iteration process is repeated until the single displacement of all vertices is less than a preset threshold to obtain the deformed clothing mesh data of the skirt section fitting the character's thigh area.

[0125] As other examples, in embodiments of the present invention, the calculation method for single-iteration optimization is expressed as follows:

[0126] ;

[0127] in, These are the 3D coordinates of the current vertex of the clothing partition in the current iteration; These are the 3D coordinates of the vertex after a single iteration of optimization. The coefficient of rigidity in the region; Based on the bonding offset; This is the global layout protection factor; This is the offset of the garment pattern; The region smoothing convergence coefficient; This represents the boundary smoothing offset. In this embodiment of the invention, the three types of offsets are weighted and summed to the current vertex coordinates using the aforementioned iterative formula. This ensures that the vertex position in each iteration is simultaneously driven by the fit constraint, the pattern constraint, and the smoothing constraint. These three types of constraints are mathematically decoupled and parallelized, guaranteeing the convergence stability of the iterative process.

[0128] This invention generates a basic fit offset, a garment pattern offset, and a boundary smoothing offset for each garment partition, and performs weighted iterative optimization based on physical property parameters. This allows the three types of offsets to be superimposed in parallel and mutually constrained during the iteration process, while maintaining the continuity of the original pattern structure and mesh topology. This triple hard constraint ensures that the garment fits onto the character's surface while maintaining the continuity of the original pattern structure and mesh topology, avoiding the pattern distortion or insufficient fit caused by a single constraint. This achieves simultaneous optimization of fit accuracy and pattern fidelity.

[0129] Optionally, in the above Figure 2 Based on one or more corresponding embodiments, in another optional embodiment provided by the present invention, step S210 may specifically include:

[0130] Obtain the original adjacent edge lengths and original triangular face curvatures of each vertex in the current clothing partition before deformation processing.

[0131] The original adjacent side length refers to the straight-line distance between each vertex and its adjacent vertex in the current clothing section before deformation processing. It is used as a reference value to determine whether the side length has been stretched or compressed in subsequent iterations.

[0132] The original triangular facet curvature refers to the degree of curvature of each triangular facet at its vertex before the current garment section undergoes deformation processing. It serves as a benchmark for determining whether the degree of curvature of the facet has changed in subsequent iterations.

[0133] Specifically, in this embodiment of the invention, all vertices in the current clothing partition can be traversed. For each vertex, the spatial coordinates of all neighboring vertices within its neighborhood range are obtained. The spatial straight-line distance between the current vertex and each neighboring vertex is calculated and stored as the original adjacent edge length of each edge corresponding to the vertex. All triangular facets in the current clothing partition are traversed. For each triangular facet, the curvature measure of the facet at the current vertex is calculated based on the spatial coordinates of the three vertices of the facet and stored as the original triangular facet curvature of the vertex.

[0134] Get the current edge length of the current neighboring vertex and the curvature of the current triangle in the current iteration.

[0135] Here, the current vertex refers to the clothing mesh vertex that is being processed and having its coordinates updated in the current iteration round. In each iteration, all vertices in the current clothing partition are traversed in sequence and processed separately.

[0136] Among them, neighboring vertices refer to other vertices that are directly connected to the current vertex in the grid topology (sharing the same edge), and are used to calculate the edge length change of the current vertex and to apply smoothing constraints.

[0137] The current neighboring edge length refers to the straight-line distance between the current vertex and its neighboring vertices in the current iteration. It is used to compare with the original neighboring edge length to determine whether the edge has been stretched or compressed during the deformation process.

[0138] The current triangular facet curvature refers to the degree of curvature of the triangular facet containing the current vertex in the current iteration. It is used to compare with the original triangular facet curvature to determine whether the facet has undergone bending deformation during the deformation process.

[0139] Specifically, in the current iteration, for the vertex currently being processed, the current spatial coordinates of all neighboring vertices within its neighborhood are obtained, and the spatial straight-line distance between the current vertex and each neighboring vertex is calculated. Each distance value is used as the current neighboring edge length of each edge corresponding to the vertex. For each triangular facet where the current vertex is located, the curvature measure of the facet at the current vertex is recalculated based on the current spatial coordinates of the three vertices of the facet, and used as the curvature of the current triangular facet of the vertex.

[0140] Determine the difference between the current adjacent edge length and the corresponding original adjacent edge length.

[0141] Among them, the edge length difference refers to the difference between the current adjacent edge length and the corresponding original adjacent edge length, which is used to quantify the degree of stretching or compression of a single edge during the deformation process.

[0142] Specifically, in this embodiment of the invention, each current adjacent edge length can be matched one-to-one with the corresponding original adjacent edge length stored in the database. The current value of the corresponding edge length is subtracted from the original value, and the difference is used as the edge length difference of that edge.

[0143] Determine the curvature difference between the current triangular patch curvature and the corresponding original triangular patch curvature.

[0144] Curvature difference refers to the difference between the curvature of the current triangular facet and the curvature of the corresponding original triangular facet, which is used to quantify the change in the degree of bending of a single triangular facet during the deformation process.

[0145] Specifically, in this embodiment of the invention, each current triangular facet curvature can be matched one-to-one with the corresponding original triangular facet curvature stored in memory. The current curvature value is subtracted from the original curvature value, and the difference is used as the curvature difference of the triangular facet.

[0146] The topological feature difference values ​​are obtained by utilizing the differences in side length and curvature.

[0147] Among them, the topological feature difference value refers to the comprehensive value obtained by weighted summation of the side length difference and curvature difference, which is used to quantify the degree of deviation of the overall topological features of the current vertex during the deformation process.

[0148] Specifically, in this embodiment of the invention, all edge length differences and all curvature differences corresponding to the current vertex can be multiplied by their respective preset weight coefficients and then summed. The summation result is used as the topological feature difference value of the vertex in the current iteration. This value is used to quantify the overall degree to which the overall topological features of the current vertex deviate from the original baseline during the deformation process.

[0149] When the topological feature difference value is greater than zero, the retraction direction is determined based on the topological feature difference value, and the garment pattern offset is generated along the retraction direction.

[0150] The retraction direction refers to the displacement direction determined when the topological feature difference value is greater than zero. Displacement along this direction can cause the current adjacent edge length of the current vertex and the curvature of the current triangle to converge to their respective original reference values, thereby restoring the original pattern of the garment.

[0151] Specifically, in this embodiment of the invention, it can determine whether the topological feature difference value is greater than zero. If it is greater than zero, it indicates that the current vertex has been stretched or squeezed and distorted. The direction vector pointing from the current vertex to the original vertex position is determined as the retraction direction. The displacement along the retraction direction is determined according to the magnitude of the topological feature difference value. The product of the direction vector and the displacement is used as the garment pattern offset.

[0152] As examples, suppose that in a certain clothing section, the original edge length between a vertex and its neighboring vertices is 0.5 units, and the original triangular face curvature is 0.3. During the iteration process, the current edge length is stretched to 0.7 units, and the current curvature becomes 0.45. Then the edge length difference is 0.2, the curvature difference is 0.15, and after weighted summation, the topological feature difference value is 0.18, which is greater than zero. At this time, the retraction direction of the vertex pointing to the original position is determined, and a displacement is generated along this direction as the clothing pattern offset, so that the vertex retracts to the original position to restore the edge length and curvature.

[0153] This invention pre-caches the original adjacent side lengths and original triangular face curvatures before deformation processing, and compares the current side lengths and curvatures with their respective original reference values ​​during the iteration process. When the topological feature difference value is greater than zero, it actively generates a garment pattern offset along the retraction direction. This can correct the pattern distortion caused by stretching or squeezing in real time during the fitting process, so that the garment maintains the original pattern structure while fitting the character's surface.

[0154] Optionally, in the above Figure 2 Based on one or more corresponding embodiments, in another optional embodiment provided by the present invention, step S150 may specifically include:

[0155] Based on semantic partitioning information, the clothing partition to which each vertex belongs in the corrected clothing mesh data is determined, and the rigidity coefficient of each clothing partition is obtained.

[0156] The stiffness coefficient refers to a numerical parameter of each clothing section output by the target processing network inference, with a value range of [0, 1]. It is used to control the stiffness of the clothing section during deformation and the strength of its influence on the skeleton skin weights during weight transfer. The higher the stiffness coefficient, the more the region tends to maintain structural stability and suppress deformation.

[0157] Specifically, in this embodiment of the invention, all vertices in the corrected clothing mesh data can be traversed, and the clothing physical attribute partition mask value corresponding to each vertex in the semantic partitioning information can be read. Based on the mask value, each vertex is classified into the corresponding clothing partition. For each clothing partition, the rigidity coefficient value of the partition is read according to the physical attribute parameters of the partition stored in the semantic partitioning information and used as the rigidity coefficient of the partition.

[0158] For any vertex, based on the cross-region matching relationship, determine the corresponding character functional area on the character mesh data and obtain the first bone skinning weight of the character functional area; adjust the first bone skinning weight based on the rigidity coefficient of the clothing partition to which the vertex belongs to obtain the second bone skinning weight; perform global normalization on the second bone skinning weight to obtain the third bone skinning weight; and assign the third bone skinning weight to the vertex.

[0159] Among them, the first bone skinning weight refers to the bone skinning weight value originally carried by the character functional area in the character mesh data. It is used to characterize the degree of influence of each vertex on each bone drive in the area, and serves as the original weight source to be migrated to the clothing mesh data.

[0160] The second bone skinning weight refers to the bone skinning weight obtained by multiplying the first bone skinning weight by the rigidity coefficient of the clothing section to which the corresponding vertex belongs. It is used to characterize the weight value after the rigidity coefficient weighting adjustment, so that clothing sections with different rigidity attributes can obtain the appropriate weight intensity during weight migration.

[0161] The third bone skinning weight refers to the bone skinning weight obtained after performing global normalization on the second bone skinning weight. It is used to ensure that the sum of all bone weights of each vertex is equal to 1, and is used as the final bone skinning weight assigned to the clothing vertex.

[0162] Specifically, in this embodiment of the invention, each vertex in the corrected clothing mesh data can be traversed. For the current vertex, based on the correspondence stored in the cross-region matching relationship, the character functional area corresponding to the clothing partition to which the vertex belongs is found, and the standard bone skinning weight of the character functional area is read from the character mesh data as the first bone skinning weight. The weight values ​​of each bone in the first bone skinning weight are multiplied by the rigidity coefficient of the clothing partition to which the current vertex belongs, and the product result is used as the second bone skinning weight. The weight values ​​of all bones in the second bone skinning weight are accumulated, and the weight values ​​of each bone in the second bone skinning weight are divided by the accumulated sum to make the sum of the weight values ​​of each bone equal to 1. The normalized result is used as the third bone skinning weight. The third bone skinning weight is written into the bone skinning weight attribute field of the current vertex.

[0163] As examples, in some embodiments of the present invention, the second skeleton skinning weight in semantic matching weight transfer The calculation method is expressed as follows:

[0164] ;

[0165] in, It is a cross-region semantic matching matrix, which is a binary constraint matrix (the matrix elements can only take the values ​​0 or 1). It only allows the weights of the clothing physical attribute area and the character function area that correspond one-to-one to the function to be interchanged, in order to prevent weight confusion across bones and regions from the root. Standard skeletal skinning weights for the corresponding functional areas in the character mesh data; This is the rigidity coefficient of the clothing partition to which the current vertex belongs, used for adaptive optimization of weight concentration and diffusion range.

[0166] After completing the weight transfer and global normalization processing, this embodiment of the invention further adjusts the distribution of the normalized skeleton skinning weights according to the physical attribute type of the clothing partition where the current vertex is located: rigid structure region ( Skeletal weights approaching 1 are highly concentrated on a single principal skeleton, with minimal weight diffusion, resulting in no shifting, twisting, or loosening during movement; flexible, tight-fitting areas ( The bone weights (at the median) transition smoothly and gradually, with uniform distribution of multi-bone interpolation; the drooping, loose region ( The weight diffusion range (approaching 0) is widened, and the proportion of multi-skeleton interpolation is increased to support the natural swing and flexible relaxation deformation of the fabric; the weight of the hard accessory area is completely fixed to prohibit any deformation and displacement distortion.

[0167] This invention, through semantic matching weight transfer and regional differentiated weight allocation, enables each section of clothing to obtain appropriate skeletal-driven weights based on its physical attribute type: the skeletal weights of rigid structure areas are highly concentrated on a single main bone, flexible areas have a smooth gradient transition, loose areas have multiple bones spreading out, and hard accessory areas are completely solidified. This solves the problem of weight confusion and motion distortion caused by the lack of corresponding regional constraints in traditional weight transfer, enabling clothing to exhibit differentiated deformation effects that adapt to different physical attributes when the character moves.

[0168] The vertices after assigning skinning weights to the third bone are combined to form the finished garment data.

[0169] Specifically, in this embodiment of the invention, all vertices that have completed the writing of bone skinning weights can be recombined in the original vertex index order to form a complete set of mesh vertices. This set of vertices is then associated with the original topological patch structure and texture information of the clothing mesh to generate finished clothing data that can be directly used for dynamic deformation and motion performance under bone-driven conditions.

[0170] As examples, for a physically corrected dress mesh, all vertices are traversed, and semantic partitioning information is used to determine that each vertex belongs to a rigid neckline partition, a flexible upper body partition, and a loose skirt partition, respectively. The rigidity coefficient of the neckline partition is 0.9, and the rigidity coefficient of the skirt partition is 0.1. For a vertex in the skirt partition, the corresponding thigh functional area of ​​the character is determined based on the cross-region matching relationship. The bone skinning weights of the four bones in the thigh functional area are obtained as (0.6, 0.3, 0.05, 0.05). After multiplying by the skirt partition rigidity coefficient of 0.1, the weights of each bone become (0.06, 0.03, 0.005, 0.005). After normalization, the sum of the weights of each bone is 1. This set of weights is assigned to the vertex, so that the skirt produces a natural swaying deformation effect with the thigh during the character's walking action.

[0171] This invention provides a solution to the problems of weight misalignment and motion distortion caused by the lack of region correspondence constraints in traditional weight transfer. By obtaining the rigidity coefficient of each vertex based on semantic partitioning information and the skeletal skin weight of the corresponding character functional area based on cross-region matching relationship, the rigidity coefficient is used to weight and normalize the skeletal skin weight and then assign it to each vertex. This allows each part of the clothing to obtain the appropriate skeletal driving weight according to its physical attribute type.

[0172] Optionally, in the above Figure 1 Based on one or more corresponding embodiments, in another optional embodiment provided by the present invention, step S140 may specifically include:

[0173] Based on semantic partitioning information, the clothing partition to which each vertex belongs in the deformed clothing mesh data is determined, and the adaptive gravity weight of each clothing partition is obtained.

[0174] Among them, the adaptive gravity weight refers to the weight value calculated based on the rigidity coefficient of each clothing partition stored in the semantic partition information. It is negatively correlated with the rigidity coefficient and is used to control the degree of gravity's influence on the drooping of each vertex within the clothing partition.

[0175] Specifically, in this embodiment of the invention, all vertices in the deformed clothing mesh data can be traversed, and the clothing physical attribute partition mask value corresponding to each vertex in the semantic partition information can be read. Based on the mask value, each vertex is classified into the corresponding clothing partition. For each clothing partition, the rigidity coefficient of the partition is read, and the preset baseline gravity weight is multiplied by (1 minus the rigidity coefficient) to obtain the adaptive gravity weight of the partition, so that the partition with the higher rigidity coefficient gets a smaller adaptive gravity weight.

[0176] For any clothing section, the adaptive gravity weight of the clothing section is used to generate the gravity offset of each vertex within the clothing section; based on the fitting weight coefficient of the clothing section, the current coordinates of each vertex within the clothing section and the coordinates after the gravity offset is superimposed are processed to obtain the corrected coordinates of each vertex within the clothing section.

[0177] Among them, gravity offset refers to the displacement of each vertex within the clothing section under adaptive gravity weight control, which is used to simulate the natural draping effect of the fabric under gravity.

[0178] Among them, the fit weight coefficient refers to the numerical parameter of each clothing zone output by the target processing network inference, which is used to control the priority of the clothing zone in maintaining the current fit state during the physical correction process, and the value range is [0, 1].

[0179] Among them, the corrected coordinates of the vertices refer to the three-dimensional spatial position coordinates obtained by weighted fusion of the current coordinates of each vertex within the clothing section and the coordinates after superimposing the gravity offset, which are used as the physically corrected vertex positions.

[0180] Specifically, in this embodiment of the invention, each clothing section can be traversed. For the current clothing section, the adaptive gravity weight of the section is multiplied by the gravitational acceleration value and the relaxation iteration step, and then multiplied by the unit vector in the vertical downward direction to obtain the gravity offset reference value of the section. For each vertex in the current clothing section, the gravity offset reference value is used as the gravity offset of the vertex. The current coordinates of the current vertex are summed with the gravity offset to obtain the coordinates after superimposing the gravity offset. The fitting weight coefficient of the clothing section is read, the fitting weight coefficient is multiplied by the current coordinates of the current vertex, (1 minus the fitting weight coefficient) is multiplied by the coordinates after superimposing the gravity offset, and the products of the two are summed to obtain the corrected coordinates of the vertex.

[0181] The corrected coordinates of each vertex within each clothing section are combined to form the corrected clothing mesh data.

[0182] Specifically, in this embodiment of the invention, the corrected coordinates of all vertices in all clothing partitions can be rearranged into a complete set of vertex coordinates according to the original index order of each vertex. This set of vertex coordinates is then associated with the original topological patch structure and texture information of the clothing mesh to generate corrected clothing mesh data.

[0183] As examples, suppose a dress mesh is divided into three zones based on semantic partitioning information: a rigid neckline zone, a flexible upper body zone, and a loosely draped skirt zone. The neckline zone has a rigidity coefficient of 0.9, with its adaptive gravity weight approaching 0; the skirt zone has a rigidity coefficient of 0.1, with its adaptive gravity weight approaching its maximum value, resulting in a noticeable downward displacement of each vertex in the vertical direction under the influence of gravity. The skirt zone has a lower fitting weight coefficient, so when the current coordinates are weighted and fused with the coordinates after the gravity offset is superimposed, the gravity offset dominates, ultimately creating a natural draping and folding effect. The neckline zone has a fitting weight coefficient approaching 1, and after weighted fusion, the current coordinates remain essentially unchanged, achieving a close fit to the character's neck. After the vertices of each zone are corrected, they are combined in the original index order to form the complete dress mesh data.

[0184] As other examples, in embodiments of the present invention, adaptive gravity offset The calculation method is expressed as follows:

[0185] ;

[0186] in, This is a constant of gravitational acceleration in the virtual scene, used to ensure the consistency of physical benchmarks; The number of gravity relaxation iterations is used to control the drooping convergence depth and wrinkle richness. This represents the rigidity coefficient of the current clothing section. The adaptive gravity weight is the core switch for differentiated physical simulation, and its value range changes dynamically with the rigidity of the region. It is a unit vector pointing vertically downwards, used to ensure that the downward direction of gravity is uniform.

[0187] Stiffness coefficient of the target processing network output The higher the adaptive gravity weight The lower the level. This applies to rigid structural areas such as the neckline and waistband. Approaching 1, gravity weight approaches 0, completely disabling sagging deformation to ensure a locked, fitted structure; loose areas such as skirts and hems... Approaching zero, the gravity weight is maximized, fully releasing the natural drape and relaxed wrinkle effect of the fabric.

[0188] In this embodiment of the invention, the calculation method for the adhesion-gravity weighted coupling is expressed as follows:

[0189] ;

[0190] in, The current coordinates of the current vertex after deformation processing; The fitting weight coefficient for the current clothing zone (output by the target processing network inference); This represents the gravitational offset of the current vertex. These are the corrected coordinates of the current vertex.

[0191] This formula achieves a smooth transition balance between a rigid fit state and a flexible relaxation state. When When the value approaches 1, the formula fully preserves the vertex coordinates after fitting, preventing loosening, sagging, and gap offset; when Gravity relaxation term during adaptive descent The increased proportion of [something] generates natural fabric folds and drapes while ensuring a basic fit.

[0192] This invention, through the physical correction process, determines adaptive gravity weights and fit weights for each garment section based on semantic partitioning information, enabling rigid and loose sections to achieve differentiated correction effects in terms of gravity sag and fit retention. This solves the problems of stiffness and pattern distortion caused by traditional globally uniform physical parameters.

[0193] Optionally, in the above Figure 1 Based on one or more corresponding embodiments, in another optional embodiment provided by the present invention, the process of obtaining the target processing network provided by the present invention may include:

[0194] Multiple character mesh training data and multiple clothing mesh training data are obtained. The training data of each character mesh and each clothing mesh are randomly paired to construct multiple sets of paired samples.

[0195] Among them, the character mesh training data refers to the character mesh sample data used to train the target processing network. It can include vertex 3D coordinates, topological patch structure, texture information and bone skinning weights. The human body functional areas have been pre-divided and it serves as the target carrier for clothing wearing during the training phase.

[0196] Among them, clothing mesh training data refers to clothing mesh sample data used to train the target processing network. It includes vertex 3D coordinates, topological patch structure and texture information, but does not include bone skinning weights. It serves as clothing objects to be adapted to the character mesh during the training phase.

[0197] Among them, the paired sample refers to the triplet data unit formed by randomly pairing a character mesh training data with a clothing mesh training data and combining it with the corresponding artificially refined standard wearing finished product mesh data, which is used as the basic input unit when training the target processing network.

[0198] Specifically, in this embodiment of the invention, multiple styles and body types of character mesh models and multiple categories of clothing mesh models can be collected from a 3D asset library in batches. After unifying all models to the same 3D world coordinate system, the same baseline standing posture, and the same model scale, the training data of each character mesh and the training data of each clothing mesh are randomly paired in pairs. Each pairing is combined with the corresponding artificially refined standard wearing finished mesh data to form a triplet data unit, which serves as a pairing sample.

[0199] Semantic annotation is performed on the character mesh training data in each paired sample to obtain bone weight annotation data; semantic annotation is performed on the clothing mesh training data in each paired sample to obtain physical attribute annotation data and character-clothing region matching annotation data.

[0200] Specifically, in this embodiment of the invention, character functional regions can be labeled in the character mesh training data of each paired sample to obtain the bone weight labeling data of each character functional region; and clothing physical attribute regions can be labeled in the clothing mesh training data of each paired sample to obtain the rigidity coefficient labeling data, fitting weight coefficient labeling data, and character-clothing region matching labeling data of each clothing physical attribute region.

[0201] Among them, the bone weight annotation data refers to the true value of the bone skinning weight obtained after manually annotating each character's functional area in the character mesh training data, which is used as a supervision signal for the character functional area segmentation task in the physical parameter regression task.

[0202] Among them, the rigidity coefficient labeled data refers to the true value of the rigidity coefficient obtained after manually labeling each physical attribute region of clothing in the clothing mesh training data, which is used as a supervision signal for rigidity coefficient prediction in the physical parameter regression task.

[0203] Among them, the fitting weight coefficient annotation data refers to the true value of the fitting weight coefficient obtained after manually annotating each physical attribute region of clothing in the clothing mesh training data, which is used as a supervision signal for the prediction of fitting weight coefficient in the physical parameter regression task.

[0204] Among them, the character-clothing region matching annotation data refers to the true value of the matching matrix obtained by manually annotating the correspondence between each clothing physical attribute region in the clothing mesh training data and each character functional region in the character mesh training data. It is used as a supervision signal for predicting the matching relationship in cross-region matching tasks.

[0205] Furthermore, in this embodiment of the invention, for each pair of character mesh training data, the vertex to which the character functional region category belongs is labeled, and the standard bone weight ground value of each region is labeled to obtain bone weight labeling data; for each pair of clothing mesh training data, the vertex to which the clothing physical attribute region category belongs is labeled, and the standard rigidity coefficient ground value and standard fitting weight coefficient ground value are labeled for each region, while the matching correspondence ground value matrix between the clothing region and the character functional region is labeled to obtain rigidity coefficient labeling data, fitting weight coefficient labeling data and character-clothing region matching labeling data.

[0206] The labeled paired samples are input into the multi-task processing network, and the multi-task processing network is jointly trained through multiple training tasks.

[0207] Specifically, in this embodiment of the invention, the labeled paired samples can be input into a multi-task processing network, and the multi-task processing network can be jointly trained through global contour alignment task, character functional area segmentation task, clothing physical attribute area segmentation task, physical parameter regression task and cross-region matching task.

[0208] The global contour alignment task is one of the subtasks in the multi-task processing network. It is used to predict global transformation parameters based on global contour features, perform global position and scale alignment on clothing mesh training data, and eliminate initial misalignment, suspension and size mismatch between clothing and characters in training samples.

[0209] Among them, the character functional area segmentation task refers to one of the subtasks in the multi-task processing network, which is used to perform semantic segmentation on the character mesh training data based on local geometric features, dividing it into shoulder and neck functional areas, chest and back functional areas, waist and abdomen functional areas, upper arm functional areas, forearm functional areas, thigh functional areas, and calf functional areas.

[0210] Among them, the clothing physical attribute region segmentation task refers to one of the subtasks in the multi-task processing network. It is used to perform semantic segmentation on clothing mesh training data based on local geometric features and topological features, dividing it into rigid fit regions, flexible tight-fitting regions, draped loose regions, and rigid accessory regions.

[0211] Among them, the physical parameter regression task refers to one of the subtasks in the multi-task processing network, which is used to predict the rigidity coefficient and fitting weight coefficient of each clothing zone based on local geometric features and topological features, so that the predicted values ​​are close to the true values ​​of the rigidity coefficient and fitting weight coefficient labeled by humans.

[0212] Among them, the cross-region matching task refers to one of the subtasks in the multi-task processing network, which is used to establish a matching matrix between the character functional area and the clothing physical attribute area based on global contour features and local geometric features, so that the predicted matching relationship approximates the manually annotated character-clothing region matching ground truth matrix.

[0213] Furthermore, in this embodiment of the invention, the labeled paired samples can be input into a multi-task processing network. After the multi-task processing network performs multi-scale feature encoding on the input dual-grid data through a shared low-level feature extraction structure, it performs a global contour alignment task in parallel to predict global transformation parameters and perform global position and scale alignment on the clothing grid. It also performs a role functional area segmentation task to predict the functional partition mask of the role grid, a clothing physical attribute area segmentation task to predict the physical attribute partition mask of the clothing grid, a physical parameter regression task to predict the stiffness coefficient and fitting weight coefficient of each clothing partition, and a cross-region matching task to predict the matching matrix between the role functional area and the clothing physical attribute area. The loss value is calculated based on the difference between the prediction results output by each task and the labeled true value, and the network parameters are updated accordingly.

[0214] The loss value for each task is calculated by pre-set loss function and backpropagated. The target processing network is obtained after the training loss converges.

[0215] Specifically, in this embodiment of the invention, the loss value of each task can be calculated by a weighted joint loss function and backpropagated to obtain the target processing network after the training loss converges.

[0216] Furthermore, in this embodiment of the invention, the prediction results of the global contour alignment task are compared with the ground truth of the global contour annotation to obtain the global contour alignment loss; the prediction results of the character functional region segmentation task and the clothing physical attribute region segmentation task are compared with the ground truth of the corresponding functional region annotation and the ground truth of the physical attribute region annotation to obtain the semantic segmentation loss; the prediction results of the physical parameter regression task are compared with the ground truth of the rigidity coefficient annotation and the ground truth of the fitting weight coefficient annotation to obtain the parameter regression loss; the prediction results of the cross-region matching task are compared with the ground truth of the character-clothing region matching annotation to obtain the cross-region matching loss; the above four losses are multiplied by their respective preset weight coefficients and summed to obtain the total loss value; the total loss value is backpropagated to each layer of the multi-task processing network for parameter optimization iteration; the above process is repeated until the total loss value is stable for several consecutive rounds and no longer decreases and the accuracy of the validation set reaches the industrial standard, at which point training is stopped, and the target processing network after training convergence is obtained.

[0217] As examples, embodiments of the present invention can collect character models of various body types and clothing models of various categories such as tops and dresses from an asset library. After unifying all models into a T-pose posture and scaling them to the same height ratio, each character model and each clothing model is randomly paired to form multiple sets of paired samples. For one set of paired samples, regions such as shoulders and neck, chest and back, waist and abdomen, upper arms, forearms, thighs, and calves are marked vertex by vertex on the character mesh, and the true values ​​of the bone weights of each region are stored. On the clothing mesh, the neckline region is marked vertex by vertex as a rigid fit region, the body region as a flexible tight-fitting region, and the skirt region as a draped loose region, and the true values ​​of the rigidity coefficient, fit weight coefficient, and the corresponding character functional region matching relationship of each region are stored. The labeled paired samples are input into a multi-task processing network. The multi-task processing network simultaneously performs functional region segmentation on the character mesh, physical attribute region segmentation on the clothing mesh, predicts the rigidity coefficient and fit weight coefficient of each partition, and establishes partition matching relationships. The prediction results of each task are compared with the labeled ground truth and weighted summation is performed to obtain the total loss value. The network parameters are repeatedly optimized through backpropagation. Training stops when both the total loss value and the accuracy of the validation set reach the preset standard, thus obtaining the target processing network.

[0218] In this embodiment of the invention, after constructing paired samples and completing multi-dimensional annotation, the annotated data is input into a multi-task processing network for joint training of global contour alignment, semantic segmentation, parameter regression, and cross-region matching. This enables the target processing network after training convergence to directly infer semantic partitioning information, physical attribute parameters, and cross-region matching relationships from the input character mesh data and clothing mesh data. This provides semantic priors for subsequent clothing partitioning, differentiated deformation, and weight transfer, enabling the entire method to identify and differentiate different regions of clothing.

[0219] Optionally, in this embodiment of the invention, the weighted joint loss function is calculated as follows:

[0220] ;

[0221] in, , , , The preset task balancing weights are dynamically fine-tuned according to the training phase to balance the training weight of each task and avoid overfitting of a single task or convergence imbalance of multiple tasks. The global contour alignment loss is used to constrain the matching accuracy of the overall contour scale, posture, and position of the clothing and the character, and to eliminate the initial misalignment and hanging problem. The semantic segmentation loss is used to constrain the accuracy of character function partitioning and clothing physical attribute partitioning. The parametric regression loss is used to constrain the model's predicted stiffness coefficients and fit weight coefficients for each clothing zone to approximate the manually labeled true values. This is the cross-region matching loss, used to constrain the rationality and uniqueness of the correspondence between the character's functional area and the clothing's physical attribute area. The total loss value is obtained by summing the four losses, each multiplied by its respective preset weight coefficient. .

[0222] This invention, through the design of a weighted joint loss function, weights and sums the loss values ​​of four tasks—global contour alignment, semantic segmentation, physical parameter regression, and cross-region matching—before backpropagation. This enables the multi-task processing network to converge synchronously and mutually positively constrain each other during training, avoiding the problem of decreased inference accuracy caused by overfitting of a single task or unbalanced convergence of multiple tasks. This ensures the overall performance of the multi-task processing network model in terms of partition accuracy, parameter regression accuracy, and matching effectiveness.

[0223] Optionally, in the above Figure 1 Based on one or more corresponding embodiments, in another optional embodiment provided by the present invention, step S100 may specifically include:

[0224] Obtain the original character mesh data and the original clothing mesh data.

[0225] The original character mesh data refers to the unstandardized 3D character mesh model, which includes vertex 3D coordinates, topological patch structure, texture information, and bone skinning weights. The bone binding and character functional area division have been completed in advance.

[0226] The original clothing mesh data refers to a 3D clothing mesh model that has not undergone standardization, which includes vertex 3D coordinates, topological patch structure and texture information, but does not include bone skinning weights.

[0227] Specifically, in this embodiment of the invention, unstandardized character mesh models and clothing mesh models can be exported from a 3D asset library. The character mesh model includes vertex 3D coordinates, topological patch structure, texture information, and bone skinning weights, while the clothing mesh model includes vertex 3D coordinates, topological patch structure, and texture information but does not include bone skinning weights. Both are used as the initial input data for standardization.

[0228] As examples, embodiments of the present invention can export a medium-sized character model with complete skeletal rigging and an original unrigging dress model from an asset library. The character model is in a standing posture with its arms slightly outstretched, while the dress model is in a flat, unfolded state. The height ratio and spatial position of the two are different.

[0229] The original character mesh data and the original clothing mesh data are unified to the same three-dimensional world coordinate system, and unified to the same baseline standing posture and the same size scale.

[0230] Among them, the baseline standing posture refers to the standard posture used to unify the spatial posture of all character mesh data and clothing mesh data, namely the T-pose posture (arms outstretched horizontally, legs straight and shoulder-width apart), which is used to eliminate the initial spatial misalignment between the character and clothing caused by posture differences.

[0231] Specifically, in this embodiment of the invention, the original character mesh data and the original clothing mesh data can be imported into a three-dimensional spatial processing environment to obtain their current spatial position coordinates and current orientation. The center points of the two can be aligned to the origin of the world coordinate system through translation transformation, the orientation of the two can be adjusted to the same reference standing posture through rotation transformation, and the model size ratio of the two can be adjusted to the same height reference through scaling transformation, so that the character and clothing maintain a consistent alignment state in terms of spatial position, posture and size.

[0232] As examples, embodiments of the present invention can import a character model and a dress model into 3D modeling software, then use translation operations to align the center points of the two models to the origin of the world coordinate system, use rotation operations to adjust the dress model from a flat pose to a T-pose pose consistent with the character model, and use scaling operations to adjust the size of the dress model to be consistent with the height ratio of the character model.

[0233] The original character mesh data and the original clothing mesh data after unified processing are cleaned by removing redundant vertices and redundant faces to generate character mesh data and clothing mesh data.

[0234] Specifically, in this embodiment of the invention, all vertices and faces of the character mesh and clothing mesh can be traversed, isolated vertices not referenced by any triangle face can be detected and deleted, redundant triangle faces with zero area or degenerate can be detected and deleted, and repeated overlapping vertex data can be detected and deleted. The cleaned vertex set and face set can be reconstructed into a standardized mesh data structure to generate character mesh data and clothing mesh data.

[0235] As examples, embodiments of the present invention can perform mesh cleaning operations on the character model and the dress model respectively, deleting more than 50 free vertices and more than 10 zero-area faces in the dress model; and deleting more than 30 duplicate vertices left over from historical editing in the character model. After cleaning, the vertex indices and face topologies of both models are clean and well-organized, and can be used as the character mesh data and clothing mesh data in subsequent processing stages, respectively.

[0236] This invention standardizes the original character mesh data and the original clothing mesh data by unifying the coordinate system, the reference standing posture, and the size ratio, so that the two are aligned in terms of spatial position, posture orientation, and body proportion. After mesh cleaning, redundant vertices and redundant faces are eliminated, thereby providing regular, unified, and interference-free standardized input data for subsequent target processing network feature inference.

[0237] Although the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous.

[0238] It should be understood that the various steps described in the method embodiments of the present invention may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present invention is not limited in this respect.

[0239] Corresponding to the above method embodiments, this invention also provides a virtual character clothing adaptation device, the structure of which is as follows: Figure 3 As shown, it may include: a grid data acquisition unit 10, a data feature reasoning unit 20, a clothing partitioning unit 30, a clothing grid data deformation unit 40, a clothing grid data correction unit 50, and a finished clothing data acquisition unit 60.

[0240] Mesh data acquisition unit 10 is used to acquire character mesh data and clothing mesh data.

[0241] The data feature reasoning unit 20 is used to perform feature reasoning on character mesh data and clothing mesh data using the target processing network to obtain semantic partitioning information, physical attribute parameters and cross-region matching relationships.

[0242] Clothing partitioning unit 30 is used to divide clothing grid data into multiple clothing partitions using semantic partitioning information.

[0243] The clothing mesh data deformation unit 40 is used to perform geometric deformation processing on the vertex coordinates within each clothing partition using physical attribute parameters and cross-region matching relationships, so as to obtain deformed clothing mesh data that fits the character mesh data.

[0244] The clothing mesh data correction unit 50 is used to correct the deformed clothing mesh data using semantic partitioning information and physical attribute parameters to obtain corrected clothing mesh data.

[0245] The finished garment data acquisition unit 60 is used to match the character mesh data with the corrected garment mesh data by utilizing semantic partitioning information and cross-regional matching relationships to obtain finished garment data.

[0246] Optionally, the clothing mesh data deformation unit 40 includes: a basic fitting offset generation sub-unit, a clothing pattern offset generation sub-unit, a boundary smoothing offset generation sub-unit, and an iterative optimization sub-unit.

[0247] The basic fit offset generation sub-unit is used to determine the character function area corresponding to the current clothing section for each clothing section by using cross-region matching relationship, and to generate the basic fit offset by using the surface position of the character function area.

[0248] The garment pattern offset generation subunit is used to generate garment pattern offsets by utilizing the original topology of the current garment partition and the topology under the current deformation state.

[0249] The boundary smooth offset generation sub-unit is used to generate boundary smooth offsets by utilizing the coordinate differences between each vertex in the current clothing partition and its neighboring vertices.

[0250] The iterative optimization sub-unit is used to combine physical property parameters and use the basic fit offset, clothing pattern offset and boundary smoothing offset to iteratively optimize the current coordinates of the current vertex to obtain the deformed clothing mesh data that fits the character mesh data.

[0251] Optionally, the garment pattern offset generation subunit can be used to obtain the original adjacent edge lengths and original triangular face curvatures of each vertex in the current garment partition before deformation processing; obtain the current adjacent edge lengths and current triangular face curvatures of the current vertex and its neighboring vertices in the current iteration; determine the edge length difference between the current adjacent edge length and the corresponding original adjacent edge length; determine the curvature difference between the current triangular face curvature and the corresponding original triangular face curvature; obtain the topological feature difference value using the edge length difference and curvature difference; and, if the topological feature difference value is greater than zero, determine the retraction direction based on the topological feature difference value and generate the garment pattern offset along the retraction direction.

[0252] Optionally, the finished garment data acquisition unit 60 can be used to determine the garment partition to which each vertex in the corrected garment mesh data belongs based on semantic partitioning information, and obtain the rigidity coefficient of each garment partition; for any vertex, determine the character functional area corresponding to the vertex in the character mesh data based on cross-region matching relationship, and obtain the first bone skinning weight of the character functional area; adjust the first bone skinning weight based on the rigidity coefficient of the garment partition to which the vertex belongs, and obtain the second bone skinning weight; perform global normalization processing on the second bone skinning weight to obtain the third bone skinning weight; assign the third bone skinning weight to the vertex; and combine the vertices after being assigned the third bone skinning weight into finished garment data.

[0253] Optionally, the clothing mesh data correction unit 50 can be used to determine the clothing partition to which each vertex in the deformed clothing mesh data belongs based on semantic partitioning information, and obtain the adaptive gravity weight of each clothing partition; for any clothing partition, the adaptive gravity weight of the clothing partition is used to generate the gravity offset of each vertex in the clothing partition; based on the fitting weight coefficient of the clothing partition, the current coordinates of each vertex in the clothing partition and the coordinates after the gravity offset of each vertex are superimposed are processed to obtain the corrected coordinates of each vertex in the clothing partition; and the corrected coordinates of each vertex in each clothing partition are combined into the corrected clothing mesh data.

[0254] Optionally, the virtual character costume adaptation device may also include a target processing network acquisition unit.

[0255] The target processing network acquisition unit is used to acquire multiple character mesh training data and multiple clothing mesh training data, randomly pair each character mesh training data with each clothing mesh training data to construct multiple sets of paired samples; semantically annotate the character mesh training data in each paired sample to obtain bone weight annotation data; semantically annotate the clothing mesh training data in each paired sample to obtain physical attribute annotation data and character-clothing region matching annotation data; input the annotated paired samples into a multi-task processing network, and jointly train the multi-task processing network through multiple training tasks; calculate the loss value of each task through a preset loss function and backpropagate, and obtain the target processing network after the training loss converges.

[0256] Optionally, the mesh data acquisition unit 10 can be used to acquire the original character mesh data and the original clothing mesh data; unify the original character mesh data and the original clothing mesh data to the same three-dimensional world coordinate system, and unify them to the same reference standing posture and the same size ratio; perform mesh cleaning on the unified original character mesh data and the original clothing mesh data respectively, delete redundant vertices and redundant faces, and generate character mesh data and clothing mesh data.

[0257] This invention provides a virtual character clothing adaptation device. After performing feature reasoning on character mesh data and clothing mesh data, it uses semantic partitioning information to partition the clothing and combines physical attribute parameters to perform differentiated geometric deformation on the vertices of each partition. This allows each clothing partition to achieve a fitting effect based on its own attributes, avoiding the pattern destruction and stiff deformation problems caused by globally uniform parameters. Furthermore, it uses semantic partitioning information and cross-regional matching relationships to guide the matching process, ensuring that matching is based on semantic region correspondence rather than spatial distance. This avoids motion tearing and distortion problems caused by matching errors, thus achieving an interpretable and controllable character clothing wearing effect while maintaining automated processing efficiency, and better adapting to industrial mass production scenarios.

[0258] Regarding the apparatus in the above embodiments, the specific manner in which each unit performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.

[0259] The virtual character clothing adaptation device includes a processor and a memory. The aforementioned grid data acquisition unit 10, data feature reasoning unit 20, clothing partitioning unit 30, clothing grid data deformation unit 40, clothing grid data correction unit 50, and finished clothing data acquisition unit 60 are all stored in the memory as program units. The processor executes the aforementioned program units stored in the memory to realize the corresponding functions.

[0260] The processor contains a kernel that retrieves the corresponding program units from memory. One or more kernels can be configured. By adjusting kernel parameters, after performing feature inference on character and clothing mesh data, semantic partitioning information is used to partition the clothing. Combined with physical attribute parameters, differentiated geometric deformation is applied to the vertices of each partition, allowing each clothing partition to achieve a fitting effect based on its own attributes. This avoids pattern destruction and stiff deformation problems caused by globally uniform parameters. Furthermore, semantic partitioning information and cross-region matching relationships guide the matching process, ensuring matching is based on semantic region correspondence rather than spatial distance. This avoids motion tearing and distortion problems caused by mismatched matching, thus achieving an interpretable and controllable character clothing wearing effect while maintaining automated processing efficiency, and better adapting to industrial mass production scenarios.

[0261] This invention provides a computer-readable storage medium storing a program that, when executed by a processor, implements the virtual character clothing adaptation method.

[0262] This invention provides a processor for running a program, wherein the program executes the virtual character clothing adaptation method during runtime.

[0263] like Figure 4 As shown, this embodiment of the invention provides an electronic device 1000, which includes at least one processor 1001, at least one memory 1002 connected to the processor 1001, and a bus 1003. The processor 1001 and the memory 1002 communicate with each other via the bus 1003. The processor 1001 is used to call program instructions in the memory 1002 to execute the aforementioned virtual character clothing adaptation method. The electronic device in this document can be a server, PC, PAD, mobile phone, etc.

[0264] The present invention also provides a computer program product that, when executed on an electronic device, is adapted to execute a program that initializes a method for adapting virtual character clothing.

[0265] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatuses, electronic devices (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable device, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1A device that provides the functions specified in one or more boxes.

[0266] In a typical configuration, an electronic device includes one or more processors (CPUs), memory, and a bus. The electronic device may also include input / output interfaces, network interfaces, etc.

[0267] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, like read-only memory (ROM) or flash RAM, and memory includes at least one memory chip. Memory is an example of computer-readable media.

[0268] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0269] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this invention are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0270] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.

[0271] In the description of this invention, it should be understood that if the terms "upper", "lower", "front", "rear", "left" and "right" are used to indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, they are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the position or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this invention.

[0272] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.

[0273] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0274] The above are merely embodiments of the present invention and are not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principle of the present invention should be included within the scope of the present invention.

Claims

1. A method for adapting virtual character clothing, characterized in that, include: Obtain character mesh data and clothing mesh data; The target processing network is used to perform feature reasoning on the character mesh data and clothing mesh data to obtain semantic partitioning information, physical attribute parameters and cross-region matching relationships; Using the semantic partitioning information, the clothing mesh data is divided into multiple clothing partitions; For each clothing section, the physical attribute parameters and the cross-region matching relationship are used to perform geometric deformation processing on the vertex coordinates within the clothing section to obtain deformed clothing mesh data that fits the character mesh data; The deformed clothing mesh data is corrected using the semantic partitioning information and the physical attribute parameters to obtain corrected clothing mesh data; Using the semantic partitioning information and the cross-regional matching relationship, the character mesh data is matched with the corrected clothing mesh data to obtain the finished clothing data.

2. The method according to claim 1, characterized in that, For each clothing section, using the physical attribute parameters and the cross-region matching relationship, geometric deformation processing is performed on the vertex coordinates within the clothing section to obtain deformed clothing mesh data that fits the character mesh data, including: For each clothing section, the cross-region matching relationship is used to determine the character function area corresponding to the current clothing section, and the surface position of the character function area is used to generate the basic fitting offset. Generate garment pattern offset using the original topology of the current garment partition and the topology under the current deformation state; By utilizing the coordinate differences between each vertex within the current clothing partition and its neighboring vertices, a boundary smoothing offset is generated; By combining the physical property parameters, the current coordinates of the current vertex are iteratively optimized using the basic fitting offset, the clothing pattern offset, and the boundary smoothing offset to obtain the deformed clothing mesh data that fits the character mesh data.

3. The method according to claim 2, characterized in that, The process of generating garment pattern offset using the original topology of the current garment partition and the topology under the current deformation state includes: Obtain the original adjacent edge lengths and original triangular face curvatures of each vertex in the current clothing partition before deformation processing; Get the current neighbor edge length and current triangle curvature of the current vertex and its neighboring vertices in the current iteration; Determine the difference between the current adjacent edge length and the corresponding original adjacent edge length; Determine the curvature difference between the current triangular patch curvature and the corresponding original triangular patch curvature; The topological feature difference value is obtained by using the difference in side length and the difference in curvature; If the topological feature difference value is greater than zero, the retraction direction is determined based on the topological feature difference value, and a garment pattern offset is generated along the retraction direction.

4. The method according to claim 2, characterized in that, The step of matching the character mesh data with the corrected clothing mesh data using the semantic partitioning information and the cross-region matching relationship to obtain the finished clothing data includes: Based on the semantic partitioning information, the clothing partition to which each vertex in the corrected clothing mesh data belongs is determined, and the rigidity coefficient of each clothing partition is obtained; For any vertex, based on the cross-region matching relationship, determine the corresponding character functional region of the vertex on the character mesh data, and obtain the first bone skinning weight of the character functional region; adjust the first bone skinning weight based on the rigidity coefficient of the clothing partition to which the vertex belongs, and obtain the second bone skinning weight; perform global normalization on the second bone skinning weight to obtain the third bone skinning weight; and assign the third bone skinning weight to the vertex. The vertices after being assigned skinning weights to the third bone are combined to form the finished garment data.

5. The method according to claim 1, characterized in that, The step of correcting the deformed clothing mesh data using the semantic partitioning information and the physical attribute parameters to obtain corrected clothing mesh data includes: Based on the semantic partitioning information, the clothing partition to which each vertex belongs in the deformed clothing mesh data is determined, and the adaptive gravity weight of each clothing partition is obtained. For any of the clothing zones, the adaptive gravity weight of the clothing zone is used to generate the gravity offset of each vertex within the clothing zone; based on the fitting weight coefficient of the clothing zone, the current coordinates of each vertex within the clothing zone and the coordinates of each vertex after adding the gravity offset are processed to obtain the corrected coordinates of each vertex within the clothing zone. The corrected coordinates of each vertex within each of the clothing zones are combined to form the corrected clothing mesh data.

6. The method according to claim 1, characterized in that, The process of obtaining the target processing network includes: Obtain multiple character mesh training data and multiple clothing mesh training data, randomly pair each character mesh training data with each clothing mesh training data, and construct multiple sets of paired samples; Semantic annotation is performed on the character mesh training data in each paired sample to obtain bone weight annotation data; Semantic annotation is performed on the clothing mesh training data in each paired sample to obtain physical attribute annotation data and character-clothing region matching annotation data; The labeled paired samples are input into the multi-task processing network, and the multi-task processing network is jointly trained through multiple training tasks. The loss value for each task is calculated by pre-set loss function and backpropagated. The target processing network is obtained after the training loss converges.

7. The method according to any one of claims 1 to 6, characterized in that, The acquisition of character mesh data and clothing mesh data includes: Obtain the original character mesh data and the original clothing mesh data; The original character mesh data and the original clothing mesh data are unified to the same three-dimensional world coordinate system, and are unified to the same baseline standing posture and the same size ratio; The original character mesh data and the original clothing mesh data after unified processing are cleaned by removing redundant vertices and redundant faces to generate character mesh data and clothing mesh data.

8. A virtual character clothing adaptation device, characterized in that, include: The unit includes a grid data acquisition unit, a data feature reasoning unit, a clothing partitioning unit, a clothing grid data deformation unit, a clothing grid data correction unit, and a finished clothing data acquisition unit. The grid data acquisition unit is used to acquire character grid data and clothing grid data; The data feature reasoning unit is used to perform feature reasoning on the character mesh data and clothing mesh data using the target processing network to obtain semantic partitioning information, physical attribute parameters and cross-regional matching relationships. The clothing partitioning unit is used to divide the clothing grid data into multiple clothing partitions using the semantic partitioning information. The clothing mesh data deformation unit is used to perform geometric deformation processing on the vertex coordinates within each clothing partition using the physical attribute parameters and the cross-region matching relationship, so as to obtain deformed clothing mesh data that fits the character mesh data. The clothing mesh data correction unit is used to correct the deformed clothing mesh data using the semantic partitioning information and the physical attribute parameters to obtain corrected clothing mesh data. The finished garment data acquisition unit is used to match the character mesh data with the corrected garment mesh data using the semantic partitioning information and the cross-regional matching relationship to obtain finished garment data.

9. A computer-readable storage medium having a program stored thereon, characterized in that, When the program is executed by the processor, it implements the virtual character clothing adaptation method as described in any one of claims 1 to 7.

10. An electronic device, characterized in that, The electronic device includes at least one processor, at least one memory connected to the processor, and a bus; wherein the processor and the memory communicate with each other through the bus; the processor is used to call program instructions in the memory to execute the virtual character clothing adaptation method as described in any one of claims 1 to 7.