Keywords

1 Introduction

Sorkine et al. [1] proposed a discrete deformation technique based on the Laplacian of the mesh. In this method, for every vertex and 1-ring neighborhood vertices connected to it, the shape is deformed so that all vertices are optimized. This approach is numerically stable, but is not able to compute in real-time, because it depends on the number of vertices. Therefore, Ju et al. [2] proposed a method to reduce computational cost. This is a way to build a similar but coarse structure with fewer vertices, and then deform the dense model through the coarser structure. This coarser structure, which surrounds the original dense model, is called a cage. However, the cage is constructed mainly by hand. It takes several hours, or even longer to construct it over the dense mesh model. So, automatic generation methods of the cage over the dense mesh model are needed.

There are many methods of automatic cage generation [3,4,5,6,7,8,9]. For example, Ben-Chen et al. [3] has proposed in a paper related to a deformation transfer method. The deformation transfer method receives as an input: a source reference pose, a deformed source pose and a target reference pose. The output of the deformation transfer is a deformed target pose. In this method, to apply the space deformation analysis and synthesis they need to envelopes the source and target reference shapes with polyhedral cages, they proposed an automatic cage generation using a simplification. Xian et al. [4] have proposed a method to generate the coarse bounding cage by uniform voxelization. However, the size of the voxels is uniform, the generated coarse bounding cage is usually too dense. Therefore, they have improved [4] using the improved OBB tree and the Boolean union operation to adjust and merge them into a whole entity [5]. In addition, they have developed another automatic method to generate the cage using voxelization based decomposition [6]. After voxelizing an input model, they decompose the model into broad regions and narrow regions by dilating the inner voxel groups. Then they construct partial cages using different strategies and unite them to get a cage. Zheng-Jie et al. [7] have proposed an automatic cage generation based on a simplification. When simplifying an input model with quadric error metrics and quadratic programming to build a coarse cage. Sacht et al. [8] have proposed an approach for nesting multiresolution mesh. This approach constructs and adds a coarser level to the hierarchy, using a sequence of decimation, flow, and contact-aware optimization steps. Huy et al. [9] have proposed a semi-automatic method to generate cages. Starting from user-specified cut slides, this method automatically optimizes the consistent, orthogonal orientations of cage cross sections. Then these cross sections together divide the whole cage into parts.

Our method is a kind of voxel-based method. The target shape is the initial shape of industrial products without skeletons. If there is a skeleton, the deformation that does not follow the skeleton becomes unnatural, and it is not suitable for the initial shape of industrial products. In addition, it is possible to be able to place many vertices at characteristic points of the shape using our method.

2 Cage Generation Algorithm

Since our algorithm is an extension of Alliez’s algorithm [10] which is a kind of variational remeshing methods, we briefly explain the basic principles and the resulting base algorithm, as illustrated in Fig. 1. The first stage of this algorithm provides an initial geometry resampling by performing an error diffusion process directly over the original triangle mesh. The second stage computes a conformal parameterization of the original model over a planar domain, connects the samples using a constrained Delaunay triangulation built in parameter space, then optimizes the sampling by building a weighted centroidal Voronoi tessellation in parameter space. The final stage restores the embedding by locating every vertex in its associated triangle in parameter space and computing its barycentric coordinates.

Fig. 1.
figure 1

An example of Alliez’s algorithm. (a) An original mesh model. (b) Providing the initial geometry resampling. (c) Computing the conformal parameterization. (d) Connecting the samples by the constrained Delaunay triangulation. (e) Optimizing the sampling. (f) projecting back every sample onto its corresponding triangle in \( {\mathbb{R}}^{3} \).

Next, we explain the procedure of the cage generation method we propose. Our algorithm mainly includes the following steps:

  1. 1.

    Evaluate the features of an original mesh model.

  2. 2.

    Voxelize the mesh model and create feature edge voxels.

  3. 3.

    Create the surfaced voxel model of the voxels and transfer the features of the original mesh model to the surfaced voxel model.

  4. 4.

    Apply Alliez’s algorithm to the surfaced voxel model.

2.1 Evaluating the Features of an Original Mesh Model

The first step of the cage generation algorithm is to evaluate the features of an original mesh model Mo. The features we evaluate are curvatures and sharp edges. As the curvature d, we use the absolute value of the mean curvature and Gaussian curvature at each vertex as shown in Eq. (1).

$$ d = \alpha d_{m}^{p} + \beta d_{g}^{q} $$
(1)

where, dm is the absolute value of the mean curvature and dg is the Gaussian curvature. α, β, p, q are factors, which are specified by a user. Currently, we chose α = 0.5, β = 0.5, p = 2, q = 1 respectively on an empirical basis. Also, the sharp edges are mainly classified using dihedral angle thresholding specified by a user. We can further use a more sophisticated approach [11, 12]. We call edges extracted with the associated dihedral angle “Feature Edges” (FE).

2.2 Voxelization of the Mesh Model and Creation of Feature Edge Voxels

