Friday, 29 January 2016

Blender 3D and Cork, a duo that saves lives and rebuilds heritage


Statue of Saint Martin de Porres ready to be printed in 3D
I've always loved to study, no matter the subject. I constantly "lost" a lot of time of my life testing a technology or discovering a new way to do what I was already able to do in a conventional way. The fun of all this was to learn it and not necessarily to apply it. I was often asked why I was doing this and found myself in serious trouble to answer, which was something like, "Look, I don't quite know what this is, but I imagine one day I may need it”.

Some pieces before the boolean operations with Cork - base body modeled by Daniela Ayma
Time passed, and as I assumed myself as a nerd at 16 years-old, I did a lot of that, I studied things without knowing for sure what for I'd use them, but kept studying. It's been already 17 years doing that same thing,which is more than half of my life. In the meantime I realized that sooner or later an application might appear and it's best to study it hard and not to know where to use it than not studying hoping that inspiration will come from heaven.

Example of a boolean operation performed with high resolution meshes
The fact is that after a while the question "what is it for?" started to bother me deeply. It is expected that sooner or later people, bearing the intelligence that is inherent in them, will know where to use that load of knowledge.

3D printing performed with two materials (rigid and flexible). Thanks to Claudio Sampaio Marques (Patola)

If on the one hand I was becoming grumpy, impatient to explain others what a knowledge is for, on the other I realized that it's essential to have motivation to "sell" ideas, i.e., it must be very clear in our minds we intend to do when we call in other people in our personal projects. This requires knowing quite where we want to arrive.

Fortunately, the grumpiness disappeared and here I am sharing with you one of these projects. A study that began almost by pure curiosity and became a series of actions that have even saved lives.


The Problem of Boolean calculations in 3D

In Blender there is a so-called Boolean modifier. With it you can do calculations as "difference," "union" and intersection "using two 3D meshes. Who works with modeling and animation knows the term and also knows that if the meshes start to stay heavy and complex, the calculations usually have problems. Not unwillingness of developers ... they strive and ask for users to submit the "bug reports", but it's a little tricky to do for those who do not understand programming, or expects the program has to resolve this type of situation .


Globo Natureza: Prótese Animal
[VÍDEO] Nosso trabalho de criação de próteses para animais é tema do GLOBO NATUREZA!Link original: http://goo.gl/h3ykF7
Publicado por Cícero Moraes em Segunda, 4 de janeiro de 2016
Video featured on Globo TV's show Globo Nature where the case of the tortoise Fred is highlight

In my case Blender's Boolean had always functioned well. All I needed so far had been solved with the modifier and its basic operations. The problem began to appear when I began my studies on prosthetics. The first fire test I did was to create a hypothetical prosthesis for a digital skull that had suffered considerable loss of bone tissue. To me it seemed obvious that all would work well, but as I started working the Boolean on the complex mesh of a skull, I realized what a problem I had gotten myself into.

The Boolean and orthognathic surgery

In August 2014 I was contacted via email by Dr. Everton da Rosa, a renowned orthognathic surgeon seeking partnership for the development of a surgical planning technology using free and open-source software.

Initially he hired me to teach Blender, InVesalius, MeshLab and other software, all intended for the simulation of virtual surgery. Things went very well, until we have to simulate the cutting of bones. When the need to use Boolean appeared... crash! The tool bugged already on the simplest cuts.

Virtual ostheotomy performed by Cork
How could we solve this? I was a little embarrassed to see Blender not work properly, but the fact is that it was not originally designed for that type of work. We were talking about meshes easily reached up to 400 MB, how to proceed with the calculations of such an “elephant” like that, when the program was developed to work with a “mouse”? That's when I used a knowledge which until then was not, shall we say, very useful in my teaching activities of computer graphics... it was the knowledge related to compiling programs.

Out of pure intuition, I looked up if there was any standalone Boolean software. I found a topic in CloudCompare forum which spoke about Cork. Long story short, since I wrote a post about it for a while, I managed to compile the program and proceed with the complex meshes of calculations in Blender.

