Keywords

1 Introduction

Collision detection is the most time consuming part in the dynamic simulation of clothes. In order to implement optimization of self-collision detection, the researchers propose a series of optimization methods, including the high-level tailoring optimization and low-level tailoring optimization methods.

High-level tailoring is made on the triangle plane to obtain all candidate triangle pairs (PCTPs) possibly occurring collision through cutting off the area and triangle pairs which will not occur collision, and the most common method is the hierarchical bounding box algorithm. As for self-collision tailoring, Barbic and James [1] proposed a subspace culling method for reduced deformation and Zheng and James [2] use energy-based certificates for arbitrary deformation. Volino [3] judged the self-collision state of meshes through the profile test. Provot [4] proposed the normal vector cone method to effectively cut off the non-collision area, and this method is only applicable to the discrete collision detection. Tang [5] expanded the normal vector cone method to the continuous collision detection to calculate the continuous normal vector cone information in the whole time step. Low-level tailoring is made on the primitive pair plane to cut off the redundant and non-collision primitive pairs and obtain all candidate primitive pairs possibly occurring collision. Many techniques have been proposed to reduce the number of elementary tests between the triangle primitives [6]. Hutter and Fuhrmann [7] proposed the primitive bounding box method to effectively cut off the non-collision primitive pairs. Curtis [8] proposed the representative triangle to eliminate the redundant primitive pairs through uniquely distributing each primitive feature to a triangle containing it. Tang et al. [9], proposed the filter method to filter out the non-coplanar primitive pairs.

2 High-Level Tailoring Optimization

This paper firstly implements the basic high-level tailoring in combination with the hierarchical bounding box algorithm and continuous normal vector cone information On this basis, this paper implements the high-level tailoring optimization based on the radiation angle and cuts off the non-collision triangle pairs in cluster through the radiation angle test. Finally, this paper implements the high-level tailoring optimization based on the isolated set and cuts off the adjoining triangle pairs in the candidate triangle pairs through establishment of isolated sets, so as to further improve the efficiency of self-collision detection.

2.1 Basic High-Level Tailoring

During the self-collision detection, this paper implements the basic high-level tailoring by combining the hierarchical bounding box algorithm with the continuous normal vector cone information. During the traverse process of hierarchical bounding box, this paper firstly uses the continuous normal vector cone information to cut off the non-collision areas, implements the intersection test of bounding box in remaining area and cuts off the disjoint area and triangle pairs in bounding box, so as to obtain all candidate triangle pairs possibly occurring collision. In order to use the continuous normal vector cone information in the hierarchical traverse process, each node in the hierarchical bounding box contains two additional attributes: semi-cone angle and cone axis vector axis.

2.2 High-Level Tailoring Optimization Based on the Radiation Angle

The tailoring idea based on the radiation angle is: if there is an observation point in the given closed manifold mesh and all triangles in this mesh is completely visible to this point (namely, the connection line from the observation point to each triangle will not intersect with other triangles), then this mesh will not occur collision.

This paper improves the skeleton-driven radiation angle tailoring method proposed by Wong [10], and implements the high-level tailoring optimization based on radiation angle in combination with the hierarchical bounding box algorithm and continuous normal vector cone information.

This paper arranges two observation points at the center of upper arm and lower arm in accordance with the structural features of the arm clothes meshes, and the initial location of observation points shall be determined in accordance with the boundary points on the upper and lower end faces of the arm mesh. The mesh is divided into two clusters in accordance with the relative location of the center point on the connection line between the triangle and two observation points, and each cluster corresponds to an observation point. This paper defines two cross sections at the initial location of observation point to cut out loops in the arm meshes and obtain two section loops. In each time step, the location and speed information of observation point can be obtained by a group of vertex interpolation of the corresponding section loop.

During the pre-processing stage, we determine the observation points, implement clustering of meshes and construct the hierarchical bounding box for each cluster of mesh.

During the collision detection stage, we firstly update the hierarchical bounding box of each cluster, update the location and speed information of the observation points and make classifications of observation points for the triangles in each cluster of mesh. Then, implement the detection in and among clusters to obtain all triangle pairs possibly occurring collision. Detection in cluster is to detect the self-collision state in cluster by performing radiation angle test on each cluster of mesh. If all triangles in the cluster are the positively directed triangles, this cluster will not occur collision and shall be cut off. If there is negatively directed triangles or non-directional triangles, detect the collision status of triangle to obtain all triangle pairs possibly occurring collision in the cluster. Detection among clusters is to use the algorithm based on the hierarchical bounding box to obtain all triangle pairs possibly occurring collision among clusters through the intersection test of hierarchical bounding box.

2.3 High-Level Tailoring Optimization Based on the Isolated Set

As the bounding boxes of adjoining triangle pairs always intersect with each other, the efficiency of high-level tailoring is low. During the final step of high-level tailoring, this paper implements the tailoring optimization based on the isolated set [5] and cuts off the adjoining triangle pairs in the candidate triangle pairs.

