In the Predict Suite, spectrums are required to define materials, lights, and sensors. Spectrums can be defined in various ways.
The spectrum editor opens by either double-clicking on a tabulated_spectrum node or by selecting such a node and pressing the "Edit Spectrum" in the inspector.
The main panel of the spectrum inspector is built as follow :
The spectrum is defined first by a kind which governs which definitions are available and how colorimetric information are computed (1),
Then, the spectrum is created either by loading from a file, from a model or a preset (2),
Post-process operations are applied to the spectrum (3),
Finally, an extrapolation policy (4) for out of bounds value is chosen :
clamp : the closest boundary value is used
constant : the value from the default field is applied
Next to the panel, a graph of the spectrum (1) and the corresponding colorimetric information (2) are displayed.
Spectrums can be defined either by importing a measure, using a preset or using a model. For all models apart from Tabulated, the spectral data are resampled from 360 to 830nm with 1nm step. At any time during the creation process, the current spectrum may be exported to a CSV file. Some models are restricted to a specific kind of spectrum.
Preset : a library of preset spectra is available and depends on the selected Kind.
Emission spectra were obtained from the CIE : daylight, fluorescent, high pressure discharge and LED light souces are included.
There is no item in the library for reflectance and IOR spectra yet.
Import : a spectrum may be imported either from a CSV file or from a file in the Predict legacy XML format.
CSV : a simple text file with wavelengths and values separated by a delimiter (usually a comma) in rows or columns order. Additional field are required to describe the data layout and extract them correctly. Finally, select which row or column to be used if the file contains multiple spectra.
Delimiter : the symbol that separates values
Decimal : the symbol to indicate the position of the decimal point
Orientation : indicates whether the spectral values are given in rows or columns
Wavelength index : row or column index of the wavelengths
First data index : the starting index of the spectral values
Predict Legacy XML : the file format used in Predict Suite V1. It is 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. If the wavelength is the same for multiple quantities, they can be put inside the same <entry>.
Constant (Reflectance/IOR) : the spectrum returns a given value for every wavelength.
Blackbody (Emission): the spectrum is a black body at a given temperature,
Daylight (Emission): the spectrum is of a CIE Daylight illuminant at a given temperature (from 4000K to 25000K)
Cauchy (IOR) : the spectrum is defined by the following equation, with b in μm² and c in μm^4 :
Abbe Cauchy (IOR) : the spectrum is defined by the same equation as the Cauchy spectrum, but its IOR and coefficients are defined by the IOR nd at 587.6nm and the "Abbe Number". You can find more details on how the coefficients are computed here : https://ian-macmillan.com/iPhone-Camera-Model/ . You can find usual values here : https://en.wikipedia.org/wiki/Abbe_number#/media/File:Abbe-diagram_2.svg.
Sellmeier (IOR) : the spectrum is defined by the following equation, where the Bi coefficients don't have a dimension and the Ci coefficients are given in μm² :
Gaussian (Emission/Reflectance): the spectrum is defined by the equation of a Gaussian distribution which is usually a good approximation for colored LEDs. The parameters are the amplitude, center wavelength and width in nanometers.
Box (Reflectance): the spectrum is defined as a box with sigmoid slope. It may be used to defined a variety of spectral filters.
Inner value : defines the value at the center
Outer value : defines the value on the edges
Center nm : defines the location of the center
Sigma : defines the steepness of the slopes (lower is steeper).
Width nm : defines the with of the box
Step (Reflectance): the spectrum is defined as a box with sigmoid slope. It may be used to defined a variety of spectral filters.
Right : defines the value on the right (red side)
Outer value : defines the value on the left (blue side
Center nm : defines the location of the center
Sigma : defines the steepness of the slopes (lower is steeper).
Tabulated : the spectrum is given manually, value per value in a table. This is the model that loaded spectra are converted to. If you want to create a spectrum by hand, prefer using Control Points.
Control points : the spectrum is defined by control points which handles can be dragged directly over the spectrum graph or by setting the values in the table. Points are created by double clicking on an empty spot and removed by double clicking on their handle. The interpolation mode may be either Linear or Cubic.