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.

Tuesday, 26 January 2016

gvSIG 2.2 - 3DView plugin

Hi all,
i was playng around the new 3DView plugin of gvSIG 2.2. In this first version it is possible to translate your 2D map into a 3D viewer based on NASA World Wind SDK. Remember that the 2D map must be in EPSG: 4326 . The video below show how to import a vector layer.



The viewer is really fast and simple to use. The active-syncro between 2D and 3D world is a good choice. Since this first version the user is allowed to import vector data, raster data and 3D DTM (as raster). The developers want to improve the import function: features as anaglyph, voxel models, 3D symbols… will be added in the next release.

Thursday, 14 January 2016

ArcheFOSS VIII proceedings finally online!

Hi all,
Thanks to the effort of +Filippo Stanco and Giovanni Gallo, are now finally online (as Open Access) the proceedings of  the eight ArcheoFOSS, which took place in Catania (at the Department of Mathematics and Computer Science of the University) in 2013 (here the ATOR related post).
The event was organized by the Image Processing Laboratory and the proceedings are published by ArchaeoPress, as open access (here the direct link).
Here below you can see the front cover:

The front cover of the publication

In this publication you can find some articles of ours and in particular the analysis of the Taung Project under the aspect of the Open Research (here the slide of the presentation) and +Rupert Gietl's report about the 3D documentation of archaeological underground environment, related with WW1.

Have a nice day!

Saturday, 26 December 2015

ArcheOS Hypatia 3DHOP package (call for testing)

This short post is related with the previous one (about Nexus) and it is a call for testing for the deb binary package (arm64) of 3DHOP, the software developed by the Visual Computing Lab (CNR-ISTI, Pisa - Italy) to create interactive and multi-resolution web-galleries of 3D objects.
Here below you can see just an example of a gallery related with conflict archeology (WW 1), which we are developing in these days.


Example of a 3D web-gallery with 3DHOP (work in progress)

Being a Debian Jessie derivative distro, ArcheOS Hypatia will install 3DHOP in the folder /var/www/html/3dhop-3.0.
The best way to practice with this software is to modify the code of the different examples the package comes with (they are placed in /var/www/html/3dhop-3.0/examples).
For people that wants to help ArcheOS development and test this package, I upload it here. Soon we will prepare also 32-bit packages.

I hope this package will be useful! Merry Christmas and Happy new year!

PS

Marco Callieri (Visual Computing Lab - CNR-ISTI) notified me that Nexus and 3DHOP are under development right in these days, so there will be probably a new version in a short time. As soon as there will be changes, I will update the packages with the new functionalities.

Monday, 21 December 2015

Nexus 3 videotutorial

In order to help people in testing Nexus package for ArcheOS Hypatia (see the related post), I just recorded a fast videotutorial to show how this simple tool works.
Please note that the videotutorial refers to ArcheOS Hypatia's package, where Nexus binaries are stored in /usr/bin (so that they can be start from any path in the terminal). If you compiled your Nexus version somewhere in your home folder, than probably you will have to activate the binary from that directory.
Here below is the short video; I hope it will be useful.




Soon I will upload also the new 3DHOP package for ArcheOS Hypatia, with some instruction about it.
Have a nice day! 

Wednesday, 16 December 2015

ArcheOS Hypatia Nexus package (call for testing)

Hi all,
Since we are working on a project related with a 3D gallery of WW1 remains, we are using the 3DHOP application (which has been also suggested by Nicola Schiavotiello in the ArcheOS-dev Mailing List), developed by the Visual Computing Lab of the CNR-ISTI (Pisa - Italy). In order to exploit the full potential of this software it is useful to use the tool Nexus (see the related issue in ArcheOS github) , to create batched multiresolution mesh structures (to enable Level of Details  - LoD - visualization). 

An example of simple visualization in 3DHOP


For this reason, today I took the occasion to build a simple binary package (for amd64), to be tested for ArcheOS. If someone wants to help in testing the package, it can be downloaded here. Please report in the comment of this post your feedbacks. 

Thank you all!

LAST UPDATED 2016-01-29

In order to implement the two new packages in ArcheOS Hypatia in a short time, we changed the architecture field of the control file of 3DHOP deb package to let it work with all the machines, while we compiled a new i386 package for Nexus. If you want to test the new packages, here are the new files:

3DHOP (architecture all)

Nexus (architecture i386)
Nexus (architecture amd64)

Soon we will update archeos-meta in order to implement these two software.

Any help in packaging is much appreciated!


Thursday, 3 December 2015

Three more animals are saved with the aid of Blender and 3D printing


Three more animals were saved thanks to a partnership between classical Veterinary Medicine and new technologies. Victoria the goose, Greenie the parrot and Beakolin the toucan were given again the possibility to feed themselves without the aid of keepers.

