An Efficient Algorithm for Joining Skinning Surfaces

3 downloads 0 Views 2MB Size Report
Aug 22, 2014 - method provides a parametric surface, skinning of a pre-. 24 .... tial differential equations (PDEs) applying an iterative. 136 ... and sphere si have common tangent planes at each. 172 ... circles are in a position having common tangent lines. 196. 3 .... normal vectors of ci1 and ci2, ni1, ni2, respectively. Ac-.
*Manuscript Click here to view linked References

KSpheres - An Efficient Algorithm for Joining Skinning Surfaces Korn´el Banaa , Kinga Kruppaa, Roland Kunklia,∗, Mikl´os Hoffmanna,b

b Institute

a Faculty of Informatics, University of Debrecen, Kassai Way 26, H-4028 Debrecen, Hungary of Mathematics and Computer Science, K´aroly Eszterh´azy University College, Le´anyka str. 4, H-3300 Eger, Hungary

Abstract Beside classical point based surface design, sphere based creation of characters and other surfaces has been introduced by some of the recently developed modeling tools in Computer Graphics. ZSpheresr by Pixologic, or SporeTM by Electronic Arts are just two prominent examples of these softwares. In this paper we introduce a new sphere based modeling tool, which allows us to create smooth, tubular-like surfaces by skinning a user-defined set of spheres. The main advantage of the new method is to provide a parametric surface with more natural and smoother shape, especially at the connection of branches than the surfaces provided by the existing softwares and methods. Keywords: sphere based modeling, skinning surface

1

1. Introduction

24 25

2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23

Creating various shapes is always the first step of many computer graphics related problems. Nowadays there is a growing demand to extend the well-known, point based surface methods (all the spline and subdivision surfaces are based on a predefined set of points) to new algorithms which rely on other types of geometric primitives such as spheres. Animation and creation of characters are of central importance in computer graphics, where skinning methods are also applied [1]. As a new tool, surface modeling by spheres has already appeared in computer graphics in the last couple of years. Several papers have been published in this topic, where theory of sphere based surface modeling has been introduced, and applied in several fields, including medical and biological applications, character animation or covering problems, see [2–6], e.g. Moreover, commercial software tools have also been developed in this field, such as ZSpheresr [7] by Pixologic, or SporeTM [8] by Electronic Arts. In this paper we introduce a novel approach of sphere based shape modeling. Based on the theoretical approach of blending of spheres developed in [9], the

26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48

method provides a parametric surface, skinning of a predefined, ordered set of spheres. The surface can be interactively modified in real time by adjusting the positions and radii of the spheres. New branches can also be added by simply defining new sequences of spheres. The result is a piecewisely defined surface, where the branches are connected automatically in a smooth (G1 continuous) way. In Figure 1 we can see a comparison between our result and the result of ZSpheresr. Thus the main contribution of this paper is to extend our previous method in order to handling branching surfaces. The method presented in this paper is based on the idea of our prior algorithm, but it is extended to shapes with several branches, which can help the creation of animation characters or more structured tubular surfaces. The final input of our method is a rooted tree graph in 3D, where at each node we have a sphere. The spheres can have different radii. During the modeling phase the graph is built from one single sequence of edges (spheres) and can be modified in an interactive way, by adding new branches to the tree and altering the radii and positions of the spheres. In one branch (one sequence of spheres) the admissible positions of spheres are defined as follows.

∗ Corresponding

author Email addresses: [email protected] (Korn´el Bana), [email protected] (Kinga Kruppa), [email protected] (Roland Kunkli), [email protected] (Mikl´os Hoffmann) Preprint submitted to Computer Aided Geometric Design

49 50 51

Definition 1. A sequence of spheres C = {s1 , s2 , s3 , . . . , sn } (n ∈ N) is called admissible configuration if the following conditions are fulfilled: August 22, 2014

52

53 54

55

56 57 58 59

60 61

62 63

64 65 66

67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96

• si 1

