Showing posts with label VRML. Show all posts
Showing posts with label VRML. Show all posts

Tuesday, November 04, 2008

Spherical Harmonics Visual Representation

Although I had developed most of the code in the last year, just today I assembled all together in order to create a prototype that produces visual representations of spherical harmonics (SHA) signatures. The SHaVisRep prototype receives as input the binary signature created by the the executable for computing SHA representations provided by Kazhdan and produce a visual representation for this descriptor. This visual representation can be a 3D column chart or a 2D line chart in VRML or BMP format, respectively. The Win32 version of the prototype is avaliable for download [ZIP 110KB].

Ant 3D model
___

Shperical harmonics of ant 3D model, represented as a 3D column chart
___

Shperical harmonics of ant 3D model, represented as a 2D line chart


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.

Thursday, March 13, 2008

Shape Segmentation with HFP

I have just combined the fitting primitives mesh clustering (HFP) algorithm proposed by Marco Attene in is paper "Hierarchical mesh segmentation based on fitting primitives" with the prototype that produces the spherical harmonics descriptor (SHA) and cord and angle histogram (CAH) for a 3D model. The result is an application that decomposes a model using the HFP approach and then computes for each segment the corresponding descriptors. This application produces a navigable VRML file containing the segmented model. By clicking on segments it is possible to see the descriptors for that segment and even the segment alone or a possible random sampling. To view an example based on a model extracted from the ESB click on screen-shot below.

Screen-shot of shape description page.

Monday, March 10, 2008

Computing Spherical Harmonics Descriptor

Based on work by Michael Kazhdan, I implemented a prototype that produces the spherical harmonics descriptor (SHA) for a 3D model. To that end I used not only the executables for computing SHA representations provided by Kazhdan, but also some code developed by Simone Marini to read the binary signatures. The results produced by my prototype for shape m87 from the PSB (the dog model I often use) are illustrated below. You can also take a look at the VRML file containing the 3D SHA representation of this model.

2D chart of SHA representation of dog model

3D view of SHA representation

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, 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