next up previous contents
Next: Geometric Error Up: Analysis Previous: Analysis   Contents


Visual Analysis

In our results chapter there were several images that portrayed our testing models at different levels of detail. We explore a few of those test models in more detail. The visual analysis of these models are important in defining our success at designing and implementing our program. We break up this section into three sub-sections based on some of the features of our program.

Edge Detection

When decimating a model it is ideal to preserve some basic geometry of the original mesh. We implemented a feature that detects edges upon loading the model file. Detecting edges in a model guarantees that the more extreme vertices of a model will not get removed, therefore preserving the basic shape of the original mesh. In Figure [*] we have a cube with two edges per side. When we run our program with this model it detects the eight corners of the cube and marks them as non-removable (See Figure [*] for a fully decimated rendering of test002). When we decimate the mesh fully (-p 100%), it removes all of the other vertices except the eight corners. The user can try repeatedly to remove more, but the program states that the model has been fully decimated, and no further decimation is possible. The program has successfully preserved its basic shape, a cube.

Figure: The model test002 rendered solid and with wireframe.

Figure: The model test002 fully decimated, rendered solid and with wireframe.

However, when we try to fully decimate another model, specifically test003 (see Figure [*]), our method for edge detection gets greedy and marks edges that can be removed as non-removable (see Figure [*]. In this figure, note that there are vertices along the edges. These are considered boundary vertices[#!shroeder!#], and can be removed safely. The ideal solution for this mesh on any simplification algorithm should be to remove all vertices (except for the four corners), therefore creating a four vertex and two triangle rectangle.

Figure: The model test003 rendered solid and with wireframe.

Figure: The model test003 fully decimated, rendered solid and with wireframe.

These figures demonstrate our edge detection scheme. It preserves vertices that are sharp corners, and are along sharp edges. This is suitable behavior for most cases. However, when a mesh is not manifold it can detect an edge that is also a boundary, which can and should be removed safely.

Simplifying Models

When we simplify a mesh we expect a visually accurate depiction of the mesh, within a suitable threshold. Our algorithm can create ideal representations from certain geometrically generic meshes. In Figure [*], we use a geometrically basic model: a cube. This cube has many similar vertices; more specifically, most vertices lie flat on one of the six sides of the model. With help from edge detection, decimating the model using our program produces the ideal result. In Figure [*], we see that the model has become minimal, since a cube that is represented by a triangle mesh can contain at the very least eight vertices and 12 triangles.

Figure: The model test004 rendered solid and with wireframe.

Figure: The model test004 fully decimated, rendered solid and with wireframe.

Our algorithm sometimes decimates with less than ideal results. In Figure [*], we see the original mesh of a hollow cylinder, or a tube. Unlike the cube from the previous figures, when we decimate the model, the mesh starts to collapse upon itself (see Figure [*]). After only completing eighty percent of the vertex removal process, the model starts to produce jagged edges. This is the result of our corner detection algorithm, which only marks vertices as corners when all angles between faces incident upon the vertex are smaller than a threshold. Since the top and bottom of the cylinder are round, there are some angles between adjacent faces here that are not corners. If we did not remove these vertices, we would also not remove the edges of a cube, thus limiting the ability to simplify in many geometrically primitive cases.

Figure: The model test005 rendered solid and with wireframe.

Figure: The model test005 decimated to eighty percent, rendered solid and with wireframe.

When our algorithm is given a complex mesh, it has a hard time determining the next best candidate to replace the vertex that we want to remove. In this case, our algorithm replaces the vertex with a less than ideal candidate and creates polygons that modify the topology greatly. If we were to incorporate a volume preservation or bounding of geometric error algorithm, our program would be less likely to have these less than ideal results. Our program seems to work perfectly for simple shapes, but when confronted by a slightly more complex mesh, we find the limitations of our decimation algorithm.

Smooth Shading

Here we explore how rendering a simplified mesh with smooth shading enabled gives a better visual result. Figure [*] shows the original mesh of the test009 model. This image has many hard edges that are a result of the representation of the model as a mesh of flat triangles. In the next image (Figure [*]), the original mesh appears to have less sharp edges: look at the table-top in particular. In the second image, the OpenGL option GL_SMOOTH has been enabled. This means that the colors of all adjacent triangles are blended across each triangle to make a smoother representation; hence, the mesh appears smoother.

Figure: The model test009 rendered solid and with flat shading.

Figure: The model test009 rendered solid and with smooth shading enabled.

The GL_SMOOTH option becomes even more valuable as we decimate the model. In the next image (Figure [*]), the mesh has been decimated to sixty percent of its original size. Removing 34,542 vertices from the model leaves 23,028 vertices that are still rendered. With this few vertices still being rendering, the model looks much more blocky. In Figure [*], we enable smooth shading: the mesh appears less rough.

Figure: The decimated model rendered solid and with flat shading.

Figure: The decimated model rendered solid and with smooth shading enabled.

Figure [*] shows a comparison of these models in greater detail. This figure is an image of the two levels of detail (original and sixty percent), each with flat shading and smooth shading enabled. The top left is the original model with flat shading. The top right is the sixty-percent decimated model with flat shading. Here we clearly see the difference in polygon count. The model in the top right has significantly fewer polygons and looks jagged. The bottom two viewports show two visually similar models. The bottom left viewport is the original 114,880 polygon mesh, and the bottom right viewport contains the decimated model with only 45,792 polygons. Both were rendered with smooth shading; the only difference between the top right and bottom right viewports is that smooth shading has been enabled in the bottom viewport. We conclude that the GL_SMOOTH feature in OpenGL helps to increase the visual quality of a simplified mesh.

Figure: The model test009 rendered with flat shading on the top and smooth shading on the bottom. The two levels of detail are the original model on the left, and the decimated model on the right.

next up previous contents
Next: Geometric Error Up: Analysis Previous: Analysis   Contents
Tim Garthwaite 2002-02-03