Skip to content

Tutorial

Federico Ponchio edited this page Oct 18, 2021 · 4 revisions

New dataset

File->New and select the folder with the images to be processed. You can save a project (.relight).

White Balance

A correct white balance in the image set should really be established before capturing the images. If I had implemented this function you could actually make minor adjustments using Relight. I will, sooner or later.

Light Directions

In order to create an RTI we need to establish for each photo and for each pixel a light direction. There are two methods: using one or more reflective spheres placed on the surface and use the light source reflection to estimate the light direction, or use a dome with a number of leds and the geometry of the dome is used instead.

Reflective spheres

Locate the sphere on the image, zoom in using a the mouse wheel, create a new sphere (Edit->Add a sphere), and doubleclick on the boundary of the sphere in at least three different locations. Two circle should be drawn on the sphere. You can move the points on the boundary to adjust the circle. You can remove a selected point using the Canc key.

Once all of your sphere has been identified, use the Edit->Find Highlight menu entry to automatically idendify the highlights. A green dot, for each sphere will mark the highlight or red to signify no highlight could be detected. The highlight can be adjusted manually.

You can have a look at the lights spread using the Show highlights button under the sphere list.

Dome

The geometry of the dome is known and a set of directions is usually provided in .lp format. Just use the File->Load LP menu entry to load the light directions. Using a reflective sphere the dome directions can also be computed once (as done in the previous paragraph) and saved in LP format.

Export RTI

Once the light directions have been computed we can export an RTI using the Export -> Export RTI... menu entry. A few parameters needs to be specified. You can select the area to be processed using the crop button.

Basis

Different basis can be used to model an RTI, the first and simpler is PTM (Polynomial texture maps) which uses a polynomial (usually second degree) to model the luminance. It is very robust but unable to accurately model reflections. HSH (Hemispherical Harmonics) is another robust base with higher accuracy.

Format

RTI format is the classical format used for example by RTIViewer to be used locally with an application.

All the other formats can only be viewed online using Openlime or Relight viewers. Relight is another format more accessible, composed by a .json and a set of images where the coefficient planes are stored, suitable for web viewers. Relight+deepzoom, Relight+tarzoom, Relight+itarzoom use a tiled approach suitable for exploring large images on the web (requires python and pyvips installed).

View the RTI

After the RTI has been created you can use the 'cast' icon in the task list to open the RTI viewer in the browser, using a minimal web server accessible at localhost:8080.

Export Normals

If you installed python, set up the path in the Preferences dialog, along with the python libraries numpy you will be able to estimate the normal map for the dataset.

Clone this wiki locally