Compatible Intrinsic Triangulations
Abstract.
Finding distortion-minimizing homeomorphisms between surfaces of arbitrary genus is a fundamental task in computer graphics and geometry processing. We propose a simple method utilizing intrinsic triangulations, operating directly on the original surfaces without going through any intermediate domains such as a plane or a sphere. Given two models and as triangle meshes, our algorithm constructs a Compatible Intrinsic Triangulation (CIT), a pair of intrinsic triangulations over and with full correspondences in their vertices, edges and faces. Such a tessellation allows us to establish consistent images of edges and faces of βs input mesh over (and vice versa) by tracing piecewise-geodesic paths over and . Our algorithm for constructing CITs, primarily consisting of carefully designed edge flipping schemes, is empirical in nature without any guarantee of success, but turns out to be robust enough to be used within a similar second-order optimization framework as was used previously in the literature. The utility of our method is demonstrated through comparisons and evaluation on a standard benchmark dataset.
1. Introduction
Computing maps between surfaces is needed in many contexts, and has been a classical topic of great importance in computer graphics and geometry processing. In particular, maps that are continuous and bijective, called homeomorphisms, are required for many applications such as texture transfer and template fitting in order to avoid various kinds of artifacts, but at the same time they are generally more difficult to compute than other relaxed versions of maps.
Given two surfaces and as triangle meshes, a naive and intuitive idea one might think of is as follows:
-
(1)
map βs vertices onto somehow, e.g., by using some form of projection, then
-
(2)
extend the above vertex-based map to βs edges and faces somehow, e.g., by using geodesics on .
If one pursued the above idea while working directly on the original surfaces, however, they would quickly realize that things get complicated. As such, all previous works introduce an intermediate domain such as a plane or a sphere and establish homeomorphisms by going through that intermediate domain. The method proposed by Schmidt et al. (2020) is the current state of the art in this area, where the surfaces are locally mapped to an intermediate domain in a globally consistent manner by using constant-curvature metrics. While their theory is elegant and results are impressive, their approach is conceptually not so intuitive, potentially making its implementation difficult for non-expert practitioners.
In this work, we present a simpler alternative that pursues the above intuitive idea using intrinsic triangulations (Sharp et al., 2019b) as our key ingredient. We propose Compatible Intrinsic Triangulation (CIT), a pair of intrinsic triangulations defined on and where the vertices, edges and faces are fully in correspondence (Fig. 1). Given vertex images as input, our algorithm constructs a CIT by employing carefully designed edge flipping schemes and other local operations (Sec. 4). CITs define strict homeomorphisms, and allow one to easily compute mapping distortions and their derivatives as well as to optimize the vertex images by using the similar second-order global optimization scheme as was used in the previous work (Schmidt et al., 2020) (Sec. 6).
We do not claim, however, any practical advantages over Schmidt et al. (2020)βs method. In fact, our method is less robust than theirs in the sense that it relies on the input vertex images being sufficiently high-quality; otherwise, our algorithm can fail, as discussed in Sec. 7. Nevertheless, to the best of our knowledge, our work is the first in the literature on computing surface homeomorphisms without going through any intermediate domains. In exchange for the conceptual simplicity and intuitiveness of our approach, we had to deal with a number of combinatorial problems which make our algorithm inherently empirical and heuristic, providing no guarantee for success. Yet, our algorithm is overall straightforward to implement, and we experimentally demonstrate practical level of robustness of our method using a standard benchmark dataset (Sec. 7.3).
We believe it is natural to utilize intrinsic triangulations for the purely intrinsic problem of inter-surface mappings. The two research domains have received increased attentions in the community recently, but only in separate, unrelated contexts. This work aims at bridging the two, thereby inspiring other researchers to develop new solutions to this difficult problem. In this light, we release our reference implementation at https://github.com/kenshi84/compatible-intrinsic-triangulations.
2. Related work
There are a large body of work on computing maps between surfaces, and they can be roughly divided into two groups based on whether strict homeomorphism is sought after or not. Those which do not seek for homeomorphism seem more popular, presumably because it is easier to represent and optimize maps in this setting. A variety of methods have been proposed including:
- β’
- β’
- β’
While there are many use cases for these relaxed maps, turning them into actual homeomorphisms is a non-trivial, open problem.
Computing homeomorphisms between surfaces is generally more difficult, and usually an intermediate domain is used in order to define the final map as a composition of individual maps between surfaces and the intermediate domain. Examples of intermediate domains include:
- β’
- β’
- β’
- β’
Among the above, only a very few address the problem of minimizing the map distortion in an end-to-end manner. Methods by Schreiner et al. (2004) and Kraevoy et al. (2004) only allow local optimization per each vertexβs 1-ring neighborhood, and are prone to converging to undesirable local minima. Methods by Litke et al. (2005) and Schmidt et al. (2019) do offer global optimization, but they are applicable only to surfaces of disk topology.
Distortion minimization of homeomorphisms between closed surfaces of arbitrary genus in a global and end-to-end manner was addressed only recently by Schmidt et al (2020). Our problem setting is exactly the same, and our results are similar with theirs. Unlike their method where surfaces are locally mapped to a respective intermediate domain (either a plane, a sphere, or a hyperbolic plane, depending on the surface genus) by using constant-curvature metrics, our method constructs consistent mappings between surfaces directly on the original surfaces without going through any intermediate domains by using intrinsic triangulations (Sharp et al., 2019b), which we believe leads to a simpler (albeit heuristic) algorithm.
Intrinsic triangulations
Our work is directly inspired by the powerful concept of intrinsic triangulations based on the signpost data structure (Sharp et al., 2019b), which has already found a number of extensions and use cases in the literature. Sharp and Crane (2020a) utilized it for defining a high-quality Laplacian operator on non-manifold meshes as well as point clouds. Sharp and Crane (2020b) also demonstrated that one can find polyhedral geodesics on surfaces by just flipping edges intrinsically. The intrinsic Delaunay triangulation algorithm has already been used for various geometry processing tasks (El Ouafdi et al., 2021; Fumero et al., 2020; Tao et al., 2021). Our work widens the application domains of intrinsic triangulations to the problem of inter-surface mappings.
Compatible triangulations for 2D animation
Our algorithm for constructing CITs is mainly about deciding which edges to flip based on the configuration of nearby vertices in a local 2D coordinate system, and thus is quite related to the existing literature on compatible triangulations in the context of 2D animation (Alexa et al., 2000; Surazhsky and Gotsman, 2004; Baxter III et al., 2009; Liu et al., 2018). Revisiting these algorithms in our context may lead to substantial improvement of our algorithm, which is left for future work.
3. Overview
Our input consists of a pair of triangle meshes and for the two models, along with βs vertex image , with being the space of barycentric coordinates, which maps βs vertex to a point inside βs face, and the other one in the opposite direction . Any method of choice can be used to obtain these vertex images, such as the Hyperbolic Orbifold Tutte (HOT) method (Aigerman and Lipman, 2016); the only requirement is that they need to be reasonably consistent in both directions in order for our algorithm to succeed. Given such input data, our algorithm generates a Compatible Intrinsic Triangulation (CIT), as explained in Sec. 4.
In Sec. 5, we explain how to process the generated CIT further in order to obtain images of on and vice versa as piecewise-geodesic polylines, as well as the piecewise-linear mapping between and as an overlay mesh.
From the generated CIT, we compute the mapβs distortion energy and its derivatives using automatic differentiation, just like the previous method (Schmidt et al., 2020). We displace the current vertex images by the computed descent direction multiplied by a certain step size, and plug them into our CIT generation algorithm again to arrive at a new configuration. We explain this optimization process in Sec. 6.
Notations
We use a bold font style to distinguish the intrinsic mesh and its elements from the input mesh and its elements on either model. For example, refers to a vertex of βs input mesh, while refers to an edge of βs intrinsic mesh.
4. CIT generation
4.1. Vertex insertion
After initializing intrinsic meshes and as copies of input meshes and , we first insert βs input vertices into according to the vertex image . For each input vertex , we check if its image is strictly inside , i.e., if (we call such a mapped point a face point). If so, we insert a new vertex into an intrinsic face corresponding to that face point, splitting into three.
If one component of is zero, the mapped point is exactly on βs input edge (we call such a mapped point an edge point). In this case, we insert a new vertex into an intrinsic edge corresponding to that edge point, splitting into two.
If two components of are zero, this means βs vertex is mapped exactly onto βs vertex , i.e., . In this case, we ensure that the vertex image in the opposite direction is consistent, i.e., . We conceptually interpret such a case as the original vertex and the inserted vertex being merged in the intrinsic mesh, and we do not insert a new vertex in this case. In our method, we achieve hard constraints on a set of fixed corresponding vertex pairs by keeping them as merged (we call such fixed vertices anchors). If not using this hard constraints mode, we will later split each merged vertex into two (as explained in Sec. 4.7) in order to treat the two vertices as variables in the optimization.
Additionally, we introduce the following adjustment procedure for stability reasons: when all of are positive but one component is extremely small, the mapped face point is almost on one of the edges of the mapped face. Having an intrinsic vertex at a face point extremely close to an input edge causes numerical instability for our overlay mesh extraction algorithm. As such, we clamp the smallest value below a threshold to zero and increase the other two components to sum to one, and treat it as an edge point.
We perform the same vertex insertion process in the opposite direction () as well.
4.2. Compatible edges & faces
After the vertex insertion step, the intrinsic meshes and have the exact same numbers of vertices, edges and faces. Also, the intrinsic vertices of both models and are fully in correspondence. If the endpoints of βs intrinsic edge correspond to the endpoints of βs intrinsic edge , we say and are compatible. If no such intrinsic edge in exists, we say is incompatible. We can further define the notion of face compatibility: if all the three edges of βs intrinsic face are compatible, and if there exists βs intrinsic face having the same set of compatible edges in the consistent order, then we say and are compatible. If has the same set of compatible edges but in the reversed order, we say and are reversed. If an intrinsic face is neither compatible nor reversed, we say it is incompatible. If all the intrinsic edges are compatible, all the intrinsic faces will be compatible by necessity. Our goal is to reach this state by mutating and in certain ways.
Fig. 2 left shows an example state after the vertex insertion step. We draw each vertex in correspondence as well as each compatible edge in their unique color, while we draw each incompatible edge in dark gray. Notice that only some fraction of the edges are compatible at this point.
There are some rules about intrinsic edges that must be adhered to in our algorithm: first, we do not allow self-edges, i.e., edges starting from and ending at the same vertex. We also do not allow multiple intrinsic edges connecting the same pair of intrinsic vertices, because they prevent the definition of one-to-one correspondence between βs intrinsic edge and βs intrinsic edge. These rules imply that every intrinsic vertex always has degree greater than two. In the following where we flip intrinsic edges, in addition to the geometric feasibility check in the original signpost method (Sharp et al., 2019b), we perform this uniqueness check in order to determine flippability of intrinsic edges.
4.3. Delaunay flipping
The first step in improving our meshesβ compatibility is to perform the intrinsic Delaunay flipping algorithm (Sharp et al., 2019b) on both intrinsic meshes and independently. When the input vertex images are reasonably consistent in both directions, the intrinsic vertices and tend to have vertex neighborhoods in similar geometric configurations, thus the Delaunay flipping procedures on both models tend to result in similar connectivities. Often, this step already makes a significant portion of the intrinsic edges compatible (Fig. 2 right).
4.4. Merging nearby vertices
An extremely short intrinsic edge in a CIT can be a source of numerical problems both for the computation of the energy derivatives and for the generation of the overlay mesh. The Delaunay flipping algorithm tends to have connected such nearby vertex pairs as compatible edges. Such extremely short intrinsic edges also tend to be collapsible, i.e., its endpoints consist of an original vertex and an inserted vertex, as they are usually caused by the input vertex images mapping βs vertex very close to βs vertex and vice versa.
As such, before proceeding to our main algorithm for improving compatibility as described below, we collapse each of such collapsible compatible edges whose length is below a threshold and turn them into a merged vertex. This edge collapse operation is realized by deleting the inserted vertex and reconnecting all of its adjacent edges to the original vertex.
4.5. FlipToCompatible algorithm
In this section, we describe our FlipToCompatible algorithm which tries to make and as compatible as possible by just flipping edges. Note that it is rare to obtain a valid CIT with this algorithm alone, especially when the input vertex images start to deviate from being mutually consistent (which happens when we examine large step sizes during optimization), and we will need to resort to some additional procedures that involve relocation of inserted vertices, as we explain later. We do prefer, however, to utilize edge flips maximally to improve compatibility, because we do not want to modify the input vertex images unnecessarily.
Our algorithm consists of five subroutines (Fig. 3), and it executes each of them in order. If a certain subroutine was able to increase the number of compatible edges, it goes back to the beginning and repeats until no more changes can be made. In the following, we explain each of the subroutines in the order of the more frequently applicable to the less frequent. The less frequent ones take effect only occasionally, but they do increase the chance of success of our CIT generation algorithm and are thus necessary.
Below, when deciding whether to flip an edge or not, we assume it is flippable (i.e., we ignore edges that are not flippable).
Subroutine 1: SimpleFlip
For βs incompatible edge , we check its opposite vertices, and if there is an incompatible edge connecting these vertices, we flip . We perform the same procedure in the opposite direction as well.
Subroutine 2: SimpleCoFlip
If there is a pair of incompatible edges and that have the same opposite vertices, we flip both of them.
Subroutine 3: FlipCompatible
Given a compatible edge and its counterpart , we check if there is an incompatible edge that is either connecting βs opposite vertices, or is flippable and has the same opposite vertices as . We perform the same check in the opposite direction for , and if the two checks both pass, we flip and (as well as (resp. ) if it has the same opposite vertices as (resp. )).
Subroutine 4: FlipFlatPolygon
Sometimes, incompatible edges are clustered and form a patch of connected faces with no interior vertex. In such a case, all the faces in the patch can be flattened to 2D without any distortions, resulting in a pair of compatible 2D polygon boundaries for and . Our algorithm tries to triangulate these two polygons in a compatible way. We use a simple heuristic to achieve this: for each vertex, we check if it is βvisibleβ from each of all the other vertices of the polygon (i.e., the line segment between them is contained within the polygon) for both and . If such a vertex is found, we connect all the other vertices to that found vertex by repeatedly flipping edges.
Subroutine 5: DoubleFlipCompatible
For a pair of nearby compatible edges and its counterpart , we flip all these four edges if the following conditions hold:
-
β’
and have the same opposite vertices.
-
β’
There is an incompatible edge that is connecting the opposite vertices of .
-
β’
There is an incompatible edge that is connecting the opposite vertices of .
4.6. Resolving incompatible patches
We define a connected set of non-compatible (i.e., reversed or incompatible) faces as an incompatible patch. At this point, assuming the input vertex images are reasonably consistent, we expect that the majority of edges have been made compatible and that there are small and sparsely distributed incompatible patches left. Our strategy then is to examine each of these incompatible patches and try to make them compatible by various means as explained below.
Note that a pair of incompatible patches in and can be made correspondent by checking if they consist of the same set of corresponding vertices. Thus, we extract all the corresponding pairs of incompatible patches and process each of them in order.
4.6.1. Exploring variations by flipping edges within patches
Consider an example incompatible patch shown in Fig. 4 at the far left where our FlipToCompatible algorithm cannot make any progress. It is, however, still possible to make FlipToCompatible process this patch if we flip the compatible edge pair highlighted by the red arrows in the figure. Note that flipping this edge pair does not increase the number of incompatible edges.
Based on this observation, after the termination of FlipToCompatible, for each corresponding pair of incompatible patches, and for each corresponding pair of their compatible edges, we check if flipping the edge pair preserves the number of incompatible edges. If so, we flip the edge pair and run FlipToCompatible again and see if it makes any progress, and if it does, we go back to the extraction of incompatible patches and repeat.
4.6.2. Merging inconsistently positioned vertices
After running our edge flipping algorithms as described above, there can still remain a few incompatible patches that cannot be resolved by just flipping edges. Such incompatible patches are often caused by the input vertex images mapping some vertex pairs close to each other on both and , but in slightly inconsistent positions. Our next strategy then is to merge these vertices so that incompatible edges arising from them will disappear. We use a pattern-based approach for determining which vertex pair to merge, and we empirically identified five common patterns (Fig. 5). Note that for pattern 5 we relaxed the notion of face connectedness when extracting incompatible patches so that faces sharing only one vertex can be included in the same patch. See Appendix A for details about how we handle each pattern.
4.6.3. Deforming patch boundary
Our vertex merging algorithm is sometimes unable to merge the intended vertices due to various configurations of vertices neighboring the incompatible patch, as illustrated in Fig. 6. In such cases, as a last resort, we try to deform the boundary shape of each incompatible patch so that it becomes convex, which will likely make some non-flippable incompatible edges flippable. Note that this operation can also fail due to various nearby vertex configurations. We run FlipToCompatible again if any of the patches could be deformed.
4.7. Splitting merged vertices
If there are any incompatible edges left at this point, our CIT generation algorithm has failed. Otherwise, we move to the next step of splitting merged (non-anchor) vertices (Fig. 7). To split a merged vertex, we first need to determine along which pair of edges the split should occur. We choose such a pair of edges (consistently across and ) in a way that makes the angle between the two edges as close to as possible. The newly created vertex is positioned at a point displaced from the original vertex in the average direction of the two edges and by a small distance (10% of the smallest height of the adjacent faces with the opposite edges being their bases). Note that the displacements on and should be opposite in order to maintain consistency.
4.8. Optimizing connectivity
Having succeeded in generating a valid CIT, we have a freedom to explore the space of CITs with various connectivities by flipping pairs of corresponding edges. A tempting strategy then, which we tried initially, is to repeatedly flip each edge pair if doing so results in lower energy, as per the Delaunay flipping algorithm (Sharp et al., 2019b), with an expectation that the final converged configuration will give the smoothest inter-surface map for a given vertex image. We realized, however, that this strategy has a serious issue: it does not care at all about the generation of almost degenerate faces (Fig. 8) which will cause numerical problems both in the computation of energy derivatives and the extraction of the overlay mesh.
As such, the strategy we adopted is to flip edges such that the smallest angle of corners of triangles on both and is maximized. While leading to a slightly higher energy, this approach generates much better quality triangles which makes our overall pipeline robust, and it tends to make the final edge and face images appear smoother, to our surprise. An in-depth analysis on the space of CITs by flipping edges is left for future work.
5. Obtaining piecewise-linear map
5.1. Obtaining edge images
To obtain the piecewise-linear map induced by a CIT in the form of an overlay mesh, we first need to obtain images of on and vice versa, which tell us about where edges of and intersect. The process consists of three steps: first, we trace βs intrinsic edges over βs input mesh to detect all their intersections with βs original edges , as was done in the original signpost method for visualizing intrinsic edges (Sharp et al., 2019b) (Fig. 9a). Next, we reinterpret the obtained intersections (edge points on ) as edge points on . This is easily done by calculating the relative arc-length parameter value of each intersection point with respect to the relevant intrinsic edge (Fig. 9b). Note that, by definition, a path corresponding to on is always a geodesic. Finally, we linearly map such a path to βs intrinsic mesh , obtaining a (generally) non-geodesic path on , and connect its corresponding points on by geodesics, obtaining a piecewise-geodesic path on (Fig. 9c). The directions and distances for this final geodesic tracing are calculated based on the geometry of . Intersections of this piecewise-geodesic path and are recorded as intersections between and .
We run the same process in the opposite direction to obtain images of βs original edges on . Note that this second run generates the same set of intersections between and up to small numerical errors.
5.2. Overlay mesh generation
Having detected all the intersections between all possible pairs of edges, we are now ready to generate an overlay mesh for each of and . As the two intrinsic meshes and are compatible, we no longer need to distinguish between them, so we drop the subscript in the following description when referring to the intrinsic mesh and its elements. Our goal is to enumerate all the overlay polygons in each intrinsic face which can be intersected by any number of βs original edges and βs original edges (Fig. 10 left). We achieve this using a data structure called an overlay wedge which is generated for each corner of an overlay polygon and encodes information about which halfedge to switch to when going around the overlay polygon (Fig. 10 right), as explained below.
We call each vertex in an overlay mesh an overlay vertex which can come from either
-
(1)
an intersection between edges (which can come from either , , or ),
-
(2)
βs original vertex , or
-
(3)
βs original vertex .
For the first case, we generate a quadruplet of overlay wedges for each intersection (Fig. 11a). An overlay wedge stores a reference to the halfedge which comes into the corner when viewed from inside its associated overlay polygon (assuming the counterclockwise ordering), along with the relative arc-length parameter value representing the position of the intersection on . Note that can refer to either the intrinsic meshβs halfedge , βs original halfedge , or βs original halfedge . Likewise, also stores a reference to the outgoing halfedge and its associated parameter value .
For the other two cases, we generate a number of overlay wedges according to the number of edges incident to the overlay vertex (Fig. 11b-d). To do so, we first need to determine the correct ordering of halfedges incident to the overlay vertex originating from different sources (, , or ), which is possible thanks to the signpost data structure storing directions of intrinsic edges relative to the canonical tangent spaces defined on vertices, edges, and faces of the input mesh (Sharp et al., 2019b).
Having processed all the overlay vertices and generated all the overlay wedges, we group them by their fields, and for each group, we sort them by their values. This allows us to find, given an overlay wedge , its βnextβ overlay wedge in the overlay polygon by the following procedure:
-
(1)
obtain the sorted list of wedges associated with , and
-
(2)
scan the list in the ascending order and return the first item whose value is greater than .
This way, we can find cycles of overlay wedges and thus generate overlay polygons.
Also, because each overlay wedge stores references to halfedges of the input meshes, we can transfer the texture coordinate data present in the original meshes (which are typically stored per halfedge) to the overlay meshes. This allows us to transfer a texture image from one model to the other while preserving all the seams, as demonstrated in Fig. 1c.
6. Optimization
6.1. Computing energy & derivatives
Given a CIT, computing its distortion energy (measured using the symmetric Dirichlet as was done in the previous work (Schmidt et al., 2019, 2020)) is simple if it were not for its derivative computation: the intrinsic edge lengths already define the 2D shape of each intrinsic face, so we can trivially compute the energy using these 2D shapes:
(1) |
where is a map Jacobian deforming into in an arbitrary 2D embedding, , and are the embedded 2D coordinates of βs three corners ( is defined analogously). We use this lightweight method to compute the energy during the line search as described in Sec. 6.2.
To compute the derivative, however, we need to express the energy as a function of the input vertex images , which boils down to expressing those embedded 2D coordinates of intrinsic facesβ corners (i.e., and introduced above) as linear combinations of 2D coordinates of or locally embedded in 2D. For example, suppose one corner of originates in and is mapped to a face point on as where , and . Then, we need to express the 2D coordinate of the corresponding corner of as a function of and :
(2) |
where and are the 2D coordinates of embedded in 2D locally. Note that this local embedding (or flattening) must be consistent (i.e., in a common coordinate frame) among all the original faces that support (we call this face set βs support patch, see Fig. 12 left). This is always possible without introducing any distortions thanks to the construction of intrinsic triangulations guaranteeing nonexistence of original vertices inside any of intrinsic faces (Sharp et al., 2019b).
Note that when is an edge point, we use one of the edgeβs two adjacent faces (determined by the edgeβs canonical orientation) as the tangent space and reinterpret the edge point as a face point in that face. For this reason, βs support patch must include such an adjacent face even if it does not overlap with (see the bottom right triangle of βs support patch in Fig. 12 left).
We perform the same procedure for corresponding to (Fig. 12 right), and derive the energy expression as a function of all the barycentric coordinates of the input vertex images involved in this intrinsic face. In the absence of anchor vertices, each corner of an intrinsic face corresponds to an inserted vertex in one model and to an original vertex in the other model, so each corner has two degrees of freedom, and each intrinsic face has six degrees of freedom. The existence of an anchor vertex decreases the degrees of freedom by two.
We use automatic differentiation to compute a local gradient vector and a Hessian matrix per intrinsic face . These local quantities are accumulated in a global gradient vector and a Hessian matrix where in the absence of anchor vertices. As in the previous work (Schmidt et al., 2019, 2020), we make the global Hessian positive definite by clamping negative eigenvalues of the local Hessian before accumulating.
6.2. Overall scheme
We basically adopt the same second-order optimization scheme as in the previous work (Schmidt et al., 2019, 2020):
-
β’
We temporally smooth the gradient as where is the gradient of the configuration steps previous to the current one. Temporally smoothed Hessian is obtained analogously.
-
β’
We compute the descent direction by solving
(3) where is a weight for the Laplacian preconditioning, is the connection Laplacian, is a block-diagonal matrix responsible for making the tangent vector magnitudes comparable, and is the diagonal mass matrix.
-
β’
We perform a line search by evaluating the energy at where is the current configuration (i.e., barycentric coordinates in the vertex images) and is the step size.
Because our variables are barycentric coordinates, all of the above are realized through the concept of tangent vector transport; please refer to Section 1 of the supplementary material of (Schmidt et al., 2020) for more details.
As opposed to the previous method which determined the feasibility of a given step size by the emergence of flipped triangles, we deem a given step size to be feasible if our CIT generation algorithm succeeds with it. When determining the maximum step size for the line search, we initialize it based on the current descent direction vector (we set where is the largest length of the 2D descent direction vectors after being scaled from the barycentric coordinates to the comparable lengths). If this initial value turns out to be feasible, we enter the upward mode where we multiply by 1.2 and see if the increased is infeasible. Otherwise, we enter the downward mode where we divide by 1.2 and see if the decreased is feasible. With determined, we look for the optimal step size satisfying the Armijo condition as was done in the previous method.
6.3. Dealing with local minima
Our method lacks one important feature that existed in the previous method (Schmidt et al., 2020): the metric regularization. It was used in the initial few hundred steps to smooth out excess distortions in the input maps, and we believe this contributed greatly to the robustness of their optimization algorithm. In our case, unfortunately, we do not have anything that has the same effect as the metric regularization, and thus our optimization algorithm can easily get trapped by local minima, as discussed in Sec. 7.1.
We found empirically that when we get stuck in a local minimum, it is often possible to make (sometimes great) progress if we switch to the first-order optimization scheme. The reason we speculate is that the energy landscape can sometimes get very non-smooth with steep peaks and dents, making the quadratic approximation of the second-order optimization scheme a poor fit. As such, we devised the following simple workaround: we start with the second-order mode, and when we get stuck in a local minimum, we switch to the first-order mode and keep moving until we get stuck again in another local minimum, then we switch back to the second-order mode and repeat, until we get stuck in both schemes.
7. Results
Implementation and setup.
We implemented our algorithm using geometry-central (Sharp et al., 2019a) that includes the reference implementation of the signpost data structure (Sharp et al., 2019b). We used an unsupported module in Eigen (Guennebaud et al., 2010) for automatic differentiation. We ran all the experiments on Ryzen 9 3900X with 32GB of RAM running Ubuntu 20.04.1 LTS, and we always used a single thread during the optimization. We normalized the given input triangle meshes such that their total surface areas equal to one, meaning that the best attainable energy is 4.0. As opposed to the previous work, we did not impose any limit on the number of the optimization steps and let the algorithm run until it gets stuck (we stopped the optimization when the energy decrease fell below ).
7.1. Initial map generation
To create the initial vertex images, we used the reference implementation of HOT (Aigerman and Lipman, 2016) and our own implementation of Seamless Surface Mappings (SSM) (Aigerman et al., 2015) (which we will release at https://github.com/kenshi84/seamlesssurfmap) for genus 0 cases and high genus cases, respectively. Because the success of our CIT generation/optimization algorithm depends heavily on the quality of the initial map, we allowed ourselves to use as many landmarks as necessary to produce good quality maps.
While theoretical analysis of exact conditions for the success of our CIT generation/optimization algorithm is left for future work, empirically we found some tips on how to place landmarks in an effective way. First, common to HOT and SSM, the mapping distortion tends to concentrate near landmarks; in particular, a landmark, when mapped to the other surface, may appear as if it was βpinchedβ in a certain direction (Fig. 13a). For a vertex image where this pinching effect is very strong, our CIT generation tends to fail. In such cases, we slightly shift those problematic landmarks toward the opposite of the pinched direction (Fig. 13b).
Second, when mapping an elongated part, if we placed just one landmark at the tip of the part, its nearby vertices, when mapped to the other surface, may often get severely concentrated or dispersed (Fig. 13c). Even though our CIT generation algorithm often succeeds with such a vertex image, our CIT optimization algorithm often gets stuck in a local minimum, unable to distribute those vertices evenly. To avoid this, we add a few more landmarks near the tip of the part so that the vertex distribution becomes more even (Fig. 13d). See the supplemental material for our choices of landmarks.
7.2. Comparison to Schmidt et al. (2020)
We ran our method on the dataset released by Schmidt et al. (2020) and compared the final distortion energy (see Fig. 14 for the final optimized maps). As shown in Table 1, our optimized distortion energy is below that of the previous method (Schmidt et al., 2020) on all but the Ant-Octopus and Pig-Armadillo cases. We believe the lower values of our energy are due to the fact that Schmidt et al. terminated optimization after a fixed number of steps, whereas we let the optimizer run until it can make no more progress. The two unsuccessful cases are of extremely non-isometric shape pairs, and our algorithm quickly gets trapped by local minima.
Case name | #F | #N | T | E | (Schmidt et al., 2020) |
---|---|---|---|---|---|
Planes | 25k | 231 | 15.0h | 4.35 | 4.69 |
Cow-Horse | 10k | 225 | 3.8h | 4.73 | 5.28 |
Hands | 32k | 366 | 37.6h | 4.35 | 4.83 |
Genus3 | 3k | 440 | 2.9h | 4.21 | 4.36 |
Genus5 | 8k | 767 | 15.0h | 4.49 | 4.74 |
Pretzel | 12k | 532 | 11.2h | 5.25 | 5.53 |
Donut-Duck | 24k | 585 | 78.9h | 4.68 | 4.77 |
Vase | 10k | 542 | 9.1h | 4.60 | 5.00 |
Ant-Octopus | 8k | 4 | 1m | 98.3 | 16.2 |
Pig-Armadillo | 22k | 370 | 19.9h | 8.10 | 7.78 |
7.3. Evaluation with Princeton Segmentation Dataset
Our method is inherently empirical, hence it is difficult to theoretically analyze how well it works in practice. To evaluate practical utility of our method, we ran our CIT optimization on models included in the Princeton 3D Mesh Segmentation Dataset (Chen et al., 2009). The dataset consists of 19 categories, each containing 20 triangle meshes. We randomly chose 5 pairs in each category, totaling pairs. To make our experiment more meaningful, we created some rules to filter out some clearly inappropriate pairs as well as extremely poor quality geometries. In some categories, we also introduced some additional sub-categories within which we formed pairs randomly, so that the problem setting becomes more relevant. See the supplemental material for how we selected the pairs. Note also that we often applied moderate degree of mesh cleaning such as remeshing and reduction to eliminate erroneous configurations such as edges of almost zero dihedral angles.
Fig. 15 shows a sample of our optimized surface mapping from each category, indicating that our method indeed produces good quality maps. See the supplemental material for the detailed statistics as well as all the images of the mappings of all pairs.
Of the 95 cases, 7 cases (41-59, 50-46, 53-54, 55-51, 124-139, 146-156, 399-385), all genus 0, could not be handled by HOT (due to flipped triangles detected during its LBFGS optimization), no matter how we chose the landmarks. Out of the remaining 88 cases, we had 7 cases (62-72, 128-136, 129-126, 130-134, 152-149, 220-201, 386-397) where our CIT generation algorithm failed due to too extreme distortion in the mapping generated by HOT (Fig. 16). For the two cases 62-72 and 386-397, the shapes are widely different near the tail region, while for the two cases 152-149 and 220-201, the overall shapes are very different. For the three cases 128-136, 129-126 and 130-134, the very thin and long tentacles of the octopuses are arranged in some inconsistent manner.
Apart from these rather extreme cases, our CIT generation and optimization algorithm succeeded on 81 models out of 88, giving us success rate of 92%.
8. Conclusion and future work
In this work, we showed that it is possible to consistently define, given vertex images as input, images of edges and faces of one model onto the other model using Compatible Intrinsic Triangulations instead of constant-curvature metrics (Schmidt et al., 2020). We demonstrated that our CIT generation algorithm is robust enough to be used within a second-order global optimization framework.
There are, however, a number of issues in our current approach. First, there are no theoretical grounds supporting our CIT generation algorithm which we devised only through empirical observations. A thorough analysis of our problem setting is essential and can be a key to improving the robustness when handling extremely distorted vertex images.
One possible idea for improving our algorithmβs success rate is to introduce additional vertices which are both inserted on and , much like the Steiner vertices for 2D triangulation. We have not tried it yet as it seemed to complicate our optimization framework due to the number of variables changing at every step, especially when considering the treatment of the temporal smoothing operator.
Another possible way of improvement would be to devise a mechanism that has the same effect as the metric regularization feature in the previous work (Schmidt et al., 2019, 2020) which we believe will make our optimization algorithm significantly more robust.
Finally, an interesting future direction would be to combine our method with recent techniques for computing bijective maps between coarse and fine meshes such as (Jiang et al., 2020), in order to enable a multi-resolution framework for the inter-surface mapping problem. This will benefit from the simplicity of our approach, requiring only vertex images as input, in contrast to the previous method which requires valid constant-curvature metrics in addition to vertex images.
Acknowledgements.
We thank the anonymous reviewers for their constructive feedback. We also thank Ryoich Ando for generously offering us an access to his powerful computing environment which was essential for conducting our experiment.References
- Spherical orbifold tutte embeddings. ACM Trans. Graph. 36 (4). Cited by: 2nd item.
- Orbifold tutte embeddings. ACM Trans. Graph. 34 (6). Cited by: 1st item.
- Hyperbolic orbifold tutte embeddings. ACM Trans. Graph. 35 (6). Cited by: 3rd item, Β§3, Β§7.1.
- Lifted bijections for low distortion surface mappings. ACM Trans. Graph. 33 (4). Cited by: 1st item.
- Seamless surface mappings. ACM Trans. Graph. 34 (4). Cited by: 1st item, Β§7.1.
- As-rigid-as-possible shape interpolation. In Proceedings of the 27th Annual Conference on Computer Graphics and Interactive Techniques, SIGGRAPH β00, pp. 157β164. Cited by: Β§2.
- Merging polyhedral shapes with scattered features. The Visual Computer 16 (1), pp. 26β37. Cited by: 2nd item.
- Consistent spherical parameterization. In Computational Science β ICCS 2005, pp. 265β272. Cited by: 2nd item.
- MΓΆbius registration. Comput. Graph. Forum 37 (5), pp. 211β220. Cited by: 2nd item.
- Compatible embedding for 2d shape animation. IEEE Trans. Vis. Comput. Graph. 15 (5), pp. 867β879. Cited by: Β§2.
- Sparse iterative closest point. Comput. Graph. Forum 32 (5), pp. 113β123. Cited by: 3rd item.
- A benchmark for 3D mesh segmentation. ACM Trans. Graph. 28 (3). Cited by: Β§7.3.
- Adaptive estimation of hodge star operator on simplicial surfaces. The Visual Computer 37 (6), pp. 1433β1445. Cited by: Β§2.
- Elastic correspondence between triangle meshes. Comput. Graph. Forum 38 (2), pp. 121β134. Cited by: 1st item.
- Reversible harmonic maps between discrete surfaces. ACM Trans. Graph. 38 (2). Cited by: 1st item.
- Nonlinear spectral geometry processing via the tv transform. ACM Trans. Graph. 39 (6). Cited by: Β§2.
- Eigen v3. Note: https://eigen.tuxfamily.org/dox/unsupported/group__AutoDiff__Module.html Cited by: Β§7.
- Non-rigid registration under isometric deformations. Comput. Graph. Forum 27 (5), pp. 1449β1457. Cited by: 3rd item.
- Bijective projection in a shell. ACM Trans. Graph. 39 (6). Cited by: Β§8.
- 3D geometric metamorphosis based on harmonic map. In Proceedings The Fifth Pacific Conference on Computer Graphics and Applications, pp. 97β104. Cited by: 1st item.
- Blended intrinsic maps. ACM Trans. Graph. 30 (4). Cited by: 1st item.
- Cross-parameterization and compatible remeshing of 3d models. ACM Trans. Graph. 23 (3), pp. 861β869. Cited by: 4th item, Β§2.
- MΓΆbius voting for surface correspondence. ACM Trans. Graph. 28 (3). Cited by: 1st item.
- An Image Processing Approach to Surface Matching. In Eurographics Symposium on Geometry Processing 2005, Cited by: 1st item, Β§2.
- High-quality compatible triangulations and their application in interactive animation. Computers & Graphics 76, pp. 60β72. Cited by: Β§2.
- Variance-minimizing transport plans for inter-surface mapping. ACM Trans. Graph. 36 (4). Cited by: 2nd item.
- Functional maps: a flexible representation of maps between shapes. ACM Trans. Graph. 31 (4). Cited by: 2nd item.
- Weighted averages on surfaces. ACM Trans. Graph. 32 (4). Cited by: 1st item.
- Consistent mesh parameterizations. In Proceedings of the 28th Annual Conference on Computer Graphics and Interactive Techniques, SIGGRAPH β01, pp. 179β184. Cited by: 4th item.
- Distortion-minimizing injective maps between surfaces. ACM Trans. Graph. 38 (6). Cited by: 1st item, Β§2, Β§6.1, Β§6.1, Β§6.2, Β§8.
- Inter-surface maps via constant-curvature metrics. ACM Trans. Graph. 39 (4). Cited by: Β§1, Β§1, Β§1, Β§2, Β§3, Β§6.1, Β§6.1, Β§6.2, Β§6.3, Figure 14, Β§7.2, Β§7.2, Table 1, Β§8, Β§8.
- Inter-surface mapping. ACM Trans. Graph. 23 (3), pp. 870β877. Cited by: 4th item, Β§2.
- SnapPaste: an interactive technique for easy mesh composition. The Visual Computer 22 (9), pp. 835β844. Cited by: 3rd item.
- Geometry-central. Note: https://www.geometry-central.net Cited by: Β§7.
- A laplacian for nonmanifold triangle meshes. Comput. Graph. Forum 39 (5), pp. 69β80. Cited by: Β§2.
- You can find geodesic paths in triangle meshes by just flipping edges. ACM Trans. Graph. 39 (6). Cited by: Β§2.
- Navigating intrinsic triangulations. ACM Trans. Graph. 38 (4). Cited by: Β§1, Β§2, Β§2, Β§4.2, Β§4.3, Β§4.8, Β§5.1, Β§5.2, Β§6.1, Β§7.
- Hyperbolic harmonic mapping for surface registration. IEEE Trans. Pattern Anal. Mach. Intell. 39 (05), pp. 965β980. Cited by: 3rd item.
- Soft maps between surfaces. Comput. Graph. Forum 31 (5), pp. 1617β1626. Cited by: 2nd item.
- High quality compatible triangulations. Eng. with Comput. 20 (2), pp. 147β156. Cited by: Β§2.
- Registration of 3d point clouds and meshes: a survey from rigid to nonrigid. IEEE Trans. Vis. Comput. Graph. 19 (7), pp. 1199β1217. Cited by: 3rd item.
- Parallel and scalable heat methods for geodesic distance computation. IEEE Trans. Pattern Anal. Mach. Intell. 43 (2), pp. 579β594. Cited by: Β§2.
- Inspired quadrangulation. Computer-Aided Design 43 (11), pp. 1516β1526. Cited by: 1st item.
- Consistent correspondence between arbitrary manifold surfaces. In International Conference on Computer Vision, Cited by: 3rd item.
- Volume-enhanced compatible remeshing of 3d models. IEEE Trans. Vis. Comput. Graph. 25 (10), pp. 2999β3010. Cited by: 3rd item.
- Error-bounded compatible remeshing. ACM Trans. Graph. 39 (4). Cited by: 3rd item.
- Manifold parameterization. In Advances in Computer Graphics, pp. 160β171. Cited by: 3rd item.
Appendix A Algorithms for merging inconsistently positioned vertices
We match the given incompatible patch pair against each of the five patterns shown in Fig. 5. Each pattern analyzes the given patch pair and returns an edge pair (one on and the other on ) that meets certain conditions defined for that pattern. We then collapse such a returned edge pair if it is collapsible. We give up on a patch pair if none of the patterns return an edge pair for collapse.
Below, we use and to refer to the available correspondences between βs elements and βs elements; e.g., refers to βs intrinsic vertex corresponding to βs intrinsic vertex (which is always available), and refers to βs intrinsic edge corresponding to βs intrinsic edge, assuming that the edge is compatible.
Pattern 1
We first check if the patch contains no interior vertices. We then look for vertices whose interior angle (i.e., the sum of corner angles of adjacent faces in the patch) is larger than . If βs patch and βs patch contain one such vertex each (referred to as and , respectively), and if there exists an edge at βs patch boundary connecting and , we return that edge.
Pattern 2
We first check if the patch contains just one interior vertex and just one reversed face . We also check if is adjacent to . Then we examine the two edges and adjacent to both and . We return if , otherwise , with representing the edgeβs length.
Pattern 3
We first check if the patch contains even number of interior vertices. Then, we look for an interior compatible edge pair and whose adjacent two faces are both reversed. If the adjacent vertices of and are all interior, we return . Otherwise, if and are both flippable and have corresponding opposite vertices which are both interior, we flip both of them and return .
Pattern 4
We first check if the patch contains no interior vertices. We then look for an interior compatible edge pair and whose adjacent vertices all have interior angles larger than . If there is just one such edge pair in the patch, we return that edge.
Pattern 5
We match the given patch with the fixed mesh topology shown in the figure; i.e., the patch must have four faces, three interior edges, six boundary edges, five boundary vertices, and one interior vertex. We then identify the βhourglassβ vertex; i.e., one that is adjacent to four boundary edges. Then we return an edge between the interior vertex and the hourglass vertex.