Method, system, device and medium for collision and self-collision handling in garment simulation

CN116416407BActive Publication Date: 2026-08-11NANJING UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-02
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

但这些方法都存在一定的限制,例如空间加速结构的建立本身就是一个比较耗时的过程而且往往难以并行,以及简单几何体近似方法往往无法实现精确逼真的处理效果

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116416407B_ABST
    Figure CN116416407B_ABST
Patent Text Reader

Abstract

This invention discloses a method, system, device, and medium for handling collisions and self-collisions in clothing simulation, relating to the field of computer graphics. The method includes: acquiring the position information, normal vector information, and adjacency information of the particles in the current frame; determining the axis-aligned cuboid bounding box of the current frame and dividing the bounding box into several three-dimensional voxels of the same size according to a set granularity; constructing the spatial distance field of the current frame; determining the collision potential energy of each clothing particle in the current frame based on the position information of the clothing particles and the spatial distance field; determining the particle-voxel index of the current frame; performing self-collision detection on each clothing particle in the current frame based on the adjacency information and particle-voxel index, and applying self-collision potential energy to clothing particle pairs with self-collisions; and solving for the minimum sum of collision potential energy and self-collision potential energy to obtain the coordinates of the best points with no collisions and self-collisions. This invention enables real-time and accurate processing of collisions and self-collisions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer graphics, and in particular to a method, system, device, and medium for handling collisions and self-collisions in clothing simulation. Background Technology

[0002] With the rapid development of the internet and computer technology, people's demands for the realism of objects simulated in the virtual world have also increased, with a growing emphasis on immersive experiences. In the field of physical simulation, flexible objects such as clothing have become a research hotspot and challenge due to their complex topological structures and mechanical properties. In recent years, clothing simulation technology has been widely used in virtual fitting, film and television production, and game development, significantly improving the fidelity of the virtual world to the real world and the user's viewing experience.

[0003] Currently, there are two main clothing simulation technologies. One is physics-based, which analyzes the forces acting on the clothing model's particles, constructs differential equations, and solves for position updates. The other is position-based, which starts directly from the particle's position, constructs constraints on the position, and obtains the optimal position output. Both methods inevitably encounter collision and penetration problems with other models and the clothing model itself during the simulation process. Collision detection and processing need to be performed iteratively until there is no penetration phenomenon that significantly affects the appearance. This process has become the main time bottleneck in the simulation process.

[0004] The main challenge in collision detection and handling lies in how to quickly detect intersections in complex geometric models and provide effective and simple processing strategies. Due to increasingly higher requirements for accuracy and complexity, most 3D models today employ explicit mesh geometry, with the number of points and faces in a single model typically reaching tens of thousands or even millions. The time complexity of collision lookup for face pairs or point pairs far exceeds acceptable limits, leading to the development of performance optimization strategies such as spatial acceleration structures, simple geometric approximation, and parallel acceleration. However, these methods all have limitations. For example, building spatial acceleration structures is inherently time-consuming and often difficult to parallelize, and simple geometric approximation methods often fail to achieve accurate and realistic processing results.

[0005] Therefore, existing collision and self-collision detection and processing technologies in the field of clothing simulation cannot simultaneously meet the requirements of real-time performance and accuracy. Summary of the Invention

[0006] The purpose of this invention is to provide a method, system, device, and medium for handling collisions and self-collisions in clothing simulation, so as to achieve real-time and accurate handling of collisions and self-collisions.

[0007] To achieve the above objectives, the present invention provides the following solution:

[0008] A method for handling collisions and self-collisions in clothing simulation, comprising:

[0009] Obtain the particle position information, normal vector information, and adjacency information of the current frame; the particle position information includes: clothing particle position information and human body particle position information;

[0010] The axis-aligned cuboid bounding box of the current frame is determined based on the particle position information of the current frame, and the axis-aligned cuboid bounding box of the current frame is divided into several three-dimensional voxels of the same size according to the set granularity.

[0011] Construct the spatial distance field of the current frame based on the human mass point position information, normal vector information, and three-dimensional voxels;

[0012] The collision potential energy of each clothing point in the current frame is determined based on the position information of the clothing points and the spatial distance field in the current frame.

[0013] The particle-voxel index of the current frame is determined based on the position information of the clothing particles and the three-dimensional voxels; the particle-voxel index represents the clothing particles contained in each three-dimensional voxel.

[0014] Based on the adjacency information and particle-voxel index of the current frame, self-collision detection is performed on each clothing particle in the current frame, and self-collision potential energy is applied to clothing particles that have self-collision.

[0015] For any clothing material point, the solution is performed with the objective of minimizing the sum of the collision potential energy and the self-collision potential energy to obtain the coordinates of the best point with no collision and self-collision; the coordinates of the best point are used to update the position of the clothing material point in the next frame.

[0016] Optionally, the spatial distance field of the current frame is constructed based on the human mass point position information, normal vector information, and three-dimensional voxels, specifically including:

[0017] When the current frame is a keyframe:

[0018] The propagation source voxel of the current frame is determined based on the human body mass point position information and the three-dimensional voxel; the propagation source voxel is a three-dimensional voxel that intersects with the mass points on the surface of the human body model.

[0019] Based on the human body mass point position information and normal vector information in the current frame, the spatial distance field parameters of the propagation source voxel in the current frame are determined by Legendre polynomial fitting.

[0020] Based on the normal vector information of the current frame and the center position coordinates of the three-dimensional voxels, the spatial distance field parameters of the propagation source voxels of the current frame are propagated to the neighboring voxels through the spatial propagation function to obtain the spatial distance field of the current frame.

[0021] When the current frame is not a key frame:

[0022] Based on the human mass point position information, normal vector information, and center position coordinates of the three-dimensional voxels in the current frame, the spatial distance field parameters of the previous frame are propagated to the current frame through a time-domain propagation function to obtain the spatial distance field of the current frame.

[0023] Optionally, based on the human mass point position information and normal vector information of the current frame, the spatial distance field parameters of the propagation source voxel of the current frame are determined by Legendre polynomial fitting, specifically including:

[0024] Construct a directed distance function for the propagation source voxel of the current frame based on the human mass point position information and normal vector information of the current frame;

[0025] The directed distance function of the propagation source voxel in the current frame is fitted using Legendre polynomials to obtain the fitted polynomial.

