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.


lorenzo.marchi said...

Thanks for the tutorial...I will surely try as soon as I have some time...however holding one of this in my hands was great :D

Anonymous said...

Spheres are one of the most common things on the universe, it seems like everything in the space vacuum take the form of s sphere, many ancient civilizations new about this sacred geometry patterns.

buy viagra

Danny said...

Thanks for posting this tutorial. I am new to MeshLab, and I really appreciate this tutorial. I was wondering if it is possible to use MeshLab to create a complete solid from a surface. Right now, I have a surface of an object, but it is completely hollow inside even after completing this tutorial. How do I go about making the interior solid?


Danny said...

If anyone have any idea, please email me at idannyou@gmail.com

Thanks in advance,

robert said...

Very much appreciate the tutorial. The step-by-step description was helpful. Was wondering if anyone has a similar procedure for basically doing the opposite of putting holes in the mesh. I am trying to put "bumps" on a surface.

Thanks again

blah said...

I think meshlab must be one of the most frustrating modelling programs ever. I got this to work once and then never again. It makes blender look accessible. I can see this is a great piece of software but where the hell to start. AGGGHHHHHHH

EricM said...

Did you ever describe the parameters for Uniform Mesh Resampling. I am trying to use this command but I cannot get the output I am looking for. I tried posting the question to the MeshLab forum with no luck.

Generic viagrabuy said...

Great job such a nice blog which you present
Generic Viagra
Tadalis SX

Bisrat Girma said...

I have a closed surface which is hollow inside and I want to change it to solid in meshlablab.
Any help is welcome.


Christopholo said...

Good idea...easy to follow

YKM Middel East LLC said...

Поставщики сетки из нержавеющей стали в России
Поставщики сеток с эпоксидным покрытием в Россия
Поставщики никелевой проволочной сетки в Россию
Поставщики сеток для алюминиевых окон в России
Поставщики горячей сварной сетки в Россию
Поставщики сварных сеток с ПВХ покрытием в Россия
Поставщики сварных заборов с ПВХ покрытием в Россия
Поставщики сварных сеток с порошковым покрытием в Россия
Поставщики оцинкованной сварной сетки в Россию
Поставщики проволочной сетки в Россию