• 沒有找到結果。

Simplifying the base mesh

Mesh Representation with Displacement Mapping

3.2 Mesh simplification

3.2.2 Simplifying the base mesh

For the initial configuration of base mesh, we set it’s surface to be the average of original mesh and bounding shell before simplification. Our simplification framework inherits the typical steps to build a PM[14] representation of base mesh. We use quadric error metric(QEM)[12]

as simplification metric to lead the simplified base mesh into a smooth coarse shape of original mesh. Additionally we add two constraints to satisfy our demand for displacement mapping.

3.2 Mesh simplification 19

3.2.2.1 Progressive meshes

The progressive meshes consists of a base mesh and a sequence of primitive reduction oper-ations used to coarsen the base mesh to represent a multi-resolution triangular mesh. PM is constructed using greedy algorithm by performing a series of primitive reduction of increasing costs on the original mesh, such as edge collapsing operation, until no reduction operation is possible. First, all possible edge collapsing operations of the input mesh are collected as candi-dates, then the cost of each candidate is calculated, and finally the edge collapsing operations are performed in the order of increasing cost. After each edge collapsed, the costs of remain-ing candidates shall be updated, and operations that become invalid will be removed from the candidate list. A cost updating step maybe time consuming and can be delayed using lazy evaluations, as proposed by Garland and Heckbert[12].

Each edge collapsing operation removes one vertex and generally two faces from the mesh.

And to refine a simplified mesh back to a higher level of detail, series of inverse operations are performed on the mesh in inverse order of the construction sequence. Vertex splitting is the inverse operation of edge collapsing, which adds a vertex and generally two faces back to the mesh. Fig. 3.5 shows the behaviors of a vertex collapsing and vertex splitting.

Figure 3.5: Edge collapsing and vertex splitting [14].

Given an input mesh M and a sequence of n vertex collapsing operations, a PM sequence with n + 1 levels of detail can be constructed. An example is shown in Fig. 3.6, where a mesh M5, after five edge collapsing operations, results in a PM of six levels. The mesh of the simplest

20 Mesh Representation with Displacement Mapping level is denoted as M0. a next level of PM can be acquired by performing a edge collapsing operation, and a previous level can be acquired by performing a vertex splitting operation.

Figure 3.6: PM sequence [16].

3.2.2.2 Quadric error metric

To guide the order of primitive reductions during simplification, we need a metric. The QEM is a metric that considers the geometric error between the simplified surface and the original surface.

The QEM evaluates the cost of each vertex collapsing as the distances from the remaining vertex Vv to the neighboring faces of the original vertices Vu and Vv. To do this, the first thing is to evaluate the total distance of a vertex v to its neighboring faces by

4(v) = X

p⊂neighbor−f aces(v)

(pTv)2 (3.1)

where v = [vx vy vz 1]T, neighbor − f aces(v) is the set of v’s neighboring faces, and p = [a b c d]T representing the plane defined by ax + by + cz + d = 0 where a + b + c + d = 1.

Equation 3.1 can be rewritten as the following quadratic form

4(v) = X

3.2 Mesh simplification 21

Equation 3.1 depicts that Kp can be used to find the squared distance from a point to the face p, and the Kp of all v’s neighbor planes can be summed to present the total distances of v to its neighboring faces. The summed Kp for v is called Q(v), the quadric error metric of v, or QEM of v.

To evaluate the cost of the edge collapse (Vu, Vv) → Vv, Q(Vu) and Q(Vv) are summed as Q(Vv) to approximate the total distances of Vv to th neighboring faces of Vu and Vv. By replacing (P

p⊂neighbor−f aces(v)Kp) by Q(Vv) in Equation 3.2, we get the cost function of edge collapse (Vu, Vv) → Vv as

4(Vv) = VvTQ(Vv)Vv (3.4)

While building the PM sequence, the QEM of each vertex that affected by a edge collapse need to be updated accordingly. The QEM of each remaining vertex during the PM building phase approximates the total distances from the vertex to all the faces collapsed to it.

3.2.2.3 Constraints

In previous simplification works there are some basic constraints such as triangle-flipping, triangle-degeneration, the folding on topology, or additionally the triangle’s aspect ratio. But for our requirement, to ensure that the simplified mesh is valid for displacement map construc-tion we add two constraints on the simplificaconstruc-tion. The first constraint is that the simplified surface can not intersect the surface of original mesh or the bounding shell. When checking an half-edge collapsing for this constraint, we virtually collapse the half-edge and trace the faces Fi in the one-ring neighborhood of the start vertex of the half-edge. If Fi is discarded after

22 Mesh Representation with Displacement Mapping collapsing, ignore it, else check if it intersect the surface of original input mesh or the bounding shell.

The other constraint is the height-field overlapping such that: since we want to convert the original mesh surface into a height-field representation, we have to prevent the original mesh surface from height-field overlapping against base mesh surface after simplification.

Figure 3.7: The height-field overlapping after simplification

Fig. 3.7 is an example of height-field overlapping after simplification., the arrows represent the displacement mapping directions. After simplifying the base mesh surface, we can see that there is a ray along displaced direction intersects three points on the original mesh surface, result in three displacement depth values mapping to the same point on base mesh surface, ruin the height-field structure.

3.2 Mesh simplification 23 Such height-field overlapping can be easily identified if there exits a point on original mesh surface whose normal dot the normal of base mesh surface equal to zero. This identifying method is proved to be correct by Collins and Hilton[5]. In order to analyze the height-field structure under a base face of base mesh, we construct a triangle slab of each base face. As in Fig. 3.8, the triangle slab is an volume constructed by extending the base face along its three inverse vertices’ normals (−N1, −N2, −N3). The verex normal is computed by average its one-ring adjacent faces’s normals. Then we used this triangle slab to determine where the region of original mesh surface are covered by the triangle slab and may be converted to displacement signals mapping to this base face.

Figure 3.8: The definition of a triangle slab

For the discrete triangular surface of original mesh, because the normal is constant on face but variate cross edges, we compute for each edge of original mesh the two dot values of its adjacent faces. That is, for each edge we have its two adjacent face’s normal N1 and N2, and

24 Mesh Representation with Displacement Mapping the normal of base face Nb. Then the height-field overlapping occurs if the two dot values have different signs as in equation 3.5.

(N1· Nb)(N2· Nb) ≤ 0 (3.5)

3.2.2.4 Conclusion

In this sectoin we described the framework of generating a simplified base mesh. We first con-struct the bounding shell with the shell volume to maintain the base mesh’s globe shape during

and after smplification. For our purpose that to render with per-pixel ray-casting methods[9][10][22][25].

we add one constraint during simplification that the base mesh surface can not cross over the original mesh surface and pierce into the original mesh. For a valid one-to-one displacement mapping from base mesh surface to original mesh surface, we add another constraint that there is no height-field overlapping after each simplifivation step.

相關文件