Self-collision processing method, system, terminal device and medium
By constructing a spatial hash structure and non-self-intersecting tetrahedral constraints on a graphics processing unit (GPU) and employing an iterative update method, the self-collision problem in deformable material simulation is solved, thereby improving simulation quality and processing speed.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-17
- Publication Date
- 2026-04-14
AI Technical Summary
In existing technologies, the self-collision processing in deformable material simulation is slow and of low quality, resulting in poor simulation results, especially in the case of complex deformable material simulation where self-collision is severe.
A self-collision handling method based on image processor GPU is adopted. Collision detection is performed by constructing a spatial hash structure, constructing a non-self-intersecting tetrahedral constraint, updating the mesh position of deformable material through iteration, and using GPU parallel processing technology to resolve self-collisions.
It improves the accuracy and quality of self-collision handling in deformable material simulation, enhances the realism and versatility of simulation results, and solves the self-collision problem.
Smart Images

Figure CN115935582B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of simulation technology, and in particular to a self-collision processing method, system, terminal device, and computer-readable storage medium. Background Technology
[0002] With the evolution of GPU (Graphics Grooving Unit) parallel computing hardware and software, real-time deformable material simulation systems have gradually emerged, enabling deformable objects in the computer world, such as clothing, flags, curtains, and tablecloths, to simulate real-time force and motion in the real world. For example, NVIDIA's NVClothes supports real-time deformable material simulation in game scenes. Furthermore, high-quality self-collision handling typically relies on continuous collision detection processed on the GPU.
[0003] However, high-quality self-collision detection cannot be parallelized in real-time due to its high computational complexity and strong dependencies. Related techniques use spatial bounding box pruning to reduce the computational complexity of sequential collision processing, but the computational complexity remains high even after pruning, especially with low parallelism, which is unfavorable for GPU implementation. Furthermore, this method fails to converge effectively at large simulation time steps, further reducing the solution speed. In addition, existing commercial real-time solutions, such as NVClothes, generally mitigate the self-crossing problem through engineering methods, such as reasonable skeletal animation binding, appropriate deformable material parameter settings, and simple simulation algorithms. However, these engineering methods limit the realism and versatility of deformable material simulations, and cannot completely eliminate the self-crossing phenomenon, especially in complex deformable material simulations where self-crossing becomes very severe, reducing the simulation quality.
[0004] In summary, the self-collision handling methods in the simulation process of deformable materials in related technologies suffer from problems such as slow processing speed and low processing quality, which in turn leads to low quality of deformable material simulation results. Summary of the Invention
[0005] The main objective of this invention is to provide a self-collision processing method, system, terminal device, and computer-readable storage medium, which aims to efficiently process the self-collision of deformable materials based on a graphics processing unit (GPU), thereby improving the simulation quality of deformable materials.
[0006] To achieve the above objectives, the present invention provides a self-collision processing method, the self-collision processing method comprising:
[0007] S10. Construct a spatial hash structure based on a triangular mesh made of a preset deformable material;
[0008] S20. Collision detection is performed based on the spatial hash structure to obtain collision pairs;
[0009] S30. Construct non-self-intersecting tetrahedral constraints based on the collision pairs, and update the initial non-self-intersecting mesh position of the deformable material based on the non-self-intersecting tetrahedral constraints and the target mesh position of the deformable material to obtain a non-self-intersecting mesh position, so as to handle the self-collision of the deformable material in the simulation process.
[0010] Optionally, after the step of updating the initial non-self-intersecting mesh position of the deformable material based on the non-self-intersecting tetrahedral constraint and the target mesh position of the deformable material to obtain a non-self-intersecting mesh position, so as to resolve the self-collision of the deformable material during the simulation process, the method further includes:
[0011] Steps S20 and S30 are repeated iteratively, and it is determined whether the difference between the non-self-intersecting grid position and the target grid position is less than a preset movement threshold.
[0012] If so, the self-collision process for the deformable material ends.
[0013] Optionally, the step of constructing a non-self-intersecting tetrahedral constraint based on the collision pair includes:
[0014] Determine the first collision pair corresponding to the current mesh position, and obtain the first tetrahedron volume based on each vertex of the first collision pair. At the same time, determine the second collision pair corresponding to the non-self-intersecting mesh position, obtain the second tetrahedron volume based on each vertex of the second collision pair, and construct a non-self-intersecting tetrahedron constraint that includes the first tetrahedron volume being greater than or equal to the second tetrahedron volume.
[0015] Optionally, the step of updating the initial non-self-intersecting mesh position of the deformable material based on the non-self-intersecting tetrahedral constraint and the target mesh position of the deformable material to obtain the non-self-intersecting mesh position includes:
[0016] Based on the aforementioned non-self-intersecting tetrahedral constraint, the target parameters of the preset linear complementarity problem are obtained through GPU graph coloring and symmetric ultraloose SSOR methods.
[0017] The target grid position is updated based on the target parameters and the initial non-self-intersecting grid position, and the position movement vector and position movement distance are obtained based on the updated target grid position;
[0018] The self-intersecting mesh position of the deformable material is obtained by updating the initial non-self-intersecting mesh position based on the position movement vector and the position movement distance.
[0019] Optionally, the step of obtaining the target parameters of a preset linear complementarity problem based on the non-self-intersecting tetrahedral constraint using a GPU graph coloring method and a symmetric ultraloose SSOR method includes:
[0020] Based on the non-self-intersecting tetrahedral constraint, the target mesh position, and the initialized non-self-intersecting mesh position, the parameters in the preset linear complementarity problem are initialized;
[0021] The constraint set of the collision pair is divided into multiple constraint subsets by color using GPU graph coloring.
[0022] Based on the initialized parameters, the target parameters of the preset linear complementarity problem are obtained by iteratively calculating multiple constraint subsets sequentially using the symmetric ultraloose SSOR method.
[0023] Optionally, the step of updating the target mesh position based on the target parameter and the initialized non-self-intersecting mesh position includes:
[0024] Obtain the Jacobian matrix in the preset linear complementarity problem, and determine the product value of the Jacobian matrix and the target parameter;
[0025] The product value is added to the target grid position to update the target grid position.
[0026] Optionally, the step of updating the initial non-self-intersecting mesh position to obtain the non-self-intersecting mesh position of the deformable material based on the position movement vector and the position movement distance includes:
[0027] Obtain the product of the movement vector and the position movement distance, and add the product to the initial non-self-intersecting mesh position to update the initial non-self-intersecting mesh position to obtain the non-self-intersecting mesh position of the deformable material.
[0028] To achieve the above objectives, the present invention also provides a self-collision handling system, the self-collision handling system comprising:
[0029] The building module is used to construct a spatial hash structure based on a triangular mesh of a preset deformable material;
[0030] The collision detection module is used to perform collision detection based on the spatial hash structure to obtain collision pairs;
[0031] The module for obtaining the position of the non-self-intersecting mesh is used to construct a non-self-intersecting tetrahedral constraint based on the collision pair, and update the initial non-self-intersecting mesh position of the deformable material based on the non-self-intersecting tetrahedral constraint and the target mesh position of the deformable material to obtain the non-self-intersecting mesh position, so as to resolve the self-collision of the deformable material during the simulation process.
[0032] In this invention, each functional module of the self-collision processing system implements the steps of the self-collision processing method described above during operation.
[0033] To achieve the above objectives, the present invention also provides a terminal device, the terminal device comprising: a memory, a processor, and a self-collision processing program stored in the memory and executable on the processor, wherein the self-collision processing program, when executed by the processor, implements the steps of the self-collision processing method as described above.
[0034] Furthermore, to achieve the above objectives, the present invention also proposes a computer-readable storage medium storing a self-collision processing program, which, when executed by a processor, implements the steps of the self-collision processing method as described above.
[0035] In addition, to achieve the above objectives, the present invention also provides a computer program product comprising a computer program that, when executed by a processor, implements the steps of the self-collision processing method as described above.
[0036] This invention provides a self-collision processing system, terminal device, computer-readable storage medium, and computer program product. It constructs a spatial hash structure based on a triangular mesh of a preset deformable material; performs collision detection based on the spatial hash structure to obtain collision pairs; constructs non-self-intersecting tetrahedral constraints based on the collision pairs; and updates the initial non-self-intersecting mesh position of the deformable material based on the non-self-intersecting tetrahedral constraints and the target mesh position of the deformable material to obtain a non-self-intersecting mesh position, thereby processing the self-collision of the deformable material during simulation.
[0037] Compared to existing self-collision handling methods, this invention employs a GPU (Graphics Processing Unit) to detect and resolve self-collisions of deformable materials during simulation. Therefore, this invention effectively solves the self-collision problem of deformable materials during simulation, improves the accuracy of self-collision handling, further enhances the quality of deformable material dynamics simulation, and ultimately improves the user experience. Attached Figure Description
[0038] Figure 1 This is a schematic diagram of the hardware operating environment involved in the embodiments of the present invention;
[0039] Figure 2 This is a schematic diagram of the first process of an embodiment of the self-collision processing method of the present invention;
[0040] Figure 3 This is a schematic diagram of the second process of an embodiment of the self-collision processing method of the present invention;
[0041] Figure 4 This is a schematic diagram of the hash bucket construction involved in an embodiment of the self-collision processing method of the present invention;
[0042] Figure 5 This is a schematic diagram of the first application scenario involved in an embodiment of the self-collision processing method of the present invention;
[0043] Figure 6 This is a schematic diagram of the first application scenario involved in an embodiment of the self-collision processing method of the present invention;
[0044] Figure 7 This is a schematic diagram of the scene test results involved in an embodiment of the self-collision processing method of the present invention;
[0045] Figure 8 This is a schematic diagram of the functional modules of an embodiment of the self-collision processing system of the present invention.
[0046] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0047] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0048] like Figure 1 As shown, Figure 1 This is a schematic diagram of the device structure of the hardware operating environment involved in the embodiments of the present invention.
[0049] It should be noted that the terminal device in the embodiments of the present invention can be a terminal device for handling self-collision, and the terminal device can specifically be a graphics processor (GPU), etc.
[0050] like Figure 1As shown, the device may include: a processor 1001, such as a CPU; a network interface 1004; a user interface 1003; a memory 1005; and a communication bus 1002. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen or an input unit such as a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 1005 may be high-speed RAM or non-volatile memory, such as a disk drive. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0051] Those skilled in the art will understand that Figure 1 The device structure shown does not constitute a limitation on the device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0052] like Figure 1 As shown, the memory 1005, as a computer storage medium, may include an operating system, a network communication module, a user interface module, and a self-collision handling program. The operating system is a program that manages and controls the device's hardware and software resources, supporting the operation of the self-collision handling program and other software or programs. Figure 1 In the device shown, the user interface 1003 is mainly used for data communication with the client; the network interface 1004 is mainly used for establishing a communication connection with the server; and the processor 1001 can be used to call the self-collision handling program stored in the memory 1005 and perform the following operations:
[0053] S10. Construct a spatial hash structure based on a triangular mesh made of a preset deformable material;
[0054] S20. Collision detection is performed based on the spatial hash structure to obtain collision pairs;
[0055] S30. Construct non-self-intersecting tetrahedral constraints based on the collision pairs, and update the initial non-self-intersecting mesh position of the deformable material based on the non-self-intersecting tetrahedral constraints and the target mesh position of the deformable material to obtain the non-self-intersecting mesh position, so as to remove the self-collision of the deformable material during the simulation process.
[0056] Furthermore, after the step of updating the initial non-self-intersecting mesh position of the deformable material based on the non-self-intersecting tetrahedral constraint and the target mesh position of the deformable material to obtain a non-self-intersecting mesh position, so as to resolve the self-collision of the deformable material during the simulation process, the processor 1001 can also be used to call the self-collision handling program stored in the memory 1005, and perform the following operations:
[0057] Steps S20 and S30 are repeated iteratively, and it is determined whether the difference between the non-self-intersecting grid position and the target grid position is less than a preset movement threshold.
[0058] If so, the self-collision process for the deformable material ends.
[0059] Furthermore, the processor 1001 can also be used to call the self-collision handling program stored in the memory 1005, and perform the following operations:
[0060] Determine the first collision pair corresponding to the current mesh position, and obtain the first tetrahedron volume based on each vertex of the first collision pair. At the same time, determine the second collision pair corresponding to the non-self-intersecting mesh position, obtain the second tetrahedron volume based on each vertex of the second collision pair, and construct a non-self-intersecting tetrahedron constraint that includes the first tetrahedron volume being greater than or equal to the second tetrahedron volume.
[0061] Furthermore, the processor 1001 can also be used to call the self-collision handling program stored in the memory 1005, and perform the following operations:
[0062] Based on the aforementioned non-self-intersecting tetrahedral constraint, the target parameters of the preset linear complementarity problem are obtained through GPU graph coloring and symmetric ultraloose SSOR methods.
[0063] The target grid position is updated based on the target parameters and the initial non-self-intersecting grid position, and the position movement vector and position movement distance are obtained based on the updated target grid position;
[0064] The self-intersecting mesh position of the deformable material is obtained by updating the initial non-self-intersecting mesh position based on the position movement vector and the position movement distance.
[0065] Furthermore, the processor 1001 can also be used to call the self-collision handling program stored in the memory 1005, and perform the following operations:
[0066] Based on the non-self-intersecting tetrahedral constraint, the target mesh position, and the initialized non-self-intersecting mesh position, the parameters in the preset linear complementarity problem are initialized;
[0067] The constraint set of the collision pair is divided into multiple constraint subsets by color using GPU graph coloring.
[0068] Based on the initialized parameters, the target parameters of the preset linear complementarity problem are obtained by iteratively calculating multiple constraint subsets sequentially using the symmetric ultraloose SSOR method.
[0069] Furthermore, the processor 1001 can also be used to call the self-collision handling program stored in the memory 1005, and perform the following operations:
[0070] Obtain the Jacobian matrix in the preset linear complementarity problem, and determine the product value of the Jacobian matrix and the target parameter;
[0071] The product value is added to the target grid position to update the target grid position.
[0072] Furthermore, the processor 1001 can also be used to call the self-collision handling program stored in the memory 1005, and perform the following operations:
[0073] Obtain the product of the movement vector and the position movement distance, and add the product to the initial non-self-intersecting mesh position to update the initial non-self-intersecting mesh position to obtain the non-self-intersecting mesh position of the deformable material.
[0074] Reference Figure 2 , Figure 2 This is a flowchart illustrating the first embodiment of the self-collision processing method of the present invention.
[0075] In this embodiment, an embodiment of the self-collision handling method is provided. It should be noted that although the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than that shown here.
[0076] To mitigate the errors in simulation results caused by self-collision (or self-intersection) of deformable materials, including fabric, during simulation processing, this embodiment employs a GPU to process the self-collision problem of fabric during real-time stress simulation in parallel, efficiently eliminating the fabric self-collision issue. Figure 3As shown, in this embodiment, the self-collision handling method for deformable materials such as cloth includes: inputting the cloth position at the current time point, the target mesh position of the cloth, and the initial non-self-intersecting mesh position of the cloth; constructing a triangle space hash structure and an edge space hash structure, and using the triangle space hash structure and the edge space hash structure to perform GPU parallel collision detection to obtain collision pairs; constructing tetrahedral constraints based on the collision pairs, and then performing GPU parallel self-collision removal based on the tetrahedral constraints and the solution of the linear complementarity problem; in order to ensure that there is no self-intersecting between the non-self-intersecting mesh position of the cloth and the target mesh position of the cloth, and that the distance is close enough, iteratively repeating the above GPU parallel collision detection process and GPU parallel self-collision removal process until the most ideal non-self-intersecting mesh position of the cloth is obtained.
[0077] Step S10: Construct a spatial hash structure based on a triangular mesh made of a preset deformable material;
[0078] It should be noted that, in this embodiment, the spatial hash structure may include a triangle spatial hash structure and an edge spatial hash structure, enabling the present invention to be used in scenarios such as a piece of cloth falling to a very sharp support angle and multiple small pieces of cloth falling to a support plate under the action of gravity.
[0079] Specifically, for example, a triangular space hash structure is a triangular hash table, where for each triangle f i Calculate the bounding sphere s i Then map each bounding ball to a hash table index {h}. ij Finally, the triangles are stored in hash buckets according to the hash table index to obtain the triangle space hash structure.
[0080] A triangular hash table is a regular hash table that consists of a large number of hash buckets. Each hash bucket contains a series of triangular indices. The geometric meaning of each hash bucket is a spatial cube, which is used to store all the bounding spheres that intersect with the spatial cube.
[0081] For each triangle, calculate the bounding sphere s. i The process is as follows: Determine the enclosing sphere s i radius r i :
[0082]
[0083] Among them, P i0 P i1 and P i2 They are triangles f i Each vertex.
[0084] ball center c i :
[0085] c i =αp i0 +βp i1 +γp i2
[0086] in,
[0087]
[0088]
[0089]
[0090] Take each surrounding ball s i The mapping to the hash table index process includes: for each bounding ball s i Calculate the integer coordinates of the spatial partition under a given collision accuracy ε:
[0091]
[0092] In this embodiment, ε is taken as the average side length of the triangular mesh, and then the hash index {h} is calculated according to the hash index function. ij}. Among them, the hash index function h i :
[0093] h i =(x i ·73856093)^(y i ·19349669)^(z i ·83492791)
[0094] Here, "^" represents bitwise XOR.
[0095] Furthermore, in this embodiment, when surrounding the sphere s i After mapping to the corresponding hash index using the hash index function, in order to resolve hash collisions, this embodiment uses GPU parallel processing to optimize hashing.
[0096] Specifically, for example, such as Figure 4 As shown, firstly, a hash counter table is allocated according to the given video memory size, and each counter is initialized to 0; then, for each triangle f, a hash counter table is processed in parallel. i Determine triangle f i hash index h i The GPU's atomicAdd instruction is used to accumulate the corresponding count in the counter table, thus obtaining the number of triangles in each hash bucket. Then, the GPU's standard scan operation is used to count the ordered memory index positions of each hash bucket, thus determining the number of triangles for each triangle f. i We can obtain triangle f. iThe corresponding hash bucket index b(h) i Finally, all memory for all hash buckets is allocated at once. In this embodiment, since each of the above operations is performed in parallel, the efficiency of hash table creation is greatly improved, thereby further improving self-collision efficiency.
[0097] Furthermore, the construction method of the edge space hash structure is basically the same as that of the triangular hash space structure. However, the calculation method for the bounding sphere of each edge of the triangular mesh differs when constructing the edge space hash structure. In determining the bounding sphere, the midpoint of the edge is used as the center of the bounding sphere, and half the length of the edge is used as the radius of the bounding sphere.
[0098] Specifically, for example, the edge space hash structure is the edge hash table, for each triangle f i The edge calculation of the bounding sphere s i Then map each bounding ball to a hash table index {h}. ij Finally, the sides of the triangle are stored in hash buckets according to their hash indices to obtain the triangle space hash structure.
[0099] Step S20: Collision detection is performed based on the spatial hash structure to obtain collision pairs;
[0100] It should be noted that in this embodiment, the fabric can be used as a deformable material to handle the self-collision problem of the fabric during the real-time dynamic simulation process, so as to avoid the distortion of the simulation process caused by self-collision.
[0101] Specifically, for example, a spatial hash structure containing multiple triangles is constructed based on the various triangular meshes of the fabric, and collision detection is performed based on this spatial hash structure. The final output is all collision pairs from the collision detection process, where each collision pair includes vertex-triangle collision pairs and edge-edge collision pairs. For instance, a vertex-triangle collision pair refers to a collision pair where, for each vertex p... k The index h in the triangular hash table, i.e., the triangular space hash structure, is determined using a hash index function. k Then obtain the corresponding hash bucket b(h) k This allows us to determine all triangles F(h) within the hash bucket. k The collision pairs obtained based on this are a set:
[0102] {(p k ,f j )|d(p k ,f j ) <d thre ,f j ∈F(h k )}
[0103] Wherein d(p k,f j ) is vertex p k With triangle f j The closest distance, and d thre It is a preset distance threshold.
[0104] Furthermore, before step S10 above, "constructing a spatial hash structure based on a pre-defined triangular mesh of deformable material", in order to handle the self-collision problem of deformable material, i.e. cloth, in the dynamic simulation process, it is necessary to pre-divide the cloth into multiple triangular meshes, and then determine the initial non-self-intersecting mesh position of the cloth at the current time point based on the triangular mesh, and pre-set the target mesh position of the cloth at the end of the simulation.
[0105] Specifically, for example, determining the current cloth position, the target mesh position of the cloth, and the initial non-self-intersecting mesh position p of the cloth. * .
[0106] Here, "fabric position" refers to the vertex position of the triangular mesh of the fabric, where the triangular mesh is a set F = {f} composed of triangular faces. i |i=0,1,...}, each triangle is composed of three vertices f i ={p i0 ,p i1 ,p i2 Each vertex in a triangle is a three-dimensional real vector. Every two vertices in a triangle form an edge.
[0107] e ik ={p ik+ ,p ik-}, k=0,1,2,k + =mod(k+1,3),k - = mod(k+2,3)
[0108] Here, mod(*,3) is the operation of taking the remainder of * with respect to 3. All vertices of the triangular mesh are concatenated into a vector p.
[0109] The current fabric position p [t] This refers to the cloth position before the simulation begins, or the cloth position at the current time after cloth simulation processing. In this embodiment, the self-collision processing method of this invention is always applied to the cloth simulation processing, so the cloth position at the current time does not include self-intersection.
[0110] Self-intersection, or self-collision, refers to the interweaving between triangular facets of the fabric. Interweaving is defined as the shortest distance between any two non-adjacent triangles being less than the fabric thickness. In this embodiment, d is used. thre = 1 mm as the fabric thickness.
[0111] The target fabric position is the position obtained by solving the simulation elastic material equation. Since the solution at this location does not consider collision handling, self-intersection may occur.
[0112] The fabric simulation elastic material equation is the one proposed in Example-based elastic materials by Sebastian Martin, Bernhard Thomaszewski, Eitan Grinspun, and Markus Gross in ACM SIGGRAPH 2011:
[0113]
[0114] Where M is the mass matrix; The velocity represents the velocity at the current time point; W(p) represents the internal force between adjacent vertices of the cloth; this equation is commonly used in most cloth simulations.
[0115] Among them, the initial cloth has no self-intersecting mesh position p * This refers to assigning the value p * ←p [t] .
[0116] Step S30: Construct non-self-intersecting tetrahedral constraints based on the collision pairs, and update the initial non-self-intersecting mesh position of the deformable material based on the non-self-intersecting tetrahedral constraints and the target mesh position of the deformable material to obtain a non-self-intersecting mesh position, so as to remove the self-collision of the deformable material during the simulation process.
[0117] After obtaining all collision pairs through collision detection using a pre-constructed spatial hash structure, in order to eliminate the self-collision of the cloth during the simulation process, the corresponding tetrahedrons will be obtained based on all collision pairs. Then, a non-self-intersecting tetrahedron constraint will be constructed based on each tetrahedron. The non-self-intersecting mesh position of the deformable material will be obtained based on the non-self-intersecting tetrahedron constraint, the initial non-self-intersecting mesh position of the deformable material, and the target mesh position of the deformable material. That is, at this position, the cloth will not have self-intersecting during the dynamic simulation process, i.e., the self-collision problem.
[0118] In this embodiment, to handle the self-collision problem of the fabric during the dynamic simulation, the fabric needs to be pre-divided into multiple triangular meshes. Then, based on these triangular meshes, the initial non-self-intersecting mesh position of the fabric at the current time point is determined, and the target mesh position of the fabric at the end of the simulation is preset. A spatial hash structure containing multiple triangles is constructed based on each triangular mesh of the fabric, and collision detection is performed based on this spatial hash structure, ultimately outputting all collision pairs in the collision detection process. Further, corresponding tetrahedrons are obtained based on all collision pairs, and non-self-intersecting tetrahedron constraints are constructed based on each tetrahedron. The non-self-intersecting mesh position of the deformable material is obtained based on this non-self-intersecting tetrahedron constraint, the initial non-self-intersecting mesh position of the deformable material, and the target mesh position of the deformable material. Collision detection and collision resolution are repeatedly executed iteratively on the GPU until the difference between the non-self-intersecting mesh position and the target mesh position is less than a preset movement threshold, thus completing the self-collision handling of the deformable material.
[0119] Compared to existing self-collision handling methods, this invention employs parallel processing via a GPU, iteratively looping the self-collision detection and resolution processes until the optimal result is achieved—that is, non-self-intersecting mesh positions where the difference between target mesh positions is less than a preset movement threshold. Therefore, this invention addresses the self-collision problem of deformable materials during simulation by using a GPU, improving the accuracy of self-collision handling and further enhancing the quality of deformable material dynamics simulation.
[0120] Based on the first embodiment of the self-collision processing method of the present invention, a second embodiment of the collision processing method of the present invention is proposed.
[0121] In this embodiment, after step S30, "based on the non-self-intersecting tetrahedral constraint and the target mesh position of the deformable material, the initial non-self-intersecting mesh position of the deformable material is updated to obtain the non-self-intersecting mesh position, so as to resolve the self-collision of the deformable material during the simulation process," the following is also included:
[0122] Step S40: Repeat steps S20 and S30 in an iterative manner, and determine whether the difference between the non-self-intersecting grid position and the target grid position is less than a preset movement threshold.
[0123] Step S50: If yes, then the self-collision processing of the deformable material ends.
[0124] After obtaining the non-self-intersecting mesh position of the deformable material based on the non-self-intersecting tetrahedral constraint, initializing the non-self-intersecting mesh position, and the target mesh position, this embodiment sets the current non-self-intersecting mesh position p under the condition that the non-self-intersecting condition is already satisfied. * Move closer to the target grid position However, a single move cannot guarantee p * and Sufficiently close. Therefore, in this embodiment, it is necessary to further alternately execute the collision detection process of step S20 and the collision resolution process of step S30 on the GPU in an iterative manner, and determine whether the difference between the non-self-intersecting mesh position and the target mesh position is less than a preset movement threshold. If it is determined that the difference between the non-self-intersecting mesh position and the target mesh position is less than the preset movement threshold, then the self-collision processing of the deformable material is completed. In this embodiment, the preset movement threshold is not specifically limited.
[0125] Furthermore, in step S30 above, "constructing a non-self-intersecting tetrahedral constraint based on the collision pair" may include:
[0126] Step S301: Determine the first collision pair corresponding to the current mesh position, and obtain the first tetrahedron volume based on each vertex of the first collision pair. At the same time, determine the second collision pair corresponding to the non-self-intersecting mesh position, obtain the second tetrahedron volume based on each vertex of the second collision pair, and construct a non-self-intersecting tetrahedron constraint containing the first tetrahedron volume being greater than or equal to the second tetrahedron volume.
[0127] After determining the triangle space hash structure and edge space hash structure based on the triangle mesh of the deformable material, and obtaining collision pairs by performing collision detection based on the hash structure, the terminal device will construct a non-self-intersecting tetrahedron constraint based on the collision pairs. The non-self-intersecting tetrahedron constraint is as follows: the volume of the first tetrahedron corresponding to the first collision pair is obtained based on each vertex of the first collision pair corresponding to the current mesh position, and the volume of the second tetrahedron corresponding to the second collision pair is obtained based on each vertex of the second collision pair corresponding to the non-self-intersecting mesh position. It is required that the volume of the first tetrahedron is greater than or equal to the volume of the second tetrahedron.
[0128] Specifically, for example, constructing a non-self-intersecting tetrahedron constraint using vertex-triangle collision pairs and edge-edge collision pairs means that since each collision pair has four vertices, it can form a tetrahedron, denoted as T. a (p)=(p a0 ,p a1 ,p a2 ,p a3), where a∈P represents any collision pair, and a0, a1, a2, a3 are the four vertex indices of the collision pair; the non-self-intersecting tetrahedral constraint means that at mesh position p, the volume of each tetrahedron must be no less than the volume of the initial non-self-intersecting mesh position p. * The volume of the tetrahedron at time t is denoted as:
[0129] {c a (p)=|p a1 -p a0 ,p a2 -p a0 ,p a3 -p a0 |-|p * a1 -p * a0 ,p * a2 -p * a0 ,p * a3 -p * a0 |≥0}
[0130] All c a The vectorized concatenation of (p) is denoted as c(p).
[0131] Further, in step S30 above, "updating the initial non-self-intersecting mesh position of the deformable material based on the non-self-intersecting tetrahedral constraint and the target mesh position of the deformable material to obtain the non-self-intersecting mesh position" may include:
[0132] Step S302: Based on the non-self-intersecting tetrahedral constraint, the target parameters of the preset linear complementarity problem are obtained through GPU graph coloring and symmetric ultraloose SSOR method.
[0133] Step S303: Update the target grid position based on the target parameters and the initial non-self-intersecting grid position, and obtain the position movement vector and position movement distance based on the updated target grid position;
[0134] Step S304: Based on the position movement vector and the position movement distance, update the initial non-self-intersecting mesh position to obtain the non-self-intersecting mesh position of the deformable material.
[0135] After constructing non-self-intersecting tetrahedral constraints based on vertex-edge collision pairs and edge-edge collision pairs, the terminal device updates the target mesh position of the cloth by solving a linear complementarity problem, thereby determining the non-self-intersecting mesh position of the cloth. The linear complementarity problem is as follows:
[0136]
[0137] Where λ is a Lagrange multiplier variable, It is a Jacobian matrix. After solving, simply update the target position of the cloth.
[0138] It is worth noting that solving the linear complementarity problem using GPU is a crucial step in enabling parallel collision resolution in this embodiment. Considering that the linear complementarity problem is essentially a linear matrix solution with positive constraints, this embodiment combines GPU graph coloring with a symmetric superloose SSOR approach to obtain the target parameter λ for the linear complementarity problem. Based on this, the target mesh position is further updated according to the target parameter and the initialized non-self-intersecting mesh position. Simultaneously, the initialized non-self-intersecting mesh position is updated based on the updated position movement vector and distance, ultimately yielding the non-self-intersecting mesh position of the deformable material.
[0139] Furthermore, in step S302 above, "based on the non-self-intersecting tetrahedral constraint, the target parameters of the preset linear complementarity problem are obtained through GPU graph coloring and symmetric ultraloose SSOR methods," may include:
[0140] Step S3021: Based on the non-self-intersecting tetrahedral constraint, the target mesh position, and the initialized non-self-intersecting mesh position, initialize each parameter in the preset linear complementarity problem;
[0141] Step S3022: The constraint set of the collision pair is divided into multiple constraint subsets by color using GPU graph coloring.
[0142] Step S3023: Based on the initialized parameters, the target parameters of the preset linear complementarity problem are obtained by iteratively calculating multiple constraint subsets in sequence using the symmetric ultraloose SSOR method.
[0143] In this embodiment, the linear complementarity problem is solved using GPU graph coloring and symmetric ultraloose SSOR methods to ultimately obtain the non-self-intersecting mesh positions of the cloth. The specific steps include:
[0144] First, initialize the parameters in the preset linear complementarity problem: Input p * c(p) * ), making λ←0, α←1.6;
[0145] Second: Set the constraint set {c a} is divided into K subsets (called K colors), denoted as {C}. k|k=0,1,...,K-1}, such that c a0 ,c a1 It does not contain common vertices;
[0146] Third, the GPU SSOR forward process: For each color set k = 0, 1, ..., K-1, perform the following operations in this order:
[0147] λ new ←λ-dig(J(p * )J T (p * )) -1 g
[0148] Parallel for each c a ∈C k ,
[0149] Fourth, the GPU SSOR backward process: For each color set k = K-1,...,1,0, perform the following operations in this order:
[0150] λ new ←λ-dig(J(p * )J T (p * )) -1 g
[0151] Parallel for each c a ∈C k ,
[0152] Based on this, the equation is solved. The target parameter λ in the equation.
[0153] Furthermore, in step S303 above, "updating the target mesh position based on the target parameter and the initialized non-self-intersecting mesh position" may include:
[0154] Step 3031: Obtain the Jacobian matrix in the preset linear complementarity problem, and determine the product value of the Jacobian matrix and the target parameter;
[0155] Step 3032: Add the product value to the target grid position to update the target grid position.
[0156] After acquiring the target parameter λ in the complementary problem, the terminal device updates the target mesh position of the deformable material based on the target parameter λ. The specific process includes:
[0157] First, determine the Jacobian matrix for the initial non-self-intersecting grid positions in the linear complementarity problem.
[0158] Second, obtain the product of the Jacobian matrix and the objective parameter λ in the linear complementarity problem: J(p * )λ;
[0159] Third, the above product value J(p) * )λ and the target mesh position of the deformable material Add them together to... The target grid position is updated. The updated target grid position is as follows:
[0160]
[0161] Further, in step S304 above, "updating the initial non-self-intersecting mesh position to obtain the non-self-intersecting mesh position of the deformable material based on the position movement vector and the position movement distance" may include:
[0162] Step S3041: Obtain the product of the movement vector and the position movement distance, and add the product to the initial non-self-intersecting mesh position to update the initial non-self-intersecting mesh position to obtain the non-self-intersecting mesh position of the deformable material.
[0163] In this embodiment, the movement vector d determined based on the updated target grid position is:
[0164] Further calculate the position movement distance β:
[0165]
[0166] Where, d min It is the minimum distance between the midpoint of all collision pairs and the triangle or between edges.
[0167] Based on this, update the non-self-intersecting mesh position p of the cloth. * :
[0168] p * ←p * +βd.
[0169] After the above steps, this embodiment can now determine the current non-self-intersecting grid position p under the condition of no self-intersecting. * Move closer to the target grid position The position of p. However, a single movement cannot guarantee the position of p. * and Sufficiently close. Therefore, in this embodiment, collision detection and collision resolution can be further performed alternately on the GPU until p * and satisfy
[0170]
[0171] The output grid position p at this time [t+1] =p * It satisfies the conditions of no self-intersection and is located relative to the target grid. close enough.
[0172] In this embodiment, after obtaining the non-self-intersecting mesh position of the deformable material based on the non-self-intersecting tetrahedral constraint of the deformable material, the initial non-self-intersecting mesh position, and the target mesh position, this embodiment sets the current non-self-intersecting mesh position p under the condition that the non-self-intersecting condition is already satisfied. * Move closer to the target grid position However, a single move cannot guarantee p * and Sufficiently close. Therefore, in this embodiment, it is necessary to further alternately execute the collision detection process of step S20 and the collision resolution process of step S30 on the GPU in an iterative manner, and determine whether the difference between the non-self-intersecting mesh position and the target mesh position is less than a preset movement threshold. If it is determined that the difference between the non-self-intersecting mesh position and the target mesh position is less than the preset movement threshold, the self-collision processing of the deformable material is completed. In this embodiment, the preset movement threshold is not specifically limited. The terminal device constructs a non-self-intersecting tetrahedron constraint containing the condition that the volume of the first tetrahedron is greater than or equal to the volume of the second tetrahedron. The target parameter λ of the linear complementarity problem is obtained by combining the GPU graph coloring method and the symmetric ultraloose SSOR method. On this basis, the target mesh position is further updated according to the target parameter and the initialized non-self-intersecting mesh position. At the same time, the initialized non-self-intersecting mesh position is updated according to the updated obtained position movement vector and position movement distance, and finally the non-self-intersecting mesh position of the deformable material is obtained.
[0173] In this invention, the linear complementarity problem is solved by using GPU graph coloring and symmetric ultraloose SSOR to update the target mesh position of the cloth, thereby determining the non-self-intersecting mesh position of the cloth. The self-collision problem of deformable materials in the simulation process is solved by GPU parallel processing, which improves the simulation accuracy and simulation quality of deformable materials in the dynamic simulation process, thereby improving the user experience.
[0174] Furthermore, based on the first and second embodiments of the self-collision processing method of the present invention, a third embodiment of the self-collision processing method of the present invention is proposed.
[0175] In this embodiment, scenarios for applying the self-collision processing method of the present invention are proposed, specifically including: such as Figure 5 The scene shown depicts fabric falling to a very sharp support angle, and... Figure 6 The scene shown depicts multiple small pieces of cloth falling onto a support plate under the influence of gravity.
[0176] Specifically, for example, such as Figure 5 The simulation illustrates dropping a piece of fabric onto a very sharp support angle. Handling the sharp point during the drop is extremely difficult. At a time step of 1 / 30s, the existing continuous collision handling method, I-Cloth, cannot effectively converge to a satisfactory state. However, the self-collision handling method of this invention achieves excellent results. The simulation results are as follows... Figure 7 As shown, in a scenario where the fabric falls onto a very sharp support angle, with 5K vertices, pruning detection using I-Cloth takes 7.2ms; collision handling using I-Cloth takes 64.7ms. However, using the self-collision handling method of this invention, collision detection only takes 3.4ms, and collision handling only takes 10.7ms.
[0177] In another embodiment, such as Figure 6 The scenario shown depicts multiple small pieces of fabric falling onto a support plate under gravity. During the fall, numerous collisions occur between the multiple layers of fabric. Under such large-scale computation, the simulation results are as follows: Figure 7 As shown, in this scenario with 51K vertices, pruning detection using I-Cloth takes 29.1ms, and collision handling using I-Cloth takes 255.9s. However, using the self-collision handling method of this invention, collision detection takes only 15.1ms, and collision handling takes only 45.2ms. It is evident that this invention possesses superior cloth self-collision handling capabilities regardless of the complexity of the scenario.
[0178] In this embodiment, various scenarios in which the self-collision processing method of the present invention is applied are proposed. Compared with the existing self-collision processing methods, the present invention greatly improves the processing efficiency of self-collision problems of deformable materials in the dynamic simulation process, can complete the processing of collision problems in a shorter time, can support a larger simulation time step, and can be applied to various complex scenarios, thereby improving the simulation quality of deformable materials and thus improving the user experience.
[0179] Furthermore, embodiments of the present invention also propose a self-collision handling system, referring to... Figure 8 , Figure 8This is a functional module diagram of an embodiment of the self-collision processing of the present invention. Figure 8 As shown, the self-collision processing system of the present invention includes:
[0180] Module 10 is used to construct a spatial hash structure based on a triangular mesh of a preset deformable material;
[0181] Collision detection module 20 is used to perform collision detection based on the spatial hash structure to obtain collision pairs;
[0182] The module 30 for obtaining the position of the non-self-intersecting mesh is used to construct a non-self-intersecting tetrahedral constraint based on the collision pair, and update the initial non-self-intersecting mesh position of the deformable material based on the non-self-intersecting tetrahedral constraint and the target mesh position of the deformable material to obtain the non-self-intersecting mesh position, so as to handle the self-collision of the deformable material during the simulation process.
[0183] Furthermore, the self-collision handling system also includes:
[0184] The judgment module is used to repeatedly execute steps S20 and S30 in an iterative manner, and to determine whether the difference between the non-self-intersecting grid position and the target grid position is less than a preset movement threshold.
[0185] The self-collision processing termination module is used to terminate the self-collision processing of the deformable material.
[0186] Furthermore, the non-self-intersecting grid position acquisition module 30 includes:
[0187] A non-self-intersecting tetrahedral constraint construction unit is used to determine the first collision pair corresponding to the current mesh position, obtain the first tetrahedral volume based on each vertex of the first collision pair, determine the second collision pair corresponding to the non-self-intersecting mesh position, obtain the second tetrahedral volume based on each vertex of the second collision pair, and construct a non-self-intersecting tetrahedral constraint containing the first tetrahedral volume being greater than or equal to the second tetrahedral volume.
[0188] Furthermore, the non-self-intersecting grid position acquisition module 30 includes:
[0189] The target parameter acquisition unit is used to acquire the target parameters of a preset linear complementarity problem based on the non-self-intersecting tetrahedral constraint, through GPU graph coloring and symmetric ultraloose SSOR.
[0190] The position movement vector and position movement distance acquisition unit is used to update the target grid position based on the target parameters and the initial non-self-intersecting grid position, and to acquire the position movement vector and position movement distance according to the updated target grid position;
[0191] The update unit is used to update the initial non-self-intersecting mesh position according to the position movement vector and the position movement distance to obtain the non-self-intersecting mesh position of the deformable material.
[0192] Furthermore, the target parameter acquisition unit includes:
[0193] An initialization sub-unit is used to initialize the parameters in a preset linear complementarity problem based on the non-self-intersecting tetrahedral constraint, the target mesh position, and the initial non-self-intersecting mesh position.
[0194] The color partitioning subunit is used to partition the constraint set of the collision pair by color using GPU graph coloring to obtain multiple constraint subsets;
[0195] The iterative calculation subunit is used to perform iterative calculations on multiple constraint subsets sequentially using a symmetric ultraloose SSOR method based on the initialized parameters to obtain the target parameters of the preset linear complementarity problem.
[0196] Furthermore, the unit for obtaining the position movement vector and position movement distance includes:
[0197] The product value acquisition subunit is used to acquire the Jacobian matrix in the preset linear complementarity problem and determine the product value of the Jacobian matrix and the target parameter.
[0198] The addition subunit is used to add the product value to the target grid position in order to update the target grid position.
[0199] Further, the updating unit includes:
[0200] A self-intersecting mesh position acquisition sub-unit is used to acquire the product of the movement vector and the position movement distance, and add the product value to the initialized self-intersecting mesh position to update the initialized self-intersecting mesh position to obtain the self-intersecting mesh position of the deformable material.
[0201] The specific implementation methods of each functional module of the self-collision processing system of the present invention are basically the same as those of the above-described embodiments of the self-collision processing method, and will not be repeated here.
[0202] Furthermore, embodiments of the present invention also propose a computer-readable storage medium storing a self-collision processing program, which, when executed by a processor, implements the steps of the self-collision processing method as described above.
[0203] The various embodiments of the self-collision processing system and computer-readable storage medium of the present invention can be referred to the various embodiments of the self-collision processing method of the present invention, and will not be repeated here.
[0204] Furthermore, embodiments of the present invention also provide a computer program product, the computer program product including a computer program, which, when executed by a processor, implements the steps of the self-collision processing method as described in any of the embodiments of the above self-collision processing method.
[0205] The specific embodiments of the computer program product of the present invention are basically the same as the embodiments of the self-collision processing method described above, and will not be repeated here.
[0206] It should be noted that, in this document, 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 a 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 that element.
[0207] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0208] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a graphics processing unit GPU) to execute the methods described in the various embodiments of the present invention.
[0209] The above are merely preferred embodiments of the present invention and do not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.
Claims
1. A self-collision processing method, characterized in that, The self-collision handling method is applied to a graphics processing unit (GPU), and the self-collision handling method includes: S10. Construct a spatial hash structure based on a triangular mesh made of a preset deformable material; S20. Collision detection is performed based on the spatial hash structure to obtain collision pairs; S30. Construct a non-self-intersecting tetrahedral constraint based on the collision pair, and update the initial non-self-intersecting mesh position of the deformable material based on the non-self-intersecting tetrahedral constraint and the target mesh position of the deformable material to obtain a non-self-intersecting mesh position, so as to remove the self-collision of the deformable material in the simulation process. The step of constructing a non-self-intersecting tetrahedral constraint based on the collision pair includes: Determine the first collision pair corresponding to the current mesh position, and obtain the first tetrahedron volume based on each vertex of the first collision pair. At the same time, determine the second collision pair corresponding to the non-self-intersecting mesh position, obtain the second tetrahedron volume based on each vertex of the second collision pair, and construct a non-self-intersecting tetrahedron constraint that includes the first tetrahedron volume being greater than or equal to the second tetrahedron volume. The step of updating the initial non-self-intersecting mesh position of the deformable material based on the non-self-intersecting tetrahedral constraint and the target mesh position of the deformable material to obtain the non-self-intersecting mesh position includes: Based on the aforementioned non-self-intersecting tetrahedral constraint, the target parameters of the preset linear complementarity problem are obtained through GPU graph coloring and symmetric ultraloose SSOR methods. The target grid position is updated based on the target parameters and the initial non-self-intersecting grid position, and the position movement vector and position movement distance are obtained based on the updated target grid position; The self-intersecting mesh position of the deformable material is obtained by updating the initial non-self-intersecting mesh position based on the position movement vector and the position movement distance.
2. The self-collision processing method as described in claim 1, characterized in that, After the step of updating the initial non-self-intersecting mesh position of the deformable material based on the non-self-intersecting tetrahedral constraint and the target mesh position of the deformable material to obtain a non-self-intersecting mesh position, in order to resolve the self-collision of the deformable material during the simulation process, the method further includes: Steps S20 and S30 are repeated iteratively, and it is determined whether the difference between the non-self-intersecting grid position and the target grid position is less than the preset movement threshold. If so, the self-collision process for the deformable material ends.
3. The self-collision handling method as described in claim 1, characterized in that, The step of obtaining the target parameters of a preset linear complementarity problem based on the non-self-intersecting tetrahedral constraint using GPU graph coloring and symmetric ultraloose SSOR methods includes: Based on the non-self-intersecting tetrahedral constraint, the target mesh position, and the initialized non-self-intersecting mesh position, the parameters in the preset linear complementarity problem are initialized; Multiple constraint subsets are obtained by color-coding the constraint set of collision pairs using GPU graph coloring. Based on the initialized parameters, the target parameters of the preset linear complementarity problem are obtained by iteratively calculating multiple constraint subsets sequentially using the symmetric ultraloose SSOR method.
4. The self-collision handling method as described in claim 1 or 3, characterized in that, The step of updating the target mesh position based on the target parameter and the initialized non-self-intersecting mesh position includes: Obtain the Jacobian matrix in the preset linear complementarity problem, and determine the product value of the Jacobian matrix and the target parameter; The product value is added to the target grid position to update the target grid position.
5. The self-collision handling method as described in claim 1, characterized in that, The step of updating the initial non-self-intersecting mesh position to obtain the non-self-intersecting mesh position of the deformable material based on the position movement vector and the position movement distance includes: Obtain the product of the position movement vector and the position movement distance, and add the product to the initial non-self-intersecting mesh position to update the initial non-self-intersecting mesh position to obtain the non-self-intersecting mesh position of the deformable material.
6. A self-collision handling system, characterized in that, The self-collision handling system includes: The building module is used to construct a spatial hash structure based on a triangular mesh of a preset deformable material; The collision detection module is used to perform collision detection based on the spatial hash structure to obtain collision pairs; The module for obtaining the position of the non-self-intersecting mesh is used to construct a non-self-intersecting tetrahedral constraint based on the collision pair, and update the initial non-self-intersecting mesh position of the deformable material based on the non-self-intersecting tetrahedral constraint and the target mesh position of the deformable material to obtain the non-self-intersecting mesh position, so as to resolve the self-collision of the deformable material during the simulation process. The step of constructing a non-self-intersecting tetrahedral constraint based on the collision pair includes: Determine the first collision pair corresponding to the current mesh position, and obtain the first tetrahedron volume based on each vertex of the first collision pair. At the same time, determine the second collision pair corresponding to the non-self-intersecting mesh position, obtain the second tetrahedron volume based on each vertex of the second collision pair, and construct a non-self-intersecting tetrahedron constraint that includes the first tetrahedron volume being greater than or equal to the second tetrahedron volume. The step of updating the initial non-self-intersecting mesh position of the deformable material based on the non-self-intersecting tetrahedral constraint and the target mesh position of the deformable material to obtain the non-self-intersecting mesh position includes: Based on the aforementioned non-self-intersecting tetrahedral constraint, the target parameters of the preset linear complementarity problem are obtained through GPU graph coloring and symmetric ultraloose SSOR methods. The target grid position is updated based on the target parameters and the initial non-self-intersecting grid position, and the position movement vector and position movement distance are obtained based on the updated target grid position; The self-intersecting mesh position of the deformable material is obtained by updating the initial non-self-intersecting mesh position based on the position movement vector and the position movement distance.
7. A terminal device, characterized in that, The terminal device includes a memory, a processor, and a self-collision handling program stored in the memory and executable on the processor. When executed by the processor, the self-collision handling program implements the steps of the self-collision handling method as described in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a self-collision handling program, which, when executed by a processor, implements the steps of the self-collision handling method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Physical special effect simulation method and device, electronic equipment and storage medium
CN112862942A
Computer graphic system and method for simulating hair
US20100277475A1