Octree-Based Decimation of Marching Cubes Surface (1996)

35
Octree-Based Decimat Octree-Based Decimat ion of Marching Cube ion of Marching Cube s Surface s Surface (1996) (1996) Raj Shekhar Raj Shekhar Elias Fayyad Elias Fayyad Roni Yagel Roni Yagel J. Fredrick Cornhill J. Fredrick Cornhill

description

Octree-Based Decimation of Marching Cubes Surface (1996). Raj Shekhar Elias Fayyad Roni Yagel J. Fredrick Cornhill. Introduction. The Marching Cubes (MC) algorithm has been the most popular one in generating high-quality surface representation. - PowerPoint PPT Presentation

Transcript of Octree-Based Decimation of Marching Cubes Surface (1996)

Page 1: Octree-Based Decimation of Marching Cubes Surface  (1996)

Octree-Based DecimatioOctree-Based Decimation of Marching Cubes Surn of Marching Cubes Sur

face face (1996)(1996)Raj ShekharRaj ShekharElias FayyadElias FayyadRoni YagelRoni Yagel

J. Fredrick CornhillJ. Fredrick Cornhill

Page 2: Octree-Based Decimation of Marching Cubes Surface  (1996)

IntroductionIntroduction

The The Marching CubesMarching Cubes (MC) algorithm has bee (MC) algorithm has been the most popular one in generating high-qn the most popular one in generating high-quality surface representation.uality surface representation.

There is a trade-off between There is a trade-off between surface detailsurface detail a and nd rendering speedrendering speed.. Example: downsampleExample: downsample

Page 3: Octree-Based Decimation of Marching Cubes Surface  (1996)

IntroductionIntroduction

The proposed decimation algorithm uses adaThe proposed decimation algorithm uses adaptive ptive downsamplingdownsampling as way to reduce the rum as way to reduce the rumber of surface primitives. ber of surface primitives. Enhance the performance of the rendererEnhance the performance of the renderer Real timeReal time

It downsamples the volume dataset where the It downsamples the volume dataset where the isosurface is mostlyisosurface is mostly flat flat and maintains high r and maintains high resolution in parts with finer details.esolution in parts with finer details. OctreeOctree

Page 4: Octree-Based Decimation of Marching Cubes Surface  (1996)

IntroductionIntroduction

The algorithm approximates the surface The algorithm approximates the surface with with large triangleslarge triangles at at low frequencylow frequency regions and regions and small trianglessmall triangles at at high high frequencyfrequency regions. regions.

The overall surface quality is controlled The overall surface quality is controlled by the user through the by the user through the error valueerror value..

Page 5: Octree-Based Decimation of Marching Cubes Surface  (1996)

OctreeOctree The use of the octree data structure for this pThe use of the octree data structure for this p

upose is quite crucial.upose is quite crucial.

Root, Intermediate node, Leaf, Branch, LevelRoot, Intermediate node, Leaf, Branch, Level case information, intersection points and child nocase information, intersection points and child no

desdes

Page 6: Octree-Based Decimation of Marching Cubes Surface  (1996)

OctreeOctree Octree node structure:Octree node structure:

Page 7: Octree-Based Decimation of Marching Cubes Surface  (1996)

OctreeOctree If the dataset is XIf the dataset is X**YY**Z in size, the Z in size, the depthdepth of the oct of the oct

ree is about the ree is about the logarithmlogarithm of the maximum of X, of the maximum of X, Y and Z.Y and Z.

The intermediate nodes, at the completion of surThe intermediate nodes, at the completion of surface tracking, do not have a face tracking, do not have a valid casevalid case ( a numbe ( a number between 0 and 255) and intersection points.r between 0 and 255) and intersection points.

There are many empty leaf nodes that do not havThere are many empty leaf nodes that do not have a valid case, either.e a valid case, either.

Page 8: Octree-Based Decimation of Marching Cubes Surface  (1996)

Octree-based decimation AlgorOctree-based decimation Algorithmithm

Surface Tracking

Merging of Cells

Crack Patching

Triangulation

Page 9: Octree-Based Decimation of Marching Cubes Surface  (1996)

Surface TrackingSurface Tracking

Original MC Original MC AlgorithmAlgorithm Cell by cell Cell by cell 15 distinct cases15 distinct cases Linear Linear

interpolationinterpolation TriangulationTriangulation

Page 10: Octree-Based Decimation of Marching Cubes Surface  (1996)

Surface TrackingSurface Tracking

Enhanced MC AlgorithmEnhanced MC AlgorithmBased on the following observations:Based on the following observations:

