Texture Mapping with Hard Constraints

Similar documents
Parameterization of Triangular Meshes with Virtual Boundaries

Intrinsic Morphing of Compatible Triangulations. VITALY SURAZHSKY CRAIG GOTSMAN

Cloning Skeleton-driven Animation to Other Models

Manifold Parameterization

Spanning Tree Seams for Reducing Parameterization Distortion of Triangulated Surfaces

A New Constrained Texture Mapping Method

Texture Mapping using Surface Flattening via Multi-Dimensional Scaling

Mesh Repairing and Simplification. Gianpaolo Palma

Parallel Computation of Spherical Parameterizations for Mesh Analysis. Th. Athanasiadis and I. Fudos University of Ioannina, Greece

Topology-driven Surface Mappings with Robust Feature Alignment

Morphing Planar Graphs in Spherical Space

Research Article Polygon Morphing and Its Application in Orebody Modeling

Surface Parameterization

Quadrilateral Remeshing

Topology-driven Surface Mappings with Robust Feature Alignment

Final Project, Digital Geometry Processing

Metamorphosis of Polyhedral Surfaces using Decomposition

Segmentation & Constraints

coding of various parts showing different features, the possibility of rotation or of hiding covering parts of the object's surface to gain an insight

Computer Aided Geometric Design

Level Set Extraction from Gridded 2D and 3D Data

Smoothing an Overlay Grid to Minimize Linear Distortion in Texture Mapping

Digital Geometry Processing Parameterization I

Comparison and affine combination of generalized barycentric coordinates for convex polygons

Multiresolution Remeshing Using Weighted Centroidal Voronoi Diagram

Ph.D. Student Vintescu Ana-Maria

Parameterization of Triangulations and Unorganized Points

A Robust Procedure to Eliminate Degenerate Faces from Triangle Meshes

Hierarchical Least Squares Conformal Map

Warping and Morphing. Ligang Liu Graphics&Geometric Computing Lab USTC

Non-Distorted Texture Mapping Using Angle Based Flattening

Parameterization II Some slides from the Mesh Parameterization Course from Siggraph Asia

Mesh Morphing. Ligang Liu Graphics&Geometric Computing Lab USTC

Morphing Planar Graphs in Spherical Space

Morphing Planar Graph Drawings

Abstract. 1 Introduction. 2 Related Work. Figure 1. Local texture mapping with different sets of feature points.

Surface Topology ReebGraph

Cut-and-Paste Editing of Multiresolution Surfaces

Topology-Free Cut-and-Paste Editing over Meshes

High quality compatible triangulations

Parameterization of Faceted Surfaces for Meshing using Angle-Based Flattening

A Hole-Filling Algorithm for Triangular Meshes. Abstract

Discrete Geometry Processing

Assignment 4: Mesh Parametrization

Preferred directions for resolving the non-uniqueness of Delaunay triangulations

3-D Morphing by Direct Mapping between Mesh Models Using Self-organizing Deformable Model

Bounded-distortion Piecewise Mesh Parameterization

Computergrafik. Matthias Zwicker Universität Bern Herbst 2016

As a consequence of the operation, there are new incidences between edges and triangles that did not exist in K; see Figure II.9.

TEXTURE mapping technique usually assigns ðu; vþ texture

Bounded-distortion Piecewise Mesh Parameterization

Geodesic Paths on Triangular Meshes

AN ADAPTABLE SURFACE PARAMETERIZATION METHOD

Surface Reconstruction. Gianpaolo Palma

Voronoi Diagram. Xiao-Ming Fu

GEOMETRIC LIBRARY. Maharavo Randrianarivony

Parameterization with Manifolds

3-Dimensional Object Modeling with Mesh Simplification Based Resolution Adjustment

Parameterization of triangular meshes

Parameterization. Michael S. Floater. November 10, 2011

3D Geometric Metamorphosis based on Harmonic Map

2D rendering takes a photo of the 2D scene with a virtual camera that selects an axis aligned rectangle from the scene. The photograph is placed into

Manipulating the Boundary Mesh

Lecture 25: Bezier Subdivision. And he took unto him all these, and divided them in the midst, and laid each piece one against another: Genesis 15:10

THE FORCE DENSITY METHOD: A BRIEF INTRODUCTION

Mesh morphing using polycube-based cross-parameterization

Cross-Parameterization and Compatible Remeshing of 3D Models

Mesh Simplification. Mesh Simplification. Mesh Simplification Goals. Mesh Simplification Motivation. Vertex Clustering. Mesh Simplification Overview

