editable polycube map for gpu-based subdivision...

8
Editable Polycube Map for GPU-based Subdivision Surfaces Jiazhi Xia †∗ Ismael Garcia ‡∗ Ying He Shi-Qing Xin Gustavo Patow School of Computer Engineering, Nanyang Technological University, Singapore. Geometry and Graphics Group, University of Girona, Spain. (a) User sketches (b) Automatic segmentation (c) Polycube map (d) GPU subdivision displacement Figure 1: The proposed method allows the users to easily edit and control the polycube map by sketching the features/constraints on the 3D model and the polycube. The generated polycube map is conformal and with low area distortion, thus facilitates some graphics applications such as GPU-based displacement mapping. Abstract In this paper we propose an editable polycube mapping method that, given an arbitrary high-resolution polygonal mesh and a sim- ple polycube representation plus optional sketched features indicat- ing relevant correspondences between the two, provides a uniform, regular and artist-controllable quads-only mesh with a parameter- ized subdivision scheme. The method introduces a global parame- terization, based on a divide and conquer strategy, which allows to create polycube-maps with a much smaller number of patches, and gives much more control over the quality of the induced subdivi- sion surface. All this makes it practical for real-time rendering on modern hardware (e.g. OGL 4.1 and D3D11 tessellation hardware). By sketching these correspondence features, processing large-scale models with complex geometry and topology is now feasible. This is crucial for obtaining watertight displaced Catmull-Clark subdivi- sion surfaces and high-quality texturing on real-time applications. Keywords: Digital geometry processing, surface parameteriza- tion, polycube map, GPU subdivision surface. 1 Introduction The motivations for this work come from two different, but related origins. On one side, it is a well known fact that most artists pre- fer modeling with quads, as quad geometry provides a better flow, tessellates cleaner and deformations under animation that are no- ticeably smoother, especially around joints [Oliverio 2006]. On the other side, hardware-supported tessellation is already feasible and provides much faster model visualization than traditional meth- ods [Loop et al. 2009], and graphics card hardware designers have added specialized programmable units for the task (Shader Model 5 hardware) [Tatarchuk 2008] . J. Xia and I. Garcia contributed equally to this project. Tarini et al. [2004] pioneered the concept of polycube maps as a technique to parameterize 3D shapes to the polycube domain, which is a natural generalization of the cube space and can be use- ful for the parametric domain of shapes with complicated topology and geometry. Compared to other global surface parameterization techniques, a polycube map has two unique features that make them promising for graphics applications. First, the parametric domain has a regular structure that naturally supports quadrangulation. The parametric domain can be easily constructed and visualized. Sec- ond, the singularities (polycube corners) have fixed structures, i.e., of valence 3, 5 or 6. The reduced number of possible singularities results in a small number of topological combinations. Constructing a polycube map is a challenging work. From the users’ point of view, an ideal polycube mapping algorithm should have at least the following features: Quality: the map is a bijection with low angle and area distortion. User control: the user can eas- ily control the mapping by specifying optional features on the 3D model and their desired locations on the polycube domain. Perfor- mance: the algorithm is efficient, robust, and automatic except for the editable user-specified constraints to control the map. There are several approaches to construct a polycube map- ping [Tarini et al. 2004; Wang et al. 2007; Wang et al. 2008; Lin et al. 2008; He et al. 2009]. Unfortunately, none of them has all the desired features. For instance, [Tarini et al. 2004] does not guarantee a bijection, [Wang et al. 2007; Lin et al. 2008; He et al. 2009] do not allow user control. [Wang et al. 2008] requires a large amount of user interaction to specify the polycube structure on the 3D model and is not suitable for large-scale models with complicated geometry and topology. More importantly, none of them allows the users to edit the polycube map in an easy and intuitive fashion: In general, current tools for editing in planar parametric domains can be awkward to use. On the other hand, editing on a polycube, which more closely resembles the gross structure of the model, could indeed be simpler, especially where the user is allowed to control the rough shape of the mapping. In this paper, we present the editable polycube map to overcome the limitations of the existing approaches. See Figure 1. Our method allows the users to construct the polycube map in an intuitive and easy manner: given a 3D model and its polycube domain , the user is able to sketch features on and to specify feature correspondences. Then, our system will automatically compute the

Upload: others

Post on 14-May-2020

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Editable Polycube Map for GPU-based Subdivision …ggg.udg.edu/publicacions/UsersWebs/igarcia_epcm_i3d2011/...Editable Polycube Map for GPU-based Subdivision Surfaces Jiazhi Xia†∗

Editable Polycube Map for GPU-based Subdivision Surfaces

Jiazhi Xia†∗ Ismael Garcia‡∗ Ying He† Shi-Qing Xin† Gustavo Patow‡

†School of Computer Engineering, Nanyang Technological University, Singapore.‡Geometry and Graphics Group, University of Girona, Spain.

(a) User sketches (b) Automatic segmentation (c) Polycube map (d) GPU subdivision displacement

Figure 1: The proposed method allows the users to easily edit and control the polycube map by sketching the features/constraints on the 3Dmodel and the polycube. The generated polycube map is conformal and with low area distortion, thus facilitates some graphics applicationssuch as GPU-based displacement mapping.

Abstract

In this paper we propose an editable polycube mapping methodthat, given an arbitrary high-resolution polygonal mesh and a sim-ple polycube representation plus optional sketched features indicat-ing relevant correspondences between the two, provides a uniform,regular and artist-controllable quads-only mesh with a parameter-ized subdivision scheme. The method introduces a global parame-terization, based on a divide and conquer strategy, which allows tocreate polycube-maps with a much smaller number of patches, andgives much more control over the quality of the induced subdivi-sion surface. All this makes it practical for real-time rendering onmodern hardware (e.g. OGL 4.1 and D3D11 tessellation hardware).By sketching these correspondence features, processing large-scalemodels with complex geometry and topology is now feasible. Thisis crucial for obtaining watertight displaced Catmull-Clark subdivi-sion surfaces and high-quality texturing on real-time applications.