The Mo is voxelized. The purpose of this step is to generate a cage outside Mo. The length of the bounding box is the length of the Mo’s bounding box plus 0 to half the voxel length of the Mo’s bounding box depending on the gaps. The resolution of the voxels for this bounding box is specified by a user. Boundary voxels, which are the ones intersecting with the mesh surface, are identified.

Next, we compute Feature Edge Voxels (FEV) from voxels and FEs, as illustrated in Fig. 2. The FEV is generated from the voxel model and the feature edge information. This is created by testing the intersection of each voxel and the FEs. These red voxels in Fig. 2(c) represent voxels that contain the terminal points of the FEs. We call the red voxels “Feature Vertex Voxels” (FVV).

Fig. 2.
figure 2

Creation of feature edge voxels. (a) Voxels. (b) Feature Edges (FE). (c) The voxels are Feature Edge Voxels (FEV), especially, the red voxels are Feature Vertex Voxels (FVV). (Color figure online)

2.3 Create the Surfaced Voxel Model of the Voxels and Transfer the Features of Mo to the Surfaced Voxel Model

The adjacency of 6 neighbors for each boundary voxel is checked and then faces are created on the surfaces of the boundary voxel that are not adjacent to other boundaries and internal voxels. We call this creation “Surfaced Voxel Model” (SVM). Next, FEs are generated on the SVM based on the FEV using the Dijkstra method [13].

We first regard vertices and edges of the outer faces constructing to a piece of FEV as a graph. A source vertex and target vertex are decided in the graph. To decide the terminal vertices, the number of the outer faces constructing a voxel is taken into consideration as shown in Fig. 3. In the case of 3 faces, the vertex sharing 3 faces is selected. In the case of 2 faces, there are two candidate vertices sharing 2 faces. Therefore, the vertex sharing other feature edges is selected. Because the terminal vertices are also intersections of a few FEs. If there are two FEs, the vertex with the shorter FE is selected. In the case of 1 face, there are 4 candidate vertices per face. Therefore, the vertex that has the shortest FE is selected. Then, the distance on the graph is decided. We want FEs to pass through corners as much as possible. Therefore, the combination of 6-adjacent relationships between voxels is considered, so the length of each edge is adjusted so that the lengths of edges passing through corners are shorter than the lengths of edges passing through interiors. By applying the Dijkstra method with these settings, a FE that preferentially passes through the corners of the shape can be created.

Fig. 3.
figure 3

The pattern of the terminal vertices. (a) Only one vertex sharing 3 faces. (b) The 2 candidate vertices of edge sharing 2 faces. (c) The 4 candidate vertices of 1 face.

Next, we describe the curvature at each vertex of the SVM. First, the curvature of each voxel is computed. The curvature of the vertices of the original model contained in a voxel is averaged and is used as the voxel curvature. Then the curvature of the vertex on the SVM is the average value of the 4 voxel curvatures adjacent to the vertex.

2.4 Apply Alliez’s Algorithm to the Surfaced Voxel Model

Vertices that constitute a cage are distributed on the SVM. At this time, the number of vertices is specified by the user. In the same way as Alliez’s method, samples are preferentially distributed over the terminal vertices of the FEs, the areas with large curvature on the FEs, and the areas with large curvature on the faces. The remainder of the procedures also is executed in the same way as Alliez’s algorithm.

3 Result and Discussion

The automatic cage generation algorithm developed in this paper runs on PCs with Intel Core i7™ 3.6 GHz CPU and 16.0 GB memory. The generated cage and the deformed shape by the cage are illustrated in Fig. 4. We used Ju’s algorithm [2] for the cage-based deformation. The number of faces of the original model is 12,946. The number of faces of the cage is 314 (Using 32 × 32 × 32 voxels).

Fig. 4.
figure 4

Cage generation for the Fandisk and shape deformation by using our method. (a) The cage (The front view). (b) The cage (The bottom view). (c, d) The cage of original model before and after deformation.

As shown in Fig. 4, we can get the coarse cage which encloses the original model. Additionally, we generate the cage so that it depends on the curvature. As you can see in Fig. 4(a)–(c), there are many vertices in the areas with high curvatures but there are few vertices in flat areas. Also, as you can see in Fig. 4(c)–(d), the parts with high curvature can be flexibly deformed using the cage made by our method. With our method, it is possible to increase the number of cage vertices, which are control points, in the areas of high curvature where the user is interested. However, in many of the previous works described above, it is not possible to partially control the number of vertices that generate a cage depending on the shape features, such as curvature and dihedral angle.

4 Conclusions and Future Work

In this paper, we have proposed an automatic cage generation algorithm from a shape with a variational remeshing method and deformed the shape using the cage. The shape’s feature are evaluated, and the shape is voxelized. Also feature edge voxels and the surfaced voxel model are created, and the features of the shape are transferred to the surfaced voxel model. Finally, Alliez’s algorithm is applied to the surfaced voxel model and we can get a cage that considers shape features for the shape and deformed the shape using the cage.

For future work we plan to make a comprehensive evaluation of the cages with our method, when the cages are applied to collision detection, deformation transfer, physical simulation and so on.