All the Polygons You Can Eat. Doug Rogers Developer Relations

Geometric Modeling. Bing-Yu Chen National Taiwan University The University of Tokyo

Motivation. towards more realism. + Texture Mapping Texture Mapping

2) For any triangle edge not on the boundary, there is exactly one neighboring

Interpolatory 3-Subdivision

Multiresolution Computation of Conformal Structures of Surfaces

Mesh Parameterization Methods and their Applications

Cross-Parameterization and Compatible Remeshing of 3D Models

Template Based Mesh Completion

Geodesic Paths on Triangular Meshes

04 - Normal Estimation, Curves

Shape Blending Using the Star-Skeleton Representation

Decoration of plastic objects using multi view-dependent textures

A Global Laplacian Smoothing Approach with Feature Preservation

Invariant shape similarity. Invariant shape similarity. Invariant similarity. Equivalence. Equivalence. Equivalence. Equal SIMILARITY TRANSFORMATION

A Short Survey of Mesh Simplification Algorithms

A Developer s Survey of Polygonal Simplification algorithms. CS 563 Advanced Topics in Computer Graphics Fan Wu Mar. 31, 2005

Geometric Modeling Mortenson Chapter 11. Complex Model Construction

Vectorization Using Stochastic Local Search

Computer Graphics Prof. Sukhendu Das Dept. of Computer Science and Engineering Indian Institute of Technology, Madras Lecture - 24 Solid Modelling

Physically-Based Modeling and Animation. University of Missouri at Columbia

Single Triangle Strip and Loop on Manifolds with Boundaries

Mathematical Surface Representations for Conceptual Design

A General Simplification Algorithm

DISCRETE DIFFERENTIAL GEOMETRY

Geometric structures on manifolds

Interactive Multiresolution Editing of Arbitrary Meshes

L1 - Introduction. Contents. Introduction of CAD/CAM system Components of CAD/CAM systems Basic concepts of graphics programming

Multi-Scale Free-Form Surface Description

Interpolating and approximating scattered 3D-data with hierarchical tensor product B-splines

Kai Hormann, N. Sukumar. Generalized Barycentric Coordinates in Computer Graphics and Computational Mechanics

Parameterization using Manifolds

Transcription:

EUROGRAPHICS 2001 / A.Chalmers and T.-M.Rhyne Volume 20 (2001), Number 3 (Guest Editors) Texture Mapping with Hard Constraints Ilya Eckstein Vitaly Surazhsky Craig Gotsman Computer Science Department, Technion Israel Institute of Technology {ekshteyn vitus gotsman}@cs.technion.ac.il Abstract We show how to continuously map a texture onto a 3D triangle mesh when some of the mesh vertices are constrained to have given (u,v) coordinates. This problem arises frequently in interactive texture mapping applications and, to the best of our knowledge, a complete and efficient solution is not available. Our techniques always guarantee a solution by introducing extra (Steiner) vertices in the triangulation if needed. We show how to apply our methods to texture mapping in multi-resolution scenarios and image warping and morphing. 1. Introduction Interactive 3D authoring applications frequently map 2D textures onto a 3D triangle mesh. This involves assigning (u,v) coordinates to the vertices of the 3D mesh, which defines a piecewise affine mapping of the texture image to the 3D mesh triangles. While many applications do not care about the precise values of the (u,v) coordinates, as long as the result looks reasonable, there are applications in which these values are critical. For example, when texture mapping a photograph of a face to a 3D mesh of a head, it is important that the eyes and the nose in the photograph are aligned precisely with the eyes and the nose in the mesh. Figure 1 illustrates what might happen if these constraints are not satisfied. Precise alignment means that the (u,v) coordinates associated with feature points in the 3D mesh are constrained to very specific values, known as hard constraints. The (u,v) coordinates of the rest of the mesh are not as constrained, as long as the resulting mapping is visually appealing. By visually appealing we mean that the texture is mapped in a continuous manner onto the 3D mesh, namely, does not contain foldovers or tears, and is not too distorted, despite the constraints. While many papers [4,6,11,12,13,14,16,19] deal with the problem of minimal-distortion texture-mapping, to the best of our knowledge, none of them permit hard constraints in the mapping. The technique of Levy and Mallet [13] permits soft constraints, i.e. where the constraints are allowed to be only approximately satisfied. This paper shows how to obtain continuous piecewise-affine mappings of a texture map to a 3D mesh with hard constraints. Since, in general, arbitrary hard constraints might prevent any solution to the problem, we present a general technique for satisfying constraints, which involves the introduction of extra vertices into the mesh. These vertices are known as Steiner vertices. Our technique solves the problem of texture mapping with hard constraints and also the following problem that arises when texture mapping a multiresolution mesh, namely, maintaining a legal parametrization of the mesh at all resolution levels: Assume that a full-resolution mesh has a continuous parametrization (i.e. texture coordinates), and a simplification algorithm has generated a sequence of vertex removals and hole retriangulations for the mesh (for an example of such an algorithm see [9]). The texture coordinates of the vertices remaining in the lower resolution meshes are just inherited from the highest resolution mesh, and the new connectivity defines a new parametrization. In many cases, this parametrization of the low resolution mesh will be legal (i.e. the 2D triangulation will not contain foldovers), but this is not guaranteed. We show how, given a high-resolution 3D mesh and its simplification history, it is possible to parametrize the mesh such that the parametrization indeed remains legal throughout the simplification procedure. This paper is organized as follows: Section 2 elaborates on the connection between parametrization of 3D meshes and the embedding of their connectivity graph in the plane. Section 3 describes our parametrization technique in detail. Section 4 provides experimental results related to various applications, and we discuss extensions and conclude in Section 5. 2. Texture Mapping as Parametrization or Embedding Assigning texture coordinates to a 3D mesh can be regarded as a parametrization of the mesh surface, where each 3D vertex is assigned a 2D parameter value, and each point on the mesh surface is parametrized by the appropriate convex combination of the parameter values of the vertices of the surface triangle in which it resides. Care must be taken that the parametrization is legal, i.e. that no two points on the mesh surface are mapped to the same point in the 2D parameter domain. This may be achieved if the Published by Blackwell Publishers, 108 Cowley Road, Oxford OX4 IJF, UK and 350 Main Street, Malden, MA 02148, USA