Keywords: Digital geometry processing, surface parameteriza-tion, polycube map, GPU subdivision surface.

1 Introduction

The motivations for this work come from two different, but relatedorigins. On one side, it is a well known fact that most artists pre-fer modeling with quads, as quad geometry provides a better flow,tessellates cleaner and deformations under animation that are no-ticeably smoother, especially around joints [Oliverio 2006]. Onthe other side, hardware-supported tessellation is already feasibleand provides much faster model visualization than traditional meth-ods [Loop et al. 2009], and graphics card hardware designers haveadded specialized programmable units for the task (Shader Model5 hardware) [Tatarchuk 2008] .

∗J. Xia and I. Garcia contributed equally to this project.

Tarini et al. [2004] pioneered the concept of polycube maps asa technique to parameterize 3D shapes to the polycube domain,which is a natural generalization of the cube space and can be use-ful for the parametric domain of shapes with complicated topologyand geometry. Compared to other global surface parameterizationtechniques, a polycube map has two unique features that make thempromising for graphics applications. First, the parametric domainhas a regular structure that naturally supports quadrangulation. Theparametric domain can be easily constructed and visualized. Sec-ond, the singularities (polycube corners) have fixed structures, i.e.,of valence 3, 5 or 6. The reduced number of possible singularitiesresults in a small number of topological combinations.

Constructing a polycube map is a challenging work. From theusers’ point of view, an ideal polycube mapping algorithm shouldhave at least the following features: Quality: the map is a bijectionwith low angle and area distortion. User control: the user can eas-ily control the mapping by specifying optional features on the 3Dmodel and their desired locations on the polycube domain. Perfor-mance: the algorithm is efficient, robust, and automatic except forthe editable user-specified constraints to control the map.

There are several approaches to construct a polycube map-ping [Tarini et al. 2004; Wang et al. 2007; Wang et al. 2008;Lin et al. 2008; He et al. 2009]. Unfortunately, none of themhas all the desired features. For instance, [Tarini et al. 2004]does not guarantee a bijection, [Wang et al. 2007; Lin et al. 2008;He et al. 2009] do not allow user control. [Wang et al. 2008]requires a large amount of user interaction to specify the polycubestructure on the 3D model and is not suitable for large-scale modelswith complicated geometry and topology. More importantly, noneof them allows the users to edit the polycube map in an easy andintuitive fashion: In general, current tools for editing in planarparametric domains can be awkward to use. On the other hand,editing on a polycube, which more closely resembles the grossstructure of the model, could indeed be simpler, especially wherethe user is allowed to control the rough shape of the mapping.

In this paper, we present the editable polycube map to overcome thelimitations of the existing approaches. See Figure 1. Our methodallows the users to construct the polycube map in an intuitive andeasy manner: given a 3D model M and its polycube domain P ,the user is able to sketch features on M and P to specify featurecorrespondences. Then, our system will automatically compute the

xiajiazhi
Sticky Note
Marked set by xiajiazhi
xiajiazhi
I3D
Page 2: Editable Polycube Map for GPU-based Subdivision …ggg.udg.edu/publicacions/UsersWebs/igarcia_epcm_i3d2011/...Editable Polycube Map for GPU-based Subdivision Surfaces Jiazhi Xia†∗

map in such a way that the features on M are mapped to the user-specified locations on P . Later on, the user is allowed to edit thefeatures on M , P or both, providing fine-grained control over themapping. This way, the editable features can help to mark and pre-serve sharp features on the polycube-mapped subdivision scheme.

We demonstrate the proposed editable polycube map frameworkto GPU-friendly interpolative subdivision surfaces. The positiveproperties enumerated above allow an extremely efficient imple-mentation of GPU-based subdivision surfaces. Also, the reducednumber of combinations, together with watertight sampling, allowfor a continuous subdivision method that smoothly integrates withcurrent production pipelines. Finally, we are able to provide coarseregular base meshes with a reduced memory footprint.

The whole process should be compared with the traditional workartists do to create a model to be used in an environment like a com-puter game, which usually requires a subdivision scheme to be usedwith modern tessellation hardware. In general, if the new modelis based on an existing model, for instance obtained from a laserscanning process, the final model generation implies manually per-forming re-topology operations on a subdivision-based representa-tion, and then transfer corresponding details by normal projection,which do not ensure bijectivity. Usually, artists start from a coarsebase model, quite often sculpted using a polycube as base mesh.Then, the model is imported into an application like ZBrush [2010]and further subdivided with a couple of steps of Catmull-Clark sub-division. From this moment on, the artist has to model/transfer thefine-grained details onto the final model. Obviously, this is a time-consuming and quite redundant procedure. Our proposal is to avoidthis by quickly establishing a bijective correspondence between thecoarse polycube and the input model, and then creating the sub-division scheme on the polycube-based model by transferring thedetails of the high-resolution input model. The resulting model willhave all the enumerated properties and would be ready for usage ina production environment with a minimal user interaction.

The specific contributions of this paper include:

∙ We present a method that, from a general mesh, creates a high-quality and artist-controllable polycube map in an efficientand intuitive manner. Our method allows the users to easilymodify the map and fine-tune the mapping. The user is alsoable to control the number of patches in the base mesh of thesubdivision scheme by the construction of the base polycube.The provided polycube doesn’t need to accurately resemblethe shape of the object. In fact, coarse polycubes are enough.