The only problem is that for Cork to work we had to export the meshes to use Cork by command line, or in CloudCompare's GUI, where it had been adapted. It was hard to teach and it gave more work for Dr. Everton, which had to forcelfully learn how to use the command line. And not just him, another health-area student of mine, Dr. Rodrigo Dornelles, Plastic Surgeon, also had to meet the pleasures of the black small screen.

Creating an Addon - who knows it, knows it.


We had solved this problem. We knew how to do very complex calculations, but we spent a lot of time doing them. That's when I thought about contacting my friend Dalai Felinto, an expert in Blender Script.

I explained to him how we did the Boolean calculation process, sent the codes of Cork and he began to study a way to carry everything into Blender. I thought it would take a long time, but he surprised us and gave us a test tool in a few days... who knows it, knows it.

Addon interface developed by Dalai Felinto (beta)

To our joy everything worked well on several different operating systems (Windows, Mac and Linux) and start to use Cork directly within Blender.

With a clear head I could devote myself to other studies and one was precisely the making prosthesis for animals, a fantastic project we were doing together with a number of professionals on the field of veterinary medicine and dentistry.

Obs .: I would like to thank my fellow Paulo Amorim, from CTI Renato Archer for compiling Cork for WIndows. I have no idea how to do this on this operating system.

Saving Lives with Blender and Cork


I never said it openly, but I used Cork addon in every project we did to create prosthesis for animals. Our team decided to keep everything secret until we are sure that the tool was good even. Fortunately it proved itself successful after many favorable results.

Stages of making prosthesis using the animal's beak as a volumetric subtraction parameter

The first animal we helped was Fred the tortoise. The shell we created for her was made possible thanks to the use of Cork within Blender. This enabled us to achieve a structure in record time.

The second animal was Zeca the stressed toucan that broke one beak after another. The third was the toucan Bicolino... then the goose Victoria and finally Verdin the parrot. So far it's been five animals and right now I'm a flight to Brasilia, where I will meet the team for a few beers and talk about the sixth and the seventh animal that we will save.

Here's two posts on the subject:



Saving the Heritage

The power of the tool goes further. We initiated a project with the Religious Art Museum of Santos attempting to restore missing pieces of religious artistic pieces that have been deteriorating over hundreds of years. We intend to rebuild dozens of pieces and at the end share with the community the technical and artistic results of the project through articles and publications.

Cork used to recovery historical pieces, such as missing toes of Christ present in the Museum of Sacred Art of Santos (SP)

Note: We thank the architect Fernando Gregório, Secretary of the Religious Art Museum of Santos for the welcome and trust. Personally I also thank Dr. Paulo Miamoto for his motivated spirit engaged in our projects, not just providing his vast scientific knowledge, but also material resources, to print the pieces that will recover the history of Santos and Brazil.

Obs.: Dr. Paulo Miamoto also translated this post... thank you very much!

Printing Cultural Projects

Another area that was highlighted by Cork Addon was the cultural project of the Facial Reconstruction of Catholic Saints. Print files of the busts have been prepared from Boolean calculations, featuring speed and accuracy in the process of creation of life-size busts.

Saint Paulina. Stages of making a life-size bust: 1) 3D Modeling, 2) Mesh preparation for printing, 3) Paint on 3D printing. 4) Presentation of the bust to the faithful. 3D printing: CTI Renato Archer, painting by Mari Bueno

Conclusion

Cork adapted to Blender opened up a huge range of possibilities, especially when we talk about 3D printing field. On the one hand the Blender native boolean tool is excellent for simpler parts and asking for a test results in real time, on the other Cork is powerful with more complex meshes and requires a great processing power.

Following the natural path of these tools, Dr. Everton Rose decided to share the addon, especially because we are developing a plan of courses aimed at application of computer graphics in healthcare. It is possible that soon the addon will available on a site like BlenderMarket at a very affordable price, so that the aid can cover the investment made to carry out the tool and who knows, may foster the development of others that come around .

The fact is that, in the end everyone ended up winning, believers, historians, artists, and most importantly, the animals had a second chance to regain life.

No comments:

Post a Comment

BlogItalia - La directory italiana dei blog Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.