1 / 42

Isosurfacing (Part 2 )

Isosurfacing (Part 2 ). Hank Childs, University of Oregon. October 25th, 2013. Announcements. Final project Pre-defined project: Volume rendering Finding data http://sciviscontest.ieeevis.org / Talk with me I may delay Nov 1 st quiz to Nov 6 th (stay tuned)

nika
Télécharger la présentation

Isosurfacing (Part 2 )

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Isosurfacing (Part 2) Hank Childs, University of Oregon October 25th, 2013

  2. Announcements • Final project • Pre-defined project: Volume rendering • Finding data • http://sciviscontest.ieeevis.org/ • Talk with me • I may delay Nov 1st quiz to Nov 6th (stay tuned) • OH: Fri 12-1 is a bad time • How would Thurs 2-3 be?

  3. Project 5 • What is the ground truth?

  4. Height field over a terrain

  5. IsolinesvsIsosurfaces • Isolines: • Input: scalar field over 2D space • Output: lines • Isosurfaces: • Input: scalar field over 3D space • Output: surface • Commonalities: • Reduce topological dimension by 1 • Produce output where scalar field is constant

  6. Iterating Over Cells • For isosurface/isoline calculation, we can iterate over the cells. • At the end, we take the results from each cell and put them into a single scene.

  7. Reality Check: context for isolines • We have millions of cells • If one cell can produce tens or hundreds of lines, then the isolines could take much more memory than the input data set

  8. Big picture: what do we want from our isosurface? • Tractable computation • Can’t create 100s or 1000s of line segments per cell for super-accurate representation • Continuous surface • Triangles (or lines for an isosurface) need to connect up … no gaps.

  9. Big idea #1: approximate the isolines / isosurface • Isolines: represent them with a minimal # of segments • Isosurface: represent them with a minimal # of triangles

  10. Quiz: how to approximate our “quarter circle”?

  11. Big picture: what do we want from our isosurface? • Tractable computation • Can’t create 100s or 1000s of line segments per cell for super-accurate representation • Quiz: did we accomplish this? • Yes: very few per cell • Continuous surface • Triangles (or lines for an isosurface) need to connect up … no gaps. • Quiz: did we accomplish this? Answer: we got the answer exactly right at the edge of the cell … hence no gaps. 

  12. The 16 cases Case 0 Case 1-5 Case 6-10 Case 11-15

  13. Big idea #2: do pre-computation to make it fast If you knew which case you had, then you would know how to proceed • Pre-compute correct answers for all 16 cases and store them in a lookup table • For each cell, identify which case it is in • Then use corresponding lookup table to generate isosurface

  14. Big idea #2: pre-computation of all possible cases If you knew which case you had, then you would know how to proceed • Pre-compute correct answers for all 16 cases and store them in a lookup table • For each cell, identify which case it is in • Then use corresponding lookup table to generate isosurface

  15. Pre-compute correct answers for all 16 cases and store them in a lookup table • Observations about correct answers for a case: • It contains one or two line segments • The ends of the line segments are always along edges.

  16. Pre-compute correct answers for all 16 cases and store them in a lookup table Edge 2 • The ends of the line segments are always along edges. • We will need to number the edges Edge 1 Edge 3 Edge 0

  17. Big idea #2: do pre-computation to make it fast If you knew which case you had, then you would know how to proceed • Pre-compute correct answers for all 16 cases and store them in a lookup table • For each cell, identify which case it is in • Then use corresponding lookup table to generate isosurface

  18. For each cell, identify which case it is in Vertex 2 Vertex 3 • 4 vertices • Each has one of 2 possible classification values • Lower than isovalue • Call this “0” • Higher than isovalue • Call this “1” • (ignore equality case) 1 1 1 0 Vertex 1 Vertex 0

  19. For each cell, identify which case it is in Vertex 2 Vertex 3 • Goal: turn classification values into a number • Number should be between 0 and 15 • Idea: use binary numbers • V3V2V1V0  1 1 1 0  14 1 1 1 0 Vertex 1 Vertex 0 This is case 14

  20. The 16 cases 1 1 1 1 1 0 0 0 0 0 0 1 0 1 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 0 1 Case 0 0 0 0 1 1 0 1 1 1 0 0 0 1 1 0 1 0 0 1 1 1 0 1 0 0 1 0 0 1 1 0 1 Case 1-5 Case 6-10 Case 11-15

  21. Big idea #2: do pre-computation to make it fast If you knew which case you had, then you would know how to proceed • Pre-compute correct answers for all 16 cases and store them in a lookup table • For each cell, identify which case it is in • Then use corresponding lookup table to generate isosurface

  22. Then use corresponding lookup table to generate isosurface intnumSegments[16]; numSegments[0] = 0; ... numSegments[6] = 2; ... numSegments[14] = 1; numSegments[15] = 0;

  23. Then use corresponding lookup table to generate isosurface intlup[16][4]; // lup == lookup lup[0][0] = lup[0][1] = lup[0][2] = lup[0][3] = -1; ... lup[6][0] = 0; lup[6][1] = 1; lup[6][2]=2; lup[6][3] = 3; … lup[14][0] = 0; lup[14][1] = 3; lup[14][2] = lup[14][3] = -1; lup[15][0] = lup[15][1] = lup[15][2] = lup[15][3] = -1;

  24. Then use corresponding lookup table to generate isosurface inticase = IdentifyCase(cell); // case is a reserved word in C++ intnsegments = numSegments[icase]; for (inti = 0 ; i < nsegments ; i++) { int edge1 = lup[icase][2*i]; float pt1[2] = // Interpolate position along edge1 int edge2 = lup[icase][2*i+1]; float pt2[2] = // Interpolate position along edge2 AddLineSegmentToOutput(pt1, pt2); }

  25. Isosurfacing • Will follow a very similar game plan. • Pre-compute correct answers for all cases and store them in a lookup table • For each cell, identify which case it is in • Then use corresponding lookup table to generate isosurface

  26. Isosurfacing 0 0 1 0 Quiz: where should the isosurface go? 0 0 0 0

  27. Isosurfacing 0 0 1 0 Quiz: where should the isosurface go? 0 0 0 0

  28. Isosurfacing 1 0 1 0 Quiz: where should the isosurface go? 1 0 0 1

  29. Isosurfacing 1 0 1 0 Quiz: where should the isosurface go? 0 0 0 1

  30. Isosurfacing 1 0 1 0 Quiz: where should the isosurface go? 1 0 0 0

  31. Isosurfacing 1 0 1 0 Quiz: where should the isosurface go? 1 0 0 0

  32. Isosurfacing 1 0 1 0 Quiz: where should the isosurface go? 1 0 0 0

  33. Isosurfacing 1 0 1 0 Quiz: where should the isosurface go? 1 0 0 0

  34. Isosurfacing 1 0 1 0 Quiz: where should the isosurface go? 1 0 0 0

  35. Isosurfacing V6 V7 V4 V5 We need conventions! V2 V3 V1 V0 Z Y X

  36. Isosurfacing V6 V7 V4 V5 We need conventions! E2 E3 V2 V3 E1 V1 V0 E0 Z Y X

  37. Isosurfacing V6 E6 V7 E7 V4 V5 E5 We need conventions! E4 V2 V3 V1 V0 Z Y X

  38. Isosurfacing V6 V7 V4 V5 We need conventions! E11 E10 E9 E8 V2 V3 V1 V0 Z Y X

  39. Isosurfacing V6 V7 V4 V5 static int edges[12][2] = { {0,1}, {1,3}, {2,3}, {0,2}, {4,5}, {5,7}, {6,7}, {4,6}, {0,4}, {1,5}, {2,6}, {3,7} }; V2 V3 V1 V0 Z Y X

  40. Different cell types • We know how to contour cubes • How do we do tetrahedrons? Prisms? Wedges?

  41. Our isosurface approximation is improved by computer graphics

  42. Project 6 • 6A: implement marching quads (Weds lecture), including all 16 cases • 6B: implement marching cubes, but only a subset of the cases • We will use SVN to share our cases • There will be a case checker • Ambiguities are hard • Everyone does 6A, some do 6B • Please email if you want to do 6B

More Related