+ All Categories
Home > Documents > Dual Marching Cubes - Peoplejrs/meshs08/present/Andrews.pdf · Dual Marching Cubes Perform marching...

Dual Marching Cubes - Peoplejrs/meshs08/present/Andrews.pdf · Dual Marching Cubes Perform marching...

Date post: 28-Oct-2019
Category:
Upload: others
View: 15 times
Download: 0 times
Share this document with a friend
35
Dual Marching Cubes Perform marching cubes over a sparse dual grid Scott Schaefer and Joe Warren
Transcript
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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

That’s all. Questions?


Recommended