Spectrums and Spectral Images

Spectral aspect of the light

Light is a wave traveling in space. Its wavelength is the length of each oscillation (Figure A). 

The wavelength defines the color that is perceived : a wave with a wavelength of 400nm will be perceived as blue and a wave with a wavelength of 700nm will be perceived as red (Figure B). 

Some wavelengths cannot be perceived by the human eye (infrared above 830 nm, uv and x-rays below 360 nm).


figure A 

figure B

https://www.chem.fsu.edu/chemlab/chm1045/estructure.html

Most light sources do not emit light at a single wavelength but they emit a combination of multiple wavelengths with different intensities. All of these wavelengths make up the light spectrum. 


intensity as a function of wavelength, example of a spectrum perceived as blue

The way we perceive the appearance of materials also depends on their spectral characteristics : the material reflects, diffracts and absorbs the light depending on its wavelength. Some examples of situations where the spectral characteristics of a material has an influence on its appearance could be :



Example 1 : metameric materials under a D65 illuminant (left) and a F10 illuminant (right)

Example 2 : interference in soap bubbles 

Example 3 : dispersion in a diamond or in prisms

Spectrums in the Predict Suite

    In the Predict Suite, spectrums are required to define materials, lights, and sensors. Spectrums can be defined in various ways (see details bellow). 


Spectrum fields are represented by a colored rectangle representing the intensity of each wavelength. You can click anywhere on the spectrum field or the "..." button to open the spectrum inspector.

A small square on the left of the spectrum field contains the spectrum preview color. The preview color is only an approximation of the color that can be generated by this spectrum, be aware that this color depends on the sensor that is used, and on the general context in which the spectrum is used : for instance, a material spectrum depends on the light that illuminates it (D65 by default).


You can change the illuminant spectrum that is used to compute the color preview for material spectrums in the PredictSuite preferences, section Matter Settings.

Spectrum Inspector

The spectrum inspector is built as follow : 

Spectrum definitions

Spectrums can be defined with the following types :


The xml file should be formatted as follow: 

<material type="Spectral">

  <entry k="1.306" n="1.422" wavelength="206.64" />

<!-- ... -->

  <entry k="15.5" n="1.205" wavelength="2479.7" />

</material>

Each entry contains the sampled quantities at the specified wavelength in nanometer.
The "wavelength" is a reserved and mandatory keyword. For the corresponding quantities, there exists common keywords such as "n", "k", "value", "x", "y", "z", "r", "g", "b" but custom ones are accepted too. If the sampling is the same for multiple quantities, they can be put inside the same <entry>.


If the "Infinite Range" toggle is not enabled, the value will be returned inside the range only and the spectrum will return 0 outside the range,


See section bellow on how to edit the points.

Editing the spectrum

Spectrums of type "Raw" can be edited directly in the spectrum curve view.


A raw spectrum is defined by a list of control points : these points are represented in the view by squares. Control points can be :

When tangent points are required, they are represented by dots in the view and linked to their associated control points by dotted lines. Tangent points can only be moved, they cannot be selected or added.


When dragging points, the position of the point on the wavelength (horizontal) axis will be limited between the two adjacent points : points need to be ordered in ascending order along the wavelength axis.

As a reminder, the "Info" button above the curve reveals details on how to navigate inside the spectrum preview.

Any kind of spectrum can be converted to a raw, editable spectrum using the conversion button in the spectrum inspector. The possible conversions are :

Figure A - Original curve : procedural RGB color

Figure B - Raw curve : 199 points

Figure C - Simplified curve (1%) : 33 points

Figure D - Simplified curve (5%) : 24 points

Navigating inside the spectrum preview

When hovering over the spectrum curve in the spectrum inspector, a vertical line highlights the value of the spectrum at the given wavelength. The value is displayed on the top line of the graph using the following format : (wavelength, value).

You can zoom on a specific zone of the spectrum curve by click-and-dragging to select a rectangle on the curve. 

You can also zoom in and out using the mouse scroll wheel.

When the curve is not entirely displayed on screen, a "Reset" button is available bellow the curve to reset to the original scale.

When the "Log Scale" toggle bellow the curve is enabled, the curve is displayed using a log scale. In that case, the grid behind the curve represent the tenths percentages of the maximum value.

Spectral Images in the Predict Suite

In the Predict Suite, spectral images are required to define some lights intensity and polarization : 


A spectral image is defined with a texture in the OpenEXR format. 

EXR files are image files with arbitrary depth where each depth component is called a layer and identified with a string label. Usual labels are the "R", "G", "B" ones used for color images. For spectral images, the Predictive Suite only recognizes layers with labels in the form "<wavelength>.L" with the wavelength in nanometer, for instance "550.35.L".


The intensity of radiometric area lights and skyboxes can also be defined with an RGB image that is converted to a spectral image by Predictive Engine. In this case, a spectral range and a number of channels can be specified to parameterize the conversion process.