(a) (b) (c) (d) Figure 1: Texture mapping with hard constraints. (a) Texture map with feature points marked. These should be mapped to the appropriate geometric features marked on (b). (b) 3D face with features corresponding to those of (a). (c) Rendering of result when constraints are ignored. Texture coordinates were generated using the shape preservation method of Floater [7]. Note the texture nose and the geometric nose. (d) Rendering of result when constraints are satisfied using our techniques. straight-line graph in the plane induced by the 3D vertex parameter values and its connectivity graph is a legal triangulation of the 2D parameter points, i.e. that the edges do not intersect and all the triangles have the same orientation. In this case we may also say that the 3D mesh has been legally embedded in the plane. Note that actually only the connectivity of the 3D mesh plays a role in the problem. The geometry of the mesh, i.e. the 3D coordinates of the vertices, does not have to be used in order to compute an embedding. Since it is impossible to legally embed a mesh topologically equivalent to a closed sphere in the plane, we restrict our discussion to the case of a mesh with a boundary, which is topologically compatible with a rectangular texture map. Closed meshes, as also those of higher genus, may be reduced to the case we treat by cutting the mesh into pieces, but then the issue of continuity across boundaries must be addressed. Embedding a 3D mesh with a single boundary (i.e. topologically equivalent to the disk) in the plane has been addressed by many authors. Since usually the embedding is not unique, a good embedding, in a variety of senses, is sought. One of the main concerns is that the embedding preserve the geometric properties of the 3D mesh, e.g. edge lengths, areas, angles, etc. Tutte [18] first provided the most basic way of computing embeddings using barycentric coordinates, in which the boundary vertices are mapped to a convex position and each interior vertex is positioned at the centroid of the locations of its neighbors. Computing this embedding involves solving a set of linear equations derived from the connectivity graph adjacency matrix, and results in an embedding with the minimal sum of squares of the edge lengths. Floater [7] later generalized this to arbitrary convex combinations and used this mechanism to generate shape-preserving parametrizations. Eck et al [6] used harmonic mappings to achieve a similar effect and minimize distortions in a sense. Other embedding methods, some which do not require mapping the boundary vertices to a convex shape, are described by Zigelman et al [19] and Sheffer and de Sturler [16]. None of these methods are easily extendable to parametrizations with hard constraints. A legal triangulation on n points may be formulated as a solution to a set of t quadratic inequalities, where t is the number of triangles, as follows: If {(x i,y i ), i=1,..,n} are the locations of the n vertices, and (x 1,y 1 ), (x 2,y 2 ) (x 3,y 3 ) are the coordinates of some triangle as defined by the connectivity graph, the following inequality must hold: x1 y1 1 x2 y2 1 > 0 x y 1 3 3 where. denotes determinant. Similar inequalities must hold for all t triangles. This means that the signed area of all the triangles must be positive, implying that the triangles be non-degenerate and consistently oriented. Note that if the boundary vertices are fixed, boundary triangles impose linear (or constant) inequalities. Sheffer and de Sturler [16] have formulated a different set of (highly non-linear) inequalities on the angles of a triangulation to guarantee legality. Both formulations can easily incorporate hard constraints as extra equalities, but solving either of them involve heavy numerics, which become slow, unwieldy and unstable, hence unpractical for large meshes. Adding a cost function to minimize distortion further complicates matters, as the optimization process might get stuck in local minima. Additionally, adding hard constraints may eliminate all solutions, such as we will see in the next section. Standard interpolation techniques to map R 3 to R 2, such as radial basis functions (RBF), based on Gaussian [1] or B- Spline basis functions [5] may satisfy hard constraints, but cannot guarantee that the induced 2D triangulation will be valid, i.e. not contain foldovers, as Figure 2 demonstrates.

