# BSDF converter toolbox¶

This toolbox allows importing BSDF data from measurement tools into Ocean. Various input formats will be supported in the future. Currently, it only supports a sparse CSV table format.

You may find this tool in the File > Import menu. It is enabled only when a scene is open. The BSDFs are imported as new materials in the Objects toolbox.

## Sparse CSV table BRDF¶

This formats use the CSV table formatting standard defined in RFC 4180

A sample file is available for download here : bsdfconverter-sparse-example.csv

The file may start by an arbitrary number of lines containing metadata. Only one tag is recognized, and used as the material name. It can be “sample name”, “name” or “sample”, and its value is read on the cell on the right on the next row. The tag name case is ignored, and may be followed by a colon character. For instance, “Sample Name:” is valid.

Other tags are ignored, and metadata lines are skipped until the data header row is detected.

The data header row identifies the data columns and precedes the data rows. Column names are case insensitive. A valid data header must contain at least these columns:

• theta-in : The incident theta angle
• theta-out : The scattered theta angle
• phi-in : The incident phi angle
• phi-out : The scattered phi angle
• at least one wavelength column

Wavelength column names are made of the wavelength value with a unit, which must be m, mm, µm, um or nm. The unit is mandatory.

Other columns are ignored.

BRDF values are then given on the following rows, until the end of file. Each row correspond to a set of angles in degrees and the corresponding spectral BRDF values.

Several files can be processed at once (one per material). The material name is read in the metadata, if none is found, the file name is used instead.

The H and D steps parameters define the resolution of the imported BSDF as described in Rusinkiewicz table BSDF.

The Remove specular option allows filtering out the specular peak from the measured data. The angle parameter defines the angular radius of the specular peak.