∙ We provide a subdivision scheme specially built for quadpatch-based tessellation at the GPU for object and characterrendering. Also, this scheme provides a reduced number oftopology combinations thanks to the low number of valencepossibilities (only 3, 5 or 6), which is very important in termsboth of memory footprint and of the texture fetching band-width, which strongly affects performance.

The remaining of the paper is organized as follows: Section 2 re-views related works on polycube map, surface quadrangulation andhardware based tessellation. Then, Section 3 presents the details ofour editable polycube map framework. After that, Section 4 showsthe experimental results and discussions. Finally, Section 5 drawsthe conclusion and discusses our future work.

2 Related work

Tarini et al. [2004] pioneered the concept of polycube maps. Theyroughly approximated the input 3D model by a polycube, and thenconstructed its dual space. By carefully examining the different

configurations that can occur in a non-empty cell, they designed sixprojection functions that map the points inside a cell of the dualspace to the polycube surface. These projection functions are ele-gantly designed to guarantee a globally continuous map. However,their method does not produce a bijective mapping since two ver-tices on the same projection line share the same image, which is afundamental feature for a large range of applications. Furthermore,their method has strict requirements on the shape of the polycube,like that the dual space should completely enclose a slightly modi-fied version of the input model in an intermediate coordinate space.Rather than projecting the 3D surface to the polycube, Wang etal. [2007] introduced an intrinsic approach that first maps the 3Dmodel and the polycube to the canonical domain (e.g., sphere, eu-clidean plane or hyperbolic disc), and then seeks the map betweenthe two canonical domains. The resulting polycube map is guaran-teed to be a diffeomorphism. However, in this scheme it is difficultto control the polycube map, i.e., a feature on the 3D model may notbe mapped to a desired location on the polycube. In their follow-upwork, Wang et al. [2008] proposed the user-controllable polycubemap where the users can specify the pre-images of the polycubecorners. Their method works well for shapes with simple geome-try and topology, but is not feasible for complicated models sinceit is very tedious and error-prone to specify the polycube structuremanually. Instead, the method presented here provides much moreuser control, which allows us to create polycube maps with a muchsmaller number of patches, and gives much more control over thequality of the induced subdivision surface, which is what makes thismethod practical for real-time rendering on modern hardware.

It is known that the polycube map quality (in terms of angle andarea distortion) highly depends on the shape of the polycube. Therehave been some research efforts that aim to construct the polycubeautomatically [Lin et al. 2008; He et al. 2009]. These techniquesusually break down the input model into smaller and simpler com-ponents and then use polycube primitives to approximate each one.For example, the Reeb graphs [Lin et al. 2008] and harmonic func-tions [He et al. 2009] can be used to guide the shape segmentation.As heuristics are usually used in the segmentation and polycubeapproximation, these approaches may not work for models of com-plicated geometry and topology. As we mentioned before, none ofthe existing algorithms allows the users to easily edit the maps.

Our work is also related to quadrangulation which has been studiedextensively in the past few years. There are a number of excellentalgorithms for the automatic or semi-automatic quadrangulationof arbitrary simplicial 2-manifolds, such as [Dong et al. 2006],[Tong et al. 2006], [Kalberer et al. 2007], [Huang et al. 2008],[Ray et al. 2009], [Bommes et al. 2009]. These constructed quadscan nicely align the principal directions. Litke et al. [2001]developed a technique to fit Catmull-Clark subdivision surfaces toa given shape within a prescribed tolerance, based on the methodof quasi-interpolation. However, the subdivision scheme mustbe known beforehand, and it does not represent a continuousparameterization, as our method does.

In the last few years there has been a growing trend to use thetessellation capabilities of modern graphics hardware to generatehigh-resolution models from a coarse base mesh [Bunnell 2005][Tatarchuk 2008]. Loop et al. [2009] and Castano [2008b]presented a method for approximating subdivision surfaces withhardware-accelerated parametric patches, but their method presentssome disparity between the surface mesh they created and the onethat is rendered in realtime, while our method presents a uniform,regular and artist-controllable quads-only mesh with a parameter-ized subdivision scheme, which fits nicely into their pipeline be-cause of the low number of combinations it generates, but also pro-vides a number of already-mentioned benefits for the artist.

Page 3: Editable Polycube Map for GPU-based Subdivision …ggg.udg.edu/publicacions/UsersWebs/igarcia_epcm_i3d2011/...Editable Polycube Map for GPU-based Subdivision Surfaces Jiazhi Xia†∗

Another related topic is cross parameterization. Recently,many algorithms are developed for building the mappings be-tween general surfaces of same topology. A common ap-proach is to parameterize the models over a common basemesh [Lee et al. 1999; Michikawa et al. 2001; Praun et al. 2001;Kraevoy and Sheffer 2004]. In this approach, the meshes are splitinto matching patches, each set of which is then parameterized ona common planar domain. A given set of matching feature pointsserve as the corners of patches and the feature correspondences. Inparticular, Yeh et al. [2010] proposed an interactive interface forcorrespondence placement. However, all the above approaches usepoints as the feature correspondence, while our method supportsuser sketches. In practice, we find it more intuitive to draw featurelines than to place points.

3 Editable Polycube Map

3.1 Overview

As mentioned, the objective of the proposed technique is, startingfrom a high-resolution model coming either from an artist or a 3Dscanner (plus its cleaning stage), to build a new subdivision schemethat allows user control over a reduced number of singularities, andhave that model ready for seamless texturing, watertight displace-ment, etc. This should be done in an artist-controllable way, usingonly quads, and without wasted space in texture space.