Alexa [2] addressed the problem of embedding a closed genus-0 3D mesh on the sphere with constraints, in order to align the vertices of two such meshes in a 3D morphing application. This is quite similar to our problem (which occurs in the plane). However, the heuristic (iterative) solution offered by Alexa is quite slow, and not guaranteed to find a solution, even if one exists. It also does not introduce Steiner vertices to create a solution when one is not possible without them. Thus an algorithmic solution is sought, which is both efficient and will produce some solution (by introducing Steiner vertices) even if the constraints are difficult (or impossible) to satisfy. The ability to solve the problem efficiently for all inputs is what distinguishes our solution from all previous work. 3. Embedding with Hard Constraints Embedding a 3D mesh in the plane with hard constraints seems to be a very difficult problem, even if such an embedding exists, which might not be the case. Hence, we make the problem easier by allowing the 2D embedding to contain extra vertices, called Steiner vertices. This means that a 3D edge will be mapped to a 2D path of edges. Steiner vertices are frequently used in graph-drawing applications, which are also a variant of the embedding problem. See e.g. Pach and Wenger [15]. Figure 3 shows an example of a constrained connectivity for which a straightline 2D embedding does not exist, but the introduction of Steiner vertices admits a solution. 3.1 The embedding procedure Our embedding procedure is as described in Algorithm 1. It first removes all the unconstrained vertices from the mesh (the simplification phase), and then restores them in reverse order (the reconstruction phase). The reconstruction phase maintains the invariant that the embedding remains legal after each vertex insertion. Steps 2, 3c and 3d of Algorithm 1 deserve further explanation. Let us begin with the latter two. The kernel fix procedure tries to move vertices of the polygon in which the vertex in question lies in order that the polygon be star-shaped (have a non-empty kernel). Note that if a vertex is not located inside the (possible empty) kernel of its neighborhood polygon, at least one of its neighbors must be in a similar predicament. Hence we (serially) examine locations of all vertices and identify all those which do not reside inside the kernel of their neighborhood polygons. For each such vertex, we position it inside the corresponding kernel if its neighbors form a star-shaped polygon. Were there no hard constraints, this procedure could ultimately result in a legal triangulation of the point set. Figure 4 illustrates this procedure. If the constraints do not allow this procedure to converge, we choose the location of the vertex to be the point in the plane which minimizes the variance of the areas of the triangles formed by the vertex and the polygon vertices. The kernel fix procedure increases the chance of a legal embedding, but can not guarantee it, since there exist inputs for which a solution does not exist. When the kernel fix procedure fails, we resort to Steiner vertices. In this case, we discard all the changes performed by the kernel fix procedure and apply the Steiner embed procedure. Note that the neighborhood polygon is always simple (since the embedding generated until now is legal due to the main invariant). Hence, all we have to do is to legally position the new vertex inside the polygon. The Steiner embed procedure positions that vertex and additional Steiner vertices in the polygon such that the new vertex is connected to all polygon vertices by polygonal paths, instead of straightline edges, and then triangulates the resulting nontriangular faces inside the polygon. The method uses a variant of Gotsman and Surazhsky [10] on the so-called universal method of Aronov et al [3] for compatibly triangulating pairs of polygons. See Figure 5 for an example. 1. (The embedding phase) Ignore the hard constraints. Compute barycentric coordinates for the vertices (using the "shape preservation" method of Floater [7]), and use them to generate a planar embedding of the connectivity graph. 2. (The simplification phase) Simplify the mesh connectivity using constrained simplification (Algorithm 2), until only the subset of constrained vertices remain embedded at their prescribed locations with some legal triangulation. Maintain a record of the entire simplification history, together with the 2D barycentric coordinates of each removed vertex relative to its neighbors at the moment of removal. 3. (The reconstruction phase) Restore the unconstrained vertices of the mesh (and their connectivity) in the reverse order of simplification, by doing the following: a. Embed the vertex at a location in the plane determined by the barycentric coordinates of its neighbors at that level, as computed in step 2. b. If the computed location of the vertex is outside the kernel of the polygon formed by its neighbors (meaning the embedding is now illegal), place the vertex at at arbitrary location inside the kernel. c. If the kernel is empty run the kernel fix procedure on the triangulation. d. If the kernel is still empty - run the Steiner embed procedure on the polygon. Algorithm 1: Constrained embedding. 3.2 Constrained simplification The main invariant of our algorithm is that each iteration of the reconstruction phase starts with a legal embedding and

