Model created with boolean (Cork) operation using a face and a skull (Taung child) |
I always read in 3D modeling websites that Boolean operations were not things that should be part of everyday life for an artist involved with that environment. Besides generating meshes polluted, not always the command works. It just to put a slightly more complex model in the scene for the algorithm to crash or even have an outcome far, far away from the expected.
Examples of Blender's boolean modifier, union, intersection and difference |
Blender, as presented above has a modifier where we can apply Boolean operations, but these operations (although the algorithm shows improvement with each release) lie very far from ideal when we speak of the fields of action above. I suffered a lot when I started teaching classes for students who wish to apply Blender studies in medicine, dentistry, research-oriented human locomotion and prosthesis manufacturing. Everything worked fine, but when we began to enter the area involving the subtraction of a mesh by another ... ah my friends! I assure you that my hair was subtracted before, when they fell because of my concerns, because I never knew the surprise that the Boolean modifier was preparing us.
Model ready to be printed in 3D |
UPDATED! CloudCompare already have a plugin to use Cork! ->
http://www.cloudcompare.org/doc/wiki/index.php?title=PluginCork
I entered the Cork's site, downloaded the library and compiled it. For those who were fearful diantes the words "compile", can be carefree because the process is quite simple, just take the GCC, the Clang 3.1+ library and the GMP library (GNU Multi-precision arithmetic library), which are easily installable via apt-get (tested on Ubuntu and soon I will have to compile for Windows and Mac).
Within the directory "samples" comes in two files OFF (Object File Format) format for you to test the software, which works on the command line and is very easy to be used.
The files are two spheres, the ballA.off (right) and ballB.off (left). After compiling the program, please refer to the executable, or if you're lazy like me, just copy the files into the just ~/bin (not the system, of course) where is the executable.
Above is the result of an operation, the intersection between ballA and ballB. Follows the command used:
$ ./cork -isct ballA.off ballB.off balINT.off
Where "-isct" is the type of intended operation and ballINT.off the output file. Needless to say, the $ should not be entered because it serves only to inform that it is the terminal.
Above we have the difference operation, where we subtract the ballB of ballB.
$ ./cork -diff BallA.off ballB.off ballDIFF.off
The "-diff" comes from difference. You can order files and reverse (A and B) to produce a different result.
Finally we have the union operation between two meshes:
$ ./cork -union BallA.off ballB.off ballUNION.off
Taking the opportunity, it is common that individuals are initiating boolean studies do not understand the difference, for example, the two spheres (first image showing both mesh), a slightly within the other and a mesh created by union (picture above). Basically the difference is that with the "union" we have a clean mesh, with nothing inside their domains than an empty space.
Examples of spheres was used solely for explanation of the operation of Cork. If you need to do simple operations and to manipulate objects in real time ... since they are simple ... I advise you to use Blender. The Cork must be activated in case of using complex meshes, like illustrated the top of the post.
See above how the operations based on the face and the skull of a hominid were made. See how the right plot of the mesh is dense ... it's almost a miracle that the boolean has worked so well!
To make this "miracle" however, you need to export the file in OFF format because the Cork only works with him. If by default Blender does not provide this exporter, the problem can be solved quickly by downloading an add-on created for this purpose.
Tip 1 (gross mode to solve triangulated export):
Before exporting the mesh, please change to edit mode and activate the Triangulate faces through the Ctrl + T command, this will ensure the functioning of operations, since the Cork only works with meshes formed by these elements.
Tip 2 (smart mode):
After I post the link of that material in the discussion group BlenderDEV-BR, the user Dalai Felinto (who wrote the book Game Development with Blender), pointed out that Blender has a modifier that triangulates the mesh, preventing the original object be modified. Thanks for the tip!
Go to Add Modifier -> Triangulate.
However, when I tested the export in default mode I got an error of mesh. To prevent this from happening, take care to keep the "Quad Method" and as the "Ngon Method" both in "Beauty", as in the screenshot above, then yes will work perfectly without errors.
Acknowledgements
I thank my students Dr. Everton Rosa, Marcia Pietrobon and Dr. Rodrigo Dornelles. Also Hermano Peixoto de Oliveira Junior (CTI Renato Archer), thanks to all these people I search this solution and fortunately I found it, so that is now enabling a number of very interesting projects.
I thank my friend Luís Cláudio Sampaio Marques (patola) which has supported this project sedendo its expertise in 3D printing to validate the projections and even an impression, that will materialize the results.
I thank the creator of Cork, Mr. Gilbert Bernstein for the excellent tool and the attention he has given the experiences that I have done.
I thank the creator of CloudCompare, Daniel Girardeau-Montaut, which besides giving me indirectly hint of Cork, also implemented a plugin for it to be used directly in application developed by him!
A big hug for all and to you, dear reader. See you next time!
No comments:
Post a Comment