MeshMan

A 3D
Mesh Manipulator
by
Ryan Holmes


What is MeshMan?

MeshMan is a 3D modeling tool. It loads and manipulates 3D mesh geometry in a few useful ways. It supports multiple subdivision schemes for smoothing a mesh, decimation for thinning a mesh, transforms for rotating, scaling, or translating a mesh, can tessellate a mesh into triangles, and supports a few other minor manipulations.

The primary file format MeshMan works with is the OFF format, a simple format for storing 3D data. For more information on the OFF format, see the pages for my RoffView OFF viewing program and the related OFF Tools page. MeshMan works only with the most basic type of OFF files and does not load the texture coordinates that RoffView can handle. This is because handling that extra data is beyond the scope of MeshMan's manipulations. MeshMan can also open simple OBJ files, and can export to several other formats, including STL and PLY.

MeshMan should be relatively straight-forward to use. The various menu items and controls are briefly described below.

Download MeshMan (320KB zip file)

File Handling

MeshMan loads OFF and OBJ files, as described above. To open such a file, use File->Open. If, after modification, you wish to return to the last saved version of the file, use File->Revert.

MeshMan supports exporting a mesh to several formats, as shown in the table below. All export options are available on the Export->Mesh.. menu option.

Export Formats
Type Description
ASCII STL Triangle mesh only. Plain-text version of the STL format. STL files are rarely used in plain-text, but the variation is supported if needed. See also the Binary STL type, below.
Binary STL Triangle mesh only. Binary version of the STL format. Used by rapid-prototyping devices. Meshes meant to be used for this purpose should be closed.
Point Cloud Binary format used in the dissertation of an ASU student. Stores points and normals for the purposes of later surface-fitting.
PLY Standard PLY format, suitable for reading into many other 3D programs.
ASCII X DirectX "xof" format, suitable for reading into DirectX 9 programs. The ASCII format is supported so that the resulting file can be easily edited by hand. The DirectX 9 SDK provides a program that can open ASCII files and save them in the compressed and/or binary versions.
Wavefront OBJ Wavefront OBJ file. Widely supported by 3D modeling programs. Should be compatible with Java3D.

In addition to exporting the 3D structure, MeshMan can export a Windows BMP of the current screen. This allows convenient screen capture without resorting to pasting screenshots into a graphics program. This type of export is also available on the Export menu.

MeshMan can also export an Encapsulated PostScript version of the current screen. This rendering may not include every feature of the rendering, due to limitations in the conversion between OpenGL and PostScript, but can be printed at high resolutions on PostScript printers. This type of export is also available on the Export menu, as is a configuration dialog (Export->Options->EPS). Using this dialog, the resulting file can be set to color or to grayscale, and a parameter governing the appearance of smooth shading in the EPS file can be set.

Interaction Basics

Interaction with MeshMan consists primarily of adjusting the current view of the mesh and is done mostly with the mouse. The normal method of viewing is orbital. To move the camera around the object, hold the left mouse button and move the mouse. To zoom in, hold the right mouse button and move the mouse up. To zoom out, hold the right mouse button and move the mouse down.

An alternate method of viewing is available. To toggle between the normal method and the Free Camera method, you can use the View->Viewing menu or the C key. While viewing with the Free Camera method the mouse controls change. To look in a different direction, hold the left mouse button and move the mouse. To move the camera forward in the direction that it is pointing, hold the right mouse button and move the mouse up. To move the camera backward, hold the right mouse button and move the mouse down.

After using the Free Camera method of camera control you may find that you want to look back toward the object. You can point the camera at one of three different points with the View->Viewing->Look At menu. The Center is the point at the center of the bounding box of the current mesh. The Centroid is the average of every point in the current mesh. Zero is the point (0,0,0). The Center and the Centroid can be seen in the Mesh Info dialog on the View menu.

If you have found just the right position to look at your model from, you may want to save that view. There are three View positions that you can save at any point and return to at a later point. These positions are accessed with the View->Viewing menu or with the number keys 1, 2, and 3 (Or ctrl+number to save to that position). There is a fourth view position that you cannot save, but you can return to at any time. This is the default position, which can be accessed from the View->Viewing->Load->Default menu item or with the Home key. In cases where a manipulation of the mesh resizes the mesh, these four view positions are re-calculated with respect to the new size. This enables you to find the mesh again even if you have translated it far from where it was, but also means that saved views are only useful between manipulations.