Ganso passa por cirurgia inédita e ganha bico artificial
Bom Dia SP (Tribuna-Globo)Ganso passa por cirurgia inédita e ganha bico artificialLink original: http://g1.globo.com/sp/santos-regiao/bom-dia-sao-paulo/videos/t/edicoes/v/ganso-passa-por-cirurgia-inedita-e-ganha-bico-artificial/4610917/
Posted by Cícero Moraes on Segunda, 16 de novembro de 2015

Victoria the goose was the first of her specie to receive a 3D printed prosthetic beak. She was found by Mr. Christian Negrão of the NGO Amigos do Mar (Friends of the Sea), at Comprida Island, about 200 km from São Paulo.



Her initial conditions were quite shocking.

A considerable portion of the rhinoteca (upper beak) and gnathoteca (lower beak) were absent.

Using his dental knowledge, Dr. Paulo Miamoto initialy cast a mold of the animal.

Next, Dr. Miamoto drew several lines on the cast, in order to make it easier for the photogrammetry algorithm and took pictures of it, using the digital camera as a 3D scanner.

Then my work began.

These pictures were sent to PPT-GUI, which converted them into a pointcloud. The resulting files were imported into MeshLab and the pointcloud was converted into a 3D mesh. The file was exported to Blender as Collada (.dae).

The airways were mantained on the prosthesis that was modeled from the original beak, on appropriate scale. This was possible thanks to an addon developed by Dalai Felinto at request of Dr. Everton da Rosa, a Dentist that grant permission to use this script (under development). This addon has brought Cork inside Blender. Cork is a standalone dor complex 3D boolean operations.

The resulting model was exported as a STL and open in Slic3r, which generated G-Codes for 3D printing. This process was greatly helped by Claudio Sampaio (Patola).

The Gcode file is nothing more than a set of instructions organized as a text, which is read by the 3D printer and makes possible to materialize objects.

The 3D printed model fit perfectly the model created by Dr. Miamoto, which was also responsible by the print and finishing of the prosthesis (which received a yellow layer of dental resin, that works as both aesthetic improvement but mainly as a structural reinforcement).

With the prototype the surgical procedure was initiated. Aenesthesists Dr. Marco Antônio Ramiro de Campos and Dr. José Pedro Estrella started the operation. Next, Veterinaries Dr. Roberto Fecchio and Dr. Sergio Camargo, from University of São Paulo (USP), along with Dentist Dr. Miamoto adapted and cimented the prosthesis.

The procedure was a great success and up to date, Victoria the goose is perfectly adapted to her beak prosthesis.

Confira como é feita a cirurgia de prótese 3D
Matéria veiculada no G1: Tucano foge da eutanásia ao receber prótese inspirada em 'Lego'; vídeoLink: http://g1.globo.com/sp/santos-regiao/noticia/2015/09/tucano-foge-da-eutanasia-ao-receber-protese-inspirada-em-lego-video.html
Posted by Cícero Moraes on Sexta, 18 de setembro de 2015

Another case was of  Beakolin toucan, that grew with a malformation on his beak. This made it impossible for him to feed without the aid of a keeper.

The procedure was the same as described for Victoria's beak. A model was cast and digitized in 3D. A beak was modeled and wrapped around the malformation. This resulting model was 3D printed, received surface treatment and was adapted onto the animal. Shortly after the surgery, Beakolin started feeding by himself.

G1 em 1 Minuto - Bicolino
"Mãe tamo na Globo"!!! G1 em 1 Minuto apresenta o projeto que envolveu a criação de uma prótese para o tucano Bicolino durante o programa Bem Estar. 18/09/2015Conheça a história: http://g1.globo.com/sp/santos-regiao/noticia/2015/09/tucano-foge-da-eutanasia-ao-receber-protese-inspirada-em-lego-video.html
Posted by Cícero Moraes on Sexta, 18 de setembro de 2015

By the way... Beakolin was a national highlight in Brazil, as he was shown during G1's morning bulletin at Globo TV`s Bem Estar show.

Last but not least, there's Greenie's case. The great fear of the team was that the prosthetic beak, printed in PLA, would not resist to the mechanical effort that this species demands on its alimentary habits. The vets had to adapt the tip of the beak to relieve a bit of the load at the extremity. Thus, another animal was now independent to feed and enjoy life.

As it is a very new technique, we still do not know whether or not these prostetics will resist to constant load, but the more important is that we are always ready and alert to help these little warriors with what they need and with what is within our reach.

I can never thank enough this spectacular team, which permitted that I could be part of all this, and converted studies that were once limited to a virtual environment to a very material and life-saving reality. Thank you very much!
BlogItalia - La directory italiana dei blog Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.