Our input is a high-resolution model plus a simple polycube rep-resentation, which is constructed manually by the users1. By con-trolling the position and location of the cubes, and by providingadditional controlling sketches, the user has control at all timesover the number and location of the singular vertices in the result-ing quads-only mesh. Then the user-specified features are sampledwith points, from which we compute the shortest distance for eachother sampled point using multi-source Dijkstra’s shortest path al-gorithm. Although the computed distance field induces a triangu-lation on the 3D model, the path between two points is not straightand the resulting patch can have a complex non-triangular shape. Toensure the quality of the triangulation, we compute the geodesic tri-angulation on the polycube by using the correspondence of the user-specified features on the 3D model and the polycube. This way,the resulting triangulation is smoother and more visually pleasingthan the one that could be obtained directly from the multi-sourceDijkstra computation. After that, both shapes are segmented intogenus-0 patches, keeping an identification between the segments inthe polycube and in the high-resolution model. We compute themap between each pair of patches using a series of harmonic maps.By setting the boundary conditions carefully, the computed map isguaranteed to be continuous along the cutting boundaries. Finally,a simple and effective global diffusion algorithm is applied to im-prove the map quality. The resultant map is bijective and satisfiesthe user-specified constraints.

The polycube map induces a quad-remeshed version of the high-res model. An immediate benefit is that the patches of the result-ing remeshed model come from tessellated squared faces, so a verylow-resolution version of the model can be built from the originalpolycube faces. This low-resolution model not only has quads as itsonly primitive, but also has only vertices with a small and restrictedvalence number, only 3, 4, 5 and 6. This low-resolution model isthe basis of our subdivision scheme, see Section 3.4.

Then, polycube texture mapping is performed, working only withthe polycube version of the model, and consists of creating a 2D

1Many commercial softwares, such as Maya and 3ds Max, allow the

users to do this easily.

texture atlas which contains all externally visible polycube faces,which is an easy task as the previous step already kept only thevisible faces that are not shared by more than one cube. To buildthe atlas, we just placed each face in consecutive squares in the finaltexture atlas.

Finally, in runtime, only the very low-resolution model needs tobe sent to the GPU, along with the texture maps built in the pre-processing, to generate a continuous subdivision scheme with allthe benefits mentioned in Section 1. As the very low-resolutionmodel can be animated, its run-time tessellated version also can. Itis important to mention that the user/artist has full control over theprocess through the segmented input polycubes, the sketched fea-tures and the segmentation step, and can introduce further tweak-ing in the processed mesh without the need to re-parameterize themodel. The entire pipeline is illustrated in Figure 2.

3.2 Constructing Polycube Map

The input model M for the method presented in this paper comesfrom two kinds of possible input models: a model from a 3D scan-ner, after a cleaning pass, or a high-resolution model created di-rectly by an artist.

Along with the high-resolution model, the artist/modeler shouldalso provide a polycube surface P that follows the shape of the orig-inal model. This polycube model can be coarse or fine, both beingable to create a good dual parameterization of the original mesh,but depending on how fine P model is, it would be much easier tocapture high frequency details in the final tessellated model.

3.2.1 Segmentation

The divide-and-conquer approach [He et al. 2009] constructs thepolycube map by breaking down the model into genus-0 patchesand then computing the piecewise map independently. Althoughtheir method is able to divide the model in automatically, all cut-ting planes are horizontal. Thus, the segmentation highly dependson the orientation of the model and may result in too many smallpatches, and the cutting boundary may not represent any feature.

In our framework, the users are allowed to sketch the features freelyon the models. Here we assume that the user-specified features areconsistent. For example, as shown in Figure 2(b), the user sketchesa few features on the 3D model M , and the same number of featuresmust be specified on the polycube P . Furthermore, the spatial re-lation of the features should be consistent in the sense that they arealigned in a similar order, otherwise, the induced harmonic mapsmay not be matched.

Our segmentation algorithm is as follows:

Step 1. Given the user-specified sketches, i ∈ M , ′

i ∈ P ,i = 1, ⋅ ⋅ ⋅ , n, we sample the sketches with set of points. Let

S = {pj}mj=1 and S′ = {p

j}mj=1 denote the sample points on

M and P respectively.

Step 2. Use pj ∈ M , j = 1, ⋅ ⋅ ⋅ ,m, as source points and com-pute the shortest distance for every point on M using multi-sourceDijkstra’s algorithm. So each vertex v is associated with a distanced(v, pj) where pj is the closest sample point to v. Let c(v) ∈ S bethe closest sample point of vertex v.

Step 3. Consider each mesh edge eij = (vi, vj), where vi and vjare neighboring mesh vertices. If c(vi) ∕= c(vj), let s1 = c(vi) ands2 = c(vj) be the two sample points. Mark the two sample pointss1 and s2 as neighbors.

Step 4. For every pair of sample points si and sj which are markedas neighbors, find the shortest path between s1 and s2. It can be

Page 4: Editable Polycube Map for GPU-based Subdivision …ggg.udg.edu/publicacions/UsersWebs/igarcia_epcm_i3d2011/...Editable Polycube Map for GPU-based Subdivision Surfaces Jiazhi Xia†∗

(a) (b) (c) (d) (e)

Figure 2: Algorithmic pipeline. (a) The user sketches constraints on the 3D model M and polycube P . (b) Black dots are sample pointson these constraints. (c) We compute the distance fields using the samples as sources. (d) The distance fields induce a triangulation on M .Using the correspondence of the sketches, we compute the geodesic triangulation on P , so the model can be cut into genus-0 patches. Wecompute the constrained map between each pair of patches such that constraints are mapped consistently. With a carefully designed boundarycondition, the two maps can be glued seamlessly. (e) The iso-parametric line on M : On top the base level of the subdivision surface.

shown that two shortest paths can only meet at the regions of thetwo ending sample points. Then on the polycube P , compute the

geodesic between s′

i and s′

j .

Step 5. Segment M and P along the computed shortest path andgeodesic path.

In the above algorithm, we compute a distance field on the 3Dmodel M using the user sketched constraints. As shown in Fig-ure 3, this distance field naturally induces a triangulation on M .

