Top Banner
Seminar 1 Surface Rendering, Decimation Presented By Sonali Barua Date:10/31/2005
34

Seminar 1 Surface Rendering, Decimation

Dec 31, 2015

Download

Documents

Hillary Watts

Seminar 1 Surface Rendering, Decimation. Presented By Sonali Barua Date:10/31/2005. Marching Cubes. Algorithm to create Triangle Models of 3D Medical Data. Information Flow for most 3D Medical Data. Former Algorithms and Drawbacks. - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Seminar 1 Surface Rendering, Decimation

Seminar 1Surface Rendering, Decimation

Presented By Sonali Barua

Date:10/31/2005

Page 2: Seminar 1 Surface Rendering, Decimation

Marching Cubes

Algorithm to create Triangle Models of 3D Medical Data

Page 3: Seminar 1 Surface Rendering, Decimation

Information Flow for most 3D Medical Data

Page 4: Seminar 1 Surface Rendering, Decimation

Former Algorithms and Drawbacks

• Surface Contours, Cuberilles (voxels), Octree, ray casting, shadow graph of density volume

• Didn’t work as they threw away useful information in the original Data such as inter slice connectivity and some algorithms relied on Motion to give a 3D effect

Page 5: Seminar 1 Surface Rendering, Decimation

Marching Cubes

• Retains the Original 3D Data

• Can be Displayed using standard rendering Algorithms.

• Uses Divide and Conquer Techniques to calculate the surface in a logical cube created from 8 pixels, four each from adjacent slices.

Page 6: Seminar 1 Surface Rendering, Decimation

Approach

• Assign 1 to Vertex if data value>=value of the surface being constructed hence inside the cube.

• Assign 0 to Vertex < value of surface hence outside the surface.

• 8 vertices =28 =256 ways a surface intersects cube.

• Creating table of 256 cases tedious and error prone

Page 7: Seminar 1 Surface Rendering, Decimation

Alternate way

• Using two symmetrical Properties : Reversing or Complimentary cases and Rotational symmetry.

• 14 unique patterns.• Permutations of these unique

patterns using complementary and rotational symmetry produces the 256 cases.

Page 8: Seminar 1 Surface Rendering, Decimation

Indexes

• To recreate the 256 cases an 8 bit index is used, each bit representing a vertex.

• The index serves as a pointer into an edge table that gives all edge intersections for a given cube configuration

• With the help of the knowledge of the edges which the surface intersects, the surface is interpolated along the edge.

• Usually linear interpolation is enough as it forms sufficient number of triangles per cube.

Page 9: Seminar 1 Surface Rendering, Decimation

Steps in Marching Cubes

• Four Slices of Data are read into Memory• Scan two slices Create a cube using four neighbors from

each of the slices.• An index of the Cube is Calculated by Comparing density

values with user specified surface constants.• Using the Index, list of edges is looked up from the table.• Linear interpolation is used to calculate the surface edge

intersection using the densities of the vertices.• Unit Normal at each vertex of the cube is calculated. The

Normal is interpolated to each triangle vertex.• The triangle vertices and the vertex Normal are the

outputs which is consequently used for Gourand shading.

Page 10: Seminar 1 Surface Rendering, Decimation

Calculating the Gradient Normal of each triangle vertex

• Estimate the Gradient Vectors at the cube vertices using central differences and linearly interpolate the gradient at the point of intersection.

• Gradient/length=unit Normal

• Unit Normal is interpolated linearly with the point of intersection.

• Reason why 4 slices are kept in Memory.

Page 11: Seminar 1 Surface Rendering, Decimation

Enhancements

• Efficiency.

• By getting 9 edges from previous slices and calculating only 3 edges.

• Save only previous line and pixel intersections.

• Reduction of Slice resolution using averaging , though it causes loss of data.

Page 12: Seminar 1 Surface Rendering, Decimation

Functional Enhancements

• Use of Boolean Operations for cutting and Capping of Solid Models using concepts of inside, outside and on the surface using the index values of the cube.

• Truth Table is drawn.• When both surfaces are there

then the clipping algorithm by Sutherland- Hodgman is used.

• Truth table allows for multiple surface extraction.

Page 13: Seminar 1 Surface Rendering, Decimation

Implementation

• C language

• Sun workstations using UNIX, VAX under VMS and IBM 3081 under IX/370

Page 14: Seminar 1 Surface Rendering, Decimation

Results CT

Page 15: Seminar 1 Surface Rendering, Decimation

MRI

Page 16: Seminar 1 Surface Rendering, Decimation

SPECT

Page 17: Seminar 1 Surface Rendering, Decimation

Questions

?????

Page 18: Seminar 1 Surface Rendering, Decimation

