1
Extracting Boolean Isosurfaces from Tetrahedral Meshes Gabriel Taubin * Brown University Peter G. Sibley Brown University Surfaces separating the inside from the outside of most solid ob- jects of interest are piecewise smooth: they can be decomposed into smooth surface patches meeting along smooth boundary curves called creases. Normal vectors are discontinuous across creases, and creases join at their ends forming corners. Rather than identi- fying sharp features in an isosurface with additional Hermite data or detecting large changes in surface normals (see [Ju et al. 2002] and references within), we consider the Constructive Solid Geom- etry (CSG) representation of surfaces as boundaries of regularized Boolean combinations of half spaces. But here each half space is defined by one piecewise linear implicit function inequality. The Boolean Isosurface Algorithm for tetrahedral meshes (TBIso) out- lined in this sketch extends the classical isosurface algorithms for tetrahedral grids from smooth implicit surfaces to volumetric sam- pled CSG surfaces in such a way that the feature lines are identified and extracted as poly-line networks. These feature lines and corners can be preserved during subsequent smoothing and simplification. The figure below shows a Boolean combination of three half spaces within a single tetrahedral cell. A and B show the surface bound- aries of two of the three half spaces (red are positive function values , blue are negative values). C, D, and E show a series of added ver- tices, edges, and faces which are the boundary of the intersection of the three half spaces. Notice that we can have vertices that lie in the interior, faces, edges or even vertices of cells. E shows the final boundary of the CSG combination. Marching Tetrahedra (MT) [Doi and Koide 1991] operates on a tetrahedral grid and one piecewise linear function f (x) defined by its values at the grid vertices. The signs (positive or negative) of the function f at the four grid vertices determines the connectiv- ity (triangle, quadrilateral, or empty) of the isosurface within each tetrahedron. There are 16 = 2 4 cases,which reduces via symmetries to 3 unique cases, these can be stored in a look up table (LUT) in- dexed by a 4-bit signature word composed concatenating the signs of f at the four corners. The locations of the vertices along the grid edges are determined via linear interpolation. TBIso takes as input: (i) a tetrahedral grid, (ii) a collection f 1 ... f N of scalar fields defined at the vertices of the tet-grid (i.e., piece-wise linear functions), and (iii) a Boolean expression b of N variables in disjunctive normal form (b corresponds to a CSG tree whose leaves are functions { f i }). The output is: (i) a polygonal mesh, (ii) a list of crease edges, and (iii) a list of corner vertices. The MT approach of precomputing and storing topology information using a single LUT isn’t feasible here. The possible number of cases for non-trivial Boolean expressions is 2 (2 N -1) - 1 , thus precomputing all cases for even small N is infeasible. Furthermore the topology of the Boolean isosurface depends on function magnitude not just their signs at the vertices of a tetrahedral cell. At run time, we compute three tables which depend on b and the number of variables N and contain par- * e-mail:[email protected] e-mail: [email protected] tial topology information. The first table, which we refer to as the cell to face (C2F) table, exploits the relation that a pair of terms (conjunctions) in b may share a face if they differ a 1-bit. Similar relations for pairs (shared edges, F2E) and triplets (shared vertices, E2V) of bits in terms of b are used to form two other look up ta- bles. These tables use the structure of b to avoid the N 2 overhead of naively clipping every plane determined by f i in a cell against all others for each term in b and forming the union. Then within each cell we evaluate the tables incorporating the function values. We work backwards through E2V, F2E, and C2F. Finally hash ta- bles are used to identify common vertices that lie on cell faces, cell edges or cell vertices to produce an indexed face set representation. Our current implementation uses unstructured tet-grids, however an out-of-core extension would simply require z-sorting the tetrahe- dral grid then working on slices. Our method also handles singular cases when the functions f i and corresponding half spaces aren’t in general position. We’ve performed some initial experiments on several examples. The top figure is a 139K face mesh corresponding to the Boolean isosurface of 4 functions and a boolean expression (in DNF) con- sisting of a 6 terms defined over 12, 290, 298 tet-grid. This tet-grid was generated from a 128 3 regular hexahedral grid. The table con- struction time was 8s and extraction took 15m, on a Xeon 2GHz with 1.5GB of ram. The tagged feature line network shown in green is where halfspaces intersect and are used to preserve creases when applying hierarchical λ |μ smoothing. The faces of the meshes are colored depending on which of the functions they bound. The ACM figure, shows 6 functions on 108, 045 tets with 15 Boolean terms, table construction took 29ms and extraction took 53s. DOI , A., AND KOIDE, A. 1991. An Efficient Method of Triangu- lating Equivalued Surfaces by Using Tetrahedral Cells. IEICE Transactions on Communications and Electronics Information Systems E74, 1, 214–224. J U, T., LOSASSO, F., SCHAEFER, S., AND WARREN, J. 2002. Dual contouring of hermite data. In Siggraph’02, 339–346.

Taubin sibley sg06-tb-iso

Embed Size (px)

Citation preview

Page 1: Taubin sibley sg06-tb-iso