(a) (b) (c) (d)

Figure 3: Distance field based on multi-source Dijkstra’s algo-rithm and its induced triangulation. Black dots in (a) are samplepoints on the user sketches (color curves). Using these samplesas sources, we compute the Dijkstra’s based distance field on themodel, as shown in (b) (warm colors mean small distance to thesources, cold colors are large distances). Curves in (c) are theshortest paths between sample points, which induces a triangula-tion on M . By using the correspondence of the user sketches, in (d)we construct the geodesic triangulation on the polycube P .

3.2.2 Constrained map

Let Pi ∈ P and Mi ∈ M be the pair of segmented patches, eachof which is a genus-0 surface with only one boundary. We wantto find a bijective and smooth map � : Mi → Pi. Rather thancomputing the map directly, we first parameterize Mi to the unitdisc using harmonic map, i.e., f : Mi → D such that △f = 0 andf maps the boundary of Mi to the boundary of D using arc lengthparameterization, f(∂Mi) = ∂D. Similarly we also parameterizePi to the unit disc using harmonic map g : Pi → D. More detailsof discrete harmonic map could be found at [Eck et al. 1995].

Then we seek a smooth map between two unit discs ℎ : D → D.This map ℎ is also computed using harmonic map △ℎ = 0 and

the boundary condition is set as follows: Let s1, s2 and s3 be thesample points on ∂Mi, and f(sj) ∈ ∂D, j = 0, 1, 2 be the images

on the boundary of unit disc. Similarly, let g(s′

j) ∈ ∂D be the

images of the sample points s′

j ∈ Pi. Then we require the function

ℎ maps f(sj) to g(s′

j), i.e., ℎ ∘ f(sj) = g(s′

j), j = 0, 1, 2. Theimages for the points between f(sj) and f(s(j+1)%3), j = 0, 1, 2,are computed using arc length parameterization.

Finally, the polycube parameterization is given by the compositemap � = f ∘ ℎ ∘ g−1 as shown in the following commutativediagram:

Mi Pi

D D

-�

?

f

?

g

-

Figure 4 demonstrates the results of constrained map. User cantake full control of the polycube map using simple sketches as theboundary condition.

Figure 4: The users can take full control of the polycube map bysimple sketches. The thumbnails show the sketched constraints.

3.2.3 Globally smoothing map

We glue the piecewise maps �i : Pi → Mi together. Withthe above boundary conditions, the maps are consistent along theboundaries which can be glued seamlessly. The resulting map ∪i�i

guarantees to be C0 continuous along the segmentation boundaries.

We use Laplacian smoothing [Field 1988] to improve the continuityalong the segmentation boundaries. Given the initial polycube map� : P → M , let p′ = �(p) ∈ M denote the image of p ∈ P . Then

Page 5: Editable Polycube Map for GPU-based Subdivision …ggg.udg.edu/publicacions/UsersWebs/igarcia_epcm_i3d2011/...Editable Polycube Map for GPU-based Subdivision Surfaces Jiazhi Xia†∗

(a) initial (b) 100 (c) 500 (d) 2000map iterations iterations iterations1.151 1.125 1.105 1.087

Figure 5: Smoothing the polycube map. The initial map has onlyC0 continuity along the segmentation curves and user-specifiedfeatures. Thus, one can clearly see the large distortion and un-smoothness in (a). Using the Laplacian smoothing algorithm, thedistortion smoothly spreads out over the entire model, see (b)-(d).The values are the angle distortions. The step length � = 0.05.

we solve the following diffusion function:

∂p′(t)

∂t= −(△p′(t))∥, (1)

where v∥ = v − (v,n)n is the tangent component of v, n is thenormal vector and (, ) is the dot product.

Since the given polycube map � is represented in a quadrilateralmesh induced by the tessellation of the polycube in which eachquad in P is a square, we use the following Laplace operator:

△ p′ = p′ −1

m

pq is edge

q′, (2)

where m is the valence of p.

Figure 6: Interactive editing of the polycube map. Initially, theuser only draws three features on the mouth, ears and tail. As aresult, the horse head, body and tail are parameterized well, butthe four legs are poorly sampled. Then the user can improve themap quality by specifying additional features on the feet. Finally,the whole model is parameterized well.

The above diffusion equation can be solved easily using the Eulermethod. We set the step length � = 0.05 in our experiments.

Following [Degener et al. 2003; Tarini et al. 2004], we measure themap quality in terms of angle and area distortions which integrateand normalize the values �1�2 + 1/�1�2 and �1/�2 + �2/�1,where �1 and �2 are the singular values of the Jacobian matrixof �. �angle = �area = 1 when the map � is isometric. Asshown in Figure 5, our method leads to visually pleasing resultsin only a few hundred iterations. Khodakovsky et al. [2003] in-troduced a globally smooth parameterization method. Particularly,our globally smooth algorithm is designed for polycube mapping,while their method is for mapping between triangle shaped patches.

3.3 Texture Mapping and run-time data generation

For any further processing, we should provide a map from the poly-cube space to regular texture space, a process that only needs thepolycube texture coordinates of the model. With them, a 2D textureatlas is created containing the textures corresponding to all visi-ble polycube faces, in a similar way to the proposal by Cohen atal. [1998]. As already mentioned, this is an easy task as the previ-ous steps already discarded internal faces shared by more than onecube. Once the visible faces are found, they are placed in consecu-tive squares in the final texture atlas. Each vertex in the model is as-signed its respective texture coordinates in the atlas, thus smoothlyintegrating texturing to the polycube mapping process.

