CIS 4930/6930-902 SCIENTIFICVISUALIZATION ISOSURFACING Paul Rosen Assistant Professor University of South Florida slides credits Tricoche and Meyer
ADMINISTRATIVE Read (or watch video): Kieffer et al, HOLA: Human-like Orthogonal Network Layout [InfoVis 2015 Best Paper]
TODAY visualization for scalar fields pseudocoloring isocurves with marching squares isosurfacing with marching cubes
Weiskopf/Machiraju/Möller 19 2D visualization slice images (or multi-planar reformating MPR) Indirect 3D visualization isosurfaces (or surface-shaded display SSD) Direct 3D visualization (direct volume rendering DVR)
In Visualization, we Use the Concept of a Transfer Function to set Color as a Function of Scalar Value Scalar values ->[0,1] -> Colors 240. 240. In OpenGL, the mapping of 1D texture
USE THE RIGHT TRANSFER FUNCTION COLOR SCALE TO REPRESENT A RANGE OF SCALAR VALUES Gray scale Intensity Interpolation Saturation interpolation Two-color interpolation Rainbow scale Heated object interpolation Blue-White-Red
A GALLERY OF COLOR SCALES
GREY SCALE.
SATURATION SCALE.
SPECTRUM SCALE.
LIMITED SPECTRUM SCALE.
REDUNDANT HUE/LIGHTNESS SCALE.
HEATED-OBJECT SCALE.
Other examples 35
ISOCONTOURS IN 2D
PROCESS Get cell Identify grid lines w/cross Find crossings Draw x x Primitives naturally chain together + -
SIMPLER TO IMPLEMENT PROCESS check each corner above or below isovalue assign bit 0/1 4-bit string describes a particular case
2D SCALAR VISUALIZATION 16 possible marching squares reduce to 5 symmetric cases or 4 topological cases 18
x x x x x x x x x x x x
0 1 3 2 3 1 5 0 0 3 3 8 6 3 2 0 2 6 1 1 0 1 2 3 1 what is the isocontour for isovalue = 4? 5x5 grid
2D Scalar Visualization 21
IN 3D: ISOSURFACES 22
Weiskopf/Machiraju/Möller 19 2D visualization slice images (or multi-planar reformating MPR) Indirect 3D visualization isosurfaces (or surface-shaded display SSD) Direct 3D visualization (direct volume rendering DVR)
MARCHING CUBES Predominant method used today Efficient and simple Independently reported by Wyvill and McPeeters in 1986, Lorenson and Cline in 1987 Patented in 1987 by Lorenson and Cline 24
MARCHING CUBES 3D generalization of isocontours Treat each cube individually No 2D contour curves Allow intersections only on the edges or at vertices Pre-calculate all of the necessary information to construct a surface 25
MARCHING CUBES Linear search through cells Trivially parallelizable Row by row, layer by layer No neighborhood information is required 26
MARCHING CUBES Consider a single cube Three cases: All vertices above the contour threshold All vertices below Mixed above and below 27
MARCHING CUBES Binary label each node (above or below) Examine all possible cases of above or below for each vertex 28
MARCHING CUBES Now we have 8 vertices Thus, 2 8 = 256 cases How many unique topological cases? 29
CASE REDUCTION Value symmetry 30
CASE REDUCTION Rotation symmetry 31
CASE REDUCTION Mirror symmetry By inspection, we can reduce 256 cases to only 15 32
MARCHING CUBES CASES 33
MARCHING CUBES SUMMARY Basic Marching Cubes algorithm: 2. Classify 1. Create a cube each voxel (volume element) 3. Build an index 4. Lookup edge list 5. Interpolate triangle vertices 6. Calculate normals 34
STEP 1: CREATE A CUBE Consider a cube defined by eight data values Four values from slice and four from neighbor 35
STEP 2: CLASSIFY EACH VOXEL Binary classify each vertex of the cube as to whether it lies Outside the surface voxel value > isosurface value Inside the surface voxel value <= isosurface value 36
CLASSIFICATION EXAMPLE 37
STEP 3: BUILD AN INDEX Use the binary labeling of each voxel to create an 8- bit index (8 vertices 256 cases) 38
STEP 4: LOOKUP EDGE LIST 39
STEP 5: INTERPOLATE TRIANGLE VERTICES For each edge Find the vertex location along the edge by using linear interpolation of the voxel values 40
STEP 6: COMPUTE NORMALS Calculate the normal at each cube vertex Linearly interpolate the polygon vertex normal Renormalize after interpolation 41
EXAMPLES 1 Isosurface 3 Isosurfaces 2 Isosurfaces
ENHANCING ISOSURFACING Can add information about additional variables Here, two additional variables control the color 43
CHALLENGES what is a good isovalue? ambiguities poorly shaped, nonadaptive triangles gaps between neighboring points looking at every voxel 73
MARCHING CUBES SPEEDUP Expensive to search each grid cell Use a MinMax Octree to ignore cells outside the isovalue range 45
MINMAX OCTREE BUILDING THE STRUCTURE Create an octree structure for the voxels of the volume In each node store the minimum and maximum isovalues of the children 46
MINMAX OCTREE BUILDING THE ISOSURFACE Begin at the root node If min <= isovalue <= max Recurse to the next level of the tree Otherwise Terminate search 47
MINMAX OCTREE PERFORMANCE ANALYSIS WORST-CASE PERFORMANCE? O(n log n) or O(nh), where n is the number of voxels and h is the tree height When all voxels cross the isovalue EXPECTED PERFORMANCE? O(k log n) or O(kh), where k is the number of voxels with geometry USUALLY K<<N, MAKING THIS METHOD QUITE EFFICIENT
BIGGEST LIMITATION OF ISOSURFACING? 49
BIGGEST LIMITATION OF ISOSURFACING? 50
Volume Rendering 51