CN116861706A - PBD-based fabric simulation method and device capable of cutting at any angle in space - Google Patents

PBD-based fabric simulation method and device capable of cutting at any angle in space Download PDF

Info

Publication number
CN116861706A
CN116861706A CN202311126872.8A CN202311126872A CN116861706A CN 116861706 A CN116861706 A CN 116861706A CN 202311126872 A CN202311126872 A CN 202311126872A CN 116861706 A CN116861706 A CN 116861706A
Authority
CN
China
Prior art keywords
particles
cloth
rigid body
pbd
updating
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202311126872.8A
Other languages
Chinese (zh)
Other versions
CN116861706B (en
Inventor
王凯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chengdu Huiju Technology Co ltd
Original Assignee
Erebati Chengdu Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Erebati Chengdu Technology Co ltd filed Critical Erebati Chengdu Technology Co ltd
Priority to CN202311126872.8A priority Critical patent/CN116861706B/en
Publication of CN116861706A publication Critical patent/CN116861706A/en
Application granted granted Critical
Publication of CN116861706B publication Critical patent/CN116861706B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2113/00Details relating to the application field
    • G06F2113/12Cloth

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Evolutionary Computation (AREA)
  • Geometry (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The PBD-based fabric simulation method and the PBD-based fabric simulation equipment capable of being cut at any angle in space can reduce the operation amount, enable the physical simulation of the fabric to be closer to the state of a real physical environment, and improve the simulation effect; wherein the method comprises the following steps: s10, constructing a cloth geometrical model; s20, establishing elastic force constraint among particles based on PBD according to material physical properties of the cloth; s30, acquiring a cutting action; the cutting action includes: the position of the cut particles, the order of the cut particles, and the intersection of the particles in the cut plane; s40, cutting any one or more polygons formed by the texture points according to the cutting action, so that a cloth geometrical model generates a plurality of new particles and a plurality of new polygons; s50, reconstructing the cloth geometrical model according to the generated plurality of new particles and the new polygons to obtain a cut cloth geometrical model; the method is suitable for the field of 3D real-time cloth simulation.

Description

PBD-based fabric simulation method and device capable of cutting at any angle in space
Technical Field
The application relates to the field of 3D real-time cloth simulation, in particular to a PBD-based cloth simulation method and device capable of cutting at any angle in space.
Background
Currently, in the field of 3D space cloth simulation, there are application cases of medical physical simulation, such as laparoscopic cloth shaping and cutting equipment developed by a company in israel, which is used for basic skill simulation training of medical staff, but due to the limitation of the technology, the following obvious problems occur in practical use:
1. because of the limitation of calculation force, the physical structure of the adopted cloth is expressed based on a small space cell array, and the advantage of the method is that geometric division on the geometric structure of the space cell is not needed when the cloth is cut or destroyed, so that the calculation force of a 3D geometric calculation part is saved; the defects are as follows: the cut edge of the cloth is not subjected to real geometric segmentation, and can only be subjected to approximate segmentation in a similar unit removal mode, so that obvious edge saw teeth can appear, even the situation that two cutting marks are generated by cutting once can appear, the same operation is caused, the difference of the results generated by the real physical environment and the 3D space simulation environment is obvious, and the sense of reality of simulation training is lost;
2. based on modeling of a 1 st point physical structure, after cloth is rendered, the cloth cannot be observed in the near place, the particle sense on the surface of the cloth can be obviously increased as long as the end is pulled to a certain distance, and the operation carried out on the cloth cutting part by the unit removal method is 0 or 1 is filled, so that the distortion degree of the edge of the cloth is further increased, and whether the shearing operation of a user meets the requirement of a training system or not cannot be counted in some cases;
3. because of the inaccuracy of the result of the unit removal method, the real-time reconstruction of the whole space topological structure after the generated cloth is sheared or destroyed cannot be performed, so that the whole structure of the cloth is distorted along with the larger destroyed degree of the cloth, and finally the destroyed cloth cannot be restored to the original state before being destroyed in the 3D space in a manual splicing mode, and therefore whether the cutting or destruction of the cloth by a user accords with the rule set by a system cannot be calculated accurately from the mathematical level.
In addition, in the prior art, although the open-source cloth simulation algorithm can approximately simulate the physical properties of cloth, the differential equation of the physical environment cannot be infinitely differentiated in the 3D engine of a computer to cause infinite accumulation of errors of floating points of the computer, generated cloth particles frequently shake or irregularly and instantaneously move at a large distance towards infinity, or the physical properties of the cloth are simulated while random damage and cutting to the physical structure of the cloth are not supported, and the spatial topological structure of the cloth is reconstructed, so that the method cannot be applied to the actual engineering project landing finally.
Disclosure of Invention
In view of the above, it is necessary to provide a method and an apparatus for simulating a cloth, which are capable of cutting the cloth at any angle in a space based on a PBD, so that the amount of computation can be reduced, and the physical simulation of the cloth can be more similar to the state of a real physical environment, thereby improving the simulation effect.
The application provides a PBD-based fabric simulation method capable of cutting at any angle in space, which comprises the following steps:
s10, constructing a cloth geometrical model; the cloth geometry model comprises: a particle and a polygonal structure consisting of a plurality of adjacent particles;
s20, establishing elastic force constraint among particles based on PBD according to material physical properties of the cloth;
s30, acquiring a cutting action; the cutting action includes: the position of the cut particles, the order of the cut particles, and the intersection of the particles in the cut plane;
s40, cutting any one or more polygons formed by the texture points according to the cutting action, so that a cloth geometrical model generates a plurality of new particles and a plurality of new polygons;
s50, reconstructing the cloth geometrical model according to the generated plurality of new particles and the new polygons to obtain the cut cloth geometrical model.
Optionally, at S50, further includes:
s60, updating the cloth geometrical model.
Optionally, in the step S30, the process of acquiring the cutting action includes:
and performing collision calculation on the particles and the rigid body, and updating the position information of the particles and the rigid body.
Optionally, the collision calculation is performed on the particles and the rigid body, and updating the position information of the particles and the rigid body includes:
s301-1, after the contact information of the particles and the rigid body is obtained, calculating the speed and the acceleration of the particles and the rigid body and the position of the next frame according to a collision operation formula between objects;
s301-2, adjusting the positions of the particles and the rigid body according to the acceleration of the particles and the rigid body, freezing the positions of the adjusted particles and the rigid body, and zeroing the energy generated by the external force of the particles and the rigid body;
s302-1, after acquiring the separation information of the particles and the rigid body, releasing the frozen state of the particles and the rigid body;
s302-2, the position of the particle is recalculated according to the position of the previous frame and constrained by the external force and the elastic force, and the position of the particle is reset to the calculated position;
s302-3, after all particles are reset, the cloth geometric model is reset.
Optionally, the step S301-2 is to adjust the positions of the particles and the rigid body according to the accelerations of the particles and the rigid body, freeze the positions of the particles and the rigid body after adjustment, and zero the energy generated by the external force of the particles and the rigid body; comprising the following steps:
when the calculated speed of the rigid body is greater than a preset threshold value, the rigid body directly passes through the collision range of the particles, and the die penetration is formed:
in the time of the next frame, carrying out position restoration on the molded particles;
and the position of the particle after the position repair is used as the position of the particle to be frozen.
Optionally, when the cutting action is that a certain portion of the cloth is completely cut, the S50 includes:
generating a new cloth geometrical model according to the newly generated particles and the polygon;
dividing the new cloth geometric model once according to the intersecting position of the cutting planes in the cutting action, so that the new cloth geometric model is separated into two independent cloth geometric models;
two independent cloth geometry models, one of which represents the cloth of which a certain part is completely cut off and the other of which represents the cloth of the rest after cutting.
Optionally, the step S60 of updating the fabric geometry model includes:
s601, updating external force applied to all particles in parallel every frame, and updating current positions of all particles;
s602, updating the elastic force constraint of all particles in parallel every frame, and updating the current positions of all particles;
s603, updating collision information of all particles in parallel every frame, and updating current positions of all particles;
s604, judging whether the updating frequency is reached, if so, stopping updating and exiting, otherwise, continuing to execute the step S601.
Optionally, in the cloth geometry model, the overall physical structure of the cloth is abstracted into a collection of regularly arranged particles in space.
The application also provides an electronic device, comprising:
a memory;
a processor; and
a computer program;
wherein the computer program is stored in the memory and configured to be executed by the processor to implement the method as described above.
The present application also provides a computer-readable storage device, characterized in that a computer program is stored thereon; the computer program is executed by a processor to implement the method as described above.
The technical scheme provided by the application has the advantages that:
1. the application relates to a cloth simulation method and equipment capable of cutting at any angle in space based on PBD, which establishes a cloth geometric model, wherein the cloth geometric model abstracts the geometric vertex and topological structure of cloth to form a cloth geometric model composed of polygonal structures composed of particles and adjacent multiple particles; according to the physical characteristics of materials of the cloth, elastic force constraint among all particles is established based on PBD;
according to the application, the distance between the particles is used as an elastic constraint condition, so that frequent shaking of cloth particles or due to great deviation of coordinates due to floating point number error accumulation generated by time differentiation of classical mechanics in a 3D engine can be eliminated, each particle in a cloth geometric model is kept relatively stable under the constraint of conforming to physical properties, the calculation amount of cloth physical calculation is simplified, the physical simulation of the cloth can be closer to the state of a real physical environment, and the practicability is extremely strong.
2. In the application, when cutting operation is carried out, the original polygonal structure can be divided according to cutting action, so that new vertexes and new polygons are generated, and the damaged cloth geometry is subjected to model reconstruction on the basis of the generated new vertexes and new polygons, so that the damaged cloth geometry becomes a brand new cloth geometry model, and the cloth is fundamentally divided; compared with the technical scheme that a large number of small cells are used for approximately simulating the cut of the cloth in the prior art, the accuracy of cutting edges of the cloth is improved;
in addition, after the cloth is cut apart, the cloth has smoother cutting edges, uneven burrs and saw tooth shapes cannot appear, and the problem of a plurality of cuts cannot appear, so that the cloth is suitable for medical simulation training.
3. In the application, in the process of acquiring the cutting action, collision calculation is carried out on the mass points and the rigid body, and the position information of the mass points and the rigid body is updated; after the contact information of the particles and the rigid body is obtained, the speed and the acceleration of the particles and the rigid body are calculated according to a collision operation formula between objects; according to the acceleration of the mass points and the rigid body, the positions of the mass points and the rigid body are adjusted, the positions of the mass points and the rigid body after adjustment are frozen, and the energy generated by the external force of the mass points and the rigid body is zeroed;
the application adopts the energy generated by external force to return to zero to drive the position adjustment of the particles, can reasonably avoid the infinite shaking of the particle stress caused by the non-uniform time differentiation and the indistinct time differentiation in the 3D engine, can more accurately simulate the real performance of the cloth in the physical environment, has extremely strong practicability, and is particularly suitable for medical simulation scenes.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions of the related art, the drawings that are required to be used in the embodiments or the description of the related art will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort to those of ordinary skill in the art.
Fig. 1 is a schematic flow chart of a PBD-based fabric simulation method capable of cutting at any angle in space according to an embodiment of the present application;
fig. 2 is a schematic flow chart of step S30 in the first embodiment of the application;
fig. 3 is a schematic flow chart of a PBD-based fabric simulation method capable of cutting at any angle in space according to a second embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments of the present application; all other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
Example 1
As shown in fig. 1, the method for simulating the cloth which can be cut at any angle in space based on the PBD comprises the following steps:
s10, constructing a cloth geometrical model; the cloth geometry model comprises: a particle and a polygonal structure consisting of a plurality of adjacent particles;
s20, establishing elastic force constraint among particles based on PBD according to material physical properties of the cloth;
s30, acquiring a cutting action; the cutting action includes: the position of the cut particles, the order of the cut particles, and the intersection of the particles in the cut plane;
s40, cutting any one or more polygons formed by the texture points according to the cutting action, so that a cloth geometrical model generates a plurality of new particles and a plurality of new polygons;
s50, reconstructing the cloth geometrical model according to the generated plurality of new particles and the new polygons to obtain the cut cloth geometrical model.
In this embodiment, the polygon may be a triangle.
In the cloth geometry model, it should be noted that: the geometrical structure of the cloth is abstracted, each vertex is represented in the abstract form of a particle, one particle corresponds to one or more vertices of the geometrical body (the vertices with the same spatial position or the distances smaller than a certain threshold value are regarded as the same particle), and the whole physical structure of the cloth is abstracted into a set of regularly arranged particles in space.
In this embodiment, the property associated with any one or more particles may be edited during the run state.
It should be noted that PBD (Position Based Dynamics, location-based dynamics) is an important computer application technology in the further computer graphics and aided design industry, following the finite element method. The position-based dynamics approach can directly control the integration, thereby avoiding overshoot and energy gain problems in explicit integration and eliminating typical instability problems.
It should be noted that, in this embodiment, elastic constraint between particles is established based on PBD, and the distance between particles is used as an elastic constraint condition, so that frequent jitter of material particles or due to large deviation of coordinates due to accumulation of floating point number errors generated by time differentiation of classical mechanics in a 3D engine can be eliminated, and each particle in a material geometrical model is kept relatively stable under constraint conforming to physical properties.
In this embodiment, when the cutting action is that a certain portion of the cloth is completely cut, the step S50 includes:
generating a new cloth geometrical model according to the newly generated particles and the polygon;
dividing the new cloth geometric model once according to the intersecting position of the cutting planes in the cutting action, so that the new cloth geometric model is separated into two independent cloth geometric models;
two independent cloth geometry models, one of which represents the cloth of which a certain part is completely cut off and the other of which represents the cloth of the rest after cutting.
During the cutting action, any one or more polygons in the cloth geometrical model can be cut and destroyed by a cutting plane (or a force applied to the cutting plane) in any direction in the 3D space, the size and the direction of the cutting plane are constrained to a certain extent, and one or more polygons intersected with the cutting plane in space can be geometrically segmented to form a plurality of new polygons; after cutting, new particles (essentially new model vertices) are created due to the spatial intersection.
In this embodiment, according to the sequence relationship between the geometric topology of the fabric and the newly generated particles after cutting, the geometric topology of the whole fabric is automatically reconstructed according to the new polygon rendering sequence (triangle vertex index sequence), so as to form the corresponding geometric topology after cutting the fabric, and the fabric maintains its original physical simulation attribute.
In this embodiment, when performing a cutting operation, the original polygon structure can be divided according to the cutting action, so as to generate a new vertex and a new polygon, and on the basis of the generated new vertex and new polygon, the damaged fabric geometry is subjected to model reconstruction, so that the damaged fabric geometry becomes a brand new fabric geometry model, and the fabric is fundamentally divided; compared with the technical scheme that a large number of small cells are used for approximately simulating the cut of the cloth in the prior art, the accuracy of cutting edges of the cloth is improved; in addition, after the cloth is cut apart, the cloth has a smoother cutting edge, uneven burrs and saw tooth shapes cannot appear, and the problem of a plurality of cuts cannot appear, so that the cloth is suitable for medical simulation training.
In the embodiment, a cloth geometrical model is established, wherein the cloth geometrical model abstracts the geometrical vertexes and the topological structure of the cloth to form a cloth geometrical model formed by polygonal structures formed by particles and adjacent multiple particles; according to the physical characteristics of materials of the cloth, elastic force constraint among all particles is established based on PBD; in this embodiment, the distance between particles is used as the elastic constraint condition, so that the calculation amount of the physical calculation of the cloth can be simplified, the physical simulation of the cloth can be closer to the state of the real physical environment, and the practicability is extremely high.
Example two
As shown in fig. 2, on the basis of the first embodiment, the method for simulating the cloth that can be cut at any angle in space based on the PBD includes, in the step S30, the steps of:
and performing collision calculation on the particles and the rigid body, and updating the position information of the particles and the rigid body.
In this embodiment, collision calculation is performed on the particles and the rigid body, and updating the position information of the particles and the rigid body includes:
s301-1, after the contact information of the particles and the rigid body is obtained, calculating the speed and the acceleration of the particles and the rigid body and the position of the next frame according to a collision operation formula between objects;
s301-2, adjusting the positions of the particles and the rigid body according to the acceleration of the particles and the rigid body, freezing the positions of the adjusted particles and the rigid body, and zeroing the energy generated by the external force of the particles and the rigid body;
s302-1, after acquiring the separation information of the particles and the rigid body, releasing the frozen state of the particles and the rigid body;
s302-2, the position of the particle is recalculated according to the position of the previous frame and constrained by the external force and the elastic force, and the position of the particle is reset to the calculated position;
s302-3, after all particles are reset, the cloth geometric model is reset.
In this embodiment, the step S301-2 is to adjust the positions of the particles and the rigid body according to the accelerations of the particles and the rigid body, freeze the positions of the particles and the rigid body after the adjustment, and zero the energy generated by the external force of the particles and the rigid body; comprising the following steps:
when the calculated speed of the rigid body is greater than a preset threshold value, the rigid body directly passes through the collision range of the particles, and the die penetration is formed:
in the time of the next frame, carrying out position restoration on the molded particles;
and the position of the particle after the position repair is used as the position of the particle to be frozen.
The collision of the cloth is divided into rigid collision and self-collision of the cloth; the collision essence of the rigid body and the cloth is that the particles of the rigid body and the cloth collide, and a collision body (collider) on the particles has certain rigid body attribute; therefore, when other rigid bodies are contacted with the particles of the cloth, the collision body attribute between the rigid bodies can respectively calculate the speed, the acceleration and the position of the next frame of the two sides (the particles and the rigid bodies) according to the rigid body collision operation of classical mechanics until the energy consumption of the relative motion between the rigid bodies is finished, so that the particles and the rigid bodies are restored to a stable relative static state; unlike conventional rigid body collisions, in 3D engines, collisions between particles and rigid bodies have non-uniformity in time differentiation and cannot be differentiated indefinitely; therefore, when energy consumption is calculated, larger errors can occur in each frame position of the particles and the rigid body due to error accumulation of the floating point number, so that the particles and the rigid body can not gradually maintain a stable relative static state due to energy attenuation.
In this embodiment, after the particles and the rigid body are in contact, first, the positions of each other are adjusted according to the acceleration; then, the positions of the two parties are frozen (especially the relative speeds of the particles and the rigid bodies are smaller and the two parties slightly collide with each other), the energy generated by the external force of the two parties is forcibly zeroed, the frequent jumping of the particles and the rigid bodies caused by the accumulation of floating point number errors generated by uneven time differentiation is avoided, and the influence on the geometrical topology structure of the cloth is avoided;
when the particle and rigid body detachment information is acquired (collision body range of rigid body detachment particle), first, the frozen state of the particle and rigid body is automatically released; then, the position of the particle is recalculated according to the position of the previous frame and constrained by the external force and the elastic force, and the position of the particle is reset to the calculated position after the external force and the elastic force are born; thereby restoring the physical properties of the current particles and further restoring the physical properties of the whole cloth geometry.
When the collision body of the particle and the collision body of the rigid body are in contact and the position is frozen, the energy is temporarily zeroed; in this case:
if the included angle between the rigid body moving direction (positive direction of the vector) and the normal vector of the tangent plane of the collision point of the particle and the rigid body is between 0 and 180 degrees, the particle and the rigid body keep fixed relative displacement, and the particle moves along with the moving direction of the rigid body until the current particle is limited by the restriction of other particles of the cloth to the adjustment of the space position; otherwise, the particles keep the original position and do not move along the moving direction of the rigid body until the collision bodies of the particles and the collision bodies of the rigid body are completely separated in space, so that the frozen state between the particles and the rigid body is relieved, and the physical properties of the particles are restored.
In the self-collision, it is only necessary to consider that the collision bodies of the particles come into contact with each other, then push the other member out of the distance between the collision body parts in the opposite direction to the initial collision direction, and retain the physical properties of the particles.
For high-speed collisions (rigid bodies move in any direction towards the particles at a faster speed, the speed being greater than a threshold value); the most extreme case of high-speed collisions is the transient, namely: the displacement generated between the position of the previous frame and the position of the next frame is too large, so that the collision body of the rigid body ignores the collision body of the particles, and the model directly passes through the collision range of the particles, thereby causing the mold penetration.
After the mold penetration occurs, the position of the molded particle needs to be repaired in the time of the next frame; the way to repair the location may be:
firstly, calculating the distance between a rigid body and a worn mold particle after the penetration;
secondly, calculating the space direction of the rigid body mold-penetrating points according to the position when the two frames of the previous frame do not penetrate and the position after mold penetration;
finally, according to the obtained distance and direction, calculating the position where the mass point should be repaired, and increasing a distance which is the same as the radius of the collision body of the mass point towards the space direction of the rigid body mold-penetrating mass point; the obtained position is the correct repair position of the particle.
In the embodiment, in the process of acquiring the cutting action, collision calculation is performed on the mass points and the rigid body, and the position information of the mass points and the rigid body is updated; after the contact information of the particles and the rigid body is obtained, the speed and the acceleration of the particles and the rigid body are calculated according to a collision operation formula between objects; according to the acceleration of the mass points and the rigid body, the positions of the mass points and the rigid body are adjusted, the positions of the mass points and the rigid body after adjustment are frozen, and the energy generated by the external force of the mass points and the rigid body is zeroed; according to the embodiment, the position adjustment of the particles is performed by resetting the energy generated by the external force on the particles and the rigid body to zero, so that the problem that the particle stress is infinitely dithered in the 3D engine due to non-uniform time differentiation and time incapability of infinitely differentiating is solved reasonably, the real performance of the cloth in a physical environment can be simulated more accurately, and the method is extremely high in practicability and particularly suitable for medical simulation scenes.
Example III
As shown in fig. 3, on the basis of the first embodiment, the method for simulating a PBD-based fabric that is cut at any angle in space is characterized by further comprising, after S50:
s60, updating the cloth geometrical model.
In this embodiment, the step S60 of updating the fabric geometry model includes:
s601, updating external force applied to all particles in parallel every frame, and updating current positions of all particles;
s602, updating the elastic force constraint of all particles in parallel every frame, and updating the current positions of all particles;
s603, updating collision information of all particles in parallel every frame, and updating current positions of all particles;
s604, judging whether the updating frequency is reached, if so, stopping updating and exiting, otherwise, continuing to execute the step S601.
In this embodiment, the fabric geometric model can be updated according to the update evaluation rate, so that the simulation precision and accuracy can be improved.
It should be noted that, in the cloth geometry model, since the number of particles is huge (if the simulation performance is relatively close to the real physical environment, the number of particles at least reaches 16x16 or 32x 32), in this embodiment, it is considered that each particle is processed in parallel by adopting a multithreading mode; as in units 3D, highly optimized Brous compiler and Job System are used to properly thread and schedule particles to optimize physical effects and execution efficiency.
In addition, the embodiment of the application also provides electronic equipment, which comprises:
a memory; a processor; a computer program;
wherein the computer program is stored in the memory and configured to be executed by the processor to implement the method as described above.
Furthermore, the embodiment of the application also provides a computer readable storage device, which stores a computer program; the computer program is executed by a processor to implement the method described above.
In the application, the method and the device are based on the same inventive concept, and because the principles of solving the problems by the method and the device are similar, the implementation of the method and the device can be mutually referred to, and the repetition is not repeated.
The storage device may be a computer readable storage medium, and may include: a U-disk, a removable hard disk, a Read-only memory (ROM), a random access memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing examples illustrate only a few embodiments of the application and are described in detail herein without thereby limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of protection of the present application is to be determined by the appended claims.

Claims (10)

1. The PBD-based fabric simulation method capable of cutting at any angle in space is characterized by comprising the following steps of:
s10, constructing a cloth geometrical model; the cloth geometry model comprises: a particle and a polygonal structure consisting of a plurality of adjacent particles;
s20, establishing elastic force constraint among particles based on PBD according to material physical properties of the cloth;
s30, acquiring a cutting action; the cutting action includes: the position of the cut particles, the order of the cut particles, and the intersection of the particles in the cut plane;
s40, cutting any one or more polygons formed by the texture points according to the cutting action, so that a cloth geometrical model generates a plurality of new particles and a plurality of new polygons;
s50, reconstructing the cloth geometrical model according to the generated plurality of new particles and the new polygons to obtain the cut cloth geometrical model.
2. The PBD-based spatially arbitrary angle cuttable fabric simulation method according to claim 1, further comprising, after S50:
s60, updating the cloth geometrical model.
3. The PBD-based spatially arbitrary angle-cuttable fabric simulation method according to claim 1, wherein in the step S30, the process of obtaining the cutting action includes:
and performing collision calculation on the particles and the rigid body, and updating the position information of the particles and the rigid body.
4. The PBD-based spatially arbitrary angle-cuttable fabric simulation method of claim 3, wherein performing collision calculation on the particles and the rigid body and updating position information of the particles and the rigid body comprises:
s301-1, after the contact information of the particles and the rigid body is obtained, calculating the speed and the acceleration of the particles and the rigid body and the position of the next frame according to a collision operation formula between objects;
s301-2, adjusting the positions of the particles and the rigid body according to the acceleration of the particles and the rigid body, freezing the positions of the adjusted particles and the rigid body, and zeroing the energy generated by the external force of the particles and the rigid body;
s302-1, after acquiring the separation information of the particles and the rigid body, releasing the frozen state of the particles and the rigid body;
s302-2, the position of the particle is recalculated according to the position of the previous frame and constrained by the external force and the elastic force, and the position of the particle is reset to the calculated position;
s302-3, after all particles are reset, the cloth geometric model is reset.
5. The PBD-based spatial arbitrary angle cuttable fabric simulation method according to claim 4, wherein S301-2 adjusts the positions of the particles and the rigid body according to the accelerations of the particles and the rigid body, freezes the positions of the adjusted particles and the rigid body, and zeroes the energy generated by the external force of the particles and the rigid body; comprising the following steps:
when the calculated speed of the rigid body is greater than a preset threshold value, the rigid body directly passes through the collision range of the particles, and the die penetration is formed:
in the time of the next frame, carrying out position restoration on the molded particles;
and the position of the particle after the position repair is used as the position of the particle to be frozen.
6. The PBD-based space arbitrary angle cuttable fabric simulation method according to claim 1, wherein when the cutting action is that a certain portion of the fabric is completely cut, the S50 comprises:
generating a new cloth geometrical model according to the newly generated particles and the polygon;
dividing the new cloth geometric model once according to the intersecting position of the cutting planes in the cutting action, so that the new cloth geometric model is separated into two independent cloth geometric models;
two independent cloth geometry models, one of which represents the cloth of which a certain part is completely cut off and the other of which represents the cloth of the rest after cutting.
7. The PBD-based spatially arbitrary angle-cuttable fabric simulation method according to claim 2, wherein the S60 updating the fabric geometry model comprises:
s601, updating external force applied to all particles in parallel every frame, and updating current positions of all particles;
s602, updating the elastic force constraint of all particles in parallel every frame, and updating the current positions of all particles;
s603, updating collision information of all particles in parallel every frame, and updating current positions of all particles;
s604, judging whether the updating frequency is reached, if so, stopping updating and exiting, otherwise, continuing to execute the step S601.
8. The PBD-based spatially arbitrary angle cuttable fabric simulation method of claim 1, wherein in the fabric geometry model, the overall physical structure of the fabric is abstracted into a set of regularly arranged particles in space.
9. An electronic device, comprising:
a memory;
a processor; and
a computer program;
wherein the computer program is stored in the memory and configured to be executed by the processor to implement the method of any one of claims 1 to 8.
10. A computer readable storage device having a computer program stored thereon; the computer program being executed by a processor to implement the method of any one of claims 1 to 8.
CN202311126872.8A 2023-09-04 2023-09-04 PBD-based fabric simulation method and device capable of cutting at any angle in space Active CN116861706B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311126872.8A CN116861706B (en) 2023-09-04 2023-09-04 PBD-based fabric simulation method and device capable of cutting at any angle in space

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311126872.8A CN116861706B (en) 2023-09-04 2023-09-04 PBD-based fabric simulation method and device capable of cutting at any angle in space

Publications (2)

Publication Number Publication Date
CN116861706A true CN116861706A (en) 2023-10-10
CN116861706B CN116861706B (en) 2024-04-26

Family

ID=88234473

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311126872.8A Active CN116861706B (en) 2023-09-04 2023-09-04 PBD-based fabric simulation method and device capable of cutting at any angle in space

Country Status (1)

Country Link
CN (1) CN116861706B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104318056A (en) * 2014-09-24 2015-01-28 北京航空航天大学 Soft tissue deformation and cutting simulation method based on position dynamics
CN109961514A (en) * 2017-12-26 2019-07-02 中国科学院深圳先进技术研究院 A kind of cutting deformation emulating method, device, storage medium and terminal device
CN114724722A (en) * 2022-03-24 2022-07-08 苏州迪威视景数字科技有限公司 Soft tissue deformation and cutting simulation method based on extended position dynamics
US20220382246A1 (en) * 2021-04-28 2022-12-01 Nvidia Corporation Differentiable simulator for robotic cutting
US20230055516A1 (en) * 2021-03-31 2023-02-23 Tencent Technology (Shenzhen) Company Limited Collision data processing method and apparatus, computer device, and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104318056A (en) * 2014-09-24 2015-01-28 北京航空航天大学 Soft tissue deformation and cutting simulation method based on position dynamics
CN109961514A (en) * 2017-12-26 2019-07-02 中国科学院深圳先进技术研究院 A kind of cutting deformation emulating method, device, storage medium and terminal device
US20230055516A1 (en) * 2021-03-31 2023-02-23 Tencent Technology (Shenzhen) Company Limited Collision data processing method and apparatus, computer device, and storage medium
US20220382246A1 (en) * 2021-04-28 2022-12-01 Nvidia Corporation Differentiable simulator for robotic cutting
CN114724722A (en) * 2022-03-24 2022-07-08 苏州迪威视景数字科技有限公司 Soft tissue deformation and cutting simulation method based on extended position dynamics

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
LYUDMILA KHAN 等: "first_pagesettingsOrder Article Reprints Open AccessArticle Cutting Simulation in Unity 3D Using Position Based Dynamics with Various Refinement Levels", 《ELECTRONICS 》, vol. 11, no. 14, pages 1 - 18 *

Also Published As

Publication number Publication date
CN116861706B (en) 2024-04-26

Similar Documents

Publication Publication Date Title
Rossignac et al. Multi-resolution 3D approximations for rendering complex scenes
CN104318056B (en) Soft tissue deformation and cutting simulation method based on position dynamics
CN103617603A (en) Automatic restoration method of three-dimensional digital geometric grid model structure
CN102930091A (en) Tooth-and-gum-oriented high-efficiency mesh repairing method
CN113724401B (en) Three-dimensional model cutting method and device, computer equipment and storage medium
CN103714575A (en) Fluid simulation method for combining SPH and dynamic surface mesh
CN113715338B (en) Slicing method, printing method and related equipment of three-dimensional model
CN106445981A (en) Wavelet transform-based self-adaptive compression method for STL (Standard Template Library) grid model slicing data
CN109961514B (en) Cutting deformation simulation method and device, storage medium and terminal equipment
CN116861706B (en) PBD-based fabric simulation method and device capable of cutting at any angle in space
CN114429535A (en) Smooth cutting method and device for triangular mesh curved surface
CN114724722A (en) Soft tissue deformation and cutting simulation method based on extended position dynamics
CN109785449A (en) Character facial editor and decal method based on FFD
CN112381950B (en) Grid hole repairing method, electronic equipment and computer readable storage medium
US8698800B2 (en) Method and apparatus for non-shrinking mesh smoothing using local fitting
CN113538695A (en) Method and device for quickly discretizing complex curved surface with arbitrary boundary and storage medium
US20120206456A1 (en) Methods and Systems for Generating Continuous Surfaces from Polygonal Data
CN109472744B (en) Three-dimensional model reduction method
EP1793349B1 (en) Method and aparatus for discrete mesh filleting and rounding through ball pivoting
Meßmer et al. Isogeometric analysis on trimmed solids: a B-spline-based approach focusing on explicit dynamics
CN118541730A (en) Low polygon mesh generation for three-dimensional models
US7623127B2 (en) Method and apparatus for discrete mesh filleting and rounding through ball pivoting
KR102013808B1 (en) Simulation Method of Deformable Objects using Surface Approximation Function
JP2594212B2 (en) Adaptive and hierarchical grid representation generator for images
CN117274536B (en) Live-action three-dimensional model reconstruction method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20240117

Address after: Room 316, Building 1, No. 338 Guoxin Avenue, Pengzhen Town, Shuangliu District, Chengdu City, Sichuan Province, 610000 (A9-1-316)

Applicant after: Chengdu Huiju Technology Co.,Ltd.

Address before: Room 01, 2nd Floor, Building 2, No. 1108, Shengbang Street, Hi-tech Zone, Chengdu, Sichuan, 610000

Applicant before: Erebati Chengdu Technology Co.,Ltd.

GR01 Patent grant
GR01 Patent grant