Once the mapping stage has finished, we are have a bijective map-ping between the tiles in texture space (one for every patch) andthe artist-provided high-resolution 3D geometry. Probably, theartist also provided normal maps, color maps, specular maps, etc.We have developed a completely automatic scheme that transfers(bakes) that information to texture tiles, and encodes them alongwith the subdivision information. Traditionally, applications likeZBrush [2010] perform an explicit projection over different reso-lution versions of the same model, but this can have serious prob-lems with an arbitrary simplification scheme. In our case, as wehave defined a dual parameterization, this is done in an automaticway without losing any detail in the process. To do it, we rasterizeeach high-resolution patch into its associated texture space, savingthe required information (normals, occlusion maps, etc). Specialcare should be taken when doing this process with the displace-ment maps, either if they are scalar displacement along the surfacenormal or full 3D displacements, as we also need to have accessto neighboring patches to correctly generate this information. Thewhole process can easily be done with tools like XNormal [2010].

3.4 GPU-based subdivision displacement

The previous sections explained how to build the bijective map-ping between the model and the polycube-map. Now, we needto explain how the induced subdivision surface is built. Ingeneral, we can generate a parameterized subdivision schemewhich can be effectively used in any graphics application likecomputer-generated movies, as well as real-time applications.In our implementation, as the bijection has already been es-tablished, we only need to recover the coarse quads from thepolycube-mapped model. In order to do that we (re-)constructedthe Catmull-Clark Subdivision scheme with the algorithm de-scribed in [Lanquetin and Neveu 2006], which allows to obtain avalid Catmull-Clark subdivision scheme for filming rendering andprepare the approximate Catmull-Clark [Loop and Schaefer 2008]data structures (textures & base mesh) for the real-time subdivision.

Later on, in real time applications, we use the subdivision algorithmpresented by Loop and Schaefer [2008], following the implemen-

Page 6: Editable Polycube Map for GPU-based Subdivision …ggg.udg.edu/publicacions/UsersWebs/igarcia_epcm_i3d2011/...Editable Polycube Map for GPU-based Subdivision Surfaces Jiazhi Xia†∗

Figure 7: GPU-based subdivision displacement. Top left: our basemesh (level 0 of the subdivision scheme). Top middle: patch struc-ture we associate with the subdivision surface (green patches con-tain only valence 4 vertices, and the darkness of the orange levelsshows the number of extraordinary vertices, darker patches havingthe greater number). Bottom left: the base mesh superimposed tothe approximate Catmull-Clark subdivision surface in grey. Bot-tom middle: In lilac, the subdivision surface. Right Column: thesubdivision surface with GPU-based subdivision displacement (theiso-parametric curves can be seen in the top right).

Table 1: Comparison of polycube map construction methods. Sym-bols: good, G# fair, # poor.

Tarini Wang Wang Lin He Our

Features [2004] [2007] [2008] [2008] [2009] method

Map quality G# G#

Bijection #

User control # # G# # #

Editing # # # # #

Polycube construction # # # #

Automatic # #

Large models # # # G#

Arbitrary topology # # # # G# G#

tation described by Castano [2008b]. The method presented here isparticularly well suited for this implementation as we only generatevertices with valences 3,4,5 or 6. In this implementation, domainshaders (or vertex shaders when using instanced tessellation) areresponsible for providing the final position of each new vertex fromthe tessellated mesh.

In order to have watertight sampling of the displacement map, wedefine, for each patch, the one who “owns” every single edge andcorner [Castano 2008b; Castano 2008a]. This way, all patches arecoordinated with respect to what texture coordinate to use whensampling the displacement map. In practice, this amounts storing,for every edge and for every corner, the texture coordinates of theowner of those features (4 texture coordinates per vertex). At run-time, only a single texture sample is needed; and the correspondingtexture coordinate can be selected with a simple calculation.

Geometry image tessellation is also an interesting option that be-comes subcase of our strategy, but it is a technique mainly intendedfor static and not too large objects. With geometry images, no tex-ture coordinate-specific information is required, sufficing just theownership data to compute everything in the respective shaders.

4 Results and Discussion

We tested our method with a wide-range of models with variousgeometry and topology configurations as shown in Fig. 10. Table 2

Table 2: Statistics of experimental results. #△: # of triangles inthe input mesh; #□: # of squares in the polycube of base level; l:# of subdivision levels for the high-resolution polycube; nc: # ofcorners in P ; nf : # of user-specified features; T : time measuredin seconds; �1: angle distortion; �2: area distortion.

#△ #□ l nc nf T �1 �2

Armadillo 346K 1012 6 82 28 148 1.16 1.18

Arthur 252K 57 7 12 5 76 1.02 1.13

Bunny 144K 452 4 22 6 35 1.01 1.13

Horse 67K 436 5 28 8 11 1.04 1.07

Lucy 526K 980 5 38 15 210 1.12 1.23

Skull 52K 24 7 8 3 7 1.02 1.06

Tylo head 500K 920 5 32 12 194 1.10 1.25

Isidore Horse 151K 74 8 14 6 48 1.01 1.07

shows the statistics of our experiments. Figure 6 shows an exampleof interactive editing of the polycube map of the horse model.

A good global bijective parameterization is very importantfor modeling and texturing, as typical projections as used in[Tarini et al. 2004] unavoidably have problems since two verticeson the same projection line share the same image, something thatproduces artifacts that are clearly visible in Figure 8.

Figure 8: Comparison of the bijectivity between the editable poly-cube map and the original polycube implementation, at the left theoriginal [Tarini et al. 2004]. Top row: insets of the Armadillohead. Bottom row: insets of its feet. As we can see, non-bijectivityin [Tarini et al. 2004] results in a dependence of multiple points onthe mesh with a single point in texture space: painting this singlepoint stains other places than the one originally intended.

