Appearance-Mimicking Surfaces

Inspired by bas-reliefs, appearance-mimicking surfaces are thin surfaces, or 2.5D images whose normals approximate the normals of a 3D shape. Given a viewpoint and per-vertex depth bounds, the algorithm proposed 1 finds a globally optimal surface that preserves the appearance of the target shape when observed from the designated viewpoint, while satisfying the depth constraints.

Problem Formulation

Let be the original surface, and be the deformed surface when observed from viewpoint . Each point of the deformed surface is constrained to stay on the ray emanating from the viewpoint in the direction of (line ).

image-20201201115724580

The perceived difference between and is measured by the sum of the L2 norm of their normals at each point:

Here, on surface . is the normal of at point . Our goal is to minimize .

Discretization

Preserving Surface Similarity

When surface is represented by a triangle mesh , points on are approximated by vertices . Each vertex can be written as:

is the unit vector pointing in the direction of . measures the distance between and . This representation is convenient because (deformed mesh) and (original mesh) share the same set of . Their differences are entirely expressed by and . Depth constraints for each vertex of can be specified as a upper bound and a lower bound on :

Using this representation, Eq. (1) can be discretized and linearized as:

is the Voronoi area ssociated with and can be obtained from the mass matrix coefficients. are weights denoting the relative importance of . Visible vertices from the viewpoint are given more weight than occluded vertices. By default are 1. is the discrete laplace operator of mesh . is a diagonal matrix with entries on the diagonal.

We follow these conventions for notations:

Now our goal is to find such that it minimizes . To do this, we extract the unknown variable from . The above equation can be further vectorized as:

We then construct all the components of matrix .

Let ,

Allowing Disconnected Pieces

Some meshes are composed of disconnected pieces. There might be use cases where each deformed piece needs to occupy a different location. In this case, the bounds need to be discontinuous as well. For example, suppose mesh A is a "connected" mesh with 4 vertices. Its bounds could be:

Suppose mesh B is a "disconnected" mesh with 4 vertices and 2 vertex groups. Its bounds could be:

This complicates user input because users need to calculate different bounds for different vertex groups. To simplify user input for this use case, the paper introduces a vector , where each element is a scaling factor for an independent group of vertices such that holds for all vertices in group . number of groups.

To obtain a unique solution for , for each group , we can fix the value of for a (randomly selected) vertex . The value of then affects the value of .

Optimization

Finally, we optimize for both and :

Is set to in the paper. are the inequality constraints derived from . are the equality constraints derived from fixing .

Combining and into one unknown vector , we now have quadratic programming problem that can be solved using the libigl active set solver:

where F is:

The deformed vertices are retrieved by multiplying each with .

Demo

Original MeshDeformed MeshOriginal MeshDeformed MeshOriginal MeshDeformed Mesh
original bunnydeformed bunnydeformed bunnyoriginal knightdeformed knightoriginal dragondeformed dragondeformed dragon

The example main.cpp deforms a mesh along the z-axis (front view).

Implementation Details

Getting

First, we construct a mass matrix :

Here, is a diagonal matrix, in which the diagonal entry is the Voronoi area around in the mesh 2. We then take the diagonal entry for each vertex, take the square root, and repeat it 3 times (1 for each dimension). The resulting matrix should look like this:

Getting

Similar to , we take the weight vector of size n x 1 and repeat it along the diagonal:

Getting

First, we compute the cotangent Laplace-Beltrami operator :

is the Kronecker product between the cotangent matrix and 3 x 3 identity matrix:

Getting

Getting

We construct such that can be transformed into . Below is an example of an inequality constraint for a mesh with 4 vertices and 2 groups.

 

Getting Bounds on

bounding box

Bounds for varies for each vertex and each mesh. We first compute a bounding box 3 for the mesh to help with customizing bounds.

bounding box

The above figure shows how main.cpp deforms a mesh from a left viewpoint. We assume the mesh faces the positive z-axis and the bounding box is roughly square.

Future Directions & Challenges

Although frees the user from specifying individual depth constraints for each disconnected piece, I am still having trouble producing disconnected appearance mimicking surfaces. If the input mesh is all connected (like the bunny), I am not sure how to break up the faces after breaking the vertices into mulitple groups. If the input mesh has disconnected pieces, I am not sure how to determine which vertices belong to the same group, other than manually inspecting the mesh file.

References


1 Christian Schuller, Daniele Panozzo, Olga Sorkine-Hornung, Appearance-Mimicking Surfaces, 2014
2 Mark Meyer, Mathieu Desbrun, Peter Schröder and Alan H. Barr, Discrete Differential-Geometry Operators for Triangulated 2-Manifolds, 2003.