Showing posts with label 3D printing. Show all posts
Showing posts with label 3D printing. Show all posts

Wednesday, January 6, 2010

Desktop Manifacturing

The January 2010 number of Make will contains a lot of stuff about Desktop Manufacturing, a field where MeshLab has always been useful as an all purpose repairing tooling (and it is often cited as a handy free stl viewer...). In particular in the "3D Fabbing state of the art" of Make, they refer MeshLab as a "really high quality free software". That's flattering :).

Tuesday, November 3, 2009

3D scanning and unrolling an ancient seal

A few lines on an interesting recent project I participated and that exploited MeshLab processing abilities.
The project whose results are now shown in a exhibition at the Louvre involved the scanning with non traditional technologies of the very small and wonderful ancient Cylinder Seal of Ibni-Sharrum (photo © CRMF / D. Pitzalis), a precious antique mesopotamic artifact that is considered one of the absolute masterpieces of glyptic art.

This small seal was digitally acquired at CRMF at a very high resolution and with a variety of 3D scanning techniques (microprofilometry, x-ray Tomography, photogrammetric techniques) and, obviously, the results were processed and integrated entirely with MeshLab.

Among the nice things that we did inside MeshLab was the virtual unrolling of the seal, e.g. getting the inverse shape that you get when you roll the seal over a soft substance like clay or wax.  It was quite easy from a technical point of view, but very appreciated by the restorers that disregard invasive plaster based techniques that often can leave small residuals over the precious artifacts.  You can find more details on the whole acquisition and processing of the seal on this VAST conference paper.





 

On the side you can see a couple of renderings of the 2-million of triangle model of the unrolled seal; the renderings were done inside MeshLab, the first one is a simple flat shaded rendering, while the second one exploit a nice shader that I have recently added to the MeshLab shading arsenal, it mimics in a shameless way the ZBrush technique of varying shininess and color according to the "cavities" of the geometric model (they use it for the famous zbrush wax and bronze materials).  It is nice to see how the shading vastly improve the shape perception of the 3D model.
I have not seen many correct discussion on how to perform these kind of shading, so expects a post on that...


A massive physical reproduction (4 meters long!) of the unrolled seal is at the center of "OnLab" a thematic exhibition of Michel Paysant, that will open in the next days at Louvre, Denis Pitzalis worked a lot on this project and you can find  more details and photos in his blog.

Tuesday, April 7, 2009

Creating Voronoi Sphere (2)


Second part of the description of how this voronoi sphere was created.

At the end of the previous post we ended with a thin surface representing a sphere holed with a voronoi pattern.





  1. convert the paper-thin surface to a solid structure.
    This can be done by exploiting the offsetting capabilities of MeshLab. The filter "Remeshing->Uniform Mesh Resampling". In this filter a mesh is re-sampled by building a uniform distance-field volumetric representation where each voxel contains the signed distance from the original surface. The surface is then reconstructed using the marching cube algorithm over this volume. Resolution of the volume obviously affects the resolution (and the processing time!) of the final mesh. The distance field representation allows to easily create offset surfaces. There are various options for building offset surfaces, I will discuss them deeply in another post, for now just set the "Precision" parameter to 1.0%, and the offset value to 53.0% and check the "Absolute Distance" flag. After a few tens of secs you should get something like the side figure.



  2. simplify a bit to get rid of the bad triangulation quality of a Marching Cube (there are a lot of thin bad shaped triangles around), a percentage reduction of .75 is usually enough to both reduce a bit the size of the mesh and to improve its quality without affecting in a significant way the precision of the result.






  3. Apply a few times the Filter Remeshing->Curvature flipping optimization, that improves how the triangles adapt to the shape of the curvature without increasing their number.









  4. Refine and smooth up to a mesh of approx 1.000.000 triangles.
    A rather overtessellated mesh is needed here to guarantee a good approximation of the geodesic distance.





  5. At this point we repeat no this dense mesh the same steps we did on the original sphere. E.g. all the steps described in the previous post:

    1. Generate 1000 poisson samples over the surface (it takes a bit of time this time...)



    2. Color the mesh according to the back distance from these samples (voronoi coloring filter)



    3. select the faces with quality in the range 0..epsilon




    4. invert selection and delete




    5. offset the thin surface to convert it into a watertight solid object. This final offsetting obviously require an higher precision (and higher processing times).



    6. Some iteration of simplify-optimize-refine-smooth just to beautify the final mesh.



And that's all! Varying a bit the parameters in the middle of the whole process greatly affect the final result. For example you can easily get a fat donut style by increasing the offsetting value. Below a high res snap done with meshlab with ambient occlusion, and thin antialiased wire frame lines. A real, touchable 3D print of the object can be obtained on Shapeways.

Friday, March 27, 2009

Creating Voronoi Sphere


February 2016 update. You can make it online without even installing anything, by using the new browser based version of MeshLab: www.meshlabjs.net 

MeshLab is quite useful for a lot of classical mesh processing tasks, but sometimes it can be used for more weird things. A few weeks ago, after stumbling upon the cool Shapeways 3D printing service I uploaded there a few artsy mathematical sculptures that I created with MeshLab. Here is how I did this one, called Voronoi sphere.
It is a double Voronoi diagram, in the sense that there is a coarse Voronoi diagram over the sphere surface but also the surface that creates the edges of this diagram has been carved to create another finer Voronoi diagram. Such a shape is really very light and thin but much more robust that you could imagine.



  1. Start from a sphere (file->new->Sphere),




  2. Refine it using Filter>Remeshing>Loop Subdivision surfaces. repeat without shame (lowering the edge threshold parameter) until it becomes reasonably well tessellated. 300k faces are enough.



  3. Create some well distributed samples over the surface using
    Filter>Sampling>Poisson Disk Sampling. 50 points are a good choice. Apparently the filters does nothing, but if you reveal the layer panel (guess the icon in the toolbar :)), you can see that there are two layers. Make invisible the first layer and switch the rendering mode to points: you will see the well distributed Poisson samples (hint: alt+mouse wheel change the drawn size of the points).

  4. Create the actual Voronoi diagram by simply choosing the filter
    Color>Voronoi Vertex Coloring. As reported in the top of the parameter window, this filter, given a mesh M and a point-set P, project the points of P over M and color each vertex of M according to the geodesic distance from these projected points. Marking the backdistance flag in the parameter window the filter computes the distance from the borders of the Voronoi diagram instead of the projected sites itself. This filter, beside coloring the mesh, writes on each vertex of the mesh the distance value itself, in the all-purpose attribute named 'quality'.


  5. Make the mesh layer active, and start the Select by vertex Quality filter. enable the preview option and enable visualization of selected faces. Play with the slider until you get something similar to the image on the right; in practice, exploiting the quality value stored onto the vertices that code the distance from the border of the Voronoi diagram we have just selected the faces very near to these borders.




  6. Apply the Filter>Selection>Invert Selection and then delete the selected faces. Edges are probably quite jaggy, so apply a couple of times the simplest of all the smoothing filter, the old classical laplacian filter (Filter>Smoothing>Laplacian Smoothing).

Now stop and save the mesh. Next post will show you how to continue by transforming the current mesh, that is a surface, into a solid object ready to be printed. In the meantime if you like the sculpture, you can buy a small (10 cm) and cheap (less than 20$) copy of this sculpture here.