We also quantitatively compared our methods with existing meth-ods like [Tarini et al. 2004], [Wang et al. 2007], [Wang et al. 2008]and [He et al. 2009] as shown in in Table 1 and Figures 8 and 9.[Tarini et al. 2004] is efficient for large scale models, but it can notguarantee the bijectivity due to the projection of the 3D model tothe polycube, and may result in some undesired artifacts in texturemapping and painting, see Figure 8. [Wang et al. 2007] computedthe polycube map in an intrinsic way by conformally parameter-izing M and P to canonical domains and then seeking the mapbetween them. For a genus-0 shape with complex geometry (likethe Armadillo), the conformal spherical parameterization has verylarge area distortion on the elongated parts (e.g. arms, legs andtail). Thus, the induced map also has a large area distortion withuneven sampling. [Wang et al. 2008] required to manually specifythe images of the polycube corners and edges on the 3D model andthen computed the map for each polycube face individually. Theuser-defined polycube structures on M can be considered as ourconstraints. However, it is very tedious and error-prone to specifythem manually if the polycube is complicated, which precludes itsusage for large-scale models. Furthermore, the user can not specifyother features or constraints in [Wang et al. 2008]. Automatic ap-

Page 7: Editable Polycube Map for GPU-based Subdivision …ggg.udg.edu/publicacions/UsersWebs/igarcia_epcm_i3d2011/...Editable Polycube Map for GPU-based Subdivision Surfaces Jiazhi Xia†∗

proaches as [Lin et al. 2008; He et al. 2009] use heuristics and maynot work well for complex models. In [He et al. 2009], both M andP are segmented by horizontal cutting planes, and the cutting locusserve as constraints. Thus, the generated map is orientation depen-dent. Due to the complex geometry of the Armadillo, e.g., the armsare not axis aligned, there are large distortions on the upper armsand shoulder, see Figure 9. Compared to the existing approaches,our method is more intuitive and flexible in terms of user controland editing, and can generate better quality polycube-maps.

1.32 1.35 1.29 1.25 1.161.22 88.62 1.24 1.23 1.18

Figure 9: Comparisons of our method with [Tarini et al. 2004],[Wang et al. 2007], [Wang et al. 2008] and [He et al. 2009]. Weuse the same polycube to make the comparison fair. Our methodis more intuitive and flexible in terms of user control and editing,and can generate polycube map of better quality. The values beloweach figure are the angle and area distortions.

Discussions We want to emphasize the differences between ourmethod and [He et al. 2009]. They first segmented the 3D modeland polycube by horizontal planes, computed a map between eachpair of segmented components, and finally smoothed the map bysolving a harmonic map for the entire shape. Although using thesame divide-and-conquer strategy, our method is completely dif-ferent in all the following steps: First, since the cutting loci arealso the constraints of the map, [He et al. 2009] can only map thehorizontal, planar features from the 3D model. Our segmentationallows the users to cut the model by arbitrary closed curves, result-ing in more flexible and meaningful constraints. Furthermore, ourmethod supports the user control and editing that are not providedin [He et al. 2009]. Second, [He et al. 2009] mapped the segmentedcomponents to the multiply connected rings by an uniformizationmetric, and then computed a harmonic map between the rings. It isknown that computing this metric is a nonlinear time-consumingprocess. Our method computed a harmonic map between twotopological disks, so it is more efficient than [He et al. 2009]. Fi-nally, rather than solving a harmonic map for the entire shape, wesmoothed the whole map by an iterative method to diffuse the angledistortion. As shown in Figure 5, our method is very effective andleads to a high quality map with only a few hundred iterations, asonly very simple vertex operations are involved in each iteration.

It is known that the distortions of polycube parameterizationshighly depend on the shape of the polycube. In general, the moreaccurate its representation, the lower distortion of the map. How-ever, the price to pay is the larger number of extraordinary points(polycube corners). Thus, there is a tradeoff between quality andcomplexity. Through our experiments, we observed that for shapeswith extruding regions, e.g., the Armadillo’s fingers and toes, it isusually a good idea to design an accurate polycube to model thesefeatures. In our framework, we leave the choice to the users.

5 Conclusions

We have proposed a new method that aims to improve the exist-ing ones and develop a very practical and efficient system. From ageneral mesh with optional featured sketches, we create an artist-controllable quads-only mesh with a globally smooth parameteri-zation. The method guarantees that the computed map is bijective

and conformal except at a finite number of extraordinary points (thepolycube corners). As listed in Table 1, our method has most of theuser-desired features: The created mesh is uniform, regular and isgenerated from the base polycube mesh in an automatic manner.During the preprocessing stage, the artist/user is able to control thenumber of patches in the base mesh of the subdivision scheme bythe construction of the base polycube. Then, the artist still has thepossibility of fully controlling the process by sketching correspon-dence lines between the high-resolution model and the polycube.

On the more technical side, as a result of the reduced number oftopology combinations, we are able to have both a small memoryfootprint and a reduced texture fetching bandwidth, which stronglyimproves run-time performance. The result can be tessellated withmodern hardware using instanced tessellation, or with the new pro-grammable units in Shader Model 5 hardware.

Limitations The limitation of the proposed framework lies in thesegmentation step. For models with genus more than one, the usersare required to sketch a loop on each handle explicitly. Then ouralgorithm can cut along the user-specified loops and then automat-ically segment the model into genus-0 patches. We conducted ex-periments for models with non-trivial topology (such as Kitten ofgenus-1 and Happy Buddha of genus-6). In the future, we will im-prove our framework by computing the canonical homology basisautomatically, which can be used as the constraints for segmenta-tion.

Acknowledgements

J. Xia, Y. He and S.-Q. Xin are partially supported by AcRF 69/07 and NRF2008IDM-

IDM004-006. I. Garcia and G. Patow are partially supported by grant TIN2007-67120

from Ministerio de Educacion y Ciencia, Spain. The authors would like to thank the