[0026] The coefficients of the fitted polynomial are solved using the Gauss-Legend de Gauss numerical quadrature formula to obtain the spatial distance field parameters of the propagation source voxel in the current frame.

[0027] Optionally, the collision potential energy of each clothing particle in the current frame is determined based on the position information of the clothing particles in the current frame and the spatial distance field, specifically including:

[0028] The three-dimensional voxel where each clothing material point is located is determined based on the clothing material point location information of the current frame;

[0029] The spatial distance field parameters of each clothing material point are determined based on the three-dimensional voxel where each clothing material point is located and the spatial distance field of the current frame.

[0030] The directional distance fitting value of each clothing material point is determined based on the position information of the clothing material points in the current frame and the spatial distance field parameters of each clothing material point.

[0031] The collision potential energy of each clothing material point is determined based on the directional distance fitting value of each clothing material point.

[0032] Optionally, based on the adjacency information and particle-voxel index of the current frame, self-collision detection is performed on each clothing particle in the current frame, and self-collision potential energy is applied to clothing particle pairs that exhibit self-collision, specifically including:

[0033] Based on the adjacency information of the current frame, each clothing material point that has no adjacency relationship in the topology is identified as a candidate clothing material point, and the three-dimensional voxel where the candidate clothing material point is located is identified as the corresponding candidate voxel.

[0034] For any candidate clothing material point, self-collision detection is performed between the candidate clothing material point and each target clothing material point according to the particle-voxel index of the current frame; each target clothing material point includes: the candidate voxel and all clothing material points contained in the neighboring voxels of the candidate voxel.

[0035] Apply self-collision potential energy to a pair of clothing particles that are capable of self-collision.

[0036] Optionally, based on the particle-voxel index of the current frame, self-collision detection is performed between the candidate clothing material points and the target clothing material points, specifically including:

[0037] Based on the particle-voxel index, calculate the Euclidean distance between the candidate clothing material point and each of the target clothing material points, and determine whether each of the Euclidean distances is less than a first set threshold to obtain a first judgment result;

[0038] If the first judgment result is negative, then there is no self-collision between the candidate clothing material point and each of the target clothing material points;

[0039] If the first judgment result is yes, then the triangular facet distance between the candidate clothing material point and the corresponding target clothing material point is calculated based on the KKT conditions, and it is determined whether the triangular facet distance is less than the second set threshold to obtain the second judgment result;

[0040] If the second judgment result is negative, then there is no self-collision between the candidate clothing material point and the corresponding target clothing material point;

[0041] If the second judgment result is yes, then there is a self-collision between the candidate clothing material point and the corresponding target clothing material point.

[0042] Optionally, the solution is performed with the objective of minimizing the sum of the collision potential energy and the self-collision potential energy to obtain the coordinates of the optimal points for collision-free and self-collision scenarios, specifically including:

[0043] Construct an objective function based on the sum of the collision potential energy and the self-collision potential energy;

[0044] The objective function is minimized using the gradient descent method to obtain the coordinates of the best points that are neither collision-free nor self-collision-free.

[0045] A collision and self-collision handling system for clothing simulation includes:

[0046] The position information acquisition module is used to acquire the particle position information, normal vector information, and adjacency information of the current frame; the particle position information includes: clothing particle position information and human body particle position information;

[0047] The 3D voxel segmentation module is used to determine the axis-aligned cuboid bounding box of the current frame based on the particle position information of the current frame, and to segment the axis-aligned cuboid bounding box of the current frame into several 3D voxels of the same size according to the set granularity.

[0048] The spatial distance field construction module is used to construct the spatial distance field of the current frame based on the human mass point position information, normal vector information, and three-dimensional voxels of the current frame.

[0049] The collision potential energy determination module is used to determine the collision potential energy of each clothing material point in the current frame based on the clothing material point position information and spatial distance field in the current frame.

[0050] The particle-voxel index determination module is used to determine the particle-voxel index of the current frame based on the position information of the clothing particles and the three-dimensional voxels; the particle-voxel index represents the clothing particles contained in each three-dimensional voxel.

[0051] The self-collision potential energy determination module is used to perform self-collision detection on each clothing material point in the current frame based on the adjacency information and the mass point-voxel index, and to apply self-collision potential energy to clothing material point pairs that have self-collisions.

[0052] The optimization solution module is used to solve for any clothing material point with the objective of minimizing the sum of the collision potential energy and the self-collision potential energy, and to obtain the coordinates of the best point with no collision and self-collision; the coordinates of the best point are used to update the position of the clothing material point in the next frame.

[0053] An electronic device includes a memory and a processor, the memory storing a computer program, and the processor running the computer program to cause the electronic device to perform the above-described collision and self-collision handling method in clothing simulation.

[0054] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described collision and self-collision handling method in clothing simulation.

[0055] According to specific embodiments provided by the present invention, the present invention discloses the following technical effects:

[0056] The collision and self-collision handling method in clothing simulation provided by this invention adopts the approach of segmenting three-dimensional voxels and constructing a spatial distance field. Segmenting three-dimensional voxels effectively simplifies the calculation of directed distances to the human body surface while maintaining accuracy. After segmentation into three-dimensional voxels, a directed spatial distance field is constructed within each voxel, allowing the directed distance from any position within the voxel to the human body surface to be directly calculated using this field. This avoids a complex polling process, and the construction of the directed spatial distance field within the three-dimensional voxels can be performed in parallel, further improving simulation speed. Therefore, this invention can achieve real-time and accurate handling of collisions and self-collisions in clothing simulation. Attached Figure Description

[0057] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0058] Figure 1 A flowchart of the collision and self-collision handling method in clothing simulation provided by the present invention;

[0059] Figure 2 A schematic diagram of three-dimensional voxel segmentation provided by the present invention;

[0060] Figure 3 A thermogram of a certain section of the spatial distance field provided by this invention;

[0061] Figure 4 This is a schematic diagram of the dynamic simulation results of clothing provided by the present invention;

[0062] Figure 5 This is a block diagram of the collision and self-collision handling system in clothing simulation provided by the present invention.

[0063] Symbol explanation:

