Dual Marching Cubes - Peoplejrs/meshs08/present/Andrews.pdf · Dual Marching Cubes Perform marching...
Transcript of Dual Marching Cubes - Peoplejrs/meshs08/present/Andrews.pdf · Dual Marching Cubes Perform marching...
![Page 1: Dual Marching Cubes - Peoplejrs/meshs08/present/Andrews.pdf · Dual Marching Cubes Perform marching cubes over a sparse dual grid Scott Schaefer and Joe Warren. Goals: Capture thin](https://reader030.fdocuments.us/reader030/viewer/2022020115/5e1bbb4ad30f3921c43255c6/html5/thumbnails/1.jpg)
Dual Marching Cubes
Perform marching cubes
over a sparse dual grid
Scott Schaefer and Joe Warren
![Page 2: Dual Marching Cubes - Peoplejrs/meshs08/present/Andrews.pdf · Dual Marching Cubes Perform marching cubes over a sparse dual grid Scott Schaefer and Joe Warren. Goals: Capture thin](https://reader030.fdocuments.us/reader030/viewer/2022020115/5e1bbb4ad30f3921c43255c6/html5/thumbnails/2.jpg)
Goals: Capture thin features & Use fewer triangles.
Dual Marching Cubes (440 tris)
Dual Contouring (17k tris)Marching Cubes (67k tris)
![Page 3: Dual Marching Cubes - Peoplejrs/meshs08/present/Andrews.pdf · Dual Marching Cubes Perform marching cubes over a sparse dual grid Scott Schaefer and Joe Warren. Goals: Capture thin](https://reader030.fdocuments.us/reader030/viewer/2022020115/5e1bbb4ad30f3921c43255c6/html5/thumbnails/3.jpg)
Process Overview:
1. Octree defines resolution
2. Grid vertex placed per octree cell at features of signed distance function
3. Dual grid edges and faces are found
4. Perform marching cubes over dual grid
![Page 4: Dual Marching Cubes - Peoplejrs/meshs08/present/Andrews.pdf · Dual Marching Cubes Perform marching cubes over a sparse dual grid Scott Schaefer and Joe Warren. Goals: Capture thin](https://reader030.fdocuments.us/reader030/viewer/2022020115/5e1bbb4ad30f3921c43255c6/html5/thumbnails/4.jpg)
Process Overview:
1. Octree defines resolution
3. Dual grid edges and faces are found
4. Perform marching cubes over dual grid
2. Grid vertex placed per octree cell at features of signed distance function
![Page 5: Dual Marching Cubes - Peoplejrs/meshs08/present/Andrews.pdf · Dual Marching Cubes Perform marching cubes over a sparse dual grid Scott Schaefer and Joe Warren. Goals: Capture thin](https://reader030.fdocuments.us/reader030/viewer/2022020115/5e1bbb4ad30f3921c43255c6/html5/thumbnails/5.jpg)
Example: Red line = isosurface
What are features of a signed distance function?
![Page 6: Dual Marching Cubes - Peoplejrs/meshs08/present/Andrews.pdf · Dual Marching Cubes Perform marching cubes over a sparse dual grid Scott Schaefer and Joe Warren. Goals: Capture thin](https://reader030.fdocuments.us/reader030/viewer/2022020115/5e1bbb4ad30f3921c43255c6/html5/thumbnails/6.jpg)
Features go where planes collide
Example: Grey shape = distance function
![Page 7: Dual Marching Cubes - Peoplejrs/meshs08/present/Andrews.pdf · Dual Marching Cubes Perform marching cubes over a sparse dual grid Scott Schaefer and Joe Warren. Goals: Capture thin](https://reader030.fdocuments.us/reader030/viewer/2022020115/5e1bbb4ad30f3921c43255c6/html5/thumbnails/7.jpg)
Thin shape will ‘grab’ vertices
![Page 8: Dual Marching Cubes - Peoplejrs/meshs08/present/Andrews.pdf · Dual Marching Cubes Perform marching cubes over a sparse dual grid Scott Schaefer and Joe Warren. Goals: Capture thin](https://reader030.fdocuments.us/reader030/viewer/2022020115/5e1bbb4ad30f3921c43255c6/html5/thumbnails/8.jpg)
1. Approximate surface at sample points with planes
1d example with one sample pointx
f(x)
xi
f(x)
Ti
Process to place vertices
![Page 9: Dual Marching Cubes - Peoplejrs/meshs08/present/Andrews.pdf · Dual Marching Cubes Perform marching cubes over a sparse dual grid Scott Schaefer and Joe Warren. Goals: Capture thin](https://reader030.fdocuments.us/reader030/viewer/2022020115/5e1bbb4ad30f3921c43255c6/html5/thumbnails/9.jpg)
2. Find vertex position to minimize the Error Quadric
x
f(x)
xi
f(x)
Ti
Vertex v at position x’
Process to place vertices
![Page 10: Dual Marching Cubes - Peoplejrs/meshs08/present/Andrews.pdf · Dual Marching Cubes Perform marching cubes over a sparse dual grid Scott Schaefer and Joe Warren. Goals: Capture thin](https://reader030.fdocuments.us/reader030/viewer/2022020115/5e1bbb4ad30f3921c43255c6/html5/thumbnails/10.jpg)
Value predicted from ith sampleActual value of f(x,y,z)
x
f(x)
xi
f(x)
Tiw=f(x’)
Ti(x’)
Vertex v at position x’
![Page 11: Dual Marching Cubes - Peoplejrs/meshs08/present/Andrews.pdf · Dual Marching Cubes Perform marching cubes over a sparse dual grid Scott Schaefer and Joe Warren. Goals: Capture thin](https://reader030.fdocuments.us/reader030/viewer/2022020115/5e1bbb4ad30f3921c43255c6/html5/thumbnails/11.jpg)
x
f(x)
xi
f(x)
Tiw=f(x’)
Ti(x’)(w-Ti(x’))2 = Error2 from this sample
Vertex v at position x’
(Normalize by slope of Ti )
![Page 12: Dual Marching Cubes - Peoplejrs/meshs08/present/Andrews.pdf · Dual Marching Cubes Perform marching cubes over a sparse dual grid Scott Schaefer and Joe Warren. Goals: Capture thin](https://reader030.fdocuments.us/reader030/viewer/2022020115/5e1bbb4ad30f3921c43255c6/html5/thumbnails/12.jpg)
x
f(x)
xi
f(x)
Ti
xj
Tj
Error min is here-ish
![Page 13: Dual Marching Cubes - Peoplejrs/meshs08/present/Andrews.pdf · Dual Marching Cubes Perform marching cubes over a sparse dual grid Scott Schaefer and Joe Warren. Goals: Capture thin](https://reader030.fdocuments.us/reader030/viewer/2022020115/5e1bbb4ad30f3921c43255c6/html5/thumbnails/13.jpg)
x
f(x)
f(x)
Note that the 1d ‘surface’ is here
Features of distance field are not features of the surface!
![Page 14: Dual Marching Cubes - Peoplejrs/meshs08/present/Andrews.pdf · Dual Marching Cubes Perform marching cubes over a sparse dual grid Scott Schaefer and Joe Warren. Goals: Capture thin](https://reader030.fdocuments.us/reader030/viewer/2022020115/5e1bbb4ad30f3921c43255c6/html5/thumbnails/14.jpg)
Features are often near medial axis
![Page 15: Dual Marching Cubes - Peoplejrs/meshs08/present/Andrews.pdf · Dual Marching Cubes Perform marching cubes over a sparse dual grid Scott Schaefer and Joe Warren. Goals: Capture thin](https://reader030.fdocuments.us/reader030/viewer/2022020115/5e1bbb4ad30f3921c43255c6/html5/thumbnails/15.jpg)
Result of minimization: 1 vertex per cell(make sure vertex is in its own cell!)
![Page 16: Dual Marching Cubes - Peoplejrs/meshs08/present/Andrews.pdf · Dual Marching Cubes Perform marching cubes over a sparse dual grid Scott Schaefer and Joe Warren. Goals: Capture thin](https://reader030.fdocuments.us/reader030/viewer/2022020115/5e1bbb4ad30f3921c43255c6/html5/thumbnails/16.jpg)
Process Overview:
1. Octree defines resolution
3. Dual grid edges and faces are found
4. Perform marching cubes over dual grid
2. Grid vertex placed per octree cell at features of signed distance function
![Page 17: Dual Marching Cubes - Peoplejrs/meshs08/present/Andrews.pdf · Dual Marching Cubes Perform marching cubes over a sparse dual grid Scott Schaefer and Joe Warren. Goals: Capture thin](https://reader030.fdocuments.us/reader030/viewer/2022020115/5e1bbb4ad30f3921c43255c6/html5/thumbnails/17.jpg)
Octree Generation
Generate(Node):List samples = Sample(Node)if (Error(samples) > thresh):
Generate(Children(Node))
Sample(Node): Fine regular sampling? Random sampling?Error(samples): Error Quadric
![Page 18: Dual Marching Cubes - Peoplejrs/meshs08/present/Andrews.pdf · Dual Marching Cubes Perform marching cubes over a sparse dual grid Scott Schaefer and Joe Warren. Goals: Capture thin](https://reader030.fdocuments.us/reader030/viewer/2022020115/5e1bbb4ad30f3921c43255c6/html5/thumbnails/18.jpg)
Process Overview:
1. Octree defines resolution
3. Dual grid edges and faces are found
4. Perform marching cubes over dual grid
2. Grid vertex placed per octree cell at features of signed distance function
![Page 19: Dual Marching Cubes - Peoplejrs/meshs08/present/Andrews.pdf · Dual Marching Cubes Perform marching cubes over a sparse dual grid Scott Schaefer and Joe Warren. Goals: Capture thin](https://reader030.fdocuments.us/reader030/viewer/2022020115/5e1bbb4ad30f3921c43255c6/html5/thumbnails/19.jpg)
Dual grid looks like this:
![Page 20: Dual Marching Cubes - Peoplejrs/meshs08/present/Andrews.pdf · Dual Marching Cubes Perform marching cubes over a sparse dual grid Scott Schaefer and Joe Warren. Goals: Capture thin](https://reader030.fdocuments.us/reader030/viewer/2022020115/5e1bbb4ad30f3921c43255c6/html5/thumbnails/20.jpg)
dual grid: Faces become VerticesConnect Adjacent Faces’ Vertices
![Page 21: Dual Marching Cubes - Peoplejrs/meshs08/present/Andrews.pdf · Dual Marching Cubes Perform marching cubes over a sparse dual grid Scott Schaefer and Joe Warren. Goals: Capture thin](https://reader030.fdocuments.us/reader030/viewer/2022020115/5e1bbb4ad30f3921c43255c6/html5/thumbnails/21.jpg)
Border vertices are specialinserted where needed
![Page 22: Dual Marching Cubes - Peoplejrs/meshs08/present/Andrews.pdf · Dual Marching Cubes Perform marching cubes over a sparse dual grid Scott Schaefer and Joe Warren. Goals: Capture thin](https://reader030.fdocuments.us/reader030/viewer/2022020115/5e1bbb4ad30f3921c43255c6/html5/thumbnails/22.jpg)
See paper for algorithm
![Page 23: Dual Marching Cubes - Peoplejrs/meshs08/present/Andrews.pdf · Dual Marching Cubes Perform marching cubes over a sparse dual grid Scott Schaefer and Joe Warren. Goals: Capture thin](https://reader030.fdocuments.us/reader030/viewer/2022020115/5e1bbb4ad30f3921c43255c6/html5/thumbnails/23.jpg)
Process Overview:
1. Octree defines resolution
3. Dual grid edges and faces are found
4. Perform marching cubes over dual grid
2. Grid vertex placed per octree cell at features of signed distance function
![Page 24: Dual Marching Cubes - Peoplejrs/meshs08/present/Andrews.pdf · Dual Marching Cubes Perform marching cubes over a sparse dual grid Scott Schaefer and Joe Warren. Goals: Capture thin](https://reader030.fdocuments.us/reader030/viewer/2022020115/5e1bbb4ad30f3921c43255c6/html5/thumbnails/24.jpg)
Perform marching cubes
![Page 25: Dual Marching Cubes - Peoplejrs/meshs08/present/Andrews.pdf · Dual Marching Cubes Perform marching cubes over a sparse dual grid Scott Schaefer and Joe Warren. Goals: Capture thin](https://reader030.fdocuments.us/reader030/viewer/2022020115/5e1bbb4ad30f3921c43255c6/html5/thumbnails/25.jpg)
Perform marching cubes
Pretend you have all 8 corners for every ‘cube’ in the dual grid
![Page 26: Dual Marching Cubes - Peoplejrs/meshs08/present/Andrews.pdf · Dual Marching Cubes Perform marching cubes over a sparse dual grid Scott Schaefer and Joe Warren. Goals: Capture thin](https://reader030.fdocuments.us/reader030/viewer/2022020115/5e1bbb4ad30f3921c43255c6/html5/thumbnails/26.jpg)
Perform marching cubes
Should have used a finer octree
![Page 27: Dual Marching Cubes - Peoplejrs/meshs08/present/Andrews.pdf · Dual Marching Cubes Perform marching cubes over a sparse dual grid Scott Schaefer and Joe Warren. Goals: Capture thin](https://reader030.fdocuments.us/reader030/viewer/2022020115/5e1bbb4ad30f3921c43255c6/html5/thumbnails/27.jpg)
Problem: slivers
![Page 28: Dual Marching Cubes - Peoplejrs/meshs08/present/Andrews.pdf · Dual Marching Cubes Perform marching cubes over a sparse dual grid Scott Schaefer and Joe Warren. Goals: Capture thin](https://reader030.fdocuments.us/reader030/viewer/2022020115/5e1bbb4ad30f3921c43255c6/html5/thumbnails/28.jpg)
Problem: slivers
Isosurface w=0
Dual grid vertices near isosurface
![Page 29: Dual Marching Cubes - Peoplejrs/meshs08/present/Andrews.pdf · Dual Marching Cubes Perform marching cubes over a sparse dual grid Scott Schaefer and Joe Warren. Goals: Capture thin](https://reader030.fdocuments.us/reader030/viewer/2022020115/5e1bbb4ad30f3921c43255c6/html5/thumbnails/29.jpg)
Solution: push vertices to surface
Dual grid vertices near isosurface
Isosurface w=0
![Page 30: Dual Marching Cubes - Peoplejrs/meshs08/present/Andrews.pdf · Dual Marching Cubes Perform marching cubes over a sparse dual grid Scott Schaefer and Joe Warren. Goals: Capture thin](https://reader030.fdocuments.us/reader030/viewer/2022020115/5e1bbb4ad30f3921c43255c6/html5/thumbnails/30.jpg)
Result of sliver elimination
Without sliver elim With sliver elim
![Page 31: Dual Marching Cubes - Peoplejrs/meshs08/present/Andrews.pdf · Dual Marching Cubes Perform marching cubes over a sparse dual grid Scott Schaefer and Joe Warren. Goals: Capture thin](https://reader030.fdocuments.us/reader030/viewer/2022020115/5e1bbb4ad30f3921c43255c6/html5/thumbnails/31.jpg)
Congratulations, you’re done.
![Page 32: Dual Marching Cubes - Peoplejrs/meshs08/present/Andrews.pdf · Dual Marching Cubes Perform marching cubes over a sparse dual grid Scott Schaefer and Joe Warren. Goals: Capture thin](https://reader030.fdocuments.us/reader030/viewer/2022020115/5e1bbb4ad30f3921c43255c6/html5/thumbnails/32.jpg)
Limitations?
Paper shows thin features work well
But what about multiple adjacent thin features?
![Page 33: Dual Marching Cubes - Peoplejrs/meshs08/present/Andrews.pdf · Dual Marching Cubes Perform marching cubes over a sparse dual grid Scott Schaefer and Joe Warren. Goals: Capture thin](https://reader030.fdocuments.us/reader030/viewer/2022020115/5e1bbb4ad30f3921c43255c6/html5/thumbnails/33.jpg)
Element inversions?
Can faces of the dual grid become inverted?
![Page 34: Dual Marching Cubes - Peoplejrs/meshs08/present/Andrews.pdf · Dual Marching Cubes Perform marching cubes over a sparse dual grid Scott Schaefer and Joe Warren. Goals: Capture thin](https://reader030.fdocuments.us/reader030/viewer/2022020115/5e1bbb4ad30f3921c43255c6/html5/thumbnails/34.jpg)
Element inversions?
Can faces of the dual grid become inverted?
![Page 35: Dual Marching Cubes - Peoplejrs/meshs08/present/Andrews.pdf · Dual Marching Cubes Perform marching cubes over a sparse dual grid Scott Schaefer and Joe Warren. Goals: Capture thin](https://reader030.fdocuments.us/reader030/viewer/2022020115/5e1bbb4ad30f3921c43255c6/html5/thumbnails/35.jpg)
That’s all. Questions?