• 沒有找到結果。

Handling unclosed meshes

3.6 View-Line Scheme

For the view-line scheme, we divide the triangles of a deformable object into three view sets at first, including Vp+, Vp, and Vp0. In addition, there is an additional view set, Vlv, for unclosed meshes. We classify the types of all triangles according to the method described in section 3.3. For all triangle, view tests are performed by V Tl(t) = v(t)·N(t), where v(t) is a linear function in the time domain according to the movement trajectory of one of the vertices, and N(t) is the time normal vector with quadratic form in the time domain.

Triangles in Vl+are determined to be positively oriented. Triangles in Vland Vl0are determined to be negatively oriented. Triangles in Vlv are determined to be violated.

Theorem 7. Suppose that there is a deformable object Mc and a view-line q0q1. The space and the object are divided into three regions, R0, R1, and R2. The view-line is put inside the object in the beginning, and we assume that the view-line does not penetrate the deformable object during the simulation. If all triangles of Mcare positively oriented according to the view-line in [0, ∆t], then Mcis self-collision free.

Proof. We sketch our proof as follows.

Suppose that we divide the triangles into three sets, S0, S1, and S2 according to the three regions, R0, R1, and R2. We can show the triangles in each set Si are self-collision free.

Then, we can show that it is collision free between two sets of the sets.

Consider that there are triangles in one set, which have collision. Then assume that these two triangles are T0 and T1. We can show that this is not possible as there must be the third triangle which is negatively oriented with respect to the view-line according to the Jordan curve theorem. This is a contradiction to our assumption.

Consider that there are two triangles collide between two sets. Assume that these two triangles are T0 and T1. Then T0 is a triangle in one set, and T1 is a triangle in another set. However, T0and T1must also belong to the same set as there is at least one vertex of a triangle belong to both set; otherwise, these two triangles cannot collide. However, we have already shown that it is collision free in a set.

If a deformable object is self-collision free, then we do not perform traversal. Other-wise, by Corollary 4, we perform further checks for the following pairs to collect poten-tially colliding pairs.

• (Vl+, Vl)

• (U, Vl0)

U is the union set of all triangles of the deformable object. For unclosed meshes, we perform further checks for the following pairs to collect potentially colliding pairs.

• (Vl+, Vl)

• (U, Vl0)

• (U, Vlv)

Vl+ = Vl+ − Vlv, Vl = Vl − Vlv, Vl0 = Vl0 − Vlv, and U = U − Vlv. Note that Vl+ ∩ Vl∩ Vl0∩ Vlv = ϕ.

The view-line scheme

1. Compute a line segment inside the deformable object Mcin the preprocessing stage.

2. Divide all triangles of the deformable object into three view sets, including Vl+, Vl, and Vl0. For unclosed meshes, there is an additional view set, Vlv.

3. If all triangles are in the set Vl+, then the deformable object Mcis self-collision free.

4. Otherwise, we need to perform further checks for the pairs (Vl+, Vl) and (U, Vl0).

For unclosed meshes, we need to perform further checks for the pairs of (Vl+, Vl), (U, Vl0), and (U, Vlv).

3.7 Discussion

3.7.1 View-based approach vs. traditional approach

For the traditional approach proposed by [VMT94], an object is divided into several regular patches, called normal cones. A normal cone is defined to be a triangle group that all triangles in the group satisfy the condition: there is a vector V such that Ni· V > 0, where Niare the normal vectors of the triangles.

During the simulation, normal cones are computed for all the leaves of the BVH of the object in the beginning. Then, normal cones of internal nodes are computed by merging adjacent normal cones until the normal cones of two adjacent nodes cannot be merged.

In the procedure, there is a lot of computation of vectors and normalization. After that contour tests are performed to check whether or not the model is self-collision free. For example, suppose that there is a patch that contains n triangles, T1, ..., Tn. The normal vectors of all triangles are N1, ..., Nn. If we can find a vector V that Ni · V > 0, where i = 1, ..., n, then V is called the normal of the patch and the patch form a normal cone.

On the other hand, we project the contour of the patch onto a plane which is perpendicular to the vector V . The projective contour in the plane is called C. The patch is determined to be self-collision free if the following two conditions are satisfied: (1) ∃V such that Ni · V > 0, ∀Ni, where i = 1, ..., n, and n is the number of triangles of the patch; (2) There is no intersection for C.

Algorithm 1 and 2 show the procedures of self-collision detection with the view-based scheme and the traditional approach for a closed deformable object. We can observe that there are mainly four differences.

1. View primitives are computed in the preprocessing stage for the view-based scheme.

2. For the view-based scheme, we adopt performing view tests to determine whether or not the deformable object is self-collision free. For the traditional approach, they adopt computing normal cones and performing contour tests to determine whether or not the deformable object is self-collision free.

3. If an object is determined to be self-collision free after performing view tests, then traversal does not be performed. But for the traditional approach, in fact, traversal, normal cones computation, and contour tests are performed at the same time.

4. For the view-based scheme, if objects are not self-collision free, the vBVHs of all kinds of view sets are constructed. Actually, we do not reconstruct BVHs of the view sets, but extract the partial BVHs, named vBVHs, by marking the nodes of the original BVH according to the view sets. We just need to update the nodes of vBVHs that the nodes contain the triangles whose types are changed between two consecutive frames.