[0064] Location information acquisition module-1, 3D voxel segmentation module-2, spatial distance field construction module-3, collision potential energy determination module-4, particle-voxel index determination module-5, self-collision potential energy determination module-6, optimization solution module-7. Detailed Implementation

[0065] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0066] The purpose of this invention is to provide a method, system, device, and medium for handling collisions and self-collisions in clothing simulation, so as to achieve real-time and accurate handling of collisions and self-collisions.

[0067] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0068] Example 1

[0069] This invention provides a method for handling collisions and self-collisions in clothing simulation. Collisions refer to collisions between clothing and other models (taking the commonly used human body model as an example), while self-collisions refer to collisions within the clothing model itself. Figure 1 As shown, the method includes:

[0070] Step S1: Obtain the particle position information, normal vector information, and adjacency information of the current frame; the particle position information includes: the position information of clothing particles (i.e., the particle of the clothing triangular facet model) and the position information of human body particles (i.e., the particle of the human body triangular facet model). The adjacency information specifically refers to the adjacency information between clothing particles. The normal vector information specifically refers to the normal vector information of the human body particles and the normal vector information of the clothing particles.

[0071] Specifically, by reading the clothing and human body triangular facet model files, the position information, adjacency information, and normal vector information of the mass points can be obtained. The clothing and human body triangular facet model files are in OBJ file format. OBJ files contain the position information of each model mass point and the index information of the three mass points of each model triangular facet. They usually also contain the normal vector information of the mass points. If not, the normal vector of the triangular facet can be calculated from its three vertices, and then interpolated to obtain the normal vector of the mass points.

[0072] Step S2: Determine the axis-aligned cuboid bounding box of the current frame based on the particle position information of the current frame, and divide the axis-aligned cuboid bounding box of the current frame into several three-dimensional voxels of the same size according to the set granularity.

[0073] Specifically, based on the positional information of the mass points in the clothing and human body model, an axis-aligned cuboid bounding box that can enclose all mass points is calculated. The bounding box is represented using the coordinates of its minimum and maximum vertices, such as... Figure 2As shown, the bounding box is divided into three-dimensional voxels of the same size along the three coordinate axes XYZ with a set granularity.