Establish the isolated set during the preprocessing stage. Only the upper and lower end face of the arm clothes mesh are not closed, boundary element is a few and the quantity of primitives in the isolated set is also a few. During the collision detection stage, cut off all adjoining triangle pairs during the high-level tailoring process to ob-tain all non-adjoining triangle pairs with intersecting bounding boxes, so as to form the candidate triangle pairs. If the bounding boxes of two leaf nodes intersect with each other during the intersection testing of hierarchical bounding box, judge whether two triangles are adjoined (namely whether they contain the common vertex). If only two triangles are not adjoined, one candidate triangle pair can be formed; otherwise, cut off this triangle pair.

After the high-level tailoring optimization on the basis of the isolated set, the candidate triangle does not contain adjoined triangle pairs. The primitive pair distributed by the candidate triangle pair and the primitive pair in the isolated set for the candidate primitive pair together and can be used for the subsequent basic intersection test.

3 Low-Level Tailoring Optimization

During the low-level tailoring stage, this paper firstly implements the low-level tailoring optimization on the basis of characteristic distribution. Cut off the redundant primitive pairs through the characteristic distribution, implement the intersection test of primitive bounding box when distributing primitive pairs to the candidate triangle and cut off the non-intersecting primitive pairs of the bounding box. In addition, this paper implements the low-level tailoring optimization based on the non-coplanar filter, filter out the non-coplanar primitive pairs in the time step through the non-coplanar test, further reduce the quantity of candidate primitive pairs and improve the efficiency of self-collision detection.

3.1 Low-Level Tailoring Optimization Based on the Characteristic Distribution

As the vertex/edge of mesh is shared by several triangles, the primitive pairs have redundancy. In order to eliminate the redundant primitive pairs, Curtis [8] proposed the idea of representative triangle and uniquely distributed each vertex/edge of mesh to one triangle containing it.

The primitive hierarchical bounding box method proposed by Hutter and Fuhrmann [7] can effectively cut off the primitive pairs not intersecting with the primitive bounding box. The tailoring efficiency is high, but the requirement of maintenance of several primitive hierarchical bounding boxes affects the simulation efficiency. In order to make use of the advantage of high tailoring efficiency of the primitive hierarchical bounding box method, this paper implements the low-level tailoring optimization based on characteristic distribution in combination with the representative triangle mechanism and primitive bounding box during the low-level tailoring stage. This paper firstly implements the characteristic distribution and use the representative triangle mechanism to cut off the redundant primitive pairs. When distributing the primitive pairs to the candidate triangle pairs containing the compatible characteristic pairs, calculate the bounding box of primitives, implement the intersection test of primitive bounding box and cut of the non-intersecting primitive pairs of the primitive bounding boxes.

The low-level tailoring optimization method in this paper implements the intersection test of primitive bounding box during the distribution of primitive pairs and cuts off the non-intersecting primitive pairs of the primitive bounding box, which further improves the efficiency of low-level tailoring. Comparing with the primitive hierarchical bounding box method, the low-level tailoring optimization method in this paper does not need to maintain several primitive hierarchical bounding boxes and has high simulation efficiency. The low-level tailoring optimization method in this paper is implemented as follows:

Pre-processing stage:

Add two attributes in the data structure of each triangle to respectively record the quantity of characteristic vertexes and characteristic sides distributed to this triangle. Implement the characteristic distribution of mesh by using the greedy algorithm and traverse each triangle in order. If there is undistributed primitive (vertex and side) in this triangle, it shall be distributed to this triangle. During the characteristic distribution process, the vertex list and side list of each triangle shall be re-arranged so as to make the distributed characteristic primitive in the front part of the vertex/edge list.

Collision detection stage:

In each time step, distribute the candidate primitive pair which will implement the subsequent basic intersection test to the candidate triangle pairs obtained through high-level tailoring. The distribution process is as follows:

  • Step 1: firstly judge whether the candidate triangle pair contains compatible characteristic pairs. If at least one triangle is distributed to one or several vertexes or two triangles are distributed to one side or several sides, then this triangle contains the compatible characteristic pairs and continues the step 2. If these two triangles don’t contain compatible characteristics pairs, skip these triangle pairs.

  • Step 2: implement the intersection test of primitive bounding box when distributing the primitive pairs.

  1. (1)

    Each vertex represented by the triangle A implements the VF primitive bounding box intersection test with the triangle B. If the primitive bounding boxes intersect with each other, it will form a VF candidate primitive pair;

  2. (2)

    Each vertex represented by the triangle B implements the VF primitive bounding box intersection test with the triangle A. If the primitive bounding boxes intersect with each other, it will form a VF candidate primitive pair;

  3. (3)

    Each characteristic side represented by the triangle A implements the EE primitive bounding box intersection test with each characteristic side represented by the triangle B. If the primitive bounding boxes intersect with each, it will form an EE candidate primitive pair.

3.2 Low-Level Tailoring Optimization Based on the Non-coplanar Filter