anonymous reviewers for their comments, I. Castano (NVIDIA Corporation) and F.

Gonzalez for support, and the Stanford 3D Scanning Repository, AIM@Shape, K.

Crane, H. Alvarado, and J. Johnson-Mortimer for the 3D models.

References

BOMMES, D., ZIMMER, H., AND KOBBELT, L. 2009. Mixed-integer quadrangulation. ACM Trans. Graph. 28, 3.

BUNNELL, M. 2005. GPU Gems 2. Addison Wesley, ch. AdaptiveTessellation of Subdivision Surfaces with Displacement Map-ping.

CASTANO, I., 2008. Next-generation rendering of subdivision sur-faces. SIGGRAPH 2008.

CASTANO, I., 2008. Tessellation of subdivision surfaces in direct3d11. Gamefest 2008.

COHEN, J., OLANO, M., AND MANOCHA, D. 1998. Appearance-preserving simplification. In SIGGRAPH ’98, 115–122.

DEGENER, P., MESETH, J., AND KLEIN, R. 2003. An adaptablesurface parameterization method. In IMR ’03, 201–213.

DONG, S., BREMER, P.-T., GARLAND, M., PASCUCCI, V., AND

HART, J. C. 2006. Spectral surface quadrangulation. ACMTrans. Graph. 25, 3, 1057–1066.

ECK, M., DEROSE, T., DUCHAMP, T., HOPPE, H., LOUNSBERY,M., AND STUETZLE, W. 1995. Multiresolution analysis ofarbitrary meshes. In SIGGRAPH ’95, 173–182.

FIELD, D. A. 1988. Laplacian smoothing and delaunay trian-gulations. Communications in Applied Numerical Methods 4,709–712.

Page 8: Editable Polycube Map for GPU-based Subdivision …ggg.udg.edu/publicacions/UsersWebs/igarcia_epcm_i3d2011/...Editable Polycube Map for GPU-based Subdivision Surfaces Jiazhi Xia†∗

Figure 10: More polycube mapping results.

HE, Y., WANG, H., FU, C.-W., AND QIN, H. 2009. A divide-and-conquer approach for automatic polycube map construction.Computer & Graphics 33, 3, 369–380.

HUANG, J., ZHANG, M., MA, J., LIU, X., KOBBELT, L., AND

BAO, H. 2008. Spectral quadrangulation with orientation andalignment control. ACM Trans. Graph. 27, 5, 147.

KALBERER, F., NIESER, M., AND POLTHIER, K. 2007. Quad-cover - surface parameterization using branched coverings. Com-put. Graph. Forum 26, 3, 375–384.

KHODAKOVSKY, A., LITKE, N., AND SCHRODER, P. 2003. Glob-ally smooth parameterizations with low distortion. ACM Trans.Graph. 22, 350–357.

KRAEVOY, V., AND SHEFFER, A. 2004. Cross-parameterizationand compatible remeshing of 3d models. ACM Trans. Graph. 23,861–869.

LANQUETIN, S., AND NEVEU, M. 2006. Reverse catmull-clarksubdivision. In WSCG ’06.

LEE, A. W. F., DOBKIN, D., SWELDENS, W., AND SCHRODER,P. 1999. Multiresolution mesh morphing. In SIGGRAPH ’99,343–350.

LIN, J., JIN, X., FAN, Z., AND WANG, C. C. L. 2008. Automaticpolycube-maps. In GMP’08, 3–16.

LITKE, N., LEVIN, A., AND SCHRODER, P. 2001. Fitting subdi-vision surfaces. In VIS ’01, 319–324.

LOOP, C., AND SCHAEFER, S. 2008. Approximating catmull-clarksubdivision surfaces with bicubic patches. ACM Trans. Graph.27, 1, 1–11.

LOOP, C., SCHAEFER, S., NI, T., AND CASTANO, I. 2009. Ap-proximating subdivision surfaces with gregory patches for hard-ware tessellation. ACM Trans. Graph. 28, 5, 1–9.

MICHIKAWA, T., KANAI, T., FUJITA, M., AND CHIYOKURA, H.2001. Multiresolution interpolation meshes. In PG ’01, 60–69.

OLIVERIO, G. 2006. Maya 8: Character Modeling. Jones &Bartlett Publishers.

ORGAZ, S., 2010. Xnormal. http://www.xnormal.net/.

PIXOLOGIC, 2010. Zbrush. http://www.pixologic.com/.

PRAUN, E., SWELDENS, W., AND SCHRODER, P. 2001. Consis-tent mesh parameterizations. In SIGGRAPH ’01, 179–184.

RAY, N., VALLET, B., ALONSO, L., AND LEVY, B. 2009. Ge-ometry aware direction field processing. ACM Transactions onGraphics 29, 1.

TARINI, M., HORMANN, K., CIGNONI, P., AND MONTANI, C.2004. PolyCube-Maps. In SIGGRAPH ’04.

TATARCHUK, N., 2008. Advanced topics in GPU tessellation.Gamefest’08.

TONG, Y., ALLIEZ, P., COHEN-STEINER, D., AND DESBRUN,M. 2006. Designing quadrangulations with discrete harmonicforms. In SGP ’06.

WANG, H., HE, Y., LI, X., GU, X., AND QIN, H. 2007. Poly-cube splines. In Proceedings of ACM symposium on Solid andPhysical Modeling, 241–251.

WANG, H., JIN, M., HE, Y., GU, X., AND QIN, H. 2008. User-controllable polycube map for manifold spline construction. InProceedings of ACM symposium on Solid and Physical Model-ing, 397–404.

YEH, I.-C., LIN, C.-H., SORKINE, O., AND LEE, T.-Y. 2010.Template-based 3d model fitting using dual-domain relaxation.IEEE Transactions on Visualization and Computer Graphics ac-cepted.