Web RTI Viewer: web publication of RTI models

0
492

Following somewhat the line of tools for the publication and dissemination of content via the web, we delve once again into the field of Reflectance Transformation Imaging, better known as RTI, which I have already addressed in previous articles.

RTI is one of those graphic documentation techniques which, along with 3D, is not particularly user-friendly when it comes to being published or disseminated via the web, or even in any other format, as it requires specialized viewers to access its full content.

Fortunately, recently the problems of publishing materials derived from RTI have been minimized thanks to the work of Gianpaolo Palma from the Visual Computing Laboratory – ISTI CNR and his “Web RTI Viewer,” a tool based on a conversion utility (unfortunately only for Windows) and a series of very easy-to-implement Javascript libraries, which will allow us in very few steps to publish our RTI model on the web, thanks to HTML5 support and, of course, the now ubiquitous webGL.

The process is tremendously simple:

After downloading the project, two Windows executables for 64 and 32 bits are included, to which we simply have to pass our model in .rti format and the quality level of the resulting model via command line:

webGLRtiMaker.exe mimodelo.rti 80

This will generate a directory with all the “pieces” necessary to compose our RTI image.

For its publication, the project download itself includes a very simple example to follow called “webViewer.” Inside this directory, we will find an example project within the “webrti” directory which we can replace with ours, and the files necessary to make the project work, namely: CSS, JS, and SPIDERGL.

The viewer.html file, which we can compose according to our needs, requires little more to function than the following documents:

  <link type="text/css" href="css/ui-lightness/jquery-ui-1.10.3.custom.css" rel="Stylesheet">
  <link type="text/css" href="css/webrtiviewer.css" rel="Stylesheet">
  <script type="text/javascript" src="js/jquery.js"></script>
  <script type="text/javascript" src="js/jquery-ui.js"></script>
  <script type="text/javascript" src="spidergl/spidergl_min.js"></script>
  <script type="text/javascript" src="spidergl/multires_min.js"></script>

And the call to the object that gives rise to the viewer itself:

 
  <div id="viewerContainer">
  <script  type="text/javascript">
  createRtiViewer("viewerContainer", "webrti", 900, 600);
  </script>
  </div>

Where “webrti” can be changed to the name of the directory with our project.

In this way and in very few steps we can have a viewer like this one, where a dry seal from 1854 is shown. It should be noted that although the web model occupies barely 10% of the weight of the original model, this example takes up about 9Mb in total, and although the loading is progressive, a few seconds of waiting are necessary for the initial load to complete.