Categories
Research

Surface Log Maps

by Anja Milutinovic and Shannon Cudworth

Geodesics and geodesic distance

Suppose we have a curved surface M⊂3\mathbb{R}^3. If we want to measure distances or move from one point to another, Euclidean straight lines are no longer appropriate because they leave the surface. So we generalise the notion of a “straight line”, by seeking the straightest possible path that remains on the surface. This is called a geodesic.

More formally, a geodesic is a curve that locally minimizes the length L of the curve:

L(γ)=01γ(t)dt,where γ(t)Tγ(t)M.L(\gamma)=\int_0^1 \|\gamma'(t)\|\,dt,\quad \text{where }\gamma'(t)\in T_{\gamma(t)}M.

The geodesic distance between two points p, q M is:

dM(p,q)=infγ:[0,1]M,γ(0)=p,γ(1)=qL(γ)d_M(p,q)=\inf_{\gamma:[0,1]\to M,\,\gamma(0)=p,\,\gamma(1)=q}L(\gamma)

Exponential and logarithmics maps

Given a point pMp\in M and a tangent vector vTpMv\in T_pM, there exists a unique geodesic γ\gamma such that γ(0)=p\gamma(0)=p and γ(0)=v\gamma'(0)=v. Exponential map Expp:TpMM\operatorname{Exp}_p:T_pM\rightarrow M is a map that for every vTpMv\in T_pM gives the endpoint of the geodesic starting at p with the direction vv and length v\|v\|

Then, the logarithmic map is the inverse of the exponential map,  Logp:MTpM\operatorname{Log}_p:M\rightarrow T_pM, whenever the exponential map is invertible. Logarithmic map for any given point qMq\in M is a tangent vector that gives the initial direction of a geodesic starting at p and ending at q.

Combining the logarithmic map with the frame ϕp:TpM2\phi_p:T_pM\rightarrow\mathbb{R}^2, we get 

z=ϕpLogpz=\phi_p\circ\operatorname{Log}_p, that maps any point q on a surface into 2\mathbb{R}^2.

Local parameterization of the Stanford Bunny using a logarithmic map centered at a selected point.

Levi Civita connections

Given two neighboring vertices v1,v2v_1, v_2 on a discrete triangle mesh, we can define corresponding tangent vectors t1,t2,t_1, t_2, such that t1t_1and t2t_2 belong to the tangent planes at v1v_1 and v2,v_2,respectively. Since t1, t2t_1,\ t_2 lie on different tangent planes, we cannot meaningfully compare them. Our goal is to define a parallel transport, which moves one tangent vector to another tangent plane at an adjacent vertex, while minimizing rotation, known as the Levi Civita connection.

To implement the Levi Civita connection, we are given a dictionary containing all vertices with a shared edge, and the normal vector defined at every vertex viv_i. By looping over all shared edges i,ji,j, we take neighboring vertices vi,vjv_i, v_j and we index and define the normal vectors corresponding with the vertices, labeled n1n_1 and n2n_2, respectively.  We then use the normals to calculate the Rodrigues Rotation, or the rotation of a vector by a specific angle around a fixed axis. The formula to determine this rotation matrix is given by:

R=I+vx+vx2×1cs2R = I + v_x + v_x^2 \times \frac{1-c}{s^2}

where v=n1×n2, c=n1n2, s=||v||, 𝐯×=[0v2v1v20v0v1v00]v = n1 \times n2,\ c = n1 \cdot n2, \ s = ||v||, \ \mathbf{v}_{\times}=\left[\begin{array}{ccc}0&-v_2&v_1\\v_2&0&-v_0\\-v_1&v_0&0\end{array}\right]

Then R approximates Levi Civita connection between adjacent tangent planes.

Connection Laplacian

After constructing the Levi Civita connection, we want to compare the tangent vectors at neighboring vertices, which is accomplished through the Connection Laplacian. As before, we loop over all vertices i,j with shared edges, and first define the cotangent weights, which are given by:

wij=12(cotαij+cotβij)w_{ij} = \frac{1}{2}(cot\alpha_{ij} + cot\beta_{ij})

where αij\alpha_{ij} and βij\beta_{ij} are the two angles opposite the edge (i, j). Now we can define the Connection Laplacian matrix, defined as:

Lij={(kN(i)wik)I,amp;i=j,wijRji,amp;(i,j) is an edge,0,amp;otherwise. L_{ij}= \begin{cases} \left(\displaystyle\sum_{k\in N(i)} w_{ik}\right)I, & i=j, \\[1.2ex] -w_{ij}R_{ji}, & (i,j)\text{ is an edge}, \\[0.8ex] 0, & \text{otherwise}. \end{cases}

where wijw_{ij} is the cotangent weight between vertex i and vertex j, RijR_{ij} is the Levi Civita connection between vertex i and vertex j, and N(i)N(i) is the set of adjacent vertices to vertex i. Once the Connection Laplacian is defined, we can now measure how tangent vector fields change across vertices and our mesh.

Heat Diffusion & Vector Heat Method

With the Levi Civita connection and the Connection Laplacian, we can now define the Vector Heat Method (VHM), which approximates parallel transports between arbitrary vertices on our surface.

Given a mass matrix M, a connection laplacian L, an initial vector field V, and a small time step h, we can solve the vector heat equation:

(M+hL)X=V(M + hL)X = V

where X is a vector field that approximates the parallel transport of V along the minimal geodesics.

We now introduce a set of user-selected seed vertices S = { s1, ... ,sks_1,\ … \ , s_k } ⊂V. Via the VHM, we can approximate the parallel transport between any arbitrary seed vertices. Our goal is to extend this to the Affine Heat Method, which will use the VHM estimations of parallel transport between seed frames to optimize a set of tangent frames, allowing adjacent logarithmic maps to be more effectively blended.

Seed graph with optimal frames & UV offset

A single logarithmic map only provides a low-distortion parameterization around one point on the surface. To cover the entire mesh, we choose a small set of seed verticesS={s1,,sk}V,S=\{s_1,\ldots,s_k\}\subseteq V,and compute one logarithmic map around each seed. Each seed defines its own local coordinate system describing the nearby geometry.

Since these maps are computed independently, their coordinate systems are arbitrary. Even if two neighboring maps describe the same part of the surface, one may be rotated relative to the other. Before we try to combine the maps, their orientations must be made consistent.

We therefore associate each seed with a local frame tsTsMt_s \in T_sM. Specifically, we define a linear map Ψs:TsMR2\Psi_s : T_sM \rightarrow \mathbb{R}^2 that maps the local frame to the horizontal axis of the plane.

However, the maps may still be translated.o fix this, we assign each seed a UV offset wsR2w_s\in\mathbb{R}^2. Neighboring logarithmic maps should predict the same relative displacement, leading to the consistency condition:

wsws+Ψs(logs(s)).w_{s’} \approx w_s + \Psi_s\!\left(\log_s(s’)\right).

he UV offsets are then computed by minimizing the disagreement between neighboring seeds.

Blending seed’s log maps

The final step was to combine the local parameterizations into a single global UV map. This involves deciding which local maps influence each part of the surface and how they should be combined. One way to this is to partition the surface into Voronoi cells, where each vertex is assigned to its nearest seed according to geodesic distance and inherits that seed’s local parameterization. While this approach is simple and efficient, it creates visible seams at the boundaries between neighboring cells.

Global UV parameterization of the Stanford Bunny using a Voronoi partition of local logarithmic maps.

Authors