Extracting Boolean Isosurfaces from Tetrahedral Meshes

Gabriel Taubin∗

Brown UniversityPeter G. Sibley†

Brown University

Surfaces separating the inside from the outside of most solid ob-jects of interest are piecewise smooth: they can be decomposedinto smooth surface patches meeting along smooth boundary curvescalled creases. Normal vectors are discontinuous across creases,and creases join at their ends forming corners. Rather than identi-fying sharp features in an isosurface with additional Hermite dataor detecting large changes in surface normals (see [Ju et al. 2002]and references within), we consider the Constructive Solid Geom-etry (CSG) representation of surfaces as boundaries of regularizedBoolean combinations of half spaces. But here each half space isdefined by one piecewise linear implicit function inequality. TheBoolean Isosurface Algorithm for tetrahedral meshes (TBIso) out-lined in this sketch extends the classical isosurface algorithms fortetrahedral grids from smooth implicit surfaces to volumetric sam-pled CSG surfaces in such a way that the feature lines are identifiedand extracted as poly-line networks. These feature lines and cornerscan be preserved during subsequent smoothing and simplification.

The figure below shows a Boolean combination of three half spaceswithin a single tetrahedral cell. A and B show the surface bound-aries of two of the three half spaces (red are positive function values, blue are negative values). C, D, and E show a series of added ver-tices, edges, and faces which are the boundary of the intersectionof the three half spaces. Notice that we can have vertices that lie inthe interior, faces, edges or even vertices of cells. E shows the finalboundary of the CSG combination.

Marching Tetrahedra (MT) [Doi and Koide 1991] operates on atetrahedral grid and one piecewise linear functionf (x) defined byits values at the grid vertices. The signs (positive or negative) ofthe function f at the four grid vertices determines the connectiv-ity (triangle, quadrilateral, or empty) of the isosurface within eachtetrahedron. There are 16= 24 cases,which reduces via symmetriesto 3 unique cases, these can be stored in a look up table (LUT) in-dexed by a 4-bit signature word composed concatenating the signsof f at the four corners. The locations of the vertices along the gridedges are determined via linear interpolation.

TBIso takes as input: (i) a tetrahedral grid, (ii) a collectionf1 . . . fNof scalar fields defined at the vertices of the tet-grid (i.e., piece-wiselinear functions), and (iii) a Boolean expressionb of N variables indisjunctive normal form (b corresponds to a CSG tree whose leavesare functions{ fi}). The output is: (i) a polygonal mesh, (ii) a list ofcrease edges, and (iii) a list of corner vertices. The MT approach ofprecomputing and storing topology information using a single LUTisn’t feasible here. The possible number of cases for non-trivialBoolean expressions is 2(2N−1)−1 , thus precomputing all cases foreven smallN is infeasible. Furthermore the topology of the Booleanisosurface depends on function magnitudenot just their signs at thevertices of a tetrahedral cell. At run time, we compute three tableswhich depend onb and the number of variablesN and contain par-

∗e-mail:[email protected]†e-mail: [email protected]

tial topology information. The first table, which we refer to as thecell to face (C2F) table, exploits the relation that a pair of terms(conjunctions) inb may share a face if they differ a 1-bit. Similarrelations for pairs (shared edges, F2E) and triplets (shared vertices,E2V) of bits in terms ofb are used to form two other look up ta-bles. These tables use the structure ofb to avoid theN2 overheadof naively clipping every plane determined byfi in a cell againstall others for each term inb and forming the union. Then withineach cell weevaluate the tables incorporating the function values.We work backwards through E2V, F2E, and C2F. Finally hash ta-bles are used to identify common vertices that lie on cell faces, celledges or cell vertices to produce an indexed face set representation.Our current implementation uses unstructured tet-grids, however anout-of-core extension would simply require z-sorting the tetrahe-dral grid then working on slices. Our method also handles singularcases when the functionsfi and corresponding half spaces aren’t ingeneral position.

We’ve performed some initial experiments on several examples.The top figure is a 139K face mesh corresponding to the Booleanisosurface of 4 functions and a boolean expression (in DNF) con-sisting of a 6 terms defined over 12,290,298 tet-grid. This tet-gridwas generated from a 1283 regular hexahedral grid. The table con-struction time was 8s and extraction took 15m, on a Xeon 2GHzwith 1.5GB of ram. The tagged feature line network shown in greenis where halfspaces intersect and are used to preserve creases whenapplying hierarchicalλ |µ smoothing. The faces of the meshes arecolored depending on which of the functions they bound. The ACMfigure, shows 6 functions on 108,045 tets with 15 Boolean terms,table construction took 29ms and extraction took 53s.

DOI, A., AND KOIDE, A. 1991. An Efficient Method of Triangu-lating Equivalued Surfaces by Using Tetrahedral Cells.IEICETransactions on Communications and Electronics InformationSystems E74, 1, 214–224.

JU, T., LOSASSO, F., SCHAEFER, S., AND WARREN, J. 2002.Dual contouring of hermite data. InSiggraph’02, 339–346.