maintains its legality. Naturally, we have to ensure that the last step of the procedure, i.e. the embedding of only the hard constrained vertices, is legal too. The problem is that if we employ an arbitrary simplification scheme in the simplification phase, the resulting triangulation at the last step may be illegal when we apply the geometric constraints. A better alternative is to work towards some legal triangulation of the constrained vertices, e.g. the Delaunay triangulation. We call this procedure constrained simplification, and need the following definitions to describe it: A fixed vertex is a vertex constrained in the input. The set of fixed vertices of a triangulation will be denoted by V F. A fixed edge is an edge connecting two fixed vertices. The set of fixed edges of a triangulation will be denoted by E F. A fixed triangle is a triangle with three fixed vertices (thus, all its edges are fixed as well). T(V,E) is the initial (non-simplified) planar triangulation and T F (V F,E F ) is the desired output of the simplification procedure. V F V. A cut-border (CB) in a triangulation T(V,E) is a simple closed cycle of edges in E F E. The simplification algorithm proceeds as described in Algorithm 2 and illustrated in Figure 6. It maintains a dynamic cut-border which separates the region of the mesh that has been simplified from that not yet simplified. Algorithm 2 maintains the invariant that the cut-border is always simple. Note that the intermediate triangulations are not required to be legal during the simplification process. However, we still try to keep them as legal as possible so that the barycentric coordinates stored for the removed vertices are legal, which is desirable for the subsequent reconstruction step. This scheme is not guaranteed to succeed. However, experiments show that in practical scenarios, failures are extremely rare. coordinates, applying steps 3(a), 3(b) of Algorithm 1. If the attempt fails for some vertex, it remains in its existing location, which is always legal. In this manner the relaxation procedure reproduces the original (unconstrained) barycentric coordinates for many unconstrained vertices, minimizing distortion. Constrained-simplification(T,T F ) 1. Initialize CB to be the boundary of T (since, in particular, the boundary is fixed). 2. While T contains non-fixed vertices (V V F φ): a. Let e be in CB and let v be the vertex within CB forming a triangle with e. b. If v V F, remove e from CB and add to CB the edges that connect the endpoints of e to v and goto (a). See Figure 6(b),(c). c. If v V F, remove v from T (Figure 6(d)) and retriangulate the resulting polygonal hole by adding all the triangles of T F incident on CB possible. We might remain with holes that still have to be retriangulated. See Figure 6(e). d. Apply Delaunay triangulation to the holes (Figure 6(f)). If any fixed edges were added in this triangulation, try to eliminate them by flipping edges (Figure 6(g)). We want to avoid fixed edges, since they might cause the cut-border to be non-simple in the future. e. If the previous step failed, find any (not necessarily geometrically legal) retriangulation which does not add fixed edges. If nothing found, return to step (c) and attempt to remove a different vertex v V F. If all such v fail - report failure. 3. Report success. Algorithm 2: Constrained simplification. 3.3 Minimizing distortion Although Algorithm 1 yields a legal planar triangulation, the result may be significantly distorted, in the sense that the triangles may be long and skinny, the constraints having had a global effect on the result. This is undesirable, especially in interactive texture mapping applications, where dragging a control point should have only a local effect. The number of Steiner vertices might also be unneccesarily large. To overcome this, we employ an on-the-fly relaxation procedure, aimed at keeping the distortion minimal during the reconstruction phase of the algorithm. The idea behind this procedure is as follows: at the simplification phase we choose several levels of the multiresolution hierarchy to be fully recorded levels: for each such level we record barycentric coordinates of every unconstrained interior vertex (relative to its neighbors). At the reconstruction phase, each time we reach a fully recorded level we attempt to re-embed every unconstrained vertex inside its neighborhood polygon according to its original barycentric (a) Figure 2: Constrained embedding using RBF. (a) A planar triangulation with a fixed boundary and two constrained interior vertices: a and b. (b) Changing the position of b and using RBF to generate new positions for the other unconstrained interior vertices. The result is not a legal embedding (b)