If you need to recreate an exact viewing situation you can use the Viewing Parameters dialog, accessible from View->Viewing->Set. This dialog displays the current At and From points of the camera, the Up vector, the near and far planes, and the field of view. You may change any of these numerically with this dialog.

Display Properties

The basic properties of the current mesh are available in the information dialog displayed with View->Mesh Info. This dialog displays the number vertices in the mesh, the number of faces in the mesh, and the number of edges in the mesh, as well as the dimensions of the bounding box, its center, and the centroid of the mesh. These properties are useful in determining desired scaling or translation. This dialog also displays the type of the last operation and the time it took to complete (Not counting re-rendering time).

MeshMan supports many different types of mesh display. The display controls can be found on the View menu. Wireframe, flat and smooth shading can be toggled on the View->Display menu. Colors and materials for the various display items can be changed from the View->Colors menu. A single light is supported, which can be set through the View->Lighting menu. The Colors and Lighting menus allow the defaults for each property to be easily restored, if a change is not to your liking. Colors are stored between program runs, but the other properties are reset to default values when MeshMan is started.

Manipulations

Many manipulations are available in MeshMan. The majority are types of geometric subdivision, and are available on the Subdivision menu. The rest are available from the Tools menu.

Subdivision

MeshMan supports the types of subdivision shown in the table below. If a particular type of subdivision is inappropriate for the current mesh (e.g. Loop subdivision on a mesh containing non-triangular faces), the menu item will be disabled. MeshMan will attempt any level of subdivision you ask of it, but may run out of memory if it hits the limits of your machine.

Subdivision Schemes
Type Description
4-Split Triangle mesh only. Splits each triangle into four by splitting each edge in the center.
9-Split Triangle mesh only. Splits each triangle into nine by splitting each edge into three segments.
Butterfly Triangle mesh only. Does one interation of Butterfly subdivision. Resulting mesh is smoother and passes through the original vertices.
Catmull-Clark Any manifold polygonal mesh. Does one iteration of Catmull-Clark subdivision. Resulting mesh is smoother and consists of all quadrilaterals.
Doo-Sabin Closed polygonal mesh only. Does one iteration of Doo-Sabin subdivision. Resulting mesh is smoother and mostly (But not entirely) quadrilaterals.
Loop Triangle mesh only. Does one iteration of Loop subdivision.
Midpoint Any manifold polygonal mesh. Splits every edge on its midpoint and connects the new points into new polygons.
Modified Butterfly Triangle mesh only. Variant of Butterfly subdivision. Resulting mesh is somewhat smoother around sharp edges than Butterfly.
PN-Split Triangle mesh only. Subdivides as in 9-Split, but new vertices are positioned at on the surface of the PN-patches of the original triangles.
Quad-Split Any manifold polygonal mesh. Splits every polygon into quadrilaterals in a star around the centroid of the polygon.
Sqrt(3) Triangle mesh only. Does one iteration of Sqrt(3) subdivision. This implementation does not keep track of the number of iterations computed, so the boundary triangles are not treated differently on even iterations.
Tri-Split Any manifold polygonal mesh. Splits every polygon into triangles in a star around the centroid of the polygon.

Other Manipulations

Matrix Transform (Tools->Matrix Transform) allows the vertices of a mesh to be transformed by a 3x3 matrix and/or a translation. This allows scaling, shearing, rotation, and translation.

Decimation (Tools->Decimate) reduces the number of triangles in a triangle mesh using Garland and Heckbert's quadric error method of decimation. Open meshes are supported. Meshes with large flat regions may give poor results.

Perturbation (Tools->Perturb) gives a random push to each vertex in the mesh, within the bounds specified in the dialog box. This can be used to improve decimation results, because large flat areas take on a slight curvature.

Tessellation (Tools->Tessellate) is available to turn polygonal meshes into triangular meshes. The tessellation algorithm is very basic, moving around the polygon and tearing off triangles. No attempt is made to handle concave polygons properly.

Normalization (Tools-Normalize) divides each component of each vertex by the distance of the vertex from the origin. This positions each vertex on the unit sphere centered around the origin. This operation can be used in conjunction with subdivision to generate a good approximation to a sphere.


Valid XHTML 1.0!   My Homepage   MeshMan Gallery   MeshMan Background   Valid CSS!