Showing posts with label OFF. Show all posts
Showing posts with label OFF. Show all posts

Wednesday, September 03, 2008

Disjoint component identification

Within my PhD work I developed a small prototype that identifies disjoint components on 3D meshes. The "Disjoint Component Detector" takes as input an OFF file and can produce three distinct outputs. It can create a VRML file with the model colorized according to the detected disjoint components. It can create a set of OFF files, containing each one of them a single component. Or it can write a text file describing the disjoint components detection results. If interested in try it, you can download the current stable version of the prototype [ZIP 143KB].

Ant model from PSB with disjoint components identified.

This simple prototype provides a straightfoward method to identify segments in some models from the PSB collection, since they are already coded with disjoint segments.

Identifying segments using disjoint components in a model from PSB.

Friday, February 29, 2008

OFFtoVRLM v0.3 released

Since many 3D models (especially CAD models) are stored in the STL format, I decided to include in OFFtoVRML prototype the capability to read from this type of file. Thus, among some other functionalities, such as reading OFF segmented models, and a few solved bugs, version 0.3 reads files in STL ASCII format. Bellow is a view of the VRML produced from a model extracted from the PRECISE Engineering Shape Benchmark. Another useful new feature is the possibility of including the reference axis in the VRML file.

The current stable version of the prototype is available for download [ZIP 136KB].

VRML model produced from an STL file.

Monday, February 18, 2008

OFFtoVRLM v0.2 released

After a couple of changes, this prototype is now able to generate VRML code with explicit edges and showing both vertex and face normal for models with a large number of triangles. For instance, the Stanford Bunny with 70K polygons is processed in less then ten seconds, generating a 16.5MB VRML file containing the mesh and showing its convex hull, bounding box and sphere, polygon edges and normals at faces and vertices. A larger file, the 345K polygons Armadillo, is processed in around fifty seconds, generating a 70MB VRML file.

For illustration purposes we processed the 'Dino' model from AIM@SHAPE shape repository. It has around 50K polygons and below I show a couple of snapshots of the resulting VRLM model, containing normals and explicit edges.

The current stable version of the prototype is available for download [ZIP 118KB].

VRML model of 'Dino'

Close-up illustrating the normals and polygon edges

Monday, February 11, 2008

Computation of vertex normals

Resuming the development of my OFF to VRML converter, I added one more feature: the computation of vertex normals. For this purpose I follow the method described in the Computer Graphics bible, Foley et.al "Computer Graphics: Principles and Practice in C" . In my approach I use the area of the adjacent polygons to determine the length of the normal vector.

Model with vertex normals and colored according to distance to barycenter

Monday, December 17, 2007

Coloring according to distance to barycenter

In the OFF to VRML converter, it is now possible to colorize the
mesh surface according to distances from the corresponding vertices to the object barycenter.

Mesh with surface colored according to distance to barycenter

Wednesday, December 12, 2007

Computing the 3D convex hull

As a new optional functionality of the OFF to VRML converter, I coded the extraction of the convex hull of a 3D shape based on the implementation of the incremental algorithm proposed by O'Rourke in "Computational Geometry in C". Despite the clear explanation of the algorithm and included code, it took me some time to adapt it to the data structure I am using. However, the expected result were achieved.


3D model and corresponding convex hull.

Tuesday, December 11, 2007

Identification of face normals in the VRML file

I just added one more feature to my OFF to VRML converter: the optional representation of mesh normal vectors in the resulting model. The length of these normals is directly proportional to the perimeter of corresponding polygon.

Model with surface normals.

Monday, December 10, 2007

Showing mesh edges on VRML file

Following my work on the OFF to VRML converter, I added another functionality. Now is possible to construct a model whit explicit edges, as shown in picture below. In the meantime I also computed a bounding sphere for the shape.


Above: Point cloud of 3D model with explicit edges, a bounding box and a bounding sphere. Below: 3D model with explicit edges.

Thursday, November 29, 2007

Creating VRML with point cloud

The new functionality was added to the OFF to VRML file converter I developed. Now it has an option to create, in the VRML file, a point cloud of the model instead of the traditional mesh. Below is an example of such output.

Point cloud for a 3D model with vertices colored according to its order

Wednesday, November 28, 2007

Converting OFF to VRML (and more)

I developed in C++ a small tool that converts 3D models stored in OFF files to VRML files. Besides this simple task, I add a couple of functionalities, such as computing the bounding box of the shape and coloring the vertices according to it's order in the vertex list (just for fun).

The original model from the OFF file, without any processing


The VRML model with the bounding box and the colored vertices


A screenshot of the application output