Continuous self-collision detection. Basic intersection test consisting of 6 VF primitive pairs and 9 EE primitive pairs shall be implemented for each candidate triangle, and each basic intersection test shall be divided into 2 steps: coplanar test and internal test. The coplanar test shall involve 4 vertexes no matter for the VF primitive pair or EE primitive pair, and the primitive pairs will possibly have collision only when 4 vertexes are coplanar. Provot [4] proposed that univariate cubic equation shall be solved for the coplanar test of 4 vertexes. If it can be judged in advance that the 4 vertexes will not be coplanar within the time step, the primitive pair will certainly not have collision and can be cut off, so it is unnecessary to solve the univariate cubic equation to implement the coplanar test.

If the vertex is always at the same side of the triangle during the whole time step for the VF primitive pair, this VF primitive will not have collision. This is because the vertex and triangle during the whole time step will not be coplanar and will not have intersection. Thus, if the two sides have not intersection during the whole time step for the EE primitive pair, this EE primitive pair will not be coplanar. Tang [9] proposed the non-penetrating filter method which is to implement the non-coplanar test of primitive through calculating the projection distance and filter out the non-coplanar primitive pairs within the time step.

At the final step of low-level tailoring, this paper implements the low-level tailoring optimization based on the non-coplanar filter and cut off the non-coplanar primitive pairs within the whole time step through the non-coplanar test, so as to further reduce the quantity of candidate primitive pairs and improve the collision detection efficiency. During the collision detection stage, implement the non-coplanar test of the VF primitive and EE primitive within each time step through calculating the projection distance of primitive pairs.

4 Experiment Result

In our experiments, we use a PC with a Intel Xeon CPU and 4G of memory. There are 693 vertexes and 1,345 triangular facets used for arm clothes mesh here. Taking one gesture for example, the quantity and simulation frame rate of the candidate triangular pairs (PCTPs) see below.

4.1 Experiment 1: High-Level Tailoring Optimization

In the high-level tailoring stage, we firstly implement the basic high-level tailoring in combination with the hierarchical bounding box algorithm and continuous normal vector cone information. In order to improve the tailoring efficiency, we implement the high-level tailoring optimization based on the radiation angle to obtain all candidate triangle pairs possibly having collision. Final step: implement the tailoring optimization of the isolated set to cut off all adjoining triangle pairs in the candidate triangle pairs through establishment of the isolated set, so as to further improve the self-collision detection efficiency.

The basic high-level tailoring experiment result is shown in the Fig. 1(a), and the high-level tailoring optimization experiment result is shown in the Fig. 1(b). The high-level tailoring optimization experiment result based on the isolated set is shown in the Fig. 1(c). Red triangles are used for marking the triangle in the detected candidate triangle pairs. We can see that comparing with basic bounding box method, the quantity of candidate triangular pairs tested by our high-level tailoring optimization method is much smaller. The simulation frame rate is improved by 14 times in fact. We improved the skeleton-driven radiation angle method of Wong and cut off adjoining triangle pairs. The simulation efficiency by our method is 6 times higher than that of Wong and moreover, the candidate triangular pairs are much less. Comparing the tailoring method of Tang which only employs orphan set, since we processed self-collision tailoring to each cluster through radiation angle test, the candidate triangular pairs tested by our method is only a half of that tested by Tang’s method, with simulation frame rate similar to that of Tang’s.

Fig. 1.
figure 1

Experiment result of high-level tailoring optimization method in this paper (Color figure online)

4.2 Experiment 2: Low-Level Tailoring Optimization

During the low-level tailoring stage, this paper firstly implements the low-level tailor-ing optimization based on the characteristic distribution. On this basis, this paper implements the low-level tailoring optimization based on the non-coplanar filter and respectively analyzes the experiment results.

Table 1 shows the comparison of quantity of primitive pairs and simulated frame rate. We can see that, comparing with basic low-level tailoring method, the quantity of candidate primitive pairs tested by our method decreased sharply and simulation frame rate has been improved by 3 times. Comparing with the tailoring method based on representative triangular mechanism of Curtis, since our method has filtered out non-coplanar primitive pairs and tested even fewer candidate primitive pairs, with high-level culling efficiency. Our low-level tailoring optimization method is lower than Tang’s in terms of simulation frame efficiency. But since our method has cut off redundant primitive pairs that do not intersect with primitive bounding box, fewer candidate primitive pairs have been tested. Thus, it is better than Tang’s method in terms of culling efficiency.

Table 1. Comparison of different low-level tailoring optimization methods

5 Conclusion

During the high-level tailoring stage, this paper firstly implements the basic high-level tailoring in combination with the hierarchical bounding box algorithm and continuous normal vector cone information. On this basis, this paper implements the high-level tailoring optimization based on the radiation angle. Finally, this paper implements the high-level tailoring optimization based on the isolated set. The high-level tailoring optimization method of this paper can greatly improve the self-collision detection efficiency. During the low-level tailoring stage, this paper firstly implements the low-level tailoring optimization based on the characteristic distribution. In addition, this paper also implements the tailoring optimization based on the non-coplanar filter. The low-level tailoring optimization method in this paper can further improve the self-collision detection efficiency.