n [

j=1, j,i

s j,

i ∈ {1, 2, . . . , n}

• si ∩ s j = ∅, i, j ∈ {1, 2, . . . , n}, j < {i − 2, i − 1, i, i + 1, i + 2} • if si−1 ∩ si+1 , ∅, then si−1 ∩ si+1 ⊂ si These conditions can easily be checked by simple computation. Conditions of adding a new branch to the existing tree are as follows: Figure 1: Defined by an ordered set of spheres, the software ZSpheresr (above) applies subdivided cylinders and cones, while our method (below) computes a parametric surface between the spheres. The given spheres with the blending pieces (left) and the final, rendered surfaces (right) can be seen in both methods.

• spheres of the new branch have to form an admissible configuration described in Def.1 • the first sphere of the new branch has to be one of the spheres of the existing structure • none of the spheres of the new branch (except, of course the first one) can intersect any of the other spheres of the existing structure. These assumptions are natural restrictions in order to avoid intersecting branches and closed loops, but at the same time the construction involves (i.e. the surface touches) all of the given spheres. As it is described in [9] the G1 continuity of the surface is guaranteed along the branches, while at the junctions of the branches it is also assured by the new method as described in Section 4.2. All given spheres are touched along a circle, and the surface does not intersect the spheres, as it follows from the original algorithm. This structure is appropriate for an important set of applications, including medical and biological applications and constructing characters. In theory, our method could handle more than three neighbors of one single sphere, which would yield junctions with more than two branches started from the same sphere. But in this case the smoothness of the joining patches is not always ensured, especially when the curve along which a new branch is connected to the existing structure has arcs in the surface of two or more existing branches. In Figure 12 one can observe this kind of junctions. The possible extension of the presented method in order to handle more complicated structures can be the direction of future research. The paper is organized as follows. In Section 2, we shortly overview the theoretical background of the topic, while in Section 3 the specific method we apply for our purpose is discussed briefly. In Section 4, the creation of new branches and their connection to the original surface are introduced. The existing software

100

tools are compared to our method in Section 5, where further examples of the output of our method are provided. Conclusion and possible future directions of research close the paper.

101

2. Related Work

97 98 99

102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127

2

Given two separated surfaces, the connection between them is normally created by a technique called blending. Several papers are dealing with the problem of blending of curved objects, and creating a surface from these blending patches. In standard methods, curves are given in the objects (sometimes as boundary curves of the surfaces, e.g. in case of cylinders), and these curves will be the joint touching (boundary) curves of the given objects and the created blending surface. Thus the blending surface has to be defined only between these curves. For spheres as given surfaces, this kind of blending algorithm is discussed in [10], [11], but these papers consider only two surfaces and the blending patch, without constructing a shape defined by a sequence of spheres. It is a more challenging task if, instead of two surfaces, a set of spheres (or more generally, surfaces without boundaries) are given, where neighbouring relations, according to a given graph, also have to be taken into account. There are recent results of this field of blending, where surfaces with branches are also considered but, contrary to our method which provides parametric surface patches, the blending surface patches in these methods are given in an implicit form [12], [13], or by subdivision methods [14], which may restrict their application in CAD softwares. Moreover, if the spheres

164

are given without predefined touching curves, then the touching curves of the blending surface have to be determined at first. In our case, spheres are given without any additional data, thus the first and most important step must be the definition of possible common touching curves of the future blending surface on the given spheres, taking into account the positions of the neighbouring spheres. This problem has been solved by partial differential equations (PDEs) applying an iterative method in [4]. In this method, an initial position of blending surface is modified iteratively by solving an energy minimizing PDE. The drawbacks of this method are that the convergency is not proved, the final result can be heavily affected by the initial position, and the iteration is time consuming (can take seconds for a surface) due to the PDE. As an alternative method, a direct computation of touching circles of the blending surface patch on the given spheres has been provided in [9]. As it has been proved in 2D in [15] and [16], this method provides better results than the iterative method presented in [4] in terms of computing time and curvature flow. In terms of computing time, contrary to the iterative method in [4], our algorithm works in real time. It provides a sufficient solution also for extreme positions of spheres. Only some evident restrictions for the positions of the given spheres have to be satisfied, especially none of the spheres can be entirely covered by other spheres (for exact definition of admissible input, see Def 1). The algorithm works perfectly even if only a small portion of a sphere is out of neighbouring spheres, as one can observe in Figure 3. But the original algorithm given in [9] can handle only one single sequence of spheres without further branches. For better understanding of the remaining part of the paper, the basic steps of this original algorithm provided in [9] will be discussed in the following section.

165

3. The basic skinning algorithm

128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163

166 167 168 169

Figure 2: Computation of touching circle (white) on one of the given spheres, where the future blending surface will touch the actual sphere. Apollonius circles (dashed red) are applied in the plane of the centers of three consecutive spheres, while the plane consisting of the touching circle is orthogonal to that plane

176 177 178 179 180 181 182 183 184 185 186 187 188

Given a sequence of spheres si with centers oi (i = 1, . . . , n), we are looking for a G1 continuous parametric surface s(φ, t) (φ ∈ [0, 2π] , t ∈ [0, 1]) called skin of the given spheres satisfying the following requirements:

j=i−1

189

170 171 172 173

• There is a circle of contact (touching circle) ci on the sphere si for all i = 1, . . . , n such that the skin s and sphere si have common tangent planes at each point of ci . Circle ci is an isoparametric curve of s.

190 191 192 193 194

174 175

• ci is not contained or intersected by any other sphere than si for all i = 1, . . . , n.

The sketch of the algorithm is as follows. The crucial point of the algorithm is to determine the touching circles. For each triplet of consecutive spheres si−1 , si , si+1 a contact circle on si is computed by considering the plane P through the centers of the triplet of spheres, and by solving the Apollonious problem for the circles where P intersects the spheres. At the touching points of the Apollonian circle and the sphere si , a plane orthogonal to the plane P is considered, and this orthogonal plane intersects the sphere si along a circle. Computing this circle to each sphere, neighboring spheres are connected by cubic polynomial surface patches touching the spheres along these contact circles. Now let us consider the details. At first we have to determine the touching circle ci on the sphere si with center o˜ i and radius r˜i (i = 1, . . . , n) (c.f. Figure 2). For the moment, let us consider the spheres si , where i = 2, . . . , n − 1, that is we exclude the first and the last sphere. Consider the plane Pi determined by the centers oi−1 , oi , oi+1 of the considered sphere and its direct neighbours. (If the centers are collinear, Pi can be chosen as an arbitrary plane passing through them.) Intersecting the spheres by this plane we obtain three circles. Here we note, that the assumptions given in def. 1. also yield i+1 [ c j , i = 2, .., n − 1 ri