Approximating Normals for Marching Cubes applied to Locally Supported Isosurfaces Gregory M. Nielson H. Adam Huang (Speaker) Steve Sylvester Computer Science and Engineering Arizona State University
Contents • I. Introduction • Isosurface Approximation - Marching Cubes • Normal Estimation - Gradient • Motivation - Problems with Central Difference Approx. • II. Alternative Methods • Triangular Mesh Topology • New Method - 4 Star • III. Results • IV. Conclusions 3DK - November 9, 2014 (2)
Isosurfaces • Isosurface ST for a field function F (x, y, z) is ST { (x, y, z) : F (x, y, z) = 0 } • Usually samples or measurements are known at regular lattice • Marching Cubes-an effective method to compute isosurface approximation 3DK - November 9, 2014 (3)
Marching Cubes (MC) • Samples F (iΔx, jΔy, kΔz) are knownDomain can be divided into small cubes as lattice building blocks 3DK - November 9, 2014 (4)
V V 2 3 V V 6 7 +y V +x V 0 1 +z V V 4 5 Marching Cubes (MC) • Isosurface approximation within an individual cube if F(i,j,k) ≥ α 3DK - November 9, 2014 (5)
V V 2 3 V V 6 7 +y V +x V 0 1 +z V V 4 5 Marching Cubes (MC) • Isosurface approximation within another individual cube 3DK - November 9, 2014 (6)
Example • Approximation surfaces comprised of triangles using MC algorithm 3DK - November 9, 2014 (7)
Normal Estimates-Gradient • Gradient as the normal vector • Apply numerical differentiation to obtain normals at the lattice points N(i,j+1,k) N(i,j,k) 3DK - November 9, 2014 (8)
Central Difference Approx. • Calculate normals at the lattice points using standard central difference approx. • Formulas for the lattice points on the boundaries 3DK - November 9, 2014 (9)
N(i,j+1,k) N(i,j+t,k) N(i,j,k) Normal Estimates-Gradient • Gradient as the normal vector • Apply numerical differentiation to obtain normals at the lattice points • Linear interpolation along edges to obtain normals at the triangular mesh vertices 3DK - November 9, 2014 (10)
Bunny Example Point Cloud Data Gradient from Central Difference Approximation 4-Star Method 3DK - November 9, 2014 (11)
Fungus Example Confocal microscopic fungus data Gradient from Central Difference Approximation 4-Star Method 3DK - November 9, 2014 (12)
(i+1, j+1) (i, j+1) (i+1, j) (i, j) (i-1, j) (i+2,j) (i, j-1) (i+1,j-1) Motivation • Problems with gradient estimate methods (x, j) Not specified or default value 3DK - November 9, 2014 (13)
II. Alternative Methods • Normal Vector is Perpendicular to Local Planar Surface Approximation • Computing average normals from the triangular mesh topology built from MC • 4-Star average normal estimates without triangular mesh topology 3DK - November 9, 2014 (14)
7 5 3 2 8 4 6 1 9 7 4 8 5 1 6 3 2 Triangular Mesh Topology Weighted average normal from local topology 3DK - November 9, 2014 (15)
Py+ Px- i,j,k P Px+ i,j,k+1 Py- New Method 4-Star Observation: Except on the boundary voxels, there will always be exactly 4 faces that share an edge +Y +Z +X 3DK - November 9, 2014 (16)
Py+ Px- i,j,k P Px+ i,j,k+1 Py- 4-Star Method Observation: Except on the boundary voxels, there will always be exactly 4 vertices that connect to P with an edge on a voxel face N++=Normal of Triangle: (P,Py+,Px+) N-+=Normal of Triangle: (P,Px-,Py+) N--=Normal of Triangle: (P,py-,px-) N+-=Normal of Triangle: (P,Px+,Py-) +Y +Z +X 3DK - November 9, 2014 (17)
Py+ Px- i,j,k P Px+ i,j,k+1 Py- 4-Star Method if Fi-1,j,k < αthen Px- [i,j,k to i-1,j,k] else ( ifFi-1,j,k+1 < αthen Px- [i-1,j,k+1 to i-1,j,k] else Px- [i-1,j,k+1 to i,j,k+1]) if Fi+1,j,k < αthen Px+ [i,j,k to i+1,j,k] else ( ifFi+1,j,k+1 < αthen Px+ [i+1,j,k+1 to i+1,j,k] else Px+ [i+1,j,k+1 to i,j,k+1] ) 3DK - November 9, 2014 (18)
III. Results-Stanford Bunny Gradient from Central Difference Approximation Average Normal from 4-Star Average Normal from Local Topology 3DK - November 9, 2014 (19)
Results-Pollen Gradient from Central Difference Approximation Average Normal from 4-Star Average Normal from Local Grid Topology 3DK - November 9, 2014 (20)
Results-Fungus 4_Star Central Difference Approximation Local Grid Topology 3DK - November 9, 2014 (21)
Results-Bust Differene Approximation 4-Star Local Grid Topology 3DK - November 9, 2014 (22)
Results-Bust Differene Approximation 4-Star Local Grid Topology 3DK - November 9, 2014 (23)
III. Results † RMS differences of normal compared to the triangular mesh topology method in degrees * Difference Ratio of 4-Star and Gradient ~ 1/6 -2/3 3DK - November 9, 2014 (24)
IV. Conclusions • Gradient approximation methods can give poor results where the field function is defined only at lattice points close to isosurfaces. • 4-Star methods produce results that are close to topology methods. • They are efficient and easy to implement. • If topology is not needed, or quick rendering is used to find proper isovalues, 4-Star methods are recommended. 3DK - November 9, 2014 (25)