(a) (b) Figure 3: Straight-line embedding using Steiner vertices. (a) A connectivity graph with all vertices constrained which cannot be embedded as a triangulation in the plane. (b) Embedding for the input of (a) using (green) Steiner vertices. The dashed edges are added to keep the graph a legal triangulation. v v u u v 0 (a) (b) (c) Figure 4: The kernel fix procedure. (a) The red polygon is not star-shaped, hence no location of the central vertex v will result in a legal triangulation. (b) The vertex u neighboring on v is outside its neighborhood polygon s kernel. (c) Moving u into the kernel of its neighborhood polygon solves both problems. (a) (b) Figure 5: Inserting a vertex into a non-star-shaped polygon using Steiner vertices. (a) Polygon and inserted central vertex. Note the crossing edges. (b) Spiderweb triangulation of polygon using (green) Steiner vertices. The brown edges partition the polygon into convex parts, the blue paths correspond to the original blue edges and the dashed ones were added to obtain a legal triangulation.

exterior (simplified) interior (non-simp lified) cut border (a) (b) (c) forbidden edge (d) (e) (f) Figure 6: Constrained simplification of a triangulation with (marked) fixed vertices. (a) A (red) cut-border is maintained. All fixed (filled) triangles are outside the cutborder (b),(c) Updating the cut-border after a new fixed vertex (the large one) is encountered. (d) Removing a non-fixed vertex. (e) Identifying the one fixed triangle that may be added at the current stage. (f) Triangulating the remaining holes. Note the fixed edge added by the retriangulation procedure, which is forbidden at this stage. (g) Several edge flips performed to eliminate the forbidden edge. (g) The relaxation also reduces the number of Steiner vertices, as we are able to remove some of those introduced during the reconstruction phase. These vertices were critical in the coarse triangulations, but as more original vertices are restored, the triangulation becomes more flexible and many Steiner vertices are no longer needed. Hence, when in the relaxation routine we discover that the neighborhood polygon of a vertex previously embedded using Steiner vertices is now star-shaped, we may eliminate all these Steiner vertices. See Figure 7 for some results. 4. Experimental Results In this section we demonstrate the results achieved by our algorithm and compare them with results from regular texture-mapping algorithms and commercial packages. 4.1 3D texture mapping Figure 8(a) shows a 2D texture and 8(b) a 3D mesh of a female torso, where a correspondence between various features on the 2D texture and 3D meshes are marked. The objective is to texture map the image onto the mesh such that the corresponding features coincide, and it looks like a well-fitted vest. Figure 8(c) shows what a interactive authoring system not supporting constrained texture mapping generates and Figure 8(d) shows our results. The 3D mesh in this example contained 928 vertices and we introduced 32 constraints. Solving for the constrained parametrization took less than one second on a state-of-the-art PC, which was typical for all the examples we experimented with. 4.2 Multiresolution texture mapping In most multiresolution scenarios, texture coordinates are defined for the highest resolution, and inherited in lower resolution versions of the model, which contain a retriangulated subset of the high resolution vertex set. However, nothing guarantees that the inherited parametrization, i.e. embedding in the plane of the subset, triangulated using the low-resolution connectivity, will be legal. If the 3D mesh is

