Sunday 30 October 2011

3D vector GIS with complex models

One of the last experiments we did regards the possibility to use a 3D graphic suite (Blender) to build 3D complex models, connect them to a database (PostgreSQL/Postgis) and visualize them inside a GIS (GRASS).
The image below is an example of the workflow:

  1. 3D documentation of an archaeological record (in this case a grave)
  2. 3D modeling of all the elements (artifacts and ecofacts) of the archaeological record (in this experiment just the skeleton)
  3. visualization inside the GIS of the 3D components of the archaeological record, connected with a DB

Actually we are following two different ways:
  1. build the model inside Blender, import the model in PostgreSQL/Postgis, connect GRASS and Postgres, visualize and interrogate the model in NVIZ
  2. build the model inside Blender, simply export it in a dxf file (without DB), import the DXF in GRASS, connect the 3D DXF to a DB in GRASS and visualize it

We are testing some script done by Andrea Scianna (Dirap, University of Palermo; please not: broken link) which are able to connect Blender with PostgreSQL and store geometrical and topological informations of the 3D models inside Postgis. There is no license in the script, so i guess they are released in the Public Domain (also because they come from a project called "Management and use of distributed 3D data by open source Web-GIS software"). I found the script here (please note: broken link) and i did some test with Giuseppe Naponiello. We started with "script 3" (the simplest) which "allows to connect to a database and write informations using triangular face model". I had to modify a little bit the script to update something (change the connection to psycopg1 in psycopg2 and so on...) and customize it for my db . At the end the script looks like this one (please note: broken link); and it works for my operating system (ArcheOS 4). If you want to use it just remember to customize the script with the data of your db (line 8) and build the db following the schema you can find in this publication. We started the test with a simple model of a skull (as you see in the picture below; please note: broken link) and the script worked perfectly, storing all the data inside PostgreSQL/Postgis.

Then we started GRASS, we set the connection with the database (Postgres) and this is what we get:

Inside NVIZ we were able to visualize our data (connected with the info inside the db) just as 3D points. Our hypothesis is that the script stores the geometrical/topological informations of the 3D models in a way that works for Blender, but is not recognized by GRASS. In other words we think that the script assign the same (numerical?) code to each point of the same triangular face (of course a single point can have more than one of these codes), so that Blender can read the data in Postgis and redraw the 3D model, but this is not valid for GRASS. Anyway this is just our idea and can be wrong. Maybe someone can help us to understand better the script (we are not good enough with Python). Actually we are stuck at this point of the test...


We simply exported a dxf from Blender and import it in GRASS. Our intention is to connect it with the db in a second time with an external key. We did not yet tried it, because we are still favoring the first option, which looks like more direct and promising, so we plan to spend a little bit more time playing with the python scripts written by Andrea Scianna. In the picture below is shown the result we get using directly a dxf file. The problem by now is that in this way we are not able to preserve a direct connection with a db.


If someone wants to help us in this kind of experiment we will be very happy. Do not hesitate to contact us, any kind of clue or information is welcome!

LAST UPDATED  2016-01-29

We are currently studying different solutions for this topic. Nevertheless the subject is still interesting for researchers of other academic fields (e.g. geography). Unfortunately the links to the scripts, which were hosted in the University of Palermo server, are broken. Since the author (+Andrea Scianna) released them in Public Domain (as there was no specific license and, as far as I know, the main topic of the PRIN was "Management and use of distributed 3D data by open source Web-GIS software”), I restored the archive in our server. Currently the scripts can be downloaded here. I strongly suggest to read related documentation (by Andrea Scianna) if you want to use them.

Some data to play with

Back again! It was just a week without internet connection, but it looked like a month...
I saw that the post about the 3D PDF was interesting for some people so i go on with this topic. As i promised to Denis i uploaded the data: if someone wants to do some tests, here it is possible to find the u3d and the tex file.

In the meantime i upload an image from one of the presentation we did in Ferrara. It regards the same data (the skull done with SfM/IBM techniques) and shows an interesting (anthropological) application of the "slice" tool of ParaView (image done by Giuseppe Naponiello).

Wednesday 19 October 2011

Data sharing (Vervò webgis)

One of the main topics during the workshop in Ferrara concerned "open data", and particularly we talked about the problems in data sharing. It looks like that in the last years the the situation did not change very much (at least in Italy): archaeological discussion and research inside the scientific community are still slowed by the difficulties of official institutions in data release (for many different reasons, not least of which a general climate of suspicion between archaeologists).
Anyway, according to our past experiences, we have to say that we were quite lucky, finding often (in our institutional partners) people who did not underestimate the problem and allowed us to share archaeological data in specific project. The media we normally chose for this purpose is the webgis.
The image belows regards one of this projects, oriented to archaeological research and conservation in a small area (the territory of Vervò, in north-west Trentino, Italy).

The webgis was developed in 2009 by Giuseppe Naponiello using entirely Free and Open Source Software (soon Giuseppe will write a post with more technical information about it); the data come from the research of Alessandro Bezzi and are released with a Creative Commons license. The project was possible thanks to Dr. Nicoletta Pisu of the "Soprintendenza per i Beni Librari Archivistici e ArcheoLogici di Trento".
Actually you can visulize the webgis here.

Tuesday 18 October 2011

Gnewarchaeology, a successful workshop

Just a fast report from the workshop "Gnewarchaeology" in Ferrara (see the previous post): the meeting was a success, both for the quality of the presentations and for the discussion. It was a good chance to share ideas and remark the importance to use FLOSS in archaeological research. Soon we will upload our slides. In the meantime we want to thank the organizers (especially Domenico Giusti) for the great job they did.

Saturday 8 October 2011

3D PDF for archaeology

Today I am preparing the presentation for the meeting in Ferrara (see the previous post), so I did some experiments with 3D PDF. I think this kind of documentation has good potentialities in archaeology. To test them I took some old data (the 3D skull done with Sfm and IBM techniques), I build the surface in Meshlab and with the same software I saved an u3d file. Then, with the help of Kyle, I wrote a (very) simple 3d document. The result is the image below. As you can see, to visualize my 3d PDF I had to virtualize Windows inside my VritualBox and run Adobe Reader. Up to now I did not find a pdf reader for Linux which is able to visualize u3d, so if you know one, please let me know...

Anyway, if you want to visualize the result, you can download the file here.
BlogItalia - La directory italiana dei blog Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.