A very complex surface within a 3D A very complex surface within a 3D dataset pass through only a dataset pass through only a small small percentagepercentage of the total cells. of the total cells.

Exhaustive search of all cubes is unnecessaryExhaustive search of all cubes is unnecessary

PropagationPropagation

Page 11: Octree-Based Decimation of Marching Cubes Surface  (1996)

Surface TrackingSurface Tracking

PropagationPropagation The number of neighboring cubes to visit The number of neighboring cubes to visit

is either 0, 3, 4, 5 or 6.is either 0, 3, 4, 5 or 6. It must be noted that only six out of 15 distIt must be noted that only six out of 15 dist

inct cases avoid visiting all the six neighboinct cases avoid visiting all the six neighboring cubes.ring cubes. Case 0 , 1 , 2 , 3 , 5 , 8Case 0 , 1 , 2 , 3 , 5 , 8

The experience shows that these six cases The experience shows that these six cases account for account for 90%90% of the cases encountered of the cases encountered in extracting an isosurface.in extracting an isosurface.

Page 12: Octree-Based Decimation of Marching Cubes Surface  (1996)

Surface TrackingSurface Tracking

Page 13: Octree-Based Decimation of Marching Cubes Surface  (1996)

Surface TrackingSurface Tracking

PropagationPropagation Look-up tableLook-up table FIFO queueFIFO queue 3D flag array3D flag array

All the elements of the flag array areAll the elements of the flag array are initially initially marked marked not-visitednot-visited..

The cells that are explored have their The cells that are explored have their corresponding flag marked corresponding flag marked visitedvisited..

Page 14: Octree-Based Decimation of Marching Cubes Surface  (1996)

Merging of CellsMerging of Cells

Page 15: Octree-Based Decimation of Marching Cubes Surface  (1996)

Merging of CellsMerging of Cells

Merging is the most important component of Merging is the most important component of this algorithm.this algorithm.

The octree is traversed The octree is traversed level by levellevel by level from from botbottom to toptom to top..

The child nodes under such parent nodes are The child nodes under such parent nodes are evaluated to see if they can be merged togethevaluated to see if they can be merged together based on the er based on the merge criteriamerge criteria explain below. explain below.

Page 16: Octree-Based Decimation of Marching Cubes Surface  (1996)

Merging of CellsMerging of Cells

Merge CriteriaMerge Criteria1.1. All the eight child cells must either All the eight child cells must either

be be simplesimple casescases or or nullnull..

2.2. If the merging If the merging failedfailed somewhere somewhere below the current below the current nodenode, then no merging , then no merging occurs at the current node.occurs at the current node.

3.3. If the parent cell results in If the parent cell results in more more than one than one intersectionintersection on any of its edges, on any of its edges, merging is aborted.merging is aborted.

4.4. AmbiguityAmbiguity

5.5. Error valueError value

Page 17: Octree-Based Decimation of Marching Cubes Surface  (1996)

Merge CriteriaMerge Criteria

All the eight child cells must either be All the eight child cells must either be simplesimple casescases or or nullnull.. A child cell is null if no surface passes A child cell is null if no surface passes

through it.through it. Example: Case 0Example: Case 0

A simple case is one in which the cell has A simple case is one in which the cell has only one connected surfaceonly one connected surface.. Example: Case 1, 2, 5, 8, 9, 11, 14Example: Case 1, 2, 5, 8, 9, 11, 14

Page 18: Octree-Based Decimation of Marching Cubes Surface  (1996)

Merge CriteriaMerge Criteria

If the merging If the merging failedfailed somewhere somewhere below below the current nodethe current node, then no merging occurs , then no merging occurs at the current node.at the current node.

Page 19: Octree-Based Decimation of Marching Cubes Surface  (1996)

Merge CriteriaMerge Criteria

If the parent cell results in If the parent cell results in more than one more than one intersectionintersection on any of its edges, merging on any of its edges, merging is aborted.is aborted.

Page 20: Octree-Based Decimation of Marching Cubes Surface  (1996)

Merge CriteriaMerge Criteria

If the case may result in two edges on at If the case may result in two edges on at least one face of the parent cell.least one face of the parent cell. Having two edges causes Having two edges causes ambiguityambiguity in the in the

patching algorithm.patching algorithm.

+

Case 6 Case 3+ +

+

Page 21: Octree-Based Decimation of Marching Cubes Surface  (1996)

Merge CriteriaMerge Criteria

The last criterion is to test if the error due The last criterion is to test if the error due to merging is with a to merging is with a user-specifieduser-specified limit. limit. If the maximum of such If the maximum of such perpendicular perpendicular

