Silver Lighting

What is this site about?

The content you'll find here revolves around an old piece of silver, engraved with bas relief writings that celebrate a very special occasion. It is in fact a medal using 800 % silver, crafted to remember the 25th year since graduation at the University of Pisa. It was given to my father in 1999.

Why a website?

The idea behind this started as a project. Actually, one to be developed for the same University and field of study my father took his graduation in, which is Pisa's University of Informatics. The medal was proof of his effort, and I wanted to show it in a new light - quite literally. More on this can be found in Dev, with a practical example of my work viewable at Play.

In time
who has knowledge knows,
who does not
his own loss.

A history of tradition

The University of Pisa has been remembering its former students since 1956, and has been aided in this by the A.L.A.P ( Association Graduates Atheneum of Pisa) since 1967, when the Association was founded. Every year a ceremony is held to reunite those who shared experiences and study effort, and to reward one amongst them who achieved great results in his life. This person receives a prized called "Campano d'oro", which roughly translates as "Golden bell". Everyone then is gifted with a silver or golden medal, whether he graduated 25 or 50 years back.

The medal

The artwork engraved on the silver is quite refined, although the years have smoothed the edges and some of the finer details are lost. On the front is depicted a monument dedicated to Galileo Galilei and sculpted by Paolo Emilio Demi for the University of Pisa in 1839. A circular writing describing the subject of the image goes around the edge of the medal, with the words "Monument (dedicated) to Galileo inaugurated at the headquarters of the university the year 1839". On the back a different circular writing explains what the medal celebrates: "THE UNIVERSITY OF STUDIES OF PISA - TO HIS STUDENTS IN THE 25th YEAR SINCE GRADUATION". In the center is portraited the yard in front of the "Palazzo della Sapienza" (Palace of Wisdom) building in Pisa, and the lower part of the engraving hosts a smaller text, curved to follow the shape of the medal: it is a motto about wisdom, traditionally related to the University La Sapienza. The words, quoted on the homepage, say "In time who has knowlege knows, who does not his own loss".

A new light

Click on the images at the right to show interactive 3D renditions of the medal, both front and back, which were created using RTI-PTM technology. You can move a virtual light above it to bring different details to life and change the overall appearence of the image. This visualization employs WebGL, SpiderGL, HTML5 and CSS3 technologies: a browser supporting those will allow you to interact correctly with the image. More on the developing process and technical details can be found in Dev.

Requirements

A capable browser is required to correctly display the images below. If you encounter any problem, the latest Google Chrome version is recommended. Alternatively you can download the original images and view them offline using the dedicated software, courtesy of the Cultural Heritage Imaging, available for Windows and OSx platforms.

Project target and motivations

The goal of the project was to create a relightable image, which is a 2D image having the implicit geometry of a 3D one. This gives the user the ability to change the light source direction in real time, so that different details of the image can be better seen. There are two different mathematical approaches to RTI ( Reflectance Transformation Imaging), and those are called respectively HSH and PTM. Each has its advantages and weaknesses, so it's a trade-off and one must choose what matters most for his visualization. The HSH was developed after PTM, and works better with shiny objects and objects having a lot of self shadowing, thanks to the higher number of coefficients describing every pixel of the resulting image. That's why I chose it, since I was going to work with a silver medal.

There are of course other acquisition techniques, but those are not fitting our needs:
  • 3D Scan is not appropriate, since our surface is almost 2D and we would need a very accurate processing. Also, the reflectance of laser beams on silver is a bit tricky.
  • Image Based Modeling is really for 3D, creating the model from pictures taken around the subject, but our case we're not interested in viewing our medal from different angles.
  • Dense Stereo Matching also works with pictures, but the resulting quality is way below our desired standard