[0074] The calculation method for the axis-aligned bounding box is as follows: Find the maximum and minimum XYZ coordinates of all clothing and human model mass points, and use these as the maximum and minimum vertices of the bounding box, forming a shape like... Figure 2 The bounding box is shown. The segmented 3D voxels are stored in ZYX order, assuming the number of segmented voxels is S. x *S y *S z The coordinates of the three-dimensional voxel with index q are (x q ,y q ,z q If the coordinates of a 3D voxel are given, then the correspondence between the voxel coordinates and indices is as follows:

[0075] q = x q *S y *S z +y q *S z +z q (1-1)

[0076] In subsequent steps, after segmenting into 3D voxels, a set of fitting parameters is calculated for each voxel. These parameters are used to calculate the directed distance from any position within the voxel space to the human body surface. Segmenting into 3D voxels effectively simplifies the calculation of the directed distance to the human body surface, which is crucial for collision handling. Since human body models are often very complex, calculating the nearest distance from any position to the human body surface by polling the distances to various points on the surface is extremely time-consuming. After segmenting into 3D voxels, a directed spatial distance field can be constructed within each voxel. The directed distance from any position within the voxel to the human body surface is then directly calculated using this distance field, avoiding the complex polling process. Furthermore, the construction of the directed spatial distance field within the 3D voxels can be completely parallelized, further accelerating the process.

[0077] Step S3: Construct the spatial distance field of the current frame based on the human mass point position information, normal vector information, and three-dimensional voxels. Step S3 specifically includes:

[0078] When the current frame is a keyframe: the propagation source voxel of the current frame is determined based on the human body mass point position information and the three-dimensional voxel; the propagation source voxel is a three-dimensional voxel that intersects with the mass points on the surface of the human body model; the spatial distance field parameters of the propagation source voxel of the current frame are determined based on Legendre polynomial fitting based on the human body mass point position information and normal vector information of the current frame; the spatial distance field parameters of the propagation source voxel of the current frame are propagated to neighboring voxels through a spatial propagation function based on the normal vector information and the center position coordinates of the three-dimensional voxel of the current frame to obtain the spatial distance field of the current frame.

[0079] When the current frame is not a key frame: based on the human mass point position information, normal vector information and the center position coordinates of the three-dimensional voxel in the current frame, the spatial distance field parameters of the previous frame are propagated to the current frame through the temporal propagation function to obtain the spatial distance field of the current frame.

[0080] Specifically, the spatial distance field parameters of the propagation source voxels in the current frame are determined based on Legendre polynomial fitting, according to the human mass point position information and normal vector information of the current frame. This includes: constructing a directed distance function of the propagation source voxels in the current frame based on the human mass point position information and normal vector information of the current frame; fitting the directed distance function of the propagation source voxels in the current frame using Legendre polynomial to obtain a fitted polynomial; and solving the coefficients of the fitted polynomial using the Gauss-Legendre numerical quadrature formula to obtain the spatial distance field parameters of the propagation source voxels in the current frame.

[0081] In this embodiment, the directed distance function is defined as the shortest distance to the surface of the human model. The directed distance function of the propagation source voxel is calculated from the position of its corresponding human mass point and the normal vector. The directed distance function is fitted using Legendre polynomials. The polynomial coefficients are solved by minimizing the fitting error, which is ultimately equivalent to solving the integral of the product of the Legendre polynomial basis and the directed distance function. The integral is solved using the Gauss-Legendre numerical quadrature formula to obtain the coefficients of the fitted polynomial, which are also the parameters of the spatial distance field.

[0082] The process of constructing a spatial distance field will be discussed in detail below.

[0083] Step (1): Based on the three-dimensional voxels obtained above, calculate the voxels that intersect with the particles on the surface of the human model as propagation sources, record the particle indices corresponding to the voxels, and construct the spatial distance field starting from these propagation source voxels. In this process, the directed distance function is fitted using Legendre polynomial basis.

[0084] The calculation of the propagation source voxel specifically involves: obtaining the three-dimensional voxel coordinates of the human mass position based on the human mass position information, the minimum vertex position of the bounding box, and the three-dimensional voxel size; and further calculating the voxel index using Formula 1-1. The directed distance function is the distance from the sampling point to the human surface calculated using the human mass position information and normal vector information. The coefficients of the Legendre polynomial are solved using the Gauss-Legendre numerical quadrature formula, and the coefficients are stored in the corresponding propagation source voxel.

[0085] The directed distance function represents the nearest distance to the human body surface, assuming Represents the directed distance function. Represents a symbolic function. This indicates any input position. Let B represent a position on the surface of the human body, and I represent the set of position vectors on the surface of the human body. The directed distance function is negative inside the human body and positive elsewhere. The specific form of the directed distance function is:

[0086]

[0087] The directed distance function is fitted using Legendre polynomials; the m-th order fitting polynomial is used. for:

[0088]

[0089] Where m represents the highest order. Representing a specific order, it is a three-dimensional vector, whose three dimensions k1, k2, and k3 represent respectively... The order of the three Legendre polynomials. Let x1, x2, and x3 represent any input position vector. The x-coordinate, y-coordinate, and vertices of the coordinate (for any three-dimensional coordinate, the subscript 1 represents the x-coordinate, the subscript 2 represents the y-coordinate, and the subscript 3 represents the vertices). Represents the coefficients of the fitted polynomial. This represents the Legendre polynomial basis, after offsetting and normalizing, within a certain range of voxels, and its specific form is:

[0090]

[0091] Where (a1,a2,a3) and (b1,b2,b3) represent the minimum and maximum vertices of a three-dimensional voxel, respectively. Let k1, k2, and k3 represent Legendre polynomials with orders k1, k2, and k3 in the three dimensions, respectively. polynomial basis It is obtained by multiplying Legendre polynomials in three dimensions.

[0092] The goal of fitting is to calculate a set of optimal fitting polynomial coefficients. The specific process is as follows:

[0093] Based on the idea of ​​the least squares method, fitting is essentially about minimizing the squared error between the Legendre polynomial and the directed distance function to obtain the optimal Legendre polynomial coefficients. Assume the column vector composed of the basis coefficients of each order of the polynomial to be fitted is... The column vectors formed by the basis of polynomials of each order are Then the fitting polynomial Can be written express The transpose of , assuming the spatial range covered by a single voxel is Ω, then the specific target of the fitting is:

[0094]

[0095] by express The transpose of is used to solve this minimization optimization problem, which is equivalent to solving the following system of linear equations:

[0096]

[0097] Due to the mutual orthogonality of the Legendre polynomial basis, the equations in the system can be calculated. The coefficient matrix is ​​an identity matrix, so calculating the fitting parameters is equivalent to calculating the integral on the right-hand side of the equation system. Since directed distance functions typically do not have a specific functional expression, numerical integration is generally used for calculation.

[0098] For accuracy reasons, the Gauss-Legend quadrature formula is used to solve the problem:

[0099]

[0100] Where f(x) represents any function to be integrated, a and b represent the lower and upper bounds of integration, respectively, i represents the index of the integrator node, n represents the number of integrator nodes, and ω i ξ represents the product coefficient. i This represents the quadrature nodes, which are also the zeros of Legendre polynomials of all orders; both can be obtained by looking up a table. Therefore, it can be deduced that... Formula for calculating the coefficients of the Legendre polynomial basis:

[0101]

[0102] Where (a1,a2,a3) and (b1,b2,b3) represent the minimum and maximum vertices of a 3D voxel, respectively; i1,i2,i3 represent the indices of the quadrature nodes in the three dimensions; and n1,n2,n3 represent the number of quadrature nodes in the three dimensions. These represent the product coefficients in the three dimensions. Represents the coordinates of the quadrature nodes in three dimensions. express The values ​​of the order-fit polynomial basis at the three-dimensional quadrature nodes. This represents the directed distance value at the 3D quadrature node.

[0103] The source voxel is the voxel containing the surface particles of the human model. Its directed distance function is the normal distance to the human particles it contains. The information of the human particles can be obtained through the human particle index corresponding to the source voxel recorded in the above steps. The specific form of the normal distance is:

[0104]

[0105] in, To propagate a vector at any position within the source voxel, and These are the position vector and normal vector of the human body mass, respectively.

[0106] Based on the fitting coefficient calculation formula 1-8 and the directed distance function 1-9 in the propagation source voxel, the polynomial fitting coefficient in the propagation source voxel can be solved. These fitting coefficients are stored as parameters of the spatial distance field in the corresponding propagation source voxel. Based on the fitting coefficients stored within the voxel and combined with fitting polynomials 1-3, the directed distance from any position within the voxel to the human body surface can be calculated, which is used to calculate the collision potential energy. Each voxel within the spatial distance field needs to have this set of parameters calculated in this way, ensuring that the directed distance from any position within the spatial distance field to the human body surface can be calculated quickly. In subsequent steps, the parameters of the propagation source voxel will be propagated to other voxels.

[0107] Step (2): Propagate the spatial distance field parameters of the source voxel to neighboring voxels through a spatial propagation function, iterating multiple times until enough voxels are propagated, thus constructing a system as shown in the figure. Figure 3 The complete spatial distance field is shown.

[0108] The term "domain voxels" refers to 26 voxels that are adjacent to each other on faces, edges, and vertices. The spatial propagation function is derived from the fitting parameter calculation process using Taylor expansion, primarily leveraging spatial adjacency to avoid complex polynomial fitting processes. The propagation process is iterated multiple times until a sufficient number of voxels are propagated. The entire spatial distance field is represented by Legendre polynomial coefficients stored in the voxels. The number of iterations determines the depth range of the constructed spatial distance field. This depth range is closely related to the simulation time step; typically, it is necessary to ensure that the displacement of a material point within a given time step does not exceed this depth range.

[0109] Starting from formulas 1-8 for calculating the spatial distance field parameters, since all voxels have the same size and the selected quadrature nodes are also the same (all are zeros of the Legendre polynomial), the only difference in calculating the parameters of each voxel lies in the directed distance function. Due to spatial adjacency, the difference in the directed distance function between adjacent voxels can be approximated by a fixed offset, which refers to the projection of the voxel center position difference vector onto the corresponding human surface normal vector. Based on the above premises, and according to the first-order Taylor expansion, the formula for calculating the spatial distance field parameters of the propagated neighboring voxels is:

[0110]

[0111]

[0112]

[0113] in, These are the position coordinates of the centers of the two voxels, respectively. Here, Φ represents the directed distance value, and ΔΦ represents the directed distance offset. This can be pre-calculated because the voxel size, quadrature nodes, and quadrature coefficients are all fixed. ΔΦ, the previously mentioned fixed offset, requires the voxel-corresponding human mass index and the obtained human mass normal vector information recorded in the above steps for calculation. Thus, the propagation process can be simplified to applying an offset to the propagation source parameters to obtain the spatial distance field parameters of the propagated voxel.

[0114] Spatial distance field parameters of adjacent voxels Substituting the parameters into propagation formula 1-10, the spatial distance field parameters of the current voxel can be calculated. This avoids the complex parameter fitting process described in step (1). After multiple iterative propagations, each voxel in the spatial distance field will have a set of parameters for calculating the directed distance to the human body surface. These parameters will be stored in an array indexed by voxels, thus completing the construction of the spatial distance field within a frame. The entire construction process can be summarized as follows: first, use step (1) to calculate the parameters of the propagation source voxel, and then use step (2) to propagate the parameters of the propagation source voxel to the remaining voxels through neighborhood propagation.

[0115] Step (3): The spatial distance field parameters are propagated between adjacent frames through a temporal propagation function to simplify the distance field construction process for non-key frames.

[0116] Since the human body model is in motion, the spatial distance field is different for each frame and needs to be constructed frame by frame. However, due to the continuity of motion, the changes in the position and shape of the human body model between adjacent frames are usually continuous and subtle. Therefore, the difference in the spatial distance field between adjacent frames is not significant. The spatial distance field parameters of adjacent frames can be calculated by the propagation formula in the time domain. That is, the spatial distance field construction process described in steps (1) and (2) can be simplified by using the propagation method of adjacent frame parameters.

[0117] The propagation in the temporal domain is similar to the spatial adjacent voxel propagation in step (2). The main idea is to use temporal continuity to avoid the complex propagation source construction and iterative spatial propagation process. The only difference is that the offset ΔΦ in temporal propagation refers to the projection of the difference vector between the center positions of the same index voxel in adjacent frames onto the normal vector of the corresponding human body surface. The specific form is:

[0118]

[0119]

[0120] in, These are the position coordinates of the center of the same voxel in the current frame and the previous frame, respectively. This is the normal vector of the corresponding human body mass point. and These represent the spatial distance field parameters of the current frame and the previous frame, respectively. It is the same as that described in Formula 1-10 for spatial propagation.

[0121] The problem of accumulated error from propagating over multiple frames can be addressed by setting keyframes. Specifically, a keyframe is set every 5-10 frames. On the keyframe, the distance field construction method described in steps (1) and (2) for spatial propagation starting from the propagation source is used. On non-keyframes, the parameters of the previous frame are substituted into the formula using temporal propagation formulas 1-11 to calculate the parameters of the current frame, and these parameters are stored in the parameter array of the voxel index. This temporal propagation strategy effectively utilizes temporal continuity to simplify the complex spatial distance field parameter fitting process, significantly accelerating the construction of the spatial distance field on non-keyframes.

[0122] Step S4: Determine the collision potential energy of each clothing material point in the current frame based on the position information of the clothing material points and the spatial distance field.

[0123] Step S4 specifically includes: determining the three-dimensional voxel where each clothing material point is located based on the clothing material point position information of the current frame; determining the spatial distance field parameters of each clothing material point based on the three-dimensional voxel where each clothing material point is located and the spatial distance field of the current frame; determining the directed distance fitting value of each clothing material point based on the clothing material point position information of the current frame and the spatial distance field parameters of each clothing material point; and determining the collision potential energy of each clothing material point based on the directed distance fitting value of each clothing material point.

[0124] Specifically, the collision potential energy of each clothing material point is calculated in parallel during the clothing simulation process based on the constructed spatial distance field. Specifically, the voxel index of the clothing material point obtained in the above steps can be calculated, and the corresponding spatial distance field parameters are then obtained from the parameter array calculated in step (2) or step (3) based on the voxel index. Furthermore, the parameters and the clothing material point position are then combined... Substituting into the fitting polynomial 1-3, the directed distance fitting value can be calculated. Therefore, the corresponding collision potential energy can be calculated:

[0125]

[0126] Where α represents the collision potential energy coefficient, used to adjust the degree of influence of collision potential energy on the position of the particle. This represents the location of a point in the clothing material. The calculated directed distance fitting value... When the value is less than 0, it indicates that the clothing particles are inside the human body model, meaning a collision has occurred, and collision potential energy needs to be applied for processing. The collision potential energy is calculated based on the directed distance; the potential energy is 0 outside the human body, and the potential energy increases with distance from the human body surface inside the body.

[0127] Based on steps S1-S4 above, after calculating the collision potential energy of each clothing particle, the optimal non-collision clothing particle position update is obtained by solving the minimization optimization problem using the collision potential energy as the objective function. From the form of the collision potential energy, it can be deduced that the particles penetrating into the human body model will acquire a negative gradient direction pointing outwards. Therefore, during the gradient descent iterative optimization process, the penetrating particles can be gradually moved out, resulting in the optimal clothing particle position update after collision processing.

[0128] Step S5: Determine the particle-voxel index of the current frame based on the position information of the clothing particles and the three-dimensional voxels; the particle-voxel index represents the clothing particles contained in each three-dimensional voxel.

[0129] Specifically, based on the location information of the fabric particles obtained in step S1 and the three-dimensional voxel segmentation method in step S2, the voxel index of the fabric particles is calculated to form a key-value pair array of particle index and voxel index. The array is sorted according to the voxel index to obtain the fabric particle index contained in each voxel.

[0130] Step S6: Based on the adjacency information and particle-voxel index of the current frame, perform self-collision detection on each clothing particle in the current frame, and apply self-collision potential energy to clothing particles that have self-collisions.

[0131] Step S6 specifically includes: based on the adjacency information of the current frame, identifying each clothing material point that has no adjacency relationship in the topology as a candidate clothing material point, and identifying the three-dimensional voxel where the candidate clothing material point is located as the corresponding candidate voxel; for any candidate clothing material point, performing self-collision detection between the candidate clothing material point and each target clothing material point based on the particle-voxel index of the current frame; each target clothing material point includes: the candidate voxel and all clothing material points contained in the neighboring voxels of the candidate voxel; applying self-collision potential energy to clothing material point pairs that have self-collision.

[0132] Specifically, based on the particle-voxel index of the current frame, self-collision detection is performed on the candidate clothing material points and target clothing material points. This includes: calculating the Euclidean distance between the candidate clothing material points and each of the target clothing material points based on the particle-voxel index, and determining whether each Euclidean distance is less than a first preset threshold to obtain a first judgment result; if the first judgment result is negative, there is no self-collision between the candidate clothing material points and each of the target clothing material points; if the first judgment result is positive, calculating the triangular facet distance between the candidate clothing material points and the corresponding target clothing material points based on KKT conditions, and determining whether the triangular facet distance is less than a second preset threshold to obtain a second judgment result; if the second judgment result is negative, there is no self-collision between the candidate clothing material points and the corresponding target clothing material points; if the second judgment result is positive, there is a self-collision between the candidate clothing material points and the corresponding target clothing material points.

[0133] Specifically, for each material point in the clothing processed in parallel, self-collision detection is performed on the voxel in which it is located and the material points contained in the adjacent voxels, and self-collision potential energy is applied to the material points in the clothing that are detected as self-collision points.

[0134] Among them, particles that are adjacent in the topology will not undergo self-collision detection because the triangular facets in the triangular facet model are not bent. The topological adjacency relationship can be determined using the adjacency information of the clothing model obtained in step S1.

[0135] Self-collision detection includes particle distance detection and triangular facet intersection detection. When the distance between particles and the distance between adjacent triangular faces are less than a certain threshold, it will be determined that a self-collision has occurred.

[0136] Particle distance detection measures the Euclidean distance between the current clothing particle and its voxel, as well as the particles contained within adjacent voxels. If the distance is less than a certain set threshold, it is determined that a self-collision may occur, and further triangular facet intersection detection is performed on adjacent triangular facets to obtain accurate self-collision detection results.

[0137] The triangular facet intersection detection uses a fast triangle distance calculation method based on KKT conditions. Calculating the spatial distance between two triangles is equivalent to finding the shortest distance between two points inside the two triangles. Points inside the triangles can be represented by centroid coordinates, thus transforming the problem into a constrained optimization problem with centroid coordinates.

[0138]

[0139] in, These represent the positions of points inside the two triangles, expressed in centroid coordinates. This represents the three-dimensional position of a point within the first triangle. Let λ1, μ1, ν1 represent the three-dimensional position of a point inside the second triangle, and let λ2, μ2, ν2 represent the centroid coordinates of a point inside the first triangle, corresponding to the weighting coefficients of the three vertices of the first triangle, respectively. Let λ2, μ2, ν2 represent the centroid coordinates of a point inside the second triangle, corresponding to the weighting coefficients of the three vertices of the second triangle, respectively.

[0140] Constraints are introduced using Lagrange multipliers to solve the problem. Since it's a convex optimization problem, the optimal solution must satisfy the KKT conditions. All possible candidate solutions are listed based on the KKT conditions, and the objective function values ​​of each candidate solution are calculated and compared. The minimum objective function value is selected as the triangle distance. The triangle distance can be used to determine whether two triangles intersect, thus determining whether a self-collision has occurred. Because the number of candidate solutions is finite and the calculation is simple, this triangle intersection detection method is simpler and faster than traditional point-edge and point-face intersection detection methods.

[0141] For particle pairs detected as having engaged in self-collision, a self-collision potential energy is applied:

[0142]

[0143] Wherein, β represents the self-collision potential energy coefficient, used to adjust the influence of self-collision potential energy on the particle position update. Let represent the position vectors of the two self-colliding clothing particles, and ε represent the safe distance threshold. For clothing particle pairs that are not detected to have self-collided, applying a self-collision potential energy related to the distance between the particle pairs can maintain a safe distance between them, thereby avoiding self-collision.

[0144] Based on steps S1-S2 and S5-S6 above, after calculating the self-collision potential energy of each clothing particle pair, the optimization problem is solved by minimizing the self-collision potential energy as the objective function, thus obtaining the optimal update of the non-self-collision clothing particle position. From the form of the self-collision potential energy, it can be deduced that a self-collision clothing particle will acquire a negative gradient direction away from the other particle, thereby gradually moving out of the self-collision range during the gradient descent optimization process until it converges to a safe distance without self-collision, ultimately obtaining the optimal point position update for both collision-free and self-collision-free points.

[0145] Step S7: For any clothing material point, solve the problem with the goal of minimizing the sum of the collision potential energy and the self-collision potential energy to obtain the coordinates of the best point with no collision and self-collision; the coordinates of the best point are used to update the position of the clothing material point in the next frame.

[0146] Specifically, an objective function is constructed based on the sum of the collision potential energy and the self-collision potential energy; the objective function is minimized and optimized using the gradient descent method to obtain the coordinates of the best points with no collision and self-collision.

[0147] In this process, steps S1-S2 are used to obtain particle position information and segment 3D voxels; steps S3-S4 are used to handle collisions between clothing and the human body model; and steps S5-S6 are used to handle collisions within the clothing model itself. Both types of collisions occur at any time during the clothing simulation and are handled by constructing potential energy as the objective function and then minimizing it. The construction processes for collision potential energy and self-collision potential energy are different, but the two potential energies are ultimately combined as the objective function, and the optimization problem in step S7 is used to obtain the optimal point positions for collision-free and self-collision scenarios. The dynamic simulation results of clothing obtained using the collision and self-collision processing methods provided by this invention are shown below. Figure 4 As can be seen, the position of the clothing model is updated accordingly as the human body model moves, and there is no obvious collision or penetration problem.

[0148] In summary, the collision and self-collision handling method in clothing simulation provided by this invention includes: reading clothing and human body triangular facet model files; calculating the bounding box aligned with the axes and dividing the bounding box into three-dimensional voxels of the same size; in keyframes, calculating voxels intersecting with human body model particles as propagation sources, constructing a spatial distance field in the propagation source voxels, and propagating the spatial distance field parameters of the propagation source voxels to neighboring voxels through a spatial propagation formula to construct a complete spatial distance field; in non-keyframes, propagating the spatial distance field parameters between adjacent frames through a temporal propagation formula; calculating the collision potential energy of clothing particles in parallel during clothing simulation based on the spatial distance field; sorting the clothing particles contained in each voxel by the voxel index where the clothing particles are located to obtain the clothing particles contained in each voxel; for each clothing particle, performing self-collision detection on the particles contained in its voxel and adjacent voxels, and applying self-collision potential energy to the self-collision clothing particles; using the self-collision potential energy and the previously mentioned collision potential energy together as the objective function to solve a minimization optimization problem to obtain the optimal update of the positions of the collision-free and self-collision clothing particles. Therefore, the collision and self-collision processing method based on voxel segmentation and spatial distance field provided by this invention can avoid complex collision query process and ensure high parallelism, thereby improving simulation speed.

[0149] Example 2

[0150] To implement the method corresponding to Embodiment 1 above and achieve the corresponding functions and technical effects, a collision and self-collision handling system for clothing simulation is provided below. For example... Figure 5 The system includes:

[0151] The position information acquisition module 1 is used to acquire the particle position information, normal vector information and adjacency information of the current frame; the particle position information includes: clothing particle position information and human body particle position information.

[0152] The 3D voxel segmentation module 2 is used to determine the axis-aligned cuboid bounding box of the current frame based on the particle position information of the current frame, and to segment the axis-aligned cuboid bounding box of the current frame into several 3D voxels of the same size according to the set granularity.

[0153] The spatial distance field construction module 3 is used to construct the spatial distance field of the current frame based on the human mass point position information, normal vector information and three-dimensional voxels of the current frame.

[0154] The collision potential energy determination module 4 is used to determine the collision potential energy of each clothing material point in the current frame based on the clothing material point position information and spatial distance field in the current frame.

[0155] The particle-voxel index determination module 5 is used to determine the particle-voxel index of the current frame based on the position information of the clothing particles and the three-dimensional voxels; the particle-voxel index represents the clothing particles contained in each three-dimensional voxel.

[0156] The self-collision potential energy determination module 6 is used to perform self-collision detection on each clothing material point in the current frame based on the adjacency information and the mass point-voxel index, and to apply self-collision potential energy to the clothing material points that have self-collisions.

[0157] The optimization solution module 7 is used to solve for any clothing material point with the objective of minimizing the sum of the collision potential energy and the self-collision potential energy, and to obtain the coordinates of the best point with no collision and self-collision; the coordinates of the best point are used to update the position of the clothing material point in the next frame.

[0158] Example 3

[0159] This invention also provides an electronic device, including a memory and a processor. The memory stores a computer program, and the processor runs the computer program to enable the electronic device to perform the collision and self-collision handling method in the clothing simulation of Embodiment 1. The electronic device may be a server.

[0160] In addition, the present invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the collision and self-collision handling method in the clothing simulation of Embodiment 1.

[0161] In summary, this invention addresses the shortcomings and deficiencies of existing collision and self-collision handling methods in clothing simulation. It proposes a collision and self-collision handling method, system, device, and medium based on voxel segmentation and a spatial distance field. The spatial distance field is represented using three-dimensional voxels, fully utilizing spatial and temporal adjacency to avoid complex collision lookup processes. Furthermore, Legendre polynomial fitting and KKT conditional calculation of triangle distances ensure high accuracy of the distance field, effectively handling collisions and self-collisions. This method exhibits high parallelism, enabling parallel processing of clothing material points and three-dimensional voxels, ensuring real-time simulation performance.

[0162] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the systems disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple; relevant parts can be referred to the method section.

[0163] This document uses specific examples to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. Furthermore, those skilled in the art will recognize that, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A method for handling collisions and self-collisions in clothing simulation, characterized in that, include: Obtain the particle position information, normal vector information, and adjacency information of the current frame; The particle position information includes: clothing particle position information and human body particle position information; The axis-aligned cuboid bounding box of the current frame is determined based on the particle position information of the current frame, and the axis-aligned cuboid bounding box of the current frame is divided into several three-dimensional voxels of the same size according to the set granularity. The spatial distance field of the current frame is constructed based on the human mass point position information, normal vector information, and three-dimensional voxels, specifically including: When the current frame is a keyframe: The propagation source voxel of the current frame is determined based on the human body mass point position information and the three-dimensional voxel; the propagation source voxel is a three-dimensional voxel that intersects with the mass points on the surface of the human body model. Based on the human mass point position information and normal vector information of the current frame, the spatial distance field parameters of the propagation source voxel of the current frame are determined based on Legendre polynomial fitting, specifically including: Construct a directed distance function for the propagation source voxel of the current frame based on the human mass point position information and normal vector information of the current frame; The directed distance function of the propagation source voxel in the current frame is fitted using Legendre polynomials to obtain the fitted polynomial. The coefficients of the fitted polynomial are solved using the Gauss-Legend de Gauss numerical quadrature formula to obtain the spatial distance field parameters of the propagation source voxel in the current frame. Based on the normal vector information of the current frame and the center position coordinates of the three-dimensional voxels, the spatial distance field parameters of the propagation source voxels of the current frame are propagated to the neighboring voxels through the spatial propagation function to obtain the spatial distance field of the current frame. When the current frame is not a key frame: Based on the human mass point position information, normal vector information, and center position coordinates of the three-dimensional voxels in the current frame, the spatial distance field parameters of the previous frame are propagated to the current frame through a time-domain propagation function to obtain the spatial distance field of the current frame. The collision potential energy of each clothing point in the current frame is determined based on the position information of the clothing points and the spatial distance field in the current frame. The particle-voxel index of the current frame is determined based on the position information of the clothing particles and the three-dimensional voxels; the particle-voxel index represents the clothing particles contained in each three-dimensional voxel. Based on the adjacency information and particle-voxel index of the current frame, self-collision detection is performed on each clothing particle in the current frame, and self-collision potential energy is applied to clothing particle pairs that have self-collisions, specifically including: Based on the adjacency information of the current frame, each clothing material point that has no adjacency relationship in the topology is identified as a candidate clothing material point, and the three-dimensional voxel where the candidate clothing material point is located is identified as the corresponding candidate voxel. For any candidate clothing material point, self-collision detection is performed between the candidate clothing material point and each target clothing material point according to the particle-voxel index of the current frame; each target clothing material point includes: the candidate voxel and all clothing material points contained in the neighboring voxels of the candidate voxel. Apply self-collision potential energy to clothing material point pairs that are capable of self-collision; For any clothing material point, the solution is performed with the objective of minimizing the sum of the collision potential energy and the self-collision potential energy to obtain the coordinates of the best point with no collision and self-collision; the coordinates of the best point are used to update the position of the clothing material point in the next frame.

2. The collision and self-collision handling method in clothing simulation according to claim 1, characterized in that, The collision potential energy of each clothing particle in the current frame is determined based on the position information of the clothing particles in the current frame and the spatial distance field, specifically including: The three-dimensional voxel where each clothing material point is located is determined based on the clothing material point location information of the current frame; The spatial distance field parameters of each clothing material point are determined based on the three-dimensional voxel where each clothing material point is located and the spatial distance field of the current frame. The directional distance fitting value of each clothing material point is determined based on the position information of the clothing material points in the current frame and the spatial distance field parameters of each clothing material point. The collision potential energy of each clothing material point is determined based on the directional distance fitting value of each clothing material point.

3. The collision and self-collision handling method in clothing simulation according to claim 1, characterized in that, Based on the particle-voxel index of the current frame, self-collision detection is performed between the candidate clothing material points and the target clothing material points, specifically including: Based on the particle-voxel index, calculate the Euclidean distance between the candidate clothing material point and each of the target clothing material points, and determine whether each of the Euclidean distances is less than a first set threshold to obtain a first judgment result; If the first judgment result is negative, then there is no self-collision between the candidate clothing material point and each of the target clothing material points; If the first judgment result is yes, then the triangular facet distance between the candidate clothing material point and the corresponding target clothing material point is calculated based on the KKT conditions, and it is determined whether the triangular facet distance is less than the second set threshold to obtain the second judgment result; If the second judgment result is negative, then there is no self-collision between the candidate clothing material point and the corresponding target clothing material point; If the second judgment result is yes, then there is a self-collision between the candidate clothing material point and the corresponding target clothing material point.

4. The collision and self-collision handling method in clothing simulation according to claim 1, characterized in that, The solution is performed with the objective of minimizing the sum of the collision potential energy and the self-collision potential energy, to obtain the coordinates of the optimal points for collision-free and self-collision scenarios, specifically including: Construct an objective function based on the sum of the collision potential energy and the self-collision potential energy; The objective function is minimized using the gradient descent method to obtain the coordinates of the best points that are neither collision-free nor self-collision-free.

5. A collision and self-collision handling system for clothing simulation, characterized in that, include: The position information acquisition module is used to acquire the particle position information, normal vector information, and adjacency information of the current frame; The particle position information includes: clothing particle position information and human body particle position information; The 3D voxel segmentation module is used to determine the axis-aligned cuboid bounding box of the current frame based on the particle position information of the current frame, and to segment the axis-aligned cuboid bounding box of the current frame into several 3D voxels of the same size according to the set granularity. The spatial distance field construction module is used to construct the spatial distance field of the current frame based on the human mass point position information, normal vector information, and three-dimensional voxels. Specifically, it includes: When the current frame is a keyframe: The propagation source voxel of the current frame is determined based on the human body mass point position information and the three-dimensional voxel; the propagation source voxel is a three-dimensional voxel that intersects with the mass points on the surface of the human body model. Based on the human mass point position information and normal vector information of the current frame, the spatial distance field parameters of the propagation source voxel of the current frame are determined based on Legendre polynomial fitting, specifically including: Construct a directed distance function for the propagation source voxel of the current frame based on the human mass point position information and normal vector information of the current frame; The directed distance function of the propagation source voxel in the current frame is fitted using Legendre polynomials to obtain the fitted polynomial. The coefficients of the fitted polynomial are solved using the Gauss-Legend de Gauss numerical quadrature formula to obtain the spatial distance field parameters of the propagation source voxel in the current frame. Based on the normal vector information of the current frame and the center position coordinates of the three-dimensional voxels, the spatial distance field parameters of the propagation source voxels of the current frame are propagated to the neighboring voxels through the spatial propagation function to obtain the spatial distance field of the current frame. When the current frame is not a key frame: Based on the human mass point position information, normal vector information, and center position coordinates of the three-dimensional voxels in the current frame, the spatial distance field parameters of the previous frame are propagated to the current frame through a time-domain propagation function to obtain the spatial distance field of the current frame. The collision potential energy determination module is used to determine the collision potential energy of each clothing material point in the current frame based on the clothing material point position information and spatial distance field in the current frame. The particle-voxel index determination module is used to determine the particle-voxel index of the current frame based on the position information of the clothing particles and the three-dimensional voxels; the particle-voxel index represents the clothing particles contained in each three-dimensional voxel. The self-collision potential energy determination module is used to perform self-collision detection on each clothing particle in the current frame based on the adjacency information and particle-voxel index, and to apply self-collision potential energy to clothing particle pairs that have self-collisions. Specifically, it includes: Based on the adjacency information of the current frame, each clothing material point that has no adjacency relationship in the topology is identified as a candidate clothing material point, and the three-dimensional voxel where the candidate clothing material point is located is identified as the corresponding candidate voxel. For any candidate clothing material point, self-collision detection is performed between the candidate clothing material point and each target clothing material point according to the particle-voxel index of the current frame; each target clothing material point includes: the candidate voxel and all clothing material points contained in the neighboring voxels of the candidate voxel. Apply self-collision potential energy to clothing material point pairs that are capable of self-collision; The optimization solution module is used to solve for any clothing material point with the objective of minimizing the sum of the collision potential energy and the self-collision potential energy, and to obtain the coordinates of the best point with no collision and self-collision; the coordinates of the best point are used to update the position of the clothing material point in the next frame.

6. An electronic device, characterized in that, The device includes a memory and a processor, the memory being used to store a computer program, and the processor running the computer program to cause the electronic device to perform the collision and self-collision handling method in clothing simulation as described in any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed by a processor, implements the collision and self-collision handling method in clothing simulation as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Real-time clothes form determination method and system

    CN111062136A

  • Method and apparatus for simulating posture of flexible cable based on spring-mass model combining bending and torsion

    US20170124230A1