distancedistance is not greater than the is not greater than the permissible permissible errorerror, merging is allowed., merging is allowed.

Page 22: Octree-Based Decimation of Marching Cubes Surface  (1996)

Crack Patching StrategyCrack Patching Strategy

Page 23: Octree-Based Decimation of Marching Cubes Surface  (1996)

Crack Patching StrategyCrack Patching Strategy

CracksCracks are generated at the interfaces of are generated at the interfaces of cells with differing dimensions.cells with differing dimensions.

This is a common problem with adaptive This is a common problem with adaptive subdivisionsubdivision algorithm. algorithm.

Page 24: Octree-Based Decimation of Marching Cubes Surface  (1996)

Crack Patching StrategyCrack Patching Strategy PatchingPatching is accomplished by stretching the is accomplished by stretching the high-high-

resolutionresolution edge to match with the edge to match with the low-resolutionlow-resolution edge. edge.

High-resolution

low-resolution

Page 25: Octree-Based Decimation of Marching Cubes Surface  (1996)

Crack Patching StrategyCrack Patching Strategy

The major steps in patching are the folThe major steps in patching are the following :lowing :1. 1. Traverse the octree in aTraverse the octree in a breadth-first breadth-first

manner.manner.2. 2. If a node with a If a node with a validvalid case is encount case is encount

ered, patching ered, patching is applied to its is applied to its 6-connecte6-connected neighboringd neighboring cells at the cells at the same level of thsame level of the octree.e octree.

Page 26: Octree-Based Decimation of Marching Cubes Surface  (1996)

Crack Patching StrategyCrack Patching Strategy

3. 3. If the neighbor cell does not exist, thIf the neighbor cell does not exist, the current cell e current cell is either on theis either on the edge edge of the of the dataset or is a neighbor dataset or is a neighbor of a of a larger celllarger cell..

4.4. If the neighbor cell exists and hIf the neighbor cell exists and has a valid case, the as a valid case, the neighbor is a cell of tneighbor is a cell of the he same dimensionsame dimension. There is . There is no chance no chance of having a crak problem.of having a crak problem.

Page 27: Octree-Based Decimation of Marching Cubes Surface  (1996)

Crack Patching StrategyCrack Patching Strategy

5.5. If the neighboring cell has child If the neighboring cell has child cells below it, then cells below it, then the child cells have an the child cells have an edge on the common interface edge on the common interface with with the current cell. the current cell.

The end points of that edge are The end points of that edge are moved to fall on the moved to fall on the low resolutionlow resolution edge.edge.

6.6. Patching stops when the Patching stops when the breadth-first traversal stops.breadth-first traversal stops.

Page 28: Octree-Based Decimation of Marching Cubes Surface  (1996)

TriangulationTriangulation

The last step is to output the surface by The last step is to output the surface by triangulation.triangulation.

Forming the surface, therefore, requires Forming the surface, therefore, requires identifying such nodes and identifying such nodes and outputting outputting their intersection pointstheir intersection points following the following the triangulation scheme of the MC triangulation scheme of the MC algorithm.algorithm.

Page 29: Octree-Based Decimation of Marching Cubes Surface  (1996)

ResultsResults

The following three datasets were used for this The following three datasets were used for this work.work.1) 64*64*64 Sphere dataset1) 64*64*64 Sphere dataset2) 128*128*128 MRI head dataset2) 128*128*128 MRI head dataset3) 256*256*256 Table dataset3) 256*256*256 Table dataset

Page 30: Octree-Based Decimation of Marching Cubes Surface  (1996)

ResultsResults

This table shows the execution time of the This table shows the execution time of the complete algorithm for the three datasets complete algorithm for the three datasets at an at an error valueerror value of of 0.50.5

The execution time is directly related to the The execution time is directly related to the size of the dataset.size of the dataset.

Page 31: Octree-Based Decimation of Marching Cubes Surface  (1996)

ResultsResults

Wiremesh models of the sphere and head dWiremesh models of the sphere and head datasets at an error value of 0.5atasets at an error value of 0.5

Page 32: Octree-Based Decimation of Marching Cubes Surface  (1996)

ResultsResults

Sphere datasetSphere dataset

Page 33: Octree-Based Decimation of Marching Cubes Surface  (1996)

ResultsResults

Table datasetTable dataset

Page 34: Octree-Based Decimation of Marching Cubes Surface  (1996)

ResultsResults

MRI head MRI head datasetdataset

Page 35: Octree-Based Decimation of Marching Cubes Surface  (1996)

ResultsResults

Percent saving in the number of triangles Percent saving in the number of triangles versus user-specified error value for the versus user-specified error value for the three datasets.three datasets.