In real-time contents, such as games and interactive simulators, it is very important to reduce the amount of simulation computation of 3D deformable objects. Although position-based dynamics has been proposed to reduce the amount of computation, the number of nodes for the tetrahedral model to represent a volumetric deformable object has to be increased, which makes the real-time simulation difficult. Therefore, this paper proposes an Internal shape preserving constraint(ISPC) generation algorithm integrated into the position-based dynamics to represent the physical properties of the 3D volumetric deformable object, while reducing the number of nodes filling the interior of the object. The proposed algorithm not only provides motion behavior similar to the tetrahedral model by using a surface model, but also enables real-time simulation by reducing the number of nodes constituting the 3D virtual object. It showed high FPS with reduced computation time compared to the tetrahedral model, and the volume maintenance and physical properties of model were expressed similarly to the tetrahedral model.

Objects in the real world have various physical properties, thus various physically-based simulation methods have been researched to generate by computer realistic virtual objects with the properties of these objects. Since the motion expression of a virtual object plays an important role in visually improving the sense of reality, a real-time physically-based simulation technique is required in various fields, such as entertainment, education, and medical applications.

In recent years, research on applying the simulation of a model with deformable physical properties to medical simulation and education have been actively applied [

The virtual object model used in this paper was modeled with the surface model composed of only properties of the surface of the object, and the tetrahedral model composed of some tetrahedra for the whole object. The tetrahedral model basically proceeds using the Delaunay triangulation to generate the tetrahedra for a virtual object [

This paper proposes a limited solution to two problems (difficulty of creating the tetrahedral model and heavy computational cost) mentioned above that may occur in modeling and real-time simulation. With this method, we discovered two possibilities.

Enables volumetric model simulation through surface models (Unclosed mesh or many holes) that are likely to cause problems with tetrahedral model creation.

When the model generated using our algorithm is compared to tetrahedral model, faster real-time simulation is passible.

We developed a deformable object simulation using a Position-based dynamic (PBD) method among various methods using Unity3D. The PBD method is fast and stable, and allows easy control of the dynamic simulation. Therefore, PBD is widely used in real-time interactive applications. The algorithm used in this paper applies Newton's law of inertia used in the PBD. Before executing the PBD solver, the pre-processing step is performed to maintain the original shape as much as possible, and then the stored data is transferred to the GPU-based PBD solver to execute the calculation through parallel processing. When the computational process is completed, the updated positions and velocity data are transferred to the CPU. During the execution time of simulation, the PBD solver operation and the process of transferring data to the CPU were performed in the update function for every frame, excluding the preprocessing process in the Unity3D start function. While the Jacobian method is easy to implement in GPU, it can cause serious stability problems [

Physically-based simulation methods are currently widely used in various applications for dynamic simulation. The Mass–Spring System (MSS) was used for face modeling and human body simulation [

The PBD has been proposed as a new paradigm for simulating dynamic systems, such as deformable objects [

In order to perform volumetric model simulation for the existing PBD, simulations were performed by setting conditions such as strain constraint and volume constraint in the Tetrahedral model. However, in this study, a preprocessing operation that creates an internal link was added to the existing PBD framework in order to proceed with the simulation using a model with only a triangle surface, not a tetrahedron.

AR/VR-related researches are also on the rise, due to the remarkable improvement of hardware and software technologies in recent years. Research and the commercialization of AR/VR contents have been conducted in various fields, such as medical, defense, education, and the game industry, and various research efforts are being conducted to improve the sense of immersion [

_{1}, ⋅ ⋅ ⋅ , _{n}), position X = (_{1}, ⋅ ⋅ ⋅ , _{n}), and mass m = (_{1}, ⋅ ⋅ ⋅ , _{n}). Input data includes position _{i} of vertex _{i}, mass _{i}, external force vector _{i}. In steps (1)–(3), the velocity V = (_{1}, ⋅ ⋅ ⋅ , _{n}) and position X = (_{1}, ⋅ ⋅ ⋅ , _{n}) are initialized, and _{i}. Afterwards, the proposed algorithm stores the data of the vertex to be connected to create the Internal Shape Preserving Constraint (ISPC) to preserve the shape of the virtual object. In addition, after setting constraints in the offline phase (C# code), computation is performed through GPU parallel processing of the computer shader. GPU computation is shown in lines (7)–(20). In line (8), the new velocity is calculated using the external force and the current velocity. The velocity is controlled through a damping method in line (9). The velocity and current position of the vertex are utilized to calculate the next position of vertex

In this paper, we applied the constraints set that includes distance constraint, bending constraint, and internal shape-preserving constraint on the 3D model in the PBD simulation. The proposed method applies distance constraints to the surface of the virtual 3D object and the inside of the object to perform with fast computation, compared to the existing tetrahedral model, while preserving the shape of the 3D object during simulation.

_{1} and _{2} are two nodes constituting the constraint, and _{1}, _{2}, and _{3}. To maintain the constraint, Δ_{i} is weighted according to _{i} = 1/_{i}.

_{0} is the angle of the initial triangle with respect to the adjacent triangles (_{1}, _{3}, _{2}) and (_{1}, _{2}, _{4}). The stiffness parameter _{bend} refers to the bending stiffness to maintain the angle between two triangles. Bending constraint can be applied regardless of the edge length of the mesh, because it uses the formula to find the initial angle and the deformation angle, even if the edge length of the deformable object is changed. Through these properties, the elastic stiffness and bending resistance can be set, and users can express models with different physical properties.

The virtual 3D object modeled with the proposed algorithm is compared with the same 3D object modeled with the existing strain constraint method [

When the projected position (_{0}, _{1}, _{2}, _{3}) and the initial position (_{0}, _{1}, _{2}, _{3}) before the simulation of tetrahedron are given, the current position and the initial position are given a new coordinate system with _{0} and

Finally, _{i} is a parameter for controlling the initial deformation of the current tetrahedral element.

Lines (1)–(9) of Algorithm

_{1}, _{2}, _{3}, and then selects the nearest vertex between the hit point and _{1}, _{2}, _{3}. In line (11), the distance between the three vertices is calculated based on the hit point of the ray, in order to connect

Components | Names and versions |
---|---|

CPU | Intel^{R} Core^{™} i7-7700 |

Mainboard | ASUSTeK H110 M-K |

BIOS | America megatrends 4210 |

RAM | 31 GB |

VGA | NVIDIA geForce GTX 1080 Ti |

Windows | Microsoft windows 10 Pro |

Unity version | Unity 2019.12f1 |

Monitor | Dell U2312HM |

Bunny model | ||||||
---|---|---|---|---|---|---|

ISPC model | Tetrahedral model | |||||

Vertices | 3,008 | Vertices | 9,629 | |||

Edges | Surface | 5,976 | Tetrahedra | 37,528 | ||

Inside | 1,011 | |||||

Gravity | −9.8 | Gravity | −9.8 | |||

Armadillo model | ||||||

ISPC model | Tetrahedral model | |||||

Vertices | 6,362 | Vertices | 17,481 | |||

Edges | Surface | 12,720 | Tetrahedra | 67,700 | ||

Inside | 6,321 | |||||

Gravity | −9.8 | Gravity | −9.8 | |||

Dragon model (hole and intersection) | ||||||

ISPC model | Surface model | |||||

Vertices | 2,998 | Vertices | 2,998 | |||

Edges | Surface | 6,000 | Edges | Surface | 6,000 | |

Inside | 2,947 | Inside | ||||

Gravity | −9.8 | Gravity | −9.8 |

In the case of the Bunny and Armadillo models, since the surface models were completely modeled, it was easy to create the tetrahedral model using TetGen. The Dragon model is provided by Stanford University, and we reduced the number of mesh elements using the 3ds Max for real-time simulation. This Dragon model contains many holes in the surface mesh, so when the tetrahedral model is created through the TetGen program, various errors appear. In the case of the incomplete surface model in which the mesh is not closed, such as the Dragon Model in

In this paper, the experimental test was stopped when 15 elapsed based on the function to measure simulation time. The output data was set to accumulate every 1 s in order to reduce the error of the data through the experimental test. Fifteen times of experimental tests were performed, and the average of 10 experimental tests was used, excluding outliers, such as the maximum and minimum values. The graphs in

Unity3D Update function is called every frame to execute the corresponding code. In this code, Time.deltaTime means the execution time per frame. The x-axis of the graph is the result of outputting FPS at 1 s intervals, and the y-axis is the average of the results of the FPS changing per second.

For the Bunny model, the ISPC and tetrahedral models were applied, and the results were compared. For experimental tests, the constraint parameters of the ISPC model, such as distance, bending, and internal shape-preservation, were adjusted to be similar to the behavior of the tetrahedral model.

ISPC model | Tetrahedral model | |||
---|---|---|---|---|

# of vertices | 3,008 | 9,629 | ||

# of constraints | 8,927 | 37,528 | ||

Distance stiffness | Surface | Compression | 1.0 | |

Stretch | 2.0 | |||

Inside | Compression | 0.03 | ||

Stretch | 0.1 | |||

Bending stiffness | 2.0 | 2.0 | ||

Strain stiffness | 4.0 |

The result of comparing the FPS showed that the FPS of the ISPC model was about 115% faster than the FPS of the tetrahedral model, as shown in

For the Armadillo model, the ISPC and tetrahedral models were applied, and the results were compared as well. For experimental tests, the constraint parameters of the ISPC Model, such as distance, bending, and internal shape-preservation, were adjusted to be similar to the behavior of the tetrahedral model, as for the Bunny model.

ISPC model | Tetrahedral model | ||||
---|---|---|---|---|---|

# of vertices | 6,362 | 17,481 | |||

# of constraints | 19,041 | 67,700 | |||

Distance stiffness | Surface | Compression | 3.0 | Compression | 3.0 |

Stretch | 3.0 | Stretch | 3.0 | ||

Inside | Compression | 0.05 | |||

Stretch | 0.1 | ||||

Bending stiffness | 2.0 | 2.0 | |||

Strain stiffness | 4.0 |

Similar to the Bunny model, the FPS of the ISPC model was about 285% faster than the FPS of the tetrahedral model, as shown in

The experimental test with the Dragon model, which includes some holes in the model, was conducted. In the case of the surface model, no matter how high the stiffness value of the constraint is in setting up, when the interactions, such as gravity or collision, are applied to 3D virtual objects, the shape of the original model cannot be maintained. However, the proposed ISPC algorithm maintained the original shape of the object well, even under the collision situation, and it was confirmed that the behavior of the ISPC object simulation was similar to that of the tetrahedral model.

ISPC model | Surface model | ||||
---|---|---|---|---|---|

# of vertices | 2,998 | 2,998 | |||

# of constraints | 8,998 | 2,998 | |||

Distance stiffness | Face | Compression | 3.0 | Compression | 3.0 |

Stretch | 3.0 | Stretch | 3.0 | ||

Inside | Compression | 3.0 | |||

Stretch | 3.0 | ||||

Bending stiffness | 2.0 | 2.0 |

Finally, to confirm the change in volume when pressure is applied to the ISPC and tetrahedral models, the experimental test of pressing two objects with a transparent glass plate was conducted. As a result of experimental test, it was confirmed that the proposed ISPC model as shown in

This model can generate a volumetric model similar to the tetrahedral model and can simulate it. However, since it creates a link inside the surface model and proceeds, it has a disadvantage in that it is vulnerable to accurate physics simulation compared to the tetrahedral model. Also, there is a disadvantage in that it is difficult to proceed with cutting simulation.

In this paper, in order to overcome the problem of generating the tetrahedral model from the surface model that might occur when trying to simulate a tetrahedral model using Unity3D, and the problem of real-time computation because it consists of many vertices, we proposed the ISPC algorithm to simply simulate the 3D virtual objects, applying the distance constraints to the inside of 3D objects. The tetrahedral model has the problem that generation errors easily occur depending on the completeness of the surface mesh and input parameter values. Therefore, users who are unfamiliar with the 3D modeling program may have difficulty in creating the simulation contents. In addition, when simulation through the tetrahedral model is possible, there is the disadvantage that real-time simulation cannot be performed on Unity3D, due to the heavy computational cost. To solve these problems, we applied the proposed ISPC algorithm, and obtained similar behavior to the result of the deformable object simulation for the tetrahedral model by adjusting the stiffness of constraints. Various physical properties, such as softness and rigidity, could be expressed with the proposed method. Also, the computational cost that could be represented using FPS was about 100% or more better than that of the tetrahedra model. Therefore, the proposed method can be a solution for the production of games or real-time simulation contents based on Unity3D.

The proposed ISPC algorithm can be effectively applied for interactive situations, such as collision and pressure, but in the case of precise simulation and cutting simulation, it has the disadvantage of being difficult to apply, which is mainly dealt with in the current simulation contents. In the future, we will provide the supplement of shortcomings of the ISPC model, and conduct the research on a new algorithm that can perform cutting simulation and volume preservation using constraints.