There are some specific considerations to be aware of with this DLL:

1. The Radiant Imaging (RI) file format supports two inputs for the SpectralContent value: Monochrome and XYZ (Tristimulus). However, the DLL currently only supports monochromatic scattering calculations, so any input file with Tristimulus BSDF data will be interpreted as an input file with 3 individual monochromatic scattering distributions. The user may then choose which of the 3 distributions to apply to the surface via the Tristimulus input parameter in the Coat/Scatter tab of the Object properties dialog box:

Tristimulus input parameter for tabular BSDF DLL

The input value for this parameter must be an integer (and will be truncated if not). For a Tristimulus data file, a value of 0 corresponds to Tristimulus X data, a value of 1 corresponds to Tristimulus Y data, and a value of 2 corresponds to the Tristimulus Z data; ZEMAX will ignore the scattering distribution and return only the specular ray if the value is less than 0 or greater than 2. For a Monochrome data file, ZEMAX will ignore the scattering distribution and return only the specular ray if a value other than 0 is provided for this parameter.

2. The RI file format supports two inputs for the ScatterType value: BRDF and BTDF. However, this data is currently not used by the DLL; whether the surface scatters in reflection or transmission will be determined by the transmission properties of the surface (e.g. the coating on the surface). The DLL may be used to scatter both in transmission and reflection simultaneously; however the DLL currently assumes that the scattering distribution is the same for both directions.

3. The RI file format allows for measurements at multiple rotations of the sample. However, the DLL currently only allows for a single rotation angle, i.e. the DLL currently only supports isotropic scattering calculations. Thus, in the input file the Number of rotation angles must be set equal to 1, and the value for the rotation angle must be set equal to 0. The DLL also limits the Number of incident angles to be less than 15, the Number of azimuthal angles to be less than 30, and the Number of radial angles to be less than 100. If you require these limits to be increased, please contact ZEMAX technical support.

Finally, it is important to note that the DLL does not interpolate any of the input data for the BSDF or TIS values. Interpolation is performed to correlate the random numbers selected in the DLL with the scattering angles, analogous to the determination of scattering angles in the Knowledge Base article “How to Create a User-Defined Scattering Function”. Since interpolation is performed when correlating the scattering angles with the random numbers, scattering can (and in general will) occur at angles other than the input angles provided in the data file. However, this correlation requires the use of integrated data sets (analogous to the functions Iq and IN in the above article) which will only exist at discrete values of the incident, azimuthal, and radial angles, since the input data are only provided at discrete values for these angles. In the DLL, the closest angle values are chosen to determine the appropriate data sets for calculating the scatter angles. Thus, when using the DLL you must ensure that the input data have sufficient angular resolution to describe any variations of importance in the BSDF data.