Decimation of Triangle Meshes

Algorithm to reduce the number of triangles rendered.

Page 19: Seminar 1 Surface Rendering, Decimation

Reason for the Algorithm

• Rendering speeds and memory requirements are proportional to the number of polygons.

• Surface construction Algorithms such as Marching cubes creates large number of triangles to render.

Page 20: Seminar 1 Surface Rendering, Decimation

Decimation

• Goal: Reduce the total number of Triangles while still retaining most of the important features

• Applies to Discrete Modeling.• Approaches can be either Adaptive or Filter based for

synthesizing objects• Adaptive: Produces more primitives in selected Areas.• Filter based: Starts with large number of samples and

replaces samples to reduce model size.

Page 21: Seminar 1 Surface Rendering, Decimation

Reduced Mesh Requirements

• Must preserve original topology of mesh including non-manifold forms.

• Good Geometric Approximation to the original Mesh.

• Hence, New vertices should not be created.

Page 22: Seminar 1 Surface Rendering, Decimation

The Simple Algorithm

• For each pass and each vertex• Characterize the local vertex geometry and

topology• Evaluate the decimation criteria• Triangulate the resulting hole

• Multiple passes are made over all vertices with adjustments in the decimation criteria until a termination criteria is met.

Page 23: Seminar 1 Surface Rendering, Decimation

Characterizing Local Geometry/topology

• Each vertex is classified into one of the 5 types

• If vertex is Complex, it is not a candidate for deletion. Rest of the vertex type are.

• If an angle is greater than the specified feature angle than a feature edge exists.

Page 24: Seminar 1 Surface Rendering, Decimation

Decimation Criteria

• Two Decimation Criteria used:• Vertex distance to plane d=| n . (v-x)|• Vertex distance to edge

• Simple vertices used the first Criteria.• Boundary and interior edge use the Second Criteria.• To get rid of undesirable feature edges or small triangles caused due to

“noise” in the original mesh, corner and interior edge vertices may use the first criteria to determine the edges.

Page 25: Seminar 1 Surface Rendering, Decimation

Triangulation

• Deletion of vertex causes one or two loops.• In each loop a triangulation must be created

such that they are non-intersecting and non-degenerate.

• Two Important Characteristics are used:• If loop cannot be triangulated, vertex is not deleted.• Due to the star shaped nature of each loop, recursive

splitting will be effective.

• Upon completion of triangulation, original vertex and it’s triangles are deleted.

Page 26: Seminar 1 Surface Rendering, Decimation

Implementation

• It is used as a filter in LYMB/VISAGE visualization environment.

• Algorithm repeated till a specified decimation threshold is met.

• Decimation is controlled by slowly adjusting the distance and feature angle criterion

• Sometimes Number of iteration is limited• Triangulation aspect ratio is also modified.

Page 27: Seminar 1 Surface Rendering, Decimation

Data Structures

• Uses a vertex –triangle ring hierarchy structure

• Contains hierarchical pointers from vertex up to triangles using the vertex and pointers from triangles down to vertices.

• three lists:• List of Vertex Coordinates.• List of Triangle definition.• List of lists using the each vertex.

Page 28: Seminar 1 Surface Rendering, Decimation

Triangulation

• Recursive loop splitting Algorithm• Each loop divided into 2 halves along a Split

line.• Split line = a line defined by 2 non-neighboring

vertices in loop• Each new loop is divided till there is only 3

vertices remaining• A loop of 3 vertices forms a triangle that is

added to the Mesh.

Page 29: Seminar 1 Surface Rendering, Decimation

Continued…..

• Since loops are non-planar and star shaped a split plane is used• Split Plane= a Plane orthogonal to the average plane that contains

the split line.• Split plane helps determine the non-overlapping of loops.• If split plane isn’t able to make two non-overlapping loops then the

vertex and it’s associated triangles are kept in the mesh.

Page 30: Seminar 1 Surface Rendering, Decimation

Aspect Ratio

• Each loop can be split more than one way, so best splitting plane is used.

• To get this a criteria of aspect ratio is used• Aspect ratio= (min distance of the loop vertices

to the split plane)/length of the split line.• Best Split plane=max (aspect ratio). Can be

made to be greater than some specified aspect ratio.

Page 31: Seminar 1 Surface Rendering, Decimation

Special Cases

• Closed tetrahedron, Tunnels.

• Remove a vertex to resolve the issue.

Page 32: Seminar 1 Surface Rendering, Decimation

Volume Modeling

Page 33: Seminar 1 Surface Rendering, Decimation

Terrain Modeling

Page 34: Seminar 1 Surface Rendering, Decimation

Questions???

Thank you