• 沒有找到結果。

Texture Mapping with Hard Constraints

在文檔中 Item 987654321/15186 (頁 63-69)

Chapter 5 Constrained Texture Mapping using Warping Scheme

5.3 Texture Mapping with Hard Constraints

5.3.1 Overview and Definitions

(a) (b) (c)

(d) (e) (f)

(g) (h)

Figure 42. (a)-(b) input triangle mesh M and 2D texture. (c) the planar embedding of M with virtual boundary. (d)-(f) warping algorithm is used to align constraints. (g) the resulting embedding is further smoothed. (h) Resulting textured model.

We now extend our new warping algorithm to compute surface parameterization for texture mapping with hard constraints. Figure 42(a)-(g) show the overall stages. To present this application, we define some terminology used in the following sections. Let M be the input triangle mesh and a set of positional correspondence between M and texture specified at stages (a)-(b). PM is the planar embedding of M and can be obtained using any bijective planar parameterization. In our implementation, PM is computed by [40]. We also add a set of virtual points surrounding PM as suggested by [18], such that the boundary of PM is free to move in the parametric domain. Let M+ be the mesh M with virtual points and the embedding of M+ be PM+ as shown in stage (c). In PM+, each feature vertex (red point at stage (c)) corresponds to a feature vertex of M (red point at stage (a)). The feature vertex of PM+ will be aligned to a user-specified position on texture image (red points at (b)) using our warping algorithm at stages (d)-(f). Finally, at stage (g), a variant of stretch metric [32] is used to smooth embedding for reducing distortion. Later in section 5.4, we will experimentally compare our method with [18] and give discussion with related work.

(a) (b)

Figure 43. fi are feature vertices and red dotted lines are edges of G. A corresponding path (green) of f3f4 was computed in (b). In (a) and (b), an edge v1v2 of PM+ divides the enclosing boundary of f1f3 into two sub-regions. A Steiner vertex (blue) is added and the corresponding path of f1f3 is shown in light blue.

5.3.2 Constructing a Base Mesh

We do not directly use the warping algorithm to match feature vertices of PM+ since the edge swap operations in PM+ will damage the geometry of mesh M. To avoid this problem, we warp a base mesh BM+ instead of PM+. A base mesh BM+ is constructed from PM+. An edge swap in BM+ corresponds to a path swap in PM+, such that a path swap does not change the geometry of mesh M. The construction of base mesh BM+ is described as follows.

Let G be a guiding mesh, which is used to construct the base mesh. The vertex set of G consists of feature vertices and virtual points from PM+. Then, we can determine the connectivity of G by the constrained Delaunay triangulation [37]. An example of G is illustrated as a red-color-edge mesh in Figure 42(d). Each edge of G guides us to compute a path on PM+. We use the following steps to find such paths (the green paths shown in Figure

1. For each inner edge EG ∈ G, we first determine a closed region in order to locally compute its corresponding path on PM+. Initially, the boundary of the closed region is formed by the enclosing quadrilateral of EG as shown in Figure 43(a). If the corresponding path of EG is found, EG is replaced by this path. For example, a guiding edge f3f4 is replaced by the green path from f3 to f4 as shown in Figure 43(b).

2. Next, if there exists some edge vmvn in PM+, such that vmvn divides the enclosing boundary of EG into two disjoint sub-regions, then both end points of vmvn can be either outside or are right on the enclosing boundary of EG, e.g., an edge v1v2 as shown in Figure 43. This edge vmvn potentially blocks the corresponding path of EG. If vmvn is split by a Steiner vertex, the corresponding path of EG can be found. Therefore, we will add a Steiner vertex at the midpoint of xmxn . The following rules are used to compute xm and xn.

(a) If both end points of vmvn are outside the boundary of EG, xm and xn become the intersection points of vmvn and the boundary of EG, e.g., x1 and x2 in Figure 43(a).

(b) If one end point vm of vmvn is outside the boundary of EG and the other vn is right on the boundary of EG, xm becomes the intersection point of vmvn and the boundary of EG, and xn is the same with vn, e.g., x1 and x2 in Figure 43(b).

(c) If both end points of vmvn are right on the boundary of EG, xm can be vm and xn

can be vn.

3. We can find the correspondent path of EG by Dijkstra’s shortest path algorithm within the enclosing boundary of EG. Only the vertices inside the enclosing boundary of EG

can be joined to the shortest path computation.

In addition, for each boundary edge of G, its corresponding path consists of the boundary edges of PM+. After constructing the corresponding path of each edge in G, PM+ is then decomposed into a set of triangular patches, e.g., in Figure 42(d), the boundary of each patch is drawn in green. Then we can straighten the boundary of each patch in PM+ and the base mesh BM+ would therefore be created as shown in Figure 42(e). We parameterize the vertices inside each patch by Tutte’s method [40]. Then the vertices inside each triangular patch are encoded by the barycentric coordinates with respect to the triangle nodes of BM+. Note that before we straighten the boundary of each base triangle, there may be some vertices outside the corresponding base triangle. But after 1) straightening the boundary of each triangle and 2) parameterizing the vertices inside each triangle patch using [40], the vertex inside the triangle patch is inside the corresponding triangle of base mesh and the resulting barycentric coordinates become valid.

5.3.3 Warping a Base Mesh

To match constraints, we warp a base mesh BM+ instead of an embedding PM+. Each edge swap of BM+ corresponds to a path swap since the edge of base mesh is actually a path on PM+. Say the edge e of BM+ to be swapped. First, we find the quadrilateral Q(e) and re-parametrize the inner vertices contained in Q(e) using barycentric parameterization [40].

From section about foldover-free 2D triangle mesh warping, we know that Q(e) can become convex before the edge-swap. Therefore, the barycentric parameterization is always valid.

Next, let the other diagonal of Q(e) be a guiding edge to compute a new path P for the swap of e. The new path P is computed by Dijkstra’s shortest path algorithm. An additional Steiner vertex will be added if there exists an edge in PM+, such that its two end points are on the boundary of Q(e). Once path P is determined, it needs to be straightened and two new

triangular patches adjacent to P are re-parametrized. Therefore, the edge e of BM+ is swapped.

Note that the inner vertices in each triangular patch of BM+ are encoded by the barycentric coordinates. These vertices are extracted to compute a new path before an edge swap in BM+, and the barycentric coordinates of these vertices need to be updated after an edge swap in BM+.

5.3.4 Smoothing the Embedding

(a) (b) (c)

Figure 44. mesh smoothing using (a) [18], (b) the metricφ(t), and (c) the weighted metric )

(t w⋅φ

After aligning the constraints, the embedding is distorted. As suggested in [18], the post embedding smoothing will be useful in reducing distortion. Our smoothing procedure is a variant of [32] and is based on a restricted and iterative relaxation procedure. All feature vertices are restricted to be stationary while the positions of other non-feature vertices are iteratively adjusted. The adjustment aims at minimizing a stretch metric φ(t) for each triangle t defined below.

Γ and γ are singular values derived from [32]. In φ(t), both enlargement Γ and shrinkage γ are treated with the same importance to measure the distortion of t. To further reduce the distortion for the neighborhood of the feature vertex, we use the weighted distortion metric

) (t

w⋅φ instead of φ(t) to smooth the embedding. The value of w is computed by 1 d , 2f where d is the distance between the centroid of t and the nearest feature vertex of t. Figure f

44 shows an experimental comparison between [18] and our mesh smoothing method using )

φ(t and w⋅φ(t). The weighted metric w⋅φ(t) performs the best in this example.

在文檔中 Item 987654321/15186 (頁 63-69)

相關文件