well-behaved, illegal triangulations at lower resolutions will rarely occur, but meshes with complex geometry cannot avoid this. Hence, an important practical problem is, given a mesh and its simplification history a sequence of vertex removals and hole retriangulations generate a parametrization which will be legal at all resolution levels. Our algorithm to achieve this is as described in Algorithm 3, possibly also requiring introduction of Steiner vertices. Note that we do not use the kernel fix procedure at Step 3 of Algorithm 3 because we are not allowed to change the locations of the vertices already embedded. In this manner we preserve the legality of the triangulation for all levels of resolution already reconstructed. Figure 9 shows parametrizations of a mesh at three levels of detail, when the original arbitrary parametrization is used, and when the one generated by Algorithm 3 is used. The former loses its validity very quickly as resolution is reduced, while the latter remains valid throughout the simplification procedure. 4.3 2D warping and morphing Another application of our constrained texture mapping procedure is to 2D image warping. This is actually no more than a special case of the problem described above, where the 3D mesh is just a 2D triangulation. The exact problem is: Given a 2D triangulation of an image with feature vertices, and new locations for a subset of the vertices, is it possible to generate new locations for the rest of the vertices such that the resulting induced triangulation (using the original connectivity) is still legal? In this case we say that the two triangulations are compatible. This will facilitate a piecewise-affine warp of the image such that the constraints (moved vertices) are satisfied. they induce legal intermediate triangulations. Naïve morphing methods, e.g. those obtained by using straight line trajectories, fail on most inputs, especially those involving rotations of the points. The method of Floater and Gotsman interpolates the barycentric coordinate representation of the triangulation, hence maintains legality of the triangulation throughout the morph. Figure 10 shows an example where compatible triangulations have been generated and morphed. 1. Execute steps (1) and (2) of Algorithm 1, with the sole difference that the simplification process used here is the given simplification history (instead of the constrained simplification ), until the coarsest simplification level is reached. 2. If the parametrization at the coarsest level is illegal, run the kernel fix procedure to make it legal. This is guaranteed to succeed, as there are no hard-constrained vertices. 3. Restore the vertices of the mesh (and their connectivity) in the reverse order of simplification, performing the following steps: Embed the vertex at a location in the plane determined by the barycentric coordinates of its neighbors at that level, as computed in step 2. If the computed location of the vertex is not in the kernel of the vertex s neighborhood polygon (meaning the embedding is illegal), place it inside the kernel. If the kernel is empty - run the Steiner embed procedure on the polygon. Algorithm 3: Multiresolution parametrization. Once we have generated two compatible triangulations, we can use the method of Floater and Gotsman [8] to morph between them. The objective is to generate vertex trajectories interpolating the two sets of vertex locations, such that (a) (b) (c) Figure 7: Minimizing distortion. (a) Original mesh in which marked vertices will be moved to new locations. (b) New parametrization with (blue) Steiner vertices generated by our algorithm, satisfying hard constraints after vertices have been moved (essentially rotated). No relaxation was used. (c) Result after relaxation.

EUROGRAPHICS 2001 / A.Chalmers and T.-M.Rhyne Volume 20 (2001), Number 3 (Guest Editors) (a) (b) (c) (d) Figure 8: Texture mapping with hard constraints. (a) 2D texture with some feature points. (b) 3D mesh with features corresponding to those in (a). (c) Results when constraints are ignored. (d) Our result when the constraints are satisfied. (a) (b) (c) (d) (e) (f) Figure 9: Multiresolution parametrization. (a) A given parametrization of a 3D mesh. (b,c) Parametrizations of two lower resolutions of the mesh, where the parameter values are inherited from (a). Note the multiple edge intersections, making the parametrizations illegal. (d-f) Parametrization of the mesh generated using our method, shown at the same levels of detail (and identical connectivities) as (a-c). Note that (e) contains two Steiner vertices, marked by + s. The EUROGRAPHICS Association and Blackwell Publishers 2001. Published by Blackwell Publishers, 108 Cowley Road, Oxford OX4 IJF, UK and 350 Main street, Malden, MA 02148, USA