So how does one create a HSH ( or PTM, they're the same acquisition-wise)? You have to take photos. Lots of them. Each one with the very same framing but under different lighting, meaning you point some light source to the subject following a virtual hemisphere. Also, you need to frame a black o red ball a fraction of the subject's size. It has to be shiny, so that the light reflecting from it is basically a white spot. The processing software will analyze each picture, find the ball position estimating a median from the whole lot, and then calculate the light source in each picture from the white spot position on the ball. Finally it will use a polynomial function to determine the color to be rendered for each pixel in all the different light source conditions.

Creating a workspace

This step proved to be quite difficult, especially in the beginning. I was sure about the tools I was going to use, just not as sure about how to set them up. I had:
  • Nikon d7000 reflex
  • HTC One S running Android with reflex remote app
  • USB OTG cable to connect the two
  • 35mm 2.8 lens 55200 3.55.5 lens
  • Tripod
  • Camping compact torch
  • Black ball from an earring
  • A piece of printing paper, A4 size
  • Paper duct tape (lots)
  • Sticky strips to hold the medal firmly in place
  • Rope for distance measuring

At first I tried a vertical camera setup, with the medal sticked on the paper which in turn was taped to the floor. I placed the tripod-mounted Nikon directly above the medal and focused manually using the Android app to get the best precision. The lens I used then was the longer 55-200mm to get closer to the subject, however I soon encountered a few problems: I still had to zoom almost to the max, losing depth of field on the already thin medal and more importantly losing sharpness. Not only that, I discovered that pointing the light beam from some angles was rather hard when not completely impossible. So the vertical setup proved to be a failure.

I then came up with the logical conclusion of going horizontal: A4 paper taped on a wall in the living room, and tripod-mounted reflex pointing straight at it. This solved most of the lighting issues, but another problem came up, and that was distancing. I knew I had to try and keep the light distance from the subject as uniform as possible to get the best results, given the small scale of the whole workflow, so I tried to use a string of rope tied to the wall and to the torch, but it went in the way of the camera even worse than with the first setup. I had find a way to maintain the distance without going between camera and subject, something that gave me quite the headache. I was quite stressed, so I decided to scrap all the setups and ideas I had in mind and started fresh.

I knew that, theoretically, lights had to come from a virtual emisphere around the subject, and I needed something to "draw" that spherical pattern. Well, if you turn a semicircle around its edges, that's what you get: whole sphere with a 360 degrees rotation, and PacMan with a little less. I just needed 180 degrees and something to conjure that semicircle into reality, so why not using some cardboard from all the eBay thingies I got via courier? I took a compass, made some rough estimates, and drew a circle on the cardboard which then I cut with, well, a cutter. I taped it on the wall so that when perfectly horizontal it would cut the reflex frame in half, thinking it would not affect the camera's FOV at such a short distance. That proved to be only partly true, because I still had to shoot rotating the carboard at different angles, not all of which were picture-safe.

In the final configuration I cut the carboard I had crafted in two halves, leaving enough empty space between them as to have a clean FOV no matter the angle. Photos were taken starting with the two halves almost against the wall and then raising them at equal heights for each round of shoots until I reached the wall again, making a full 180 degrees. To keep them held up I used some rope and again the wall as a support. Some of the lighting would have to come from where the reflex body was, and that was something without a possible solution. I tried to put the torchlight as close as I could to the camera body and then angle it up or down, left or right following the semicircular patterns.

The setup was good enough, and the resulting pictures too. To shoot in sequence I used an Android app that let me automatically fire the camera at predefined intervals. Each image should have been identical to the others in terms of framing, since I used a tripod and didn't touch the camera body at all. However, there was a slight misalignment between scores of pictures, and I had no idea why until I realized that medal, A4 paper and cardboards were all connected and so, when I moved the cardboards, the paper was slightly pushed or pulled and the medal with it. The solution? Sticky strips between the paper and the wall itself, right behind the medal. That fixed once and for all. You shall not move.

Focusing with the shallower 35mm I was using proved to be a little tricky too. Luckily it is a very bright lens, so I could step down some F-stops and gain a decent depth of field, while still being quite close to the subject. For those who don't know, the depth of field is a way of saying how much of what you shoot is focused: since your subject has tipically some depth, you want all of that to be in focus. Our medal is thin, but it still is engraved with bas reliefs so our DOF cannot be too shallow. F-stops are a measure of how much light will reach the camera sensor when you open or close the diaphragm that stand between it and the glasses of the lens. The more you close that down, the more DOF you get and the darker your picture will be. So it's a tradeoff between focus and brightness where you have to find the right balance. Also, each lens has a minimum focusing distance: get closer than that and you won't be able to focus anything because of the lens physical limits.

Counting all the different tests and trials, I took three rounds of acquisitions for the front of the medal, and two for the back. You never know when you accidentally brush against your tripod a little too forcefully, until hundreds of pictures later you are sittig at your PC and realize they're misaligned. Then you bang your head to the wall.

Processing the final result

With the correct pictures in hand, I proceeded to edit them. I did a crop to leave only the medal and the black ball in view, and made a uniform monochrome background for the medal that would blend nicely with this website. To create the HSH itself I used the RTIBuilder software provided by the Cultural Heritage. It shows you a map of all the light points on the ball together, so you get a good idea of the coverage you managed to achieve and can take some more shoots if you see some uncovered areas. Before creating the HSH, you can select a rectangular area that you want to render, basically a crop. I used the monochrome background as the delimiter of my cropping area. Another software was used to transform the HSH file into something that can be displayed and interacted with online. It basically creates a series of tiles from the whole image at different resolutions to optimize zooming and rendering, similar to what Google Maps does. Some javascrpits and proprietary libraries and a XML descriptor are used for the actual live rendering. All of the software I used is linked in the article and can be found at the Cultural Heritage website.