Collision detection method between fabric and complex models in a space mesh
Objective Collision detection and collision processing are challenging problems and active research fields in computer graphics and virtual reality.The collision detection algorithm is a technical difficulty and the most important link in the entire simulation process.The quality of collision detection algorithms directly affects the authenticity of simulation situations.For collision detection between fabric and complex rigid body models,the softness and nonfixity of fabric pose great challenges to collision detection.When numerous particles that make up the fabric move,collisions inevitably occur.If collisions cannot be detected in a timely manner and the collision location cannot be repaired,penetration and distortion occur,considerably affecting subsequent simulations.Therefore,during the collision detection of fabric,higher require-ments are placed on the authenticity and real-time performance of the system.To solve the problem of low detection rate and poor simulation authenticity when collision detection occurs between flexible fabric and complex rigid body models during interaction,this study analyzes the characteristics of flexible fabric and complex rigid body models and selects different suitable bounding boxes for collision detection of different detection objects.This study proposes a hybrid hierarchical bounding box method,a fast directed bounding box method,and a spatial grid method for detecting objects to improve the timeliness of collision detection.Method In response to the characteristics of flexible fabric that is soft and prone to defor-mation,a bounding box with fast construction speed and simple structure is selected for flexible fabric.The bounding box with a simple structure can be quickly updated to better cope with the deformation of flexible fabric during movement,mak-ing the bounding box better surrounded in the simulation of the fabric model and more rapid for subsequent collision detec-tion.First,a hierarchical bounding box tree with a hybrid structure suitable for flexible fabric is constructed.The hierar-chical bounding box tree structure is divided into three layers,with the upper,middle,and lower layers playing different roles in eliminating each other.The three layers of bounding boxes overlap with each other.The top layer uses a simple and fast spherical bounding box,the middle layer uses a spherical aixe align bounding box(AABB)mixed structure bounding box,and the bottom layer uses an AABB bounding box.A quickly constructed bounding box is used to eliminate irrelevant collision pairs quickly and efficiently,facilitating subsequent detection.The main reason for the slow speed and poor authenticity of collision detection for complex rigid body models is due to numerous points and surfaces contained in the complex surface,which leads to low detection efficiency and high system overhead.Moreover,the more complex the num-ber of points and surfaces,the easier it is to cause penetration and distortion during simulation.In this situation,we use the method of triangle folding to simplify the complex rigid body model and combine it with quadratic error measurement to simplify and evaluate the model.This method enables the complex rigid body model to reduce the number of points and sur-faces without losing the details of the model's cause and allows the simplified model to replace the original complex model for rapid construction of the directed bounding box.This method accelerates the construction speed of bounding boxes and reduces system overhead,accelerating the process of collision detection.After collision detection of the bounding box struc-ture,the collision pair information is obtained.The spatial grid method is used on the surface of the collision model to con-nect sequentially the model surface vertices between the detected models to construct a spatial grid.The area or volume of the spatial grid changes with the movement of the detected object.By detecting changes in the area or volume of the spatial grid,whether a collision has occurred is determined.The elements that make up the spatial grid must be constrained so that the area or volume of the spatial grid is within an acceptable range and is not zero.This process ensures that the simula-tion effect is not affected and prevents the collision simulation between the fabric and the rigid body model from penetrating.Result Compared with traditional methods and other literature methods,this study conducted experiments to record colli-sion detection data in multiple scenarios.The experimental results showed that in the same scenario,compared with other methods,the construction speed of the bounding box in this study was shortened by 10%~18%,and the tightness of the bounding box on the model was improved by 8%~15%.For the same collision model,the removal rate of irrelevant colli-sion pairs by bounding boxes is improved by 8%~13%compared with traditional methods,and the overall collision detec-tion time is reduced by 6%~13%.This method ensures the authenticity of the simulation while improving the collision detection rate and rejection rate.Conclusion The improved bounding box method in this study has improved the detection speed in the rough detection stage and enhanced the rejection rate of incoherent collision pairs.In the precise detection stage,the use of spatial mesh methods can not only detect collisions but also prevent collision penetration between the fab-ric and the rigid body by imposing constraints on the model vertices.The algorithm in this study not only ensures the overall simulation authenticity but also improves the detection speed,reduces system overhead,and is more suitable for collision detection with flexible fabric and complex rigid body models.