(a) (b) (c) Figure 10: Morphing using constrained parametrization. (a) Source image with triangulation of control points. Purple points are features that will be moved to new locations in the target image. (b) Target image with new triangulation satisfying constraints generated by our method. (c) Result generated by SurfaceSuite package in an attempt to satisfy the constraints. Note the tear (discontinuity) in the image. Bottom line: Morph between (a) and (b) generated by algorithm of Floater and Gotsman [8] for morphing compatible triangulations. 5. Discussion and Conclusion We have presented an efficient algorithm for the generation of a parametrization of a 3D mesh in the presence of hard constraints. The algorithm may generate Steiner vertices in the case that a simple solution does not exist. This seems to be the first algorithm to deal with hard constraints in a systematic manner, and is applicable to a number of common problems in 2D and 3D modeling, including multiresolution texture mapping and image morphing. Our method generates continuous piecewise-affine parametrizations of 3D meshes containing Steiner vertices. It is easy to see that many Steiner vertices might be needed in the worst case, which is undesirable, as it increases the complexity of the mapping. Relaxation indeed alleviates this, but a method to bring to a minimum the number of Steiner vertices used is still open. A number of heuristic parameters are used in our algorithm, and their effect on the results is not fully clear yet. An example is the precise location of a vertex in the kernel during the kernel fix procedure. Right now we position it somewhere along the line joining the kernel centroid with the original location, so that, on the one hand, it is in the kernel, and on the other hand, it does not move too much from its original location. From a theoretical point of view, Algorithm 3 produces a legal parametrization for all resolution levels of a multiresolution model. However, from a practical point of view, this parametrization leaves much to be desired in terms of its quality. Relaxation in its current form is impossible since it must be done on multiple resolution levels. We are experimenting with this, as well as with ways of guiding the parametrization by incorporating hard constraints in this scenario as well. A computational geometric problem which is closely related to the constrained embedding problem is that of compatible geometries: Given two n-vertex planar graph connectivities, position n vertices in the plane, such that both the straight-line graphs induced by the two connectivities are legal triangulations. This will allow the use of common texture coordinates for two n-vertex 3D models with different connectivity graphs, or the changing of the connectivity of a given 3D model (as in a remeshing or mesh optimization scenario) without having to modify the model s texture coordinates. This is a subject of future research. Acknowledgements This research was partially supported by European project HPRN-CT-99-00117 (MINGLE).

References [1] N. Arad and D. Reisfeld. Image warping using few anchor points and radial functions. Computer Graphics Forum, 14(1):35-46, 1995. [2] M. Alexa. Merging polyhedral shapes with scattered features. The Visual Computer, 16:26-37, 2000. [3] B. Aronov, R. Seidel and D. Souvaine. On compatible triangulations of simple polygons. Computational Geometry: Theory and Applications, 3:27-35, 1993. [4] C. Bennis, J. M. Vezien and G. Iglesias. Piecewise surface flattening for non-distorted texture mapping, ACM SIGGRAPH Conference Proceedings, pp. 237-246, 1991. [5] P. Borrel and A. Rappoport, Simple constrained deformations for geometric modeling and interactive design. ACM Transactions on Graphics, 13(2):137-155, 1994. [6] M. Eck, T. DeRose, T. Duchamp, H. Hoppe, M. Lounsbery, and W. Stuetzle. Multiresolution analysis of arbitrary meshes. ACM SIGGRAPH Conference Proceedings, pp. 173-182, 1995. [7] M. S. Floater. Parameterization and smooth approximation of surface triangulation. Computer Aided Geometric Design, 14:231-250, 1997. [8] M. S. Floater and C. Gotsman. How to morph tilings injectively. Journal of Computational and Applied Mathematics, 101:117-129, 1999. [9] M. Garland and P. Heckbert. Surface simplification using quadric error metrics. ACM SIGGRAPH Conference Proceedings, pp. 209-216, 1997. [10] C. Gotsman and V. Surazhsky. Guaranteed intersection-free polygon morphing. Computers and Graphics, 25(1):67-75, 2001. [11] K. Hormann, G. Greiner. MIPS - An efficient global parametrization method. Curve and Surface Design Conference Proceedings, pp. 153-162, Saint-Malo, 1999. [12] W. F. Lee, W. Sweldens, P. Schroder, L. Cowsar and D. Dobkin. MAPS: Multiresolution adaptive parameterization of surfaces. ACM SIGGRAPH Conference Proceedings, pp. 95-104, 1998. [13] Levy and J. L. Mallet. Non-distorted texture mapping for sheared triangulated meshes. ACM SIGGRAPH Conference Proceedings, pp. 343-352, 1998. [14] J. Maillot, H. Yahia and A. Verroust. Interactive texture mapping. ACM SIGGRAPH Conference Proceedings, pp. 27-34, 1993. [15] J. Pach and R. Wenger. Embedding planar graphs with fixed vertex locations. Proceedings of Graph Drawing '98. Lecture Notes in Computer Science 1547, Springer-Verlag, 1998, pp. 263-274. [16] A. Sheffer and E. de Sturler. Surface parametrization for meshing by triangulation by flattening. Proceedings of the 9 th International Meshing Roundtable, pp. 161-172, 2000. [17] Sven Technologies, Inc. Surface Suite Pro. Available at http://www.avatarmaker.com/products/surfacesuite/ [18] W. T. Tutte. How to draw a graph. Proc. London Math. Soc., 13:743-768, 1963. [19] G. Zigelman, R. Kimmel and N. Kiryati. Texture mapping using surface flattening via multidimensional scaling", Technical Report CIS-2000-01